From 717f75c857d61920d5d8a0a077bb1340abb9d20e Mon Sep 17 00:00:00 2001 From: eecavanna Date: Sun, 29 Oct 2023 13:17:54 -0700 Subject: [PATCH] Deploy v1.0.6 --- assets/{arc-f4b03a28.js => arc-1761d8ed.js} | 2 +- ...de03.js => c4Diagram-d0fbc5ce-6576756d.js} | 2 +- ...6.js => classDiagram-936ed81e-8c2c2b2f.js} | 2 +- ...s => classDiagram-v2-c3cb15f1-527aa3a5.js} | 2 +- ...b67.js => createText-62fc7601-0312dc07.js} | 2 +- ...795ea1c8.js => edges-f2ad444c-7df4797c.js} | 2 +- ...ceb2.js => erDiagram-9d236eb7-5f4da687.js} | 2 +- ...899fd0a.js => flowDb-1972c806-d31c77fd.js} | 2 +- ...72.js => flowDiagram-7ea5b25a-802bdd2f.js} | 2 +- assets/flowDiagram-v2-855bc5b3-3d40ebb1.js | 1 + assets/flowDiagram-v2-855bc5b3-908b141e.js | 1 - ...chart-elk-definition-abe16c3d-82de085c.js} | 2 +- ...e.js => ganttDiagram-9b5ea136-f59873c3.js} | 2 +- ...s => gitGraphDiagram-99d0ae7c-9ea9e35b.js} | 2 +- ...7c73707d.js => index-2c4b9a3b-bbd91aa2.js} | 2 +- .../{index-b371ab76.js => index-e0ff10fa.js} | 66 +++++++++---------- ...ec.js => infoDiagram-736b4530-7edd3494.js} | 2 +- ...js => journeyDiagram-df861f2b-03c13e5c.js} | 2 +- ...{layout-fa84e821.js => layout-608b290b.js} | 2 +- assets/{line-63c0ea4d.js => line-434e5c73.js} | 2 +- ...{linear-ccca5fef.js => linear-3615363e.js} | 2 +- ...> mindmap-definition-beec6740-13a55f61.js} | 2 +- ...141.js => pieDiagram-dbbf0591-44bd3b4a.js} | 2 +- ...s => quadrantDiagram-4d7f4fd6-5d0384f4.js} | 2 +- ...> requirementDiagram-6fc4c22a-2b6b8c39.js} | 2 +- ....js => sankeyDiagram-8f13d901-8196c28d.js} | 2 +- ...s => sequenceDiagram-b655622a-698172bb.js} | 2 +- ...8.js => stateDiagram-59f0c015-0ccbe740.js} | 2 +- ...s => stateDiagram-v2-2b26beab-4af09cbf.js} | 2 +- ...a42e0c3.js => styles-080da4f6-3483b67d.js} | 2 +- ...2afae50.js => styles-3dcbcfbf-c6ba177b.js} | 2 +- ...bbab345.js => styles-9c745c82-5d32dd25.js} | 2 +- ....js => svgDrawCommon-4835440b-b3589b66.js} | 2 +- ... timeline-definition-5b62e21b-fc0193a6.js} | 2 +- ...js => xychartDiagram-2b33534f-91f0354e.js} | 2 +- index.html | 2 +- 36 files changed, 67 insertions(+), 67 deletions(-) rename assets/{arc-f4b03a28.js => arc-1761d8ed.js} (98%) rename assets/{c4Diagram-d0fbc5ce-88c6de03.js => c4Diagram-d0fbc5ce-6576756d.js} (99%) rename assets/{classDiagram-936ed81e-f8506dd6.js => classDiagram-936ed81e-8c2c2b2f.js} (97%) rename assets/{classDiagram-v2-c3cb15f1-bb733d7d.js => classDiagram-v2-c3cb15f1-527aa3a5.js} (93%) rename assets/{createText-62fc7601-6b649b67.js => createText-62fc7601-0312dc07.js} (99%) rename assets/{edges-f2ad444c-795ea1c8.js => edges-f2ad444c-7df4797c.js} (99%) rename assets/{erDiagram-9d236eb7-e170ceb2.js => erDiagram-9d236eb7-5f4da687.js} (99%) rename assets/{flowDb-1972c806-1899fd0a.js => flowDb-1972c806-d31c77fd.js} (99%) rename assets/{flowDiagram-7ea5b25a-2ec2ff72.js => flowDiagram-7ea5b25a-802bdd2f.js} (97%) create mode 100644 assets/flowDiagram-v2-855bc5b3-3d40ebb1.js delete mode 100644 assets/flowDiagram-v2-855bc5b3-908b141e.js rename assets/{flowchart-elk-definition-abe16c3d-57c0d888.js => flowchart-elk-definition-abe16c3d-82de085c.js} (99%) rename assets/{ganttDiagram-9b5ea136-8ba8104e.js => ganttDiagram-9b5ea136-f59873c3.js} (99%) rename assets/{gitGraphDiagram-99d0ae7c-54d7e10a.js => gitGraphDiagram-99d0ae7c-9ea9e35b.js} (99%) rename assets/{index-2c4b9a3b-7c73707d.js => index-2c4b9a3b-bbd91aa2.js} (97%) rename assets/{index-b371ab76.js => index-e0ff10fa.js} (76%) rename assets/{infoDiagram-736b4530-81b7efec.js => infoDiagram-736b4530-7edd3494.js} (99%) rename assets/{journeyDiagram-df861f2b-ba484b2a.js => journeyDiagram-df861f2b-03c13e5c.js} (99%) rename assets/{layout-fa84e821.js => layout-608b290b.js} (99%) rename assets/{line-63c0ea4d.js => line-434e5c73.js} (93%) rename assets/{linear-ccca5fef.js => linear-3615363e.js} (98%) rename assets/{mindmap-definition-beec6740-4405b0e1.js => mindmap-definition-beec6740-13a55f61.js} (99%) rename assets/{pieDiagram-dbbf0591-d4cca141.js => pieDiagram-dbbf0591-44bd3b4a.js} (99%) rename assets/{quadrantDiagram-4d7f4fd6-b5f47b25.js => quadrantDiagram-4d7f4fd6-5d0384f4.js} (99%) rename assets/{requirementDiagram-6fc4c22a-65ae7e79.js => requirementDiagram-6fc4c22a-2b6b8c39.js} (99%) rename assets/{sankeyDiagram-8f13d901-dc439297.js => sankeyDiagram-8f13d901-8196c28d.js} (99%) rename assets/{sequenceDiagram-b655622a-838eb6c2.js => sequenceDiagram-b655622a-698172bb.js} (99%) rename assets/{stateDiagram-59f0c015-3ba775a8.js => stateDiagram-59f0c015-0ccbe740.js} (98%) rename assets/{stateDiagram-v2-2b26beab-78fc96ed.js => stateDiagram-v2-2b26beab-4af09cbf.js} (93%) rename assets/{styles-080da4f6-2a42e0c3.js => styles-080da4f6-3483b67d.js} (98%) rename assets/{styles-3dcbcfbf-02afae50.js => styles-3dcbcfbf-c6ba177b.js} (99%) rename assets/{styles-9c745c82-7bbab345.js => styles-9c745c82-5d32dd25.js} (99%) rename assets/{svgDrawCommon-4835440b-3fa5d101.js => svgDrawCommon-4835440b-b3589b66.js} (95%) rename assets/{timeline-definition-5b62e21b-2e009dcd.js => timeline-definition-5b62e21b-fc0193a6.js} (99%) rename assets/{xychartDiagram-2b33534f-9913587a.js => xychartDiagram-2b33534f-91f0354e.js} (99%) diff --git a/assets/arc-f4b03a28.js b/assets/arc-1761d8ed.js similarity index 98% rename from assets/arc-f4b03a28.js rename to assets/arc-1761d8ed.js index 71430e7..9805dba 100644 --- a/assets/arc-f4b03a28.js +++ b/assets/arc-1761d8ed.js @@ -1 +1 @@ -import{w as ln,c as W}from"./path-53f90ab3.js";import{aW as an,aX as $,aY as w,aZ as rn,a_ as y,V as on,a$ as B,b0 as _,b1 as un,b2 as t,b3 as sn,b4 as tn,b5 as fn}from"./index-b371ab76.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function mn(l){return l.endAngle}function pn(l){return l&&l.padAngle}function dn(l,h,E,q,v,A,X,a){var I=E-l,i=q-h,n=X-v,m=a-A,r=m*I-n*i;if(!(r*ru*u+Z*Z&&(S=P,V=d),{cx:S,cy:V,x01:-n,y01:-m,x11:S*(v/T-1),y11:V*(v/T-1)}}function vn(){var l=cn,h=yn,E=W(0),q=null,v=gn,A=mn,X=pn,a=null,I=ln(i);function i(){var n,m,r=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-rn,c=A.apply(this,arguments)-rn,Y=un(c-f),o=c>f;if(a||(a=n=I()),sy))a.moveTo(0,0);else if(Y>on-y)a.moveTo(s*$(f),s*w(f)),a.arc(0,0,s,f,c,!o),r>y&&(a.moveTo(r*$(c),r*w(c)),a.arc(0,0,r,c,f,o));else{var p=f,g=c,R=f,T=c,b=Y,O=Y,S=X.apply(this,arguments)/2,V=S>y&&(q?+q.apply(this,arguments):B(r*r+s*s)),P=_(un(s-r)/2,+E.apply(this,arguments)),d=P,x=P,e,u;if(V>y){var Z=sn(V/r*w(S)),C=sn(V/s*w(S));(b-=Z*2)>y?(Z*=o?1:-1,R+=Z,T-=Z):(b=0,R=T=(f+c)/2),(O-=C*2)>y?(C*=o?1:-1,p+=C,g-=C):(O=0,p=g=(f+c)/2)}var j=s*$(p),z=s*w(p),F=r*$(T),G=r*w(T);if(P>y){var H=s*$(g),J=s*w(g),L=r*$(R),M=r*w(R),D;if(Yy?x>y?(e=K(L,M,j,z,s,x,o),u=K(H,J,F,G,s,x,o),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(b>y)?a.lineTo(F,G):d>y?(e=K(F,G,H,J,r,-d,o),u=K(j,z,L,M,r,-d,o),a.lineTo(e.cx+e.x01,e.cy+e.y01),du*u+Z*Z&&(S=P,V=d),{cx:S,cy:V,x01:-n,y01:-m,x11:S*(v/T-1),y11:V*(v/T-1)}}function vn(){var l=cn,h=yn,E=W(0),q=null,v=gn,A=mn,X=pn,a=null,I=ln(i);function i(){var n,m,r=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-rn,c=A.apply(this,arguments)-rn,Y=un(c-f),o=c>f;if(a||(a=n=I()),sy))a.moveTo(0,0);else if(Y>on-y)a.moveTo(s*$(f),s*w(f)),a.arc(0,0,s,f,c,!o),r>y&&(a.moveTo(r*$(c),r*w(c)),a.arc(0,0,r,c,f,o));else{var p=f,g=c,R=f,T=c,b=Y,O=Y,S=X.apply(this,arguments)/2,V=S>y&&(q?+q.apply(this,arguments):B(r*r+s*s)),P=_(un(s-r)/2,+E.apply(this,arguments)),d=P,x=P,e,u;if(V>y){var Z=sn(V/r*w(S)),C=sn(V/s*w(S));(b-=Z*2)>y?(Z*=o?1:-1,R+=Z,T-=Z):(b=0,R=T=(f+c)/2),(O-=C*2)>y?(C*=o?1:-1,p+=C,g-=C):(O=0,p=g=(f+c)/2)}var j=s*$(p),z=s*w(p),F=r*$(T),G=r*w(T);if(P>y){var H=s*$(g),J=s*w(g),L=r*$(R),M=r*w(R),D;if(Yy?x>y?(e=K(L,M,j,z,s,x,o),u=K(H,J,F,G,s,x,o),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(b>y)?a.lineTo(F,G):d>y?(e=K(F,G,H,J,r,-d,o),u=K(j,z,L,M,r,-d,o),a.lineTo(e.cx+e.x01,e.cy+e.y01),d"u"&&(D.yylloc={});var Ht=D.yylloc;u.push(Ht);var ke=D.options&&D.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ae(){var X;return X=g.pop()||D.lex()||ae,typeof X!="number"&&(X instanceof Array&&(g=X,X=g.pop()),X=x.symbols_[X]||X),X}for(var M,kt,N,qt,Ct={},Mt,z,re,Lt;;){if(kt=m[m.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((M===null||typeof M>"u")&&(M=Ae()),N=Tt[kt]&&Tt[kt][M]),typeof N>"u"||!N.length||!N[0]){var Gt="";Lt=[];for(Mt in Tt[kt])this.terminals_[Mt]&&Mt>Ee&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Gt="Parse error on line "+(Et+1)+`: +import{s as Ce,g as we,a as Oe,b as Te,c as Dt,d as ue,e as Re,f as wt,h as Nt,l as le,i as De,w as Se,j as Kt,k as oe,m as Pe}from"./index-e0ff10fa.js";import{d as Me,g as Le}from"./svgDrawCommon-4835440b-b3589b66.js";var Yt=function(){var e=function(bt,_,x,m){for(x=x||{},m=bt.length;m--;x[bt[m]]=_);return x},t=[1,24],a=[1,25],o=[1,26],l=[1,27],i=[1,28],s=[1,63],r=[1,64],n=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],E=[1,29],O=[1,30],R=[1,31],S=[1,32],L=[1,33],Y=[1,34],Q=[1,35],H=[1,36],q=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],$=[1,42],tt=[1,43],et=[1,44],it=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],lt=[1,51],ot=[1,52],ct=[1,53],ht=[1,54],ut=[1,55],dt=[1,56],ft=[1,57],pt=[1,58],yt=[1,59],gt=[1,60],At=[14,42],Vt=[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],Ot=[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],k=[1,83],A=[1,84],C=[1,85],w=[12,14,42],ne=[12,14,33,42],Pt=[12,14,33,42,76,77,79,80],mt=[12,33],zt=[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],Xt={trace:function(){},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:function(_,x,m,g,T,u,Tt){var y=u.length-1;switch(T){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(u[y-3]);break;case 19:g.setTitle(u[y].substring(6)),this.$=u[y].substring(6);break;case 20:g.setAccDescription(u[y].substring(15)),this.$=u[y].substring(15);break;case 21:this.$=u[y].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=u[y].trim(),g.setAccDescription(this.$);break;case 28:case 29:u[y].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 30:g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 31:u[y].splice(2,0,"CONTAINER"),g.addContainerBoundary(...u[y]),this.$=u[y];break;case 32:g.addDeploymentNode("node",...u[y]),this.$=u[y];break;case 33:g.addDeploymentNode("nodeL",...u[y]),this.$=u[y];break;case 34:g.addDeploymentNode("nodeR",...u[y]),this.$=u[y];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...u[y]),this.$=u[y];break;case 40:g.addPersonOrSystem("external_person",...u[y]),this.$=u[y];break;case 41:g.addPersonOrSystem("system",...u[y]),this.$=u[y];break;case 42:g.addPersonOrSystem("system_db",...u[y]),this.$=u[y];break;case 43:g.addPersonOrSystem("system_queue",...u[y]),this.$=u[y];break;case 44:g.addPersonOrSystem("external_system",...u[y]),this.$=u[y];break;case 45:g.addPersonOrSystem("external_system_db",...u[y]),this.$=u[y];break;case 46:g.addPersonOrSystem("external_system_queue",...u[y]),this.$=u[y];break;case 47:g.addContainer("container",...u[y]),this.$=u[y];break;case 48:g.addContainer("container_db",...u[y]),this.$=u[y];break;case 49:g.addContainer("container_queue",...u[y]),this.$=u[y];break;case 50:g.addContainer("external_container",...u[y]),this.$=u[y];break;case 51:g.addContainer("external_container_db",...u[y]),this.$=u[y];break;case 52:g.addContainer("external_container_queue",...u[y]),this.$=u[y];break;case 53:g.addComponent("component",...u[y]),this.$=u[y];break;case 54:g.addComponent("component_db",...u[y]),this.$=u[y];break;case 55:g.addComponent("component_queue",...u[y]),this.$=u[y];break;case 56:g.addComponent("external_component",...u[y]),this.$=u[y];break;case 57:g.addComponent("external_component_db",...u[y]),this.$=u[y];break;case 58:g.addComponent("external_component_queue",...u[y]),this.$=u[y];break;case 60:g.addRel("rel",...u[y]),this.$=u[y];break;case 61:g.addRel("birel",...u[y]),this.$=u[y];break;case 62:g.addRel("rel_u",...u[y]),this.$=u[y];break;case 63:g.addRel("rel_d",...u[y]),this.$=u[y];break;case 64:g.addRel("rel_l",...u[y]),this.$=u[y];break;case 65:g.addRel("rel_r",...u[y]),this.$=u[y];break;case 66:g.addRel("rel_b",...u[y]),this.$=u[y];break;case 67:u[y].splice(0,1),g.addRel("rel",...u[y]),this.$=u[y];break;case 68:g.updateElStyle("update_el_style",...u[y]),this.$=u[y];break;case 69:g.updateRelStyle("update_rel_style",...u[y]),this.$=u[y];break;case 70:g.updateLayoutConfig("update_layout_config",...u[y]),this.$=u[y];break;case 71:this.$=[u[y]];break;case 72:u[y].unshift(u[y-1]),this.$=u[y];break;case 73:case 75:this.$=u[y].trim();break;case 74:let Et={};Et[u[y-1].trim()]=u[y].trim(),this.$=Et;break;case 76:this.$="";break}},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:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{14:[1,74]},e(At,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt}),e(At,[2,14]),e(Vt,[2,16],{12:[1,76]}),e(At,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:v,77:k,79:A,80:C},{35:86,75:81,76:v,77:k,79:A,80:C},{35:87,75:81,76:v,77:k,79:A,80:C},{35:88,75:81,76:v,77:k,79:A,80:C},{35:89,75:81,76:v,77:k,79:A,80:C},{35:90,75:81,76:v,77:k,79:A,80:C},{35:91,75:81,76:v,77:k,79:A,80:C},{35:92,75:81,76:v,77:k,79:A,80:C},{35:93,75:81,76:v,77:k,79:A,80:C},{35:94,75:81,76:v,77:k,79:A,80:C},{35:95,75:81,76:v,77:k,79:A,80:C},{35:96,75:81,76:v,77:k,79:A,80:C},{35:97,75:81,76:v,77:k,79:A,80:C},{35:98,75:81,76:v,77:k,79:A,80:C},{35:99,75:81,76:v,77:k,79:A,80:C},{35:100,75:81,76:v,77:k,79:A,80:C},{35:101,75:81,76:v,77:k,79:A,80:C},{35:102,75:81,76:v,77:k,79:A,80:C},{35:103,75:81,76:v,77:k,79:A,80:C},{35:104,75:81,76:v,77:k,79:A,80:C},e(w,[2,59]),{35:105,75:81,76:v,77:k,79:A,80:C},{35:106,75:81,76:v,77:k,79:A,80:C},{35:107,75:81,76:v,77:k,79:A,80:C},{35:108,75:81,76:v,77:k,79:A,80:C},{35:109,75:81,76:v,77:k,79:A,80:C},{35:110,75:81,76:v,77:k,79:A,80:C},{35:111,75:81,76:v,77:k,79:A,80:C},{35:112,75:81,76:v,77:k,79:A,80:C},{35:113,75:81,76:v,77:k,79:A,80:C},{35:114,75:81,76:v,77:k,79:A,80:C},{35:115,75:81,76:v,77:k,79:A,80:C},{20:116,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:v,77:k,79:A,80:C},{35:120,75:81,76:v,77:k,79:A,80:C},{35:121,75:81,76:v,77:k,79:A,80:C},{35:122,75:81,76:v,77:k,79:A,80:C},{35:123,75:81,76:v,77:k,79:A,80:C},{35:124,75:81,76:v,77:k,79:A,80:C},{35:125,75:81,76:v,77:k,79:A,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(At,[2,15]),e(Vt,[2,17],{21:22,19:130,22:t,23:a,24:o,26:l,28:i}),e(At,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:a,24:o,26:l,28:i,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:R,47:S,48:L,49:Y,50:Q,51:H,52:q,53:G,54:K,55:J,56:Z,57:$,58:tt,59:et,60:it,61:nt,62:st,63:at,64:rt,65:lt,66:ot,67:ct,68:ht,69:ut,70:dt,71:ft,72:pt,73:yt,74:gt}),e(Ot,[2,21]),e(Ot,[2,22]),e(w,[2,39]),e(ne,[2,71],{75:81,35:132,76:v,77:k,79:A,80:C}),e(Pt,[2,73]),{78:[1,133]},e(Pt,[2,75]),e(Pt,[2,76]),e(w,[2,40]),e(w,[2,41]),e(w,[2,42]),e(w,[2,43]),e(w,[2,44]),e(w,[2,45]),e(w,[2,46]),e(w,[2,47]),e(w,[2,48]),e(w,[2,49]),e(w,[2,50]),e(w,[2,51]),e(w,[2,52]),e(w,[2,53]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(w,[2,60]),e(w,[2,61]),e(w,[2,62]),e(w,[2,63]),e(w,[2,64]),e(w,[2,65]),e(w,[2,66]),e(w,[2,67]),e(w,[2,68]),e(w,[2,69]),e(w,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(mt,[2,28]),e(mt,[2,29]),e(mt,[2,30]),e(mt,[2,31]),e(mt,[2,32]),e(mt,[2,33]),e(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Vt,[2,18]),e(At,[2,38]),e(ne,[2,72]),e(Pt,[2,74]),e(w,[2,24]),e(w,[2,35]),e(zt,[2,25]),e(zt,[2,26],{12:[1,138]}),e(zt,[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:function(_,x){if(x.recoverable)this.trace(_);else{var m=new Error(_);throw m.hash=x,m}},parse:function(_){var x=this,m=[0],g=[],T=[null],u=[],Tt=this.table,y="",Et=0,se=0,Ee=2,ae=1,ve=u.slice.call(arguments,1),D=Object.create(this.lexer),vt={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(vt.yy[Qt]=this.yy[Qt]);D.setInput(_,vt.yy),vt.yy.lexer=D,vt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Ht=D.yylloc;u.push(Ht);var ke=D.options&&D.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ae(){var X;return X=g.pop()||D.lex()||ae,typeof X!="number"&&(X instanceof Array&&(g=X,X=g.pop()),X=x.symbols_[X]||X),X}for(var M,kt,N,qt,Ct={},Mt,z,re,Lt;;){if(kt=m[m.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((M===null||typeof M>"u")&&(M=Ae()),N=Tt[kt]&&Tt[kt][M]),typeof N>"u"||!N.length||!N[0]){var Gt="";Lt=[];for(Mt in Tt[kt])this.terminals_[Mt]&&Mt>Ee&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Gt="Parse error on line "+(Et+1)+`: `+D.showPosition()+` Expecting `+Lt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Gt="Parse error on line "+(Et+1)+": Unexpected "+(M==ae?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Gt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:Ht,expected:Lt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+M);switch(N[0]){case 1:m.push(M),T.push(D.yytext),u.push(D.yylloc),m.push(N[1]),M=null,se=D.yyleng,y=D.yytext,Et=D.yylineno,Ht=D.yylloc;break;case 2:if(z=this.productions_[N[1]][1],Ct.$=T[T.length-z],Ct._$={first_line:u[u.length-(z||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(z||1)].first_column,last_column:u[u.length-1].last_column},ke&&(Ct._$.range=[u[u.length-(z||1)].range[0],u[u.length-1].range[1]]),qt=this.performAction.apply(Ct,[y,se,Et,vt.yy,N[1],T,u].concat(ve)),typeof qt<"u")return qt;z&&(m=m.slice(0,-1*z*2),T=T.slice(0,-1*z),u=u.slice(0,-1*z)),m.push(this.productions_[N[1]][0]),T.push(Ct.$),u.push(Ct._$),re=Tt[m[m.length-2]][m[m.length-1]],m.push(re);break;case 3:return!0}}return!0}},me=function(){var bt={EOF:1,parseError:function(x,m){if(this.yy.parser)this.yy.parser.parseError(x,m);else throw new Error(x)},setInput:function(_,x){return this.yy=x||this.yy||{},this._input=_,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},input:function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var x=_.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},unput:function(_){var x=_.length,m=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var g=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),m.length-1&&(this.yylineno-=m.length-1);var T=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:m?(m.length===g.length?this.yylloc.first_column:0)+g[g.length-m.length].length-m[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(_){this.unput(this.match.slice(_))},pastInput:function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var _=this.pastInput(),x=new Array(_.length+1).join("-");return _+this.upcomingInput()+` diff --git a/assets/classDiagram-936ed81e-f8506dd6.js b/assets/classDiagram-936ed81e-8c2c2b2f.js similarity index 97% rename from assets/classDiagram-936ed81e-f8506dd6.js rename to assets/classDiagram-936ed81e-8c2c2b2f.js index e6b37af..b580080 100644 --- a/assets/classDiagram-936ed81e-f8506dd6.js +++ b/assets/classDiagram-936ed81e-8c2c2b2f.js @@ -1,2 +1,2 @@ -import{p as G,d as S,s as A}from"./styles-3dcbcfbf-02afae50.js";import{c as v,l as y,h as B,i as W,F as $,z as M,G as I}from"./index-b371ab76.js";import{G as O,l as P}from"./layout-fa84e821.js";import{l as X}from"./line-63c0ea4d.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";let H=0;const Y=function(i,a,t,o,p){const g=function(e){switch(e){case p.db.relationType.AGGREGATION:return"aggregation";case p.db.relationType.EXTENSION:return"extension";case p.db.relationType.COMPOSITION:return"composition";case p.db.relationType.DEPENDENCY:return"dependency";case p.db.relationType.LOLLIPOP:return"lollipop"}};a.points=a.points.filter(e=>!Number.isNaN(e.y));const s=a.points,c=X().x(function(e){return e.x}).y(function(e){return e.y}).curve($),n=i.append("path").attr("d",c(s)).attr("id","edge"+H).attr("class","relation");let r="";o.arrowMarkerAbsolute&&(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,r=r.replace(/\(/g,"\\("),r=r.replace(/\)/g,"\\)")),t.relation.lineType==1&&n.attr("class","relation dashed-line"),t.relation.lineType==10&&n.attr("class","relation dotted-line"),t.relation.type1!=="none"&&n.attr("marker-start","url("+r+"#"+g(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&n.attr("marker-end","url("+r+"#"+g(t.relation.type2)+"End)");let f,h;const x=a.points.length;let b=M.calcLabelPosition(a.points);f=b.x,h=b.y;let u,m,w,k;if(x%2!==0&&x>1){let e=M.calcCardinalityPosition(t.relation.type1!=="none",a.points,a.points[0]),d=M.calcCardinalityPosition(t.relation.type2!=="none",a.points,a.points[x-1]);y.debug("cardinality_1_point "+JSON.stringify(e)),y.debug("cardinality_2_point "+JSON.stringify(d)),u=e.x,m=e.y,w=d.x,k=d.y}if(t.title!==void 0){const e=i.append("g").attr("class","classLabel"),d=e.append("text").attr("class","label").attr("x",f).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=d;const l=d.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",l.x-o.padding/2).attr("y",l.y-o.padding/2).attr("width",l.width+o.padding).attr("height",l.height+o.padding)}y.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",m).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",w).attr("y",k).attr("fill","black").attr("font-size","6").text(t.relationTitle2),H++},J=function(i,a,t,o){y.debug("Rendering class ",a,t);const p=a.id,g={id:p,label:a.id,width:0,height:0},s=i.append("g").attr("id",o.db.lookUpDomId(p)).attr("class","classGroup");let c;a.link?c=s.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let n=!0;a.annotations.forEach(function(d){const l=c.append("tspan").text("«"+d+"»");n||l.attr("dy",t.textHeight),n=!1});let r=C(a);const f=c.append("tspan").text(r).attr("class","title");n||f.attr("dy",t.textHeight);const h=c.node().getBBox().height;let x,b,u;if(a.members.length>0){x=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin/2).attr("y2",t.padding+h+t.dividerMargin/2);const d=s.append("text").attr("x",t.padding).attr("y",h+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");n=!0,a.members.forEach(function(l){_(d,l,n,t),n=!1}),b=d.node().getBBox()}if(a.methods.length>0){u=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin+b.height).attr("y2",t.padding+h+t.dividerMargin+b.height);const d=s.append("text").attr("x",t.padding).attr("y",h+2*t.dividerMargin+b.height+t.textHeight).attr("fill","white").attr("class","classText");n=!0,a.methods.forEach(function(l){_(d,l,n,t),n=!1})}const m=s.node().getBBox();var w=" ";a.cssClasses.length>0&&(w=w+a.cssClasses.join(" "));const e=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*t.padding).attr("height",m.height+t.padding+.5*t.dividerMargin).attr("class",w).node().getBBox().width;return c.node().childNodes.forEach(function(d){d.setAttribute("x",(e-d.getBBox().width)/2)}),a.tooltip&&c.insert("title").text(a.tooltip),x&&x.attr("x2",e),u&&u.attr("x2",e),g.width=e,g.height=m.height+t.padding+.5*t.dividerMargin,g},C=function(i){let a=i.id;return i.type&&(a+="<"+I(i.type)+">"),a},Z=function(i,a,t,o){y.debug("Rendering note ",a,t);const p=a.id,g={id:p,text:a.text,width:0,height:0},s=i.append("g").attr("id",p).attr("class","classGroup");let c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const n=JSON.parse(`"${a.text}"`).split(` +import{p as G,d as S,s as A}from"./styles-3dcbcfbf-c6ba177b.js";import{c as v,l as y,h as B,i as W,F as $,z as M,G as I}from"./index-e0ff10fa.js";import{G as O,l as P}from"./layout-608b290b.js";import{l as X}from"./line-434e5c73.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";let H=0;const Y=function(i,a,t,o,p){const g=function(e){switch(e){case p.db.relationType.AGGREGATION:return"aggregation";case p.db.relationType.EXTENSION:return"extension";case p.db.relationType.COMPOSITION:return"composition";case p.db.relationType.DEPENDENCY:return"dependency";case p.db.relationType.LOLLIPOP:return"lollipop"}};a.points=a.points.filter(e=>!Number.isNaN(e.y));const s=a.points,c=X().x(function(e){return e.x}).y(function(e){return e.y}).curve($),n=i.append("path").attr("d",c(s)).attr("id","edge"+H).attr("class","relation");let r="";o.arrowMarkerAbsolute&&(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,r=r.replace(/\(/g,"\\("),r=r.replace(/\)/g,"\\)")),t.relation.lineType==1&&n.attr("class","relation dashed-line"),t.relation.lineType==10&&n.attr("class","relation dotted-line"),t.relation.type1!=="none"&&n.attr("marker-start","url("+r+"#"+g(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&n.attr("marker-end","url("+r+"#"+g(t.relation.type2)+"End)");let f,h;const x=a.points.length;let b=M.calcLabelPosition(a.points);f=b.x,h=b.y;let u,m,w,k;if(x%2!==0&&x>1){let e=M.calcCardinalityPosition(t.relation.type1!=="none",a.points,a.points[0]),d=M.calcCardinalityPosition(t.relation.type2!=="none",a.points,a.points[x-1]);y.debug("cardinality_1_point "+JSON.stringify(e)),y.debug("cardinality_2_point "+JSON.stringify(d)),u=e.x,m=e.y,w=d.x,k=d.y}if(t.title!==void 0){const e=i.append("g").attr("class","classLabel"),d=e.append("text").attr("class","label").attr("x",f).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=d;const l=d.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",l.x-o.padding/2).attr("y",l.y-o.padding/2).attr("width",l.width+o.padding).attr("height",l.height+o.padding)}y.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",m).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",w).attr("y",k).attr("fill","black").attr("font-size","6").text(t.relationTitle2),H++},J=function(i,a,t,o){y.debug("Rendering class ",a,t);const p=a.id,g={id:p,label:a.id,width:0,height:0},s=i.append("g").attr("id",o.db.lookUpDomId(p)).attr("class","classGroup");let c;a.link?c=s.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let n=!0;a.annotations.forEach(function(d){const l=c.append("tspan").text("«"+d+"»");n||l.attr("dy",t.textHeight),n=!1});let r=C(a);const f=c.append("tspan").text(r).attr("class","title");n||f.attr("dy",t.textHeight);const h=c.node().getBBox().height;let x,b,u;if(a.members.length>0){x=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin/2).attr("y2",t.padding+h+t.dividerMargin/2);const d=s.append("text").attr("x",t.padding).attr("y",h+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");n=!0,a.members.forEach(function(l){_(d,l,n,t),n=!1}),b=d.node().getBBox()}if(a.methods.length>0){u=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin+b.height).attr("y2",t.padding+h+t.dividerMargin+b.height);const d=s.append("text").attr("x",t.padding).attr("y",h+2*t.dividerMargin+b.height+t.textHeight).attr("fill","white").attr("class","classText");n=!0,a.methods.forEach(function(l){_(d,l,n,t),n=!1})}const m=s.node().getBBox();var w=" ";a.cssClasses.length>0&&(w=w+a.cssClasses.join(" "));const e=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*t.padding).attr("height",m.height+t.padding+.5*t.dividerMargin).attr("class",w).node().getBBox().width;return c.node().childNodes.forEach(function(d){d.setAttribute("x",(e-d.getBBox().width)/2)}),a.tooltip&&c.insert("title").text(a.tooltip),x&&x.attr("x2",e),u&&u.attr("x2",e),g.width=e,g.height=m.height+t.padding+.5*t.dividerMargin,g},C=function(i){let a=i.id;return i.type&&(a+="<"+I(i.type)+">"),a},Z=function(i,a,t,o){y.debug("Rendering note ",a,t);const p=a.id,g={id:p,text:a.text,width:0,height:0},s=i.append("g").attr("id",p).attr("class","classGroup");let c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const n=JSON.parse(`"${a.text}"`).split(` `);n.forEach(function(x){y.debug(`Adding line: ${x}`),c.append("tspan").text(x).attr("class","title").attr("dy",t.textHeight)});const r=s.node().getBBox(),h=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",r.width+2*t.padding).attr("height",r.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin).node().getBBox().width;return c.node().childNodes.forEach(function(x){x.setAttribute("x",(h-x.getBBox().width)/2)}),g.width=h,g.height=r.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin,g},_=function(i,a,t,o){const{displayText:p,cssStyle:g}=a.getDisplayDetails(),s=i.append("tspan").attr("x",o.padding).text(p);g!==""&&s.attr("style",a.cssStyle),t||s.attr("dy",o.textHeight)},N={getClassTitleString:C,drawClass:J,drawEdge:Y,drawNote:Z};let T={};const E=20,L=function(i){const a=Object.entries(T).find(t=>t[1].label===i);if(a)return a[0]},R=function(i){i.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).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"),i.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).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"),i.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).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"),i.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).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"),i.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).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"),i.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 18,7 L9,13 L14,7 L9,1 Z")},F=function(i,a,t,o){const p=v().class;T={},y.info("Rendering diagram "+i);const g=v().securityLevel;let s;g==="sandbox"&&(s=B("#i"+a));const c=g==="sandbox"?B(s.nodes()[0].contentDocument.body):B("body"),n=c.select(`[id='${a}']`);R(n);const r=new O({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const f=o.db.getClasses(),h=Object.keys(f);for(const e of h){const d=f[e],l=N.drawClass(n,d,p,o);T[l.id]=l,r.setNode(l.id,l),y.info("Org height: "+l.height)}o.db.getRelations().forEach(function(e){y.info("tjoho"+L(e.id1)+L(e.id2)+JSON.stringify(e)),r.setEdge(L(e.id1),L(e.id2),{relation:e},e.title||"DEFAULT")}),o.db.getNotes().forEach(function(e){y.debug(`Adding note: ${JSON.stringify(e)}`);const d=N.drawNote(n,e,p,o);T[d.id]=d,r.setNode(d.id,d),e.class&&e.class in f&&r.setEdge(e.id,L(e.class),{relation:{id1:e.id,id2:e.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),P(r),r.nodes().forEach(function(e){e!==void 0&&r.node(e)!==void 0&&(y.debug("Node "+e+": "+JSON.stringify(r.node(e))),c.select("#"+(o.db.lookUpDomId(e)||e)).attr("transform","translate("+(r.node(e).x-r.node(e).width/2)+","+(r.node(e).y-r.node(e).height/2)+" )"))}),r.edges().forEach(function(e){e!==void 0&&r.edge(e)!==void 0&&(y.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r.edge(e))),N.drawEdge(n,r.edge(e),r.edge(e).relation,p,o))});const u=n.node().getBBox(),m=u.width+E*2,w=u.height+E*2;W(n,w,m,p.useMaxWidth);const k=`${u.x-E} ${u.y-E} ${m} ${w}`;y.debug(`viewBox ${k}`),n.attr("viewBox",k)},z={draw:F},j={parser:G,db:S,renderer:z,styles:A,init:i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,S.clear()}};export{j as diagram}; diff --git a/assets/classDiagram-v2-c3cb15f1-bb733d7d.js b/assets/classDiagram-v2-c3cb15f1-527aa3a5.js similarity index 93% rename from assets/classDiagram-v2-c3cb15f1-bb733d7d.js rename to assets/classDiagram-v2-c3cb15f1-527aa3a5.js index d6631f0..2f03310 100644 --- a/assets/classDiagram-v2-c3cb15f1-bb733d7d.js +++ b/assets/classDiagram-v2-c3cb15f1-527aa3a5.js @@ -1,2 +1,2 @@ -import{p as M,d as N,s as $}from"./styles-3dcbcfbf-02afae50.js";import{l as d,c,h as w,z as R,r as B,q as E,n as _,o as G,j as C}from"./index-b371ab76.js";import{G as z}from"./layout-fa84e821.js";import{r as q}from"./index-2c4b9a3b-7c73707d.js";import"./edges-f2ad444c-795ea1c8.js";import"./createText-62fc7601-6b649b67.js";import"./line-63c0ea4d.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const S=s=>C.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const P=function(s,t,y,n){const e=Object.keys(s);d.info("keys:",e),d.info(s),e.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};t.setNode(l.id,p),A(l.classes,t,y,n,l.id),d.info("setNode",p)})},A=function(s,t,y,n,e){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==e).forEach(function(o){var r,l;const a=s[o],p=a.cssClasses.join(" "),f={labelStyle:"",style:""},m=a.label??a.id,b=0,h="class_box",u={labelStyle:f.labelStyle,shape:h,labelText:S(m),classData:a,rx:b,ry:b,class:p,style:f.style,id:a.id,domId:a.domId,tooltip:n.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};t.setNode(a.id,u),e&&t.setParent(a.id,e),d.info("setNode",u)})},F=function(s,t,y,n){d.info(s),s.forEach(function(e,i){var o,r;const l=e,a="",p={labelStyle:"",style:""},f=l.text,m=0,b="note",h={labelStyle:p.labelStyle,shape:b,labelText:S(f),noteData:l,rx:m,ry:m,class:a,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(t.setNode(l.id,h),d.info("setNode",h),!l.class||!(l.class in n))return;const u=y+i,g={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:E(k.curve,_)};t.setEdge(l.id,l.class,g,u)})},H=function(s,t){const y=c().flowchart;let n=0;s.forEach(function(e){var i;n++;const o={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:"id"+n,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:D(e.relation.type1),arrowTypeEnd:D(e.relation.type2),style:"fill:none",labelStyle:"",curve:E(y==null?void 0:y.curve,_)};if(d.info(o,e),e.style!==void 0){const r=G(e.style);o.style=r.style,o.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label=''+e.text+""):(o.labelType="text",o.label=e.text.replace(C.lineBreakRegex,` +import{p as M,d as N,s as $}from"./styles-3dcbcfbf-c6ba177b.js";import{l as d,c,h as w,z as R,r as B,q as E,n as _,o as G,j as C}from"./index-e0ff10fa.js";import{G as z}from"./layout-608b290b.js";import{r as q}from"./index-2c4b9a3b-bbd91aa2.js";import"./edges-f2ad444c-7df4797c.js";import"./createText-62fc7601-0312dc07.js";import"./line-434e5c73.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const S=s=>C.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const P=function(s,t,y,n){const e=Object.keys(s);d.info("keys:",e),d.info(s),e.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};t.setNode(l.id,p),A(l.classes,t,y,n,l.id),d.info("setNode",p)})},A=function(s,t,y,n,e){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==e).forEach(function(o){var r,l;const a=s[o],p=a.cssClasses.join(" "),f={labelStyle:"",style:""},m=a.label??a.id,b=0,h="class_box",u={labelStyle:f.labelStyle,shape:h,labelText:S(m),classData:a,rx:b,ry:b,class:p,style:f.style,id:a.id,domId:a.domId,tooltip:n.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};t.setNode(a.id,u),e&&t.setParent(a.id,e),d.info("setNode",u)})},F=function(s,t,y,n){d.info(s),s.forEach(function(e,i){var o,r;const l=e,a="",p={labelStyle:"",style:""},f=l.text,m=0,b="note",h={labelStyle:p.labelStyle,shape:b,labelText:S(f),noteData:l,rx:m,ry:m,class:a,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(t.setNode(l.id,h),d.info("setNode",h),!l.class||!(l.class in n))return;const u=y+i,g={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:E(k.curve,_)};t.setEdge(l.id,l.class,g,u)})},H=function(s,t){const y=c().flowchart;let n=0;s.forEach(function(e){var i;n++;const o={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:"id"+n,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:D(e.relation.type1),arrowTypeEnd:D(e.relation.type2),style:"fill:none",labelStyle:"",curve:E(y==null?void 0:y.curve,_)};if(d.info(o,e),e.style!==void 0){const r=G(e.style);o.style=r.style,o.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label=''+e.text+""):(o.labelType="text",o.label=e.text.replace(C.lineBreakRegex,` `),e.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,o,n)})},V=function(s){k={...k,...s}},W=async function(s,t,y,n){d.info("Drawing class - ",t);const e=c().flowchart??c().class,i=c().securityLevel;d.info("config:",e);const o=(e==null?void 0:e.nodeSpacing)??50,r=(e==null?void 0:e.rankSpacing)??50,l=new z({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:o,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=n.db.getNamespaces(),p=n.db.getClasses(),f=n.db.getRelations(),m=n.db.getNotes();d.info(f),P(a,l,t,n),A(p,l,t,n),H(f,l),F(m,l,f.length+1,p);let b;i==="sandbox"&&(b=w("#i"+t));const h=i==="sandbox"?w(b.nodes()[0].contentDocument.body):w("body"),u=h.select(`[id="${t}"]`),g=h.select("#"+t+" g");if(await q(g,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),R.insertTitle(u,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,n.db.getDiagramTitle()),B(l,u,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const T=i==="sandbox"?b.nodes()[0].contentDocument:document,I=T.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const x of I){const L=x.getBBox(),v=T.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),x.insertBefore(v,x.firstChild)}}};function D(s){let t;switch(s){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const J={setConf:V,draw:W},te={parser:M,db:N,renderer:J,styles:$,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,N.clear()}};export{te as diagram}; diff --git a/assets/createText-62fc7601-6b649b67.js b/assets/createText-62fc7601-0312dc07.js similarity index 99% rename from assets/createText-62fc7601-6b649b67.js rename to assets/createText-62fc7601-0312dc07.js index b134c0f..2df103a 100644 --- a/assets/createText-62fc7601-6b649b67.js +++ b/assets/createText-62fc7601-0312dc07.js @@ -1,4 +1,4 @@ -import{l as At,aR as zt,b6 as It}from"./index-b371ab76.js";const Tt={};function Bt(n,r){const t=r||Tt,e=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,u=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return et(n,e,u)}function et(n,r,t){if(Lt(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Vn(n.children,r,t)}return Array.isArray(n)?Vn(n,r,t):""}function Vn(n,r,t){const e=[];let u=-1;for(;++uu?0:u+r:r=r>u?u:r,t=t>0?t:0,e.length<1e4)l=Array.from(e),l.unshift(r,t),n.splice(...l);else for(t&&n.splice(r,t);i0?(tn(n,n.length,0,r),n):r}const Wn={}.hasOwnProperty;function Ot(n){const r={};let t=-1;for(;++tl))return;const T=r.events.length;let H=T,N,V;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){if(N){V=r.events[H][1].end;break}N=!0}for(b(e),k=T;kF;){const _=t[D];r.containerState=_[1],_[0].exit.call(r,n)}t.length=F}function j(){u.write([null]),i=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Ut(n,r,t){return O(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Un(n){if(n===null||Z(n)||Ht(n))return 1;if(qt(n))return 2}function Ln(n,r,t){const e=[];let u=-1;for(;++u1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f=Object.assign({},n[e][1].end),x=Object.assign({},n[t][1].start);$n(f,-m),$n(x,m),l={type:m>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},n[e][1].end)},a={type:m>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:x},i={type:m>1?"strongText":"emphasisText",start:Object.assign({},n[e][1].end),end:Object.assign({},n[t][1].start)},u={type:m>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},a.end)},n[e][1].end=Object.assign({},l.start),n[t][1].start=Object.assign({},a.end),c=[],n[e][1].end.offset-n[e][1].start.offset&&(c=Y(c,[["enter",n[e][1],r],["exit",n[e][1],r]])),c=Y(c,[["enter",u,r],["enter",l,r],["exit",l,r],["enter",i,r]]),c=Y(c,Ln(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),c=Y(c,[["exit",i,r],["enter",a,r],["exit",a,r],["exit",u,r]]),n[t][1].end.offset-n[t][1].start.offset?(p=2,c=Y(c,[["enter",n[t][1],r],["exit",n[t][1],r]])):p=0,tn(n,e-1,t-e+3,c),t=e+c.length-p-2;break}}for(t=-1;++t0&&z(k)?O(n,j,"linePrefix",i+1)(k):j(k)}function j(k){return k===null||C(k)?n.check(Yn,I,D)(k):(n.enter("codeFlowValue"),F(k))}function F(k){return k===null||C(k)?(n.exit("codeFlowValue"),j(k)):(n.consume(k),F)}function D(k){return n.exit("codeFenced"),r(k)}function _(k,T,H){let N=0;return V;function V(w){return k.enter("lineEnding"),k.consume(w),k.exit("lineEnding"),y}function y(w){return k.enter("codeFencedFence"),z(w)?O(k,S,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):S(w)}function S(w){return w===a?(k.enter("codeFencedFenceSequence"),P(w)):H(w)}function P(w){return w===a?(N++,k.consume(w),P):N>=l?(k.exit("codeFencedFenceSequence"),z(w)?O(k,R,"whitespace")(w):R(w)):H(w)}function R(w){return w===null||C(w)?(k.exit("codeFencedFence"),T(w)):H(w)}}}function re(n,r,t){const e=this;return u;function u(l){return l===null?t(l):(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}const Cn={name:"codeIndented",tokenize:ue},ie={tokenize:le,partial:!0};function ue(n,r,t){const e=this;return u;function u(c){return n.enter("codeIndented"),O(n,i,"linePrefix",4+1)(c)}function i(c){const p=e.events[e.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(c):t(c)}function l(c){return c===null?m(c):C(c)?n.attempt(ie,l,m)(c):(n.enter("codeFlowValue"),a(c))}function a(c){return c===null||C(c)?(n.exit("codeFlowValue"),l(c)):(n.consume(c),a)}function m(c){return n.exit("codeIndented"),r(c)}}function le(n,r,t){const e=this;return u;function u(l){return e.parser.lazy[e.now().line]?t(l):C(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),u):O(n,i,"linePrefix",4+1)(l)}function i(l){const a=e.events[e.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):C(l)?u(l):t(l)}}const ae={name:"codeText",tokenize:ce,resolve:oe,previous:se};function oe(n){let r=n.length-4,t=3,e,u;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(e=t;++e=4?r(l):n.interrupt(e.parser.constructs.flow,t,r)(l)}}function at(n,r,t,e,u,i,l,a,m){const c=m||Number.POSITIVE_INFINITY;let p=0;return f;function f(b){return b===60?(n.enter(e),n.enter(u),n.enter(i),n.consume(b),n.exit(i),x):b===null||b===32||b===41||An(b)?t(b):(n.enter(e),n.enter(l),n.enter(a),n.enter("chunkString",{contentType:"string"}),I(b))}function x(b){return b===62?(n.enter(i),n.consume(b),n.exit(i),n.exit(u),n.exit(e),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(n.exit("chunkString"),n.exit(a),x(b)):b===null||b===60||C(b)?t(b):(n.consume(b),b===92?A:h)}function A(b){return b===60||b===62||b===92?(n.consume(b),h):h(b)}function I(b){return!p&&(b===null||b===41||Z(b))?(n.exit("chunkString"),n.exit(a),n.exit(l),n.exit(e),r(b)):p999||h===null||h===91||h===93&&!m||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(n.exit(i),n.enter(u),n.consume(h),n.exit(u),n.exit(e),r):C(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||C(h)||a++>999?(n.exit("chunkString"),p(h)):(n.consume(h),m||(m=!z(h)),h===92?x:f)}function x(h){return h===91||h===92||h===93?(n.consume(h),a++,f):f(h)}}function st(n,r,t,e,u,i){let l;return a;function a(x){return x===34||x===39||x===40?(n.enter(e),n.enter(u),n.consume(x),n.exit(u),l=x===40?41:x,m):t(x)}function m(x){return x===l?(n.enter(u),n.consume(x),n.exit(u),n.exit(e),r):(n.enter(i),c(x))}function c(x){return x===l?(n.exit(i),m(l)):x===null?t(x):C(x)?(n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),O(n,c,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===l||x===null||C(x)?(n.exit("chunkString"),c(x)):(n.consume(x),x===92?f:p)}function f(x){return x===l||x===92?(n.consume(x),p):p(x)}}function dn(n,r){let t;return e;function e(u){return C(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),t=!0,e):z(u)?O(n,e,t?"linePrefix":"lineSuffix")(u):r(u)}}function xn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ke={name:"definition",tokenize:be},de={tokenize:ye,partial:!0};function be(n,r,t){const e=this;let u;return i;function i(h){return n.enter("definition"),l(h)}function l(h){return ot.call(e,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return u=xn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),h===58?(n.enter("definitionMarker"),n.consume(h),n.exit("definitionMarker"),m):t(h)}function m(h){return Z(h)?dn(n,c)(h):c(h)}function c(h){return at(n,p,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function p(h){return n.attempt(de,f,f)(h)}function f(h){return z(h)?O(n,x,"whitespace")(h):x(h)}function x(h){return h===null||C(h)?(n.exit("definition"),e.parser.defined.push(u),r(h)):t(h)}}function ye(n,r,t){return e;function e(a){return Z(a)?dn(n,u)(a):t(a)}function u(a){return st(n,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return z(a)?O(n,l,"whitespace")(a):l(a)}function l(a){return a===null||C(a)?r(a):t(a)}}const Se={name:"hardBreakEscape",tokenize:Fe};function Fe(n,r,t){return e;function e(i){return n.enter("hardBreakEscape"),n.consume(i),u}function u(i){return C(i)?(n.exit("hardBreakEscape"),r(i)):t(i)}}const Ee={name:"headingAtx",tokenize:we,resolve:Ce};function Ce(n,r){let t=n.length-2,e=3,u,i;return n[e][1].type==="whitespace"&&(e+=2),t-2>e&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(e===t-1||t-4>e&&n[t-2][1].type==="whitespace")&&(t-=e+1===t?2:4),t>e&&(u={type:"atxHeadingText",start:n[e][1].start,end:n[t][1].end},i={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},tn(n,e,t-e+1,[["enter",u,r],["enter",i,r],["exit",i,r],["exit",u,r]])),n}function we(n,r,t){let e=0;return u;function u(p){return n.enter("atxHeading"),i(p)}function i(p){return n.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&e++<6?(n.consume(p),l):p===null||Z(p)?(n.exit("atxHeadingSequence"),a(p)):t(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),m(p)):p===null||C(p)?(n.exit("atxHeading"),r(p)):z(p)?O(n,a,"whitespace")(p):(n.enter("atxHeadingText"),c(p))}function m(p){return p===35?(n.consume(p),m):(n.exit("atxHeadingSequence"),a(p))}function c(p){return p===null||p===35||Z(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),c)}}const Ae=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jn=["pre","script","style","textarea"],ze={name:"htmlFlow",tokenize:Le,resolveTo:Be,concrete:!0},Ie={tokenize:De,partial:!0},Te={tokenize:Oe,partial:!0};function Be(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function Le(n,r,t){const e=this;let u,i,l,a,m;return c;function c(s){return p(s)}function p(s){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(s),f}function f(s){return s===33?(n.consume(s),x):s===47?(n.consume(s),i=!0,I):s===63?(n.consume(s),u=3,e.interrupt?r:o):nn(s)?(n.consume(s),l=String.fromCharCode(s),M):t(s)}function x(s){return s===45?(n.consume(s),u=2,h):s===91?(n.consume(s),u=5,a=0,A):nn(s)?(n.consume(s),u=4,e.interrupt?r:o):t(s)}function h(s){return s===45?(n.consume(s),e.interrupt?r:o):t(s)}function A(s){const K="CDATA[";return s===K.charCodeAt(a++)?(n.consume(s),a===K.length?e.interrupt?r:S:A):t(s)}function I(s){return nn(s)?(n.consume(s),l=String.fromCharCode(s),M):t(s)}function M(s){if(s===null||s===47||s===62||Z(s)){const K=s===47,hn=l.toLowerCase();return!K&&!i&&Jn.includes(hn)?(u=1,e.interrupt?r(s):S(s)):Ae.includes(l.toLowerCase())?(u=6,K?(n.consume(s),b):e.interrupt?r(s):S(s)):(u=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(s):i?j(s):F(s))}return s===45||v(s)?(n.consume(s),l+=String.fromCharCode(s),M):t(s)}function b(s){return s===62?(n.consume(s),e.interrupt?r:S):t(s)}function j(s){return z(s)?(n.consume(s),j):V(s)}function F(s){return s===47?(n.consume(s),V):s===58||s===95||nn(s)?(n.consume(s),D):z(s)?(n.consume(s),F):V(s)}function D(s){return s===45||s===46||s===58||s===95||v(s)?(n.consume(s),D):_(s)}function _(s){return s===61?(n.consume(s),k):z(s)?(n.consume(s),_):F(s)}function k(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),m=s,T):z(s)?(n.consume(s),k):H(s)}function T(s){return s===m?(n.consume(s),m=null,N):s===null||C(s)?t(s):(n.consume(s),T)}function H(s){return s===null||s===34||s===39||s===47||s===60||s===61||s===62||s===96||Z(s)?_(s):(n.consume(s),H)}function N(s){return s===47||s===62||z(s)?F(s):t(s)}function V(s){return s===62?(n.consume(s),y):t(s)}function y(s){return s===null||C(s)?S(s):z(s)?(n.consume(s),y):t(s)}function S(s){return s===45&&u===2?(n.consume(s),U):s===60&&u===1?(n.consume(s),W):s===62&&u===4?(n.consume(s),J):s===63&&u===3?(n.consume(s),o):s===93&&u===5?(n.consume(s),en):C(s)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(Ie,rn,P)(s)):s===null||C(s)?(n.exit("htmlFlowData"),P(s)):(n.consume(s),S)}function P(s){return n.check(Te,R,rn)(s)}function R(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),w}function w(s){return s===null||C(s)?P(s):(n.enter("htmlFlowData"),S(s))}function U(s){return s===45?(n.consume(s),o):S(s)}function W(s){return s===47?(n.consume(s),l="",G):S(s)}function G(s){if(s===62){const K=l.toLowerCase();return Jn.includes(K)?(n.consume(s),J):S(s)}return nn(s)&&l.length<8?(n.consume(s),l+=String.fromCharCode(s),G):S(s)}function en(s){return s===93?(n.consume(s),o):S(s)}function o(s){return s===62?(n.consume(s),J):s===45&&u===2?(n.consume(s),o):S(s)}function J(s){return s===null||C(s)?(n.exit("htmlFlowData"),rn(s)):(n.consume(s),J)}function rn(s){return n.exit("htmlFlow"),r(s)}}function Oe(n,r,t){const e=this;return u;function u(l){return C(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i):t(l)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}function De(n,r,t){return e;function e(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Sn,r,t)}}const Pe={name:"htmlText",tokenize:_e};function _e(n,r,t){const e=this;let u,i,l;return a;function a(o){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(o),m}function m(o){return o===33?(n.consume(o),c):o===47?(n.consume(o),_):o===63?(n.consume(o),F):nn(o)?(n.consume(o),H):t(o)}function c(o){return o===45?(n.consume(o),p):o===91?(n.consume(o),i=0,A):nn(o)?(n.consume(o),j):t(o)}function p(o){return o===45?(n.consume(o),h):t(o)}function f(o){return o===null?t(o):o===45?(n.consume(o),x):C(o)?(l=f,W(o)):(n.consume(o),f)}function x(o){return o===45?(n.consume(o),h):f(o)}function h(o){return o===62?U(o):o===45?x(o):f(o)}function A(o){const J="CDATA[";return o===J.charCodeAt(i++)?(n.consume(o),i===J.length?I:A):t(o)}function I(o){return o===null?t(o):o===93?(n.consume(o),M):C(o)?(l=I,W(o)):(n.consume(o),I)}function M(o){return o===93?(n.consume(o),b):I(o)}function b(o){return o===62?U(o):o===93?(n.consume(o),b):I(o)}function j(o){return o===null||o===62?U(o):C(o)?(l=j,W(o)):(n.consume(o),j)}function F(o){return o===null?t(o):o===63?(n.consume(o),D):C(o)?(l=F,W(o)):(n.consume(o),F)}function D(o){return o===62?U(o):F(o)}function _(o){return nn(o)?(n.consume(o),k):t(o)}function k(o){return o===45||v(o)?(n.consume(o),k):T(o)}function T(o){return C(o)?(l=T,W(o)):z(o)?(n.consume(o),T):U(o)}function H(o){return o===45||v(o)?(n.consume(o),H):o===47||o===62||Z(o)?N(o):t(o)}function N(o){return o===47?(n.consume(o),U):o===58||o===95||nn(o)?(n.consume(o),V):C(o)?(l=N,W(o)):z(o)?(n.consume(o),N):U(o)}function V(o){return o===45||o===46||o===58||o===95||v(o)?(n.consume(o),V):y(o)}function y(o){return o===61?(n.consume(o),S):C(o)?(l=y,W(o)):z(o)?(n.consume(o),y):N(o)}function S(o){return o===null||o===60||o===61||o===62||o===96?t(o):o===34||o===39?(n.consume(o),u=o,P):C(o)?(l=S,W(o)):z(o)?(n.consume(o),S):(n.consume(o),R)}function P(o){return o===u?(n.consume(o),u=void 0,w):o===null?t(o):C(o)?(l=P,W(o)):(n.consume(o),P)}function R(o){return o===null||o===34||o===39||o===60||o===61||o===96?t(o):o===47||o===62||Z(o)?N(o):(n.consume(o),R)}function w(o){return o===47||o===62||Z(o)?N(o):t(o)}function U(o){return o===62?(n.consume(o),n.exit("htmlTextData"),n.exit("htmlText"),r):t(o)}function W(o){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),G}function G(o){return z(o)?O(n,en,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):en(o)}function en(o){return n.enter("htmlTextData"),l(o)}}const Dn={name:"labelEnd",tokenize:Ne,resolveTo:He,resolveAll:qe},Me={tokenize:Ve},je={tokenize:We},Re={tokenize:Qe};function qe(n){let r=-1;for(;++r=3&&(c===null||C(c))?(n.exit("thematicBreak"),r(c)):t(c)}function m(c){return c===u?(n.consume(c),e++,m):(n.exit("thematicBreakSequence"),z(c)?O(n,a,"whitespace")(c):a(c))}}const $={name:"list",tokenize:ve,continuation:{tokenize:nr},exit:er},Ke={tokenize:rr,partial:!0},Xe={tokenize:tr,partial:!0};function ve(n,r,t){const e=this,u=e.events[e.events.length-1];let i=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,l=0;return a;function a(h){const A=e.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!e.containerState.marker||h===e.containerState.marker:zn(h)){if(e.containerState.type||(e.containerState.type=A,n.enter(A,{_container:!0})),A==="listUnordered")return n.enter("listItemPrefix"),h===42||h===45?n.check(bn,t,c)(h):c(h);if(!e.interrupt||h===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(h)}return t(h)}function m(h){return zn(h)&&++l<10?(n.consume(h),m):(!e.interrupt||l<2)&&(e.containerState.marker?h===e.containerState.marker:h===41||h===46)?(n.exit("listItemValue"),c(h)):t(h)}function c(h){return n.enter("listItemMarker"),n.consume(h),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||h,n.check(Sn,e.interrupt?t:p,n.attempt(Ke,x,f))}function p(h){return e.containerState.initialBlankLine=!0,i++,x(h)}function f(h){return z(h)?(n.enter("listItemPrefixWhitespace"),n.consume(h),n.exit("listItemPrefixWhitespace"),x):t(h)}function x(h){return e.containerState.size=i+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(h)}}function nr(n,r,t){const e=this;return e.containerState._closeFlow=void 0,n.check(Sn,u,i);function u(a){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,O(n,r,"listItemIndent",e.containerState.size+1)(a)}function i(a){return e.containerState.furtherBlankLines||!z(a)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,l(a)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(Xe,r,l)(a))}function l(a){return e.containerState._closeFlow=!0,e.interrupt=void 0,O(n,n.attempt($,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function tr(n,r,t){const e=this;return O(n,u,"listItemIndent",e.containerState.size+1);function u(i){const l=e.events[e.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===e.containerState.size?r(i):t(i)}}function er(n){n.exit(this.containerState.type)}function rr(n,r,t){const e=this;return O(n,u,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function u(i){const l=e.events[e.events.length-1];return!z(i)&&l&&l[1].type==="listItemPrefixWhitespace"?r(i):t(i)}}const Kn={name:"setextUnderline",tokenize:ur,resolveTo:ir};function ir(n,r){let t=n.length,e,u,i;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){e=t;break}n[t][1].type==="paragraph"&&(u=t)}else n[t][1].type==="content"&&n.splice(t,1),!i&&n[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:Object.assign({},n[u][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[u][1].type="setextHeadingText",i?(n.splice(u,0,["enter",l,r]),n.splice(i+1,0,["exit",n[e][1],r]),n[e][1].end=Object.assign({},n[i][1].end)):n[e][1]=l,n.push(["exit",l,r]),n}function ur(n,r,t){const e=this;let u;return i;function i(c){let p=e.events.length,f;for(;p--;)if(e.events[p][1].type!=="lineEnding"&&e.events[p][1].type!=="linePrefix"&&e.events[p][1].type!=="content"){f=e.events[p][1].type==="paragraph";break}return!e.parser.lazy[e.now().line]&&(e.interrupt||f)?(n.enter("setextHeadingLine"),u=c,l(c)):t(c)}function l(c){return n.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===u?(n.consume(c),a):(n.exit("setextHeadingLineSequence"),z(c)?O(n,m,"lineSuffix")(c):m(c))}function m(c){return c===null||C(c)?(n.exit("setextHeadingLine"),r(c)):t(c)}}const lr={tokenize:ar};function ar(n){const r=this,t=n.attempt(Sn,e,n.attempt(this.parser.constructs.flowInitial,u,O(n,n.attempt(this.parser.constructs.flow,u,n.attempt(pe,u)),"linePrefix")));return t;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),r.currentConstruct=void 0,t}}const or={resolveAll:ht()},sr=ct("string"),cr=ct("text");function ct(n){return{tokenize:r,resolveAll:ht(n==="text"?hr:void 0)};function r(t){const e=this,u=this.parser.constructs[n],i=t.attempt(u,l,a);return l;function l(p){return c(p)?i(p):a(p)}function a(p){if(p===null){t.consume(p);return}return t.enter("data"),t.consume(p),m}function m(p){return c(p)?(t.exit("data"),i(p)):(t.consume(p),m)}function c(p){if(p===null)return!0;const f=u[p];let x=-1;if(f)for(;++x-1){const a=l[0];typeof a=="string"?l[0]=a.slice(e):l.shift()}i>0&&l.push(n[u].slice(0,i))}return l}function mr(n,r){let t=-1;const e=[];let u;for(;++tu?0:u+r:r=r>u?u:r,t=t>0?t:0,e.length<1e4)l=Array.from(e),l.unshift(r,t),n.splice(...l);else for(t&&n.splice(r,t);i0?(tn(n,n.length,0,r),n):r}const Wn={}.hasOwnProperty;function Ot(n){const r={};let t=-1;for(;++tl))return;const T=r.events.length;let H=T,N,V;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){if(N){V=r.events[H][1].end;break}N=!0}for(b(e),k=T;kF;){const _=t[D];r.containerState=_[1],_[0].exit.call(r,n)}t.length=F}function j(){u.write([null]),i=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Ut(n,r,t){return O(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Un(n){if(n===null||Z(n)||Ht(n))return 1;if(qt(n))return 2}function Ln(n,r,t){const e=[];let u=-1;for(;++u1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f=Object.assign({},n[e][1].end),x=Object.assign({},n[t][1].start);$n(f,-m),$n(x,m),l={type:m>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},n[e][1].end)},a={type:m>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:x},i={type:m>1?"strongText":"emphasisText",start:Object.assign({},n[e][1].end),end:Object.assign({},n[t][1].start)},u={type:m>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},a.end)},n[e][1].end=Object.assign({},l.start),n[t][1].start=Object.assign({},a.end),c=[],n[e][1].end.offset-n[e][1].start.offset&&(c=Y(c,[["enter",n[e][1],r],["exit",n[e][1],r]])),c=Y(c,[["enter",u,r],["enter",l,r],["exit",l,r],["enter",i,r]]),c=Y(c,Ln(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),c=Y(c,[["exit",i,r],["enter",a,r],["exit",a,r],["exit",u,r]]),n[t][1].end.offset-n[t][1].start.offset?(p=2,c=Y(c,[["enter",n[t][1],r],["exit",n[t][1],r]])):p=0,tn(n,e-1,t-e+3,c),t=e+c.length-p-2;break}}for(t=-1;++t0&&z(k)?O(n,j,"linePrefix",i+1)(k):j(k)}function j(k){return k===null||C(k)?n.check(Yn,I,D)(k):(n.enter("codeFlowValue"),F(k))}function F(k){return k===null||C(k)?(n.exit("codeFlowValue"),j(k)):(n.consume(k),F)}function D(k){return n.exit("codeFenced"),r(k)}function _(k,T,H){let N=0;return V;function V(w){return k.enter("lineEnding"),k.consume(w),k.exit("lineEnding"),y}function y(w){return k.enter("codeFencedFence"),z(w)?O(k,S,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):S(w)}function S(w){return w===a?(k.enter("codeFencedFenceSequence"),P(w)):H(w)}function P(w){return w===a?(N++,k.consume(w),P):N>=l?(k.exit("codeFencedFenceSequence"),z(w)?O(k,R,"whitespace")(w):R(w)):H(w)}function R(w){return w===null||C(w)?(k.exit("codeFencedFence"),T(w)):H(w)}}}function re(n,r,t){const e=this;return u;function u(l){return l===null?t(l):(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}const Cn={name:"codeIndented",tokenize:ue},ie={tokenize:le,partial:!0};function ue(n,r,t){const e=this;return u;function u(c){return n.enter("codeIndented"),O(n,i,"linePrefix",4+1)(c)}function i(c){const p=e.events[e.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(c):t(c)}function l(c){return c===null?m(c):C(c)?n.attempt(ie,l,m)(c):(n.enter("codeFlowValue"),a(c))}function a(c){return c===null||C(c)?(n.exit("codeFlowValue"),l(c)):(n.consume(c),a)}function m(c){return n.exit("codeIndented"),r(c)}}function le(n,r,t){const e=this;return u;function u(l){return e.parser.lazy[e.now().line]?t(l):C(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),u):O(n,i,"linePrefix",4+1)(l)}function i(l){const a=e.events[e.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):C(l)?u(l):t(l)}}const ae={name:"codeText",tokenize:ce,resolve:oe,previous:se};function oe(n){let r=n.length-4,t=3,e,u;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(e=t;++e=4?r(l):n.interrupt(e.parser.constructs.flow,t,r)(l)}}function at(n,r,t,e,u,i,l,a,m){const c=m||Number.POSITIVE_INFINITY;let p=0;return f;function f(b){return b===60?(n.enter(e),n.enter(u),n.enter(i),n.consume(b),n.exit(i),x):b===null||b===32||b===41||An(b)?t(b):(n.enter(e),n.enter(l),n.enter(a),n.enter("chunkString",{contentType:"string"}),I(b))}function x(b){return b===62?(n.enter(i),n.consume(b),n.exit(i),n.exit(u),n.exit(e),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(n.exit("chunkString"),n.exit(a),x(b)):b===null||b===60||C(b)?t(b):(n.consume(b),b===92?A:h)}function A(b){return b===60||b===62||b===92?(n.consume(b),h):h(b)}function I(b){return!p&&(b===null||b===41||Z(b))?(n.exit("chunkString"),n.exit(a),n.exit(l),n.exit(e),r(b)):p999||h===null||h===91||h===93&&!m||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(n.exit(i),n.enter(u),n.consume(h),n.exit(u),n.exit(e),r):C(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||C(h)||a++>999?(n.exit("chunkString"),p(h)):(n.consume(h),m||(m=!z(h)),h===92?x:f)}function x(h){return h===91||h===92||h===93?(n.consume(h),a++,f):f(h)}}function st(n,r,t,e,u,i){let l;return a;function a(x){return x===34||x===39||x===40?(n.enter(e),n.enter(u),n.consume(x),n.exit(u),l=x===40?41:x,m):t(x)}function m(x){return x===l?(n.enter(u),n.consume(x),n.exit(u),n.exit(e),r):(n.enter(i),c(x))}function c(x){return x===l?(n.exit(i),m(l)):x===null?t(x):C(x)?(n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),O(n,c,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===l||x===null||C(x)?(n.exit("chunkString"),c(x)):(n.consume(x),x===92?f:p)}function f(x){return x===l||x===92?(n.consume(x),p):p(x)}}function dn(n,r){let t;return e;function e(u){return C(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),t=!0,e):z(u)?O(n,e,t?"linePrefix":"lineSuffix")(u):r(u)}}function xn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ke={name:"definition",tokenize:be},de={tokenize:ye,partial:!0};function be(n,r,t){const e=this;let u;return i;function i(h){return n.enter("definition"),l(h)}function l(h){return ot.call(e,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return u=xn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),h===58?(n.enter("definitionMarker"),n.consume(h),n.exit("definitionMarker"),m):t(h)}function m(h){return Z(h)?dn(n,c)(h):c(h)}function c(h){return at(n,p,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function p(h){return n.attempt(de,f,f)(h)}function f(h){return z(h)?O(n,x,"whitespace")(h):x(h)}function x(h){return h===null||C(h)?(n.exit("definition"),e.parser.defined.push(u),r(h)):t(h)}}function ye(n,r,t){return e;function e(a){return Z(a)?dn(n,u)(a):t(a)}function u(a){return st(n,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return z(a)?O(n,l,"whitespace")(a):l(a)}function l(a){return a===null||C(a)?r(a):t(a)}}const Se={name:"hardBreakEscape",tokenize:Fe};function Fe(n,r,t){return e;function e(i){return n.enter("hardBreakEscape"),n.consume(i),u}function u(i){return C(i)?(n.exit("hardBreakEscape"),r(i)):t(i)}}const Ee={name:"headingAtx",tokenize:we,resolve:Ce};function Ce(n,r){let t=n.length-2,e=3,u,i;return n[e][1].type==="whitespace"&&(e+=2),t-2>e&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(e===t-1||t-4>e&&n[t-2][1].type==="whitespace")&&(t-=e+1===t?2:4),t>e&&(u={type:"atxHeadingText",start:n[e][1].start,end:n[t][1].end},i={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},tn(n,e,t-e+1,[["enter",u,r],["enter",i,r],["exit",i,r],["exit",u,r]])),n}function we(n,r,t){let e=0;return u;function u(p){return n.enter("atxHeading"),i(p)}function i(p){return n.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&e++<6?(n.consume(p),l):p===null||Z(p)?(n.exit("atxHeadingSequence"),a(p)):t(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),m(p)):p===null||C(p)?(n.exit("atxHeading"),r(p)):z(p)?O(n,a,"whitespace")(p):(n.enter("atxHeadingText"),c(p))}function m(p){return p===35?(n.consume(p),m):(n.exit("atxHeadingSequence"),a(p))}function c(p){return p===null||p===35||Z(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),c)}}const Ae=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jn=["pre","script","style","textarea"],ze={name:"htmlFlow",tokenize:Le,resolveTo:Be,concrete:!0},Ie={tokenize:De,partial:!0},Te={tokenize:Oe,partial:!0};function Be(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function Le(n,r,t){const e=this;let u,i,l,a,m;return c;function c(s){return p(s)}function p(s){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(s),f}function f(s){return s===33?(n.consume(s),x):s===47?(n.consume(s),i=!0,I):s===63?(n.consume(s),u=3,e.interrupt?r:o):nn(s)?(n.consume(s),l=String.fromCharCode(s),M):t(s)}function x(s){return s===45?(n.consume(s),u=2,h):s===91?(n.consume(s),u=5,a=0,A):nn(s)?(n.consume(s),u=4,e.interrupt?r:o):t(s)}function h(s){return s===45?(n.consume(s),e.interrupt?r:o):t(s)}function A(s){const K="CDATA[";return s===K.charCodeAt(a++)?(n.consume(s),a===K.length?e.interrupt?r:S:A):t(s)}function I(s){return nn(s)?(n.consume(s),l=String.fromCharCode(s),M):t(s)}function M(s){if(s===null||s===47||s===62||Z(s)){const K=s===47,hn=l.toLowerCase();return!K&&!i&&Jn.includes(hn)?(u=1,e.interrupt?r(s):S(s)):Ae.includes(l.toLowerCase())?(u=6,K?(n.consume(s),b):e.interrupt?r(s):S(s)):(u=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(s):i?j(s):F(s))}return s===45||v(s)?(n.consume(s),l+=String.fromCharCode(s),M):t(s)}function b(s){return s===62?(n.consume(s),e.interrupt?r:S):t(s)}function j(s){return z(s)?(n.consume(s),j):V(s)}function F(s){return s===47?(n.consume(s),V):s===58||s===95||nn(s)?(n.consume(s),D):z(s)?(n.consume(s),F):V(s)}function D(s){return s===45||s===46||s===58||s===95||v(s)?(n.consume(s),D):_(s)}function _(s){return s===61?(n.consume(s),k):z(s)?(n.consume(s),_):F(s)}function k(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),m=s,T):z(s)?(n.consume(s),k):H(s)}function T(s){return s===m?(n.consume(s),m=null,N):s===null||C(s)?t(s):(n.consume(s),T)}function H(s){return s===null||s===34||s===39||s===47||s===60||s===61||s===62||s===96||Z(s)?_(s):(n.consume(s),H)}function N(s){return s===47||s===62||z(s)?F(s):t(s)}function V(s){return s===62?(n.consume(s),y):t(s)}function y(s){return s===null||C(s)?S(s):z(s)?(n.consume(s),y):t(s)}function S(s){return s===45&&u===2?(n.consume(s),U):s===60&&u===1?(n.consume(s),W):s===62&&u===4?(n.consume(s),J):s===63&&u===3?(n.consume(s),o):s===93&&u===5?(n.consume(s),en):C(s)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(Ie,rn,P)(s)):s===null||C(s)?(n.exit("htmlFlowData"),P(s)):(n.consume(s),S)}function P(s){return n.check(Te,R,rn)(s)}function R(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),w}function w(s){return s===null||C(s)?P(s):(n.enter("htmlFlowData"),S(s))}function U(s){return s===45?(n.consume(s),o):S(s)}function W(s){return s===47?(n.consume(s),l="",G):S(s)}function G(s){if(s===62){const K=l.toLowerCase();return Jn.includes(K)?(n.consume(s),J):S(s)}return nn(s)&&l.length<8?(n.consume(s),l+=String.fromCharCode(s),G):S(s)}function en(s){return s===93?(n.consume(s),o):S(s)}function o(s){return s===62?(n.consume(s),J):s===45&&u===2?(n.consume(s),o):S(s)}function J(s){return s===null||C(s)?(n.exit("htmlFlowData"),rn(s)):(n.consume(s),J)}function rn(s){return n.exit("htmlFlow"),r(s)}}function Oe(n,r,t){const e=this;return u;function u(l){return C(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i):t(l)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}function De(n,r,t){return e;function e(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Sn,r,t)}}const Pe={name:"htmlText",tokenize:_e};function _e(n,r,t){const e=this;let u,i,l;return a;function a(o){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(o),m}function m(o){return o===33?(n.consume(o),c):o===47?(n.consume(o),_):o===63?(n.consume(o),F):nn(o)?(n.consume(o),H):t(o)}function c(o){return o===45?(n.consume(o),p):o===91?(n.consume(o),i=0,A):nn(o)?(n.consume(o),j):t(o)}function p(o){return o===45?(n.consume(o),h):t(o)}function f(o){return o===null?t(o):o===45?(n.consume(o),x):C(o)?(l=f,W(o)):(n.consume(o),f)}function x(o){return o===45?(n.consume(o),h):f(o)}function h(o){return o===62?U(o):o===45?x(o):f(o)}function A(o){const J="CDATA[";return o===J.charCodeAt(i++)?(n.consume(o),i===J.length?I:A):t(o)}function I(o){return o===null?t(o):o===93?(n.consume(o),M):C(o)?(l=I,W(o)):(n.consume(o),I)}function M(o){return o===93?(n.consume(o),b):I(o)}function b(o){return o===62?U(o):o===93?(n.consume(o),b):I(o)}function j(o){return o===null||o===62?U(o):C(o)?(l=j,W(o)):(n.consume(o),j)}function F(o){return o===null?t(o):o===63?(n.consume(o),D):C(o)?(l=F,W(o)):(n.consume(o),F)}function D(o){return o===62?U(o):F(o)}function _(o){return nn(o)?(n.consume(o),k):t(o)}function k(o){return o===45||v(o)?(n.consume(o),k):T(o)}function T(o){return C(o)?(l=T,W(o)):z(o)?(n.consume(o),T):U(o)}function H(o){return o===45||v(o)?(n.consume(o),H):o===47||o===62||Z(o)?N(o):t(o)}function N(o){return o===47?(n.consume(o),U):o===58||o===95||nn(o)?(n.consume(o),V):C(o)?(l=N,W(o)):z(o)?(n.consume(o),N):U(o)}function V(o){return o===45||o===46||o===58||o===95||v(o)?(n.consume(o),V):y(o)}function y(o){return o===61?(n.consume(o),S):C(o)?(l=y,W(o)):z(o)?(n.consume(o),y):N(o)}function S(o){return o===null||o===60||o===61||o===62||o===96?t(o):o===34||o===39?(n.consume(o),u=o,P):C(o)?(l=S,W(o)):z(o)?(n.consume(o),S):(n.consume(o),R)}function P(o){return o===u?(n.consume(o),u=void 0,w):o===null?t(o):C(o)?(l=P,W(o)):(n.consume(o),P)}function R(o){return o===null||o===34||o===39||o===60||o===61||o===96?t(o):o===47||o===62||Z(o)?N(o):(n.consume(o),R)}function w(o){return o===47||o===62||Z(o)?N(o):t(o)}function U(o){return o===62?(n.consume(o),n.exit("htmlTextData"),n.exit("htmlText"),r):t(o)}function W(o){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),G}function G(o){return z(o)?O(n,en,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):en(o)}function en(o){return n.enter("htmlTextData"),l(o)}}const Dn={name:"labelEnd",tokenize:Ne,resolveTo:He,resolveAll:qe},Me={tokenize:Ve},je={tokenize:We},Re={tokenize:Qe};function qe(n){let r=-1;for(;++r=3&&(c===null||C(c))?(n.exit("thematicBreak"),r(c)):t(c)}function m(c){return c===u?(n.consume(c),e++,m):(n.exit("thematicBreakSequence"),z(c)?O(n,a,"whitespace")(c):a(c))}}const $={name:"list",tokenize:ve,continuation:{tokenize:nr},exit:er},Ke={tokenize:rr,partial:!0},Xe={tokenize:tr,partial:!0};function ve(n,r,t){const e=this,u=e.events[e.events.length-1];let i=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,l=0;return a;function a(h){const A=e.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!e.containerState.marker||h===e.containerState.marker:zn(h)){if(e.containerState.type||(e.containerState.type=A,n.enter(A,{_container:!0})),A==="listUnordered")return n.enter("listItemPrefix"),h===42||h===45?n.check(bn,t,c)(h):c(h);if(!e.interrupt||h===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(h)}return t(h)}function m(h){return zn(h)&&++l<10?(n.consume(h),m):(!e.interrupt||l<2)&&(e.containerState.marker?h===e.containerState.marker:h===41||h===46)?(n.exit("listItemValue"),c(h)):t(h)}function c(h){return n.enter("listItemMarker"),n.consume(h),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||h,n.check(Sn,e.interrupt?t:p,n.attempt(Ke,x,f))}function p(h){return e.containerState.initialBlankLine=!0,i++,x(h)}function f(h){return z(h)?(n.enter("listItemPrefixWhitespace"),n.consume(h),n.exit("listItemPrefixWhitespace"),x):t(h)}function x(h){return e.containerState.size=i+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(h)}}function nr(n,r,t){const e=this;return e.containerState._closeFlow=void 0,n.check(Sn,u,i);function u(a){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,O(n,r,"listItemIndent",e.containerState.size+1)(a)}function i(a){return e.containerState.furtherBlankLines||!z(a)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,l(a)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(Xe,r,l)(a))}function l(a){return e.containerState._closeFlow=!0,e.interrupt=void 0,O(n,n.attempt($,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function tr(n,r,t){const e=this;return O(n,u,"listItemIndent",e.containerState.size+1);function u(i){const l=e.events[e.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===e.containerState.size?r(i):t(i)}}function er(n){n.exit(this.containerState.type)}function rr(n,r,t){const e=this;return O(n,u,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function u(i){const l=e.events[e.events.length-1];return!z(i)&&l&&l[1].type==="listItemPrefixWhitespace"?r(i):t(i)}}const Kn={name:"setextUnderline",tokenize:ur,resolveTo:ir};function ir(n,r){let t=n.length,e,u,i;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){e=t;break}n[t][1].type==="paragraph"&&(u=t)}else n[t][1].type==="content"&&n.splice(t,1),!i&&n[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:Object.assign({},n[u][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[u][1].type="setextHeadingText",i?(n.splice(u,0,["enter",l,r]),n.splice(i+1,0,["exit",n[e][1],r]),n[e][1].end=Object.assign({},n[i][1].end)):n[e][1]=l,n.push(["exit",l,r]),n}function ur(n,r,t){const e=this;let u;return i;function i(c){let p=e.events.length,f;for(;p--;)if(e.events[p][1].type!=="lineEnding"&&e.events[p][1].type!=="linePrefix"&&e.events[p][1].type!=="content"){f=e.events[p][1].type==="paragraph";break}return!e.parser.lazy[e.now().line]&&(e.interrupt||f)?(n.enter("setextHeadingLine"),u=c,l(c)):t(c)}function l(c){return n.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===u?(n.consume(c),a):(n.exit("setextHeadingLineSequence"),z(c)?O(n,m,"lineSuffix")(c):m(c))}function m(c){return c===null||C(c)?(n.exit("setextHeadingLine"),r(c)):t(c)}}const lr={tokenize:ar};function ar(n){const r=this,t=n.attempt(Sn,e,n.attempt(this.parser.constructs.flowInitial,u,O(n,n.attempt(this.parser.constructs.flow,u,n.attempt(pe,u)),"linePrefix")));return t;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),r.currentConstruct=void 0,t}}const or={resolveAll:ht()},sr=ct("string"),cr=ct("text");function ct(n){return{tokenize:r,resolveAll:ht(n==="text"?hr:void 0)};function r(t){const e=this,u=this.parser.constructs[n],i=t.attempt(u,l,a);return l;function l(p){return c(p)?i(p):a(p)}function a(p){if(p===null){t.consume(p);return}return t.enter("data"),t.consume(p),m}function m(p){return c(p)?(t.exit("data"),i(p)):(t.consume(p),m)}function c(p){if(p===null)return!0;const f=u[p];let x=-1;if(f)for(;++x-1){const a=l[0];typeof a=="string"?l[0]=a.slice(e):l.shift()}i>0&&l.push(n[u].slice(0,i))}return l}function mr(n,r){let t=-1;const e=[];let u;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCharCode(t)}const Ir=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Tr(n){return n.replace(Ir,Br)}function Br(n,r,t){if(r)return r;if(t.charCodeAt(0)===35){const u=t.charCodeAt(1),i=u===120||u===88;return pt(t.slice(i?2:1),i?16:10)}return On(t)||n}function yn(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?vn(n.position):"start"in n||"end"in n?vn(n):"line"in n||"column"in n?Tn(n):""}function Tn(n){return nt(n&&n.line)+":"+nt(n&&n.column)}function vn(n){return Tn(n&&n.start)+"-"+Tn(n&&n.end)}function nt(n){return n&&typeof n=="number"?n:1}const ft={}.hasOwnProperty,mt=function(n,r,t){return typeof r!="string"&&(t=r,r=void 0),Lr(t)(zr(wr(t).document().write(Ar()(n,r,!0))))};function Lr(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Hn),autolinkProtocol:y,autolinkEmail:y,atxHeading:a(jn),blockQuote:a(Fn),characterEscape:y,characterReference:y,codeFenced:a(Mn),codeFencedFenceInfo:m,codeFencedFenceMeta:m,codeIndented:a(Mn,m),codeText:a(kt,m),codeTextData:y,data:y,codeFlowValue:y,definition:a(dt),definitionDestinationString:m,definitionLabelString:m,definitionTitleString:m,emphasis:a(bt),hardBreakEscape:a(Rn),hardBreakTrailing:a(Rn),htmlFlow:a(qn,m),htmlFlowData:y,htmlText:a(qn,m),htmlTextData:y,image:a(yt),label:m,link:a(Hn),listItem:a(St),listItemValue:A,listOrdered:a(Nn,h),listUnordered:a(Nn),paragraph:a(Ft),reference:hn,referenceString:m,resourceDestinationString:m,resourceTitleString:m,setextHeading:a(jn),strong:a(Et),thematicBreak:a(wt)},exit:{atxHeading:p(),atxHeadingSequence:T,autolink:p(),autolinkEmail:mn,autolinkProtocol:fn,blockQuote:p(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:pn,characterReferenceMarkerNumeric:pn,characterReferenceValue:an,codeFenced:p(j),codeFencedFence:b,codeFencedFenceInfo:I,codeFencedFenceMeta:M,codeFlowValue:S,codeIndented:p(F),codeText:p(W),codeTextData:S,data:S,definition:p(),definitionDestinationString:k,definitionLabelString:D,definitionTitleString:_,emphasis:p(),hardBreakEscape:p(R),hardBreakTrailing:p(R),htmlFlow:p(w),htmlFlowData:S,htmlText:p(U),htmlTextData:S,image:p(en),label:J,labelText:o,lineEnding:P,link:p(G),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:Q,resourceDestinationString:rn,resourceTitleString:s,resource:K,setextHeading:p(V),setextHeadingLineSequence:N,setextHeadingText:H,strong:p(),thematicBreak:p()}};xt(r,(n||{}).mdastExtensions||[]);const t={};return e;function e(g){let d={type:"root",children:[]};const E={stack:[d],tokenStack:[],config:r,enter:c,exit:f,buffer:m,resume:x,setData:i,getData:l},B=[];let L=-1;for(;++L0){const X=E.tokenStack[E.tokenStack.length-1];(X[1]||tt).call(E,void 0,X[0])}for(d.position={start:sn(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:sn(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},L=-1;++L{t.forEach(e=>{ut[e](a,r,n)})},ht=(a,t,r)=>{x.trace("Making markers for ",r),a.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).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"),a.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).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")},ot=(a,t,r)=>{a.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).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"),a.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).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")},ft=(a,t,r)=>{a.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).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"),a.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).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")},pt=(a,t,r)=>{a.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).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"),a.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).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")},yt=(a,t,r)=>{a.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).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),a.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).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)},dt=(a,t,r)=>{a.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).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"),a.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).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")},xt=(a,t,r)=>{a.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).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"),a.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).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")},bt=(a,t,r)=>{a.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).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"),a.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).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")},gt=(a,t,r)=>{a.append("defs").append("marker").attr("id",r+"_"+t+"-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")},ut={extension:ht,composition:ot,aggregation:ft,dependency:pt,lollipop:yt,point:dt,circle:xt,cross:bt,barb:gt},rr=ct;function wt(a,t){t&&a.attr("style",t)}function mt(a){const t=M(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=a.label,e=a.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+""),wt(r,a.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}const kt=(a,t,r,n)=>{let e=a||"";if(typeof e=="object"&&(e=e[0]),$(w().flowchart.htmlLabels)){e=e.replace(/\\n|\n/g,"
"),x.info("vertexText"+e);const i={isNode:n,label:Q(e).replace(/fa[blrs]?:fa-[\w-]+/g,l=>``),labelStyle:t.replace("fill:","color:")};return mt(i)}else{const i=document.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof e=="string"?s=e.split(/\\n|\n|/gi):Array.isArray(e)?s=e:s=[];for(const l of s){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=l.trim(),i.appendChild(c)}return i}},I=kt,_=async(a,t,r,n)=>{let e;const i=t.useHtmlLabels||$(w().flowchart.htmlLabels);r?e=r:e="node default";const s=a.insert("g").attr("class",e).attr("id",t.domId||t.id),l=s.insert("g").attr("class","label").attr("style",t.labelStyle);let c;t.labelText===void 0?c="":c=typeof t.labelText=="string"?t.labelText:t.labelText[0];const o=l.node();let h;t.labelType==="markdown"?h=at(l,J(Q(c),w()),{useHtmlLabels:i,width:t.width||w().flowchart.wrappingWidth,classes:"markdown-node-label"}):h=o.appendChild(I(J(Q(c),w()),t.labelStyle,!1,n));let f=h.getBBox();const y=t.padding/2;if($(w().flowchart.htmlLabels)){const p=h.children[0],u=M(h),k=p.getElementsByTagName("img");if(k){const g=c.replace(/]*>/g,"").trim()==="";await Promise.all([...k].map(d=>new Promise(b=>{function B(){if(d.style.display="flex",d.style.flexDirection="column",g){const C=w().fontSize?w().fontSize:window.getComputedStyle(document.body).fontSize,X=5;d.style.width=parseInt(C,10)*X+"px"}else d.style.width="100%";b(d)}setTimeout(()=>{d.complete&&B()}),d.addEventListener("error",B),d.addEventListener("load",B)})))}f=p.getBoundingClientRect(),u.attr("width",f.width),u.attr("height",f.height)}return i?l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):l.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:s,bbox:f,halfPadding:y,label:l}},v=(a,t)=>{const r=t.node().getBBox();a.width=r.width,a.height=r.height};function N(a,t,r,n){return a.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}function vt(a,t){return a.intersect(t)}function et(a,t,r,n){var e=a.x,i=a.y,s=e-n.x,l=i-n.y,c=Math.sqrt(t*t*l*l+r*r*s*s),o=Math.abs(t*r*s/c);n.x0}function Et(a,t,r){var n=a.x,e=a.y,i=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(u){s=Math.min(s,u.x),l=Math.min(l,u.y)}):(s=Math.min(s,t.x),l=Math.min(l,t.y));for(var c=n-a.width/2-s,o=e-a.height/2-l,h=0;h1&&i.sort(function(u,k){var g=u.x-r.x,d=u.y-r.y,b=Math.sqrt(g*g+d*d),B=k.x-r.x,C=k.y-r.y,X=Math.sqrt(B*B+C*C);return b{var r=a.x,n=a.y,e=t.x-r,i=t.y-n,s=a.width/2,l=a.height/2,c,o;return Math.abs(i)*s>Math.abs(e)*l?(i<0&&(l=-l),c=i===0?0:l*e/i,o=l):(e<0&&(s=-s),c=s,o=e===0?0:s*i/e),{x:r+c,y:n+o}},Mt=Bt,m={node:vt,circle:Lt,ellipse:et,polygon:Et,rect:Mt},_t=async(a,t)=>{t.useHtmlLabels||w().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:e,halfPadding:i}=await _(a,t,"node "+t.classes,!0);x.info("Classes = ",t.classes);const s=n.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-e.width/2-i).attr("y",-e.height/2-i).attr("width",e.width+t.padding).attr("height",e.height+t.padding),v(t,s),t.intersect=function(l){return m.rect(t,l)},n},Ct=_t,K=a=>a?" "+a:"",R=(a,t)=>`${t||"node default"}${K(a.classes)} ${K(a.class)}`,G=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=e+i,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];x.info("Question main (Circle)");const c=N(r,s,s,l);return c.attr("style",t.style),v(t,c),t.intersect=function(o){return x.warn("Intersect called"),m.polygon(t,l,o)},r},Tt=(a,t)=>{const r=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,e=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",e.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return m.circle(t,14,s)},r},Rt=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=4,i=n.height+t.padding,s=i/e,l=n.width+2*s+t.padding,c=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-i/2},{x:l-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],o=N(r,l,i,c);return o.attr("style",t.style),v(t,o),t.intersect=function(h){return m.polygon(t,c,h)},r},It=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:-i/2,y:0},{x:e,y:0},{x:e,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return N(r,e,i,s).attr("style",t.style),t.width=e+i,t.height=i,t.intersect=function(c){return m.polygon(t,s,c)},r},$t=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:-2*i/6,y:0},{x:e-i/6,y:0},{x:e+2*i/6,y:-i},{x:i/6,y:-i}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Ht=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:2*i/6,y:0},{x:e+i/6,y:0},{x:e-2*i/6,y:-i},{x:-i/6,y:-i}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Nt=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:-2*i/6,y:0},{x:e+2*i/6,y:0},{x:e-i/6,y:-i},{x:i/6,y:-i}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Ot=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:i/6,y:0},{x:e-i/6,y:0},{x:e+2*i/6,y:-i},{x:-2*i/6,y:-i}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Xt=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:0,y:0},{x:e+i/2,y:0},{x:e,y:-i/2},{x:e+i/2,y:-i},{x:0,y:-i}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Yt=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=e/2,s=i/(2.5+e/50),l=n.height+s+t.padding,c="M 0,"+s+" a "+i+","+s+" 0,0,0 "+e+" 0 a "+i+","+s+" 0,0,0 "+-e+" 0 l 0,"+l+" a "+i+","+s+" 0,0,0 "+e+" 0 l 0,"+-l,o=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-e/2+","+-(l/2+s)+")");return v(t,o),t.intersect=function(h){const f=m.rect(t,h),y=f.x-t.x;if(i!=0&&(Math.abs(y)t.height/2-s)){let p=s*s*(1-y*y/(i*i));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-t.y>0&&(p=-p),f.y+=p}return f},r},Wt=async(a,t)=>{const{shapeSvg:r,bbox:n,halfPadding:e}=await _(a,t,"node "+t.classes+" "+t.class,!0),i=r.insert("rect",":first-child"),s=n.width+t.padding,l=n.height+t.padding;if(i.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",-n.width/2-e).attr("y",-n.height/2-e).attr("width",s).attr("height",l),t.props){const c=new Set(Object.keys(t.props));t.props.borders&&(st(i,t.props.borders,s,l),c.delete("borders")),c.forEach(o=>{x.warn(`Unknown node property ${o}`)})}return v(t,i),t.intersect=function(c){return m.rect(t,c)},r},Dt=async(a,t)=>{const{shapeSvg:r}=await _(a,t,"label",!0);x.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),e=0,i=0;if(n.attr("width",e).attr("height",i),r.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(st(n,t.props.borders,e,i),s.delete("borders")),s.forEach(l=>{x.warn(`Unknown node property ${l}`)})}return v(t,n),t.intersect=function(s){return m.rect(t,s)},r};function st(a,t,r,n){const e=[],i=l=>{e.push(l,0)},s=l=>{e.push(0,l)};t.includes("t")?(x.debug("add top border"),i(r)):s(r),t.includes("r")?(x.debug("add right border"),i(n)):s(n),t.includes("b")?(x.debug("add bottom border"),i(r)):s(r),t.includes("l")?(x.debug("add left border"),i(n)):s(n),a.attr("stroke-dasharray",e.join(" "))}const jt=(a,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=a.insert("g").attr("class",r).attr("id",t.domId||t.id),e=n.insert("rect",":first-child"),i=n.insert("line"),s=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof l=="object"?c=l[0]:c=l,x.info("Label text abc79",c,l,typeof l=="object");const o=s.node().appendChild(I(c,t.labelStyle,!0,!0));let h={width:0,height:0};if($(w().flowchart.htmlLabels)){const k=o.children[0],g=M(o);h=k.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}x.info("Text 2",l);const f=l.slice(1,l.length);let y=o.getBBox();const p=s.node().appendChild(I(f.join?f.join("
"):f,t.labelStyle,!0,!0));if($(w().flowchart.htmlLabels)){const k=p.children[0],g=M(p);h=k.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}const u=t.padding/2;return M(p).attr("transform","translate( "+(h.width>y.width?0:(y.width-h.width)/2)+", "+(y.height+u+5)+")"),M(o).attr("transform","translate( "+(h.width{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.height+t.padding,i=n.width+e/4+t.padding,s=r.insert("rect",":first-child").attr("style",t.style).attr("rx",e/2).attr("ry",e/2).attr("x",-i/2).attr("y",-e/2).attr("width",i).attr("height",e);return v(t,s),t.intersect=function(l){return m.rect(t,l)},r},Ut=async(a,t)=>{const{shapeSvg:r,bbox:n,halfPadding:e}=await _(a,t,R(t,void 0),!0),i=r.insert("circle",":first-child");return i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+e).attr("width",n.width+t.padding).attr("height",n.height+t.padding),x.info("Circle main"),v(t,i),t.intersect=function(s){return x.info("Circle intersect",t,n.width/2+e,s),m.circle(t,n.width/2+e,s)},r},zt=async(a,t)=>{const{shapeSvg:r,bbox:n,halfPadding:e}=await _(a,t,R(t,void 0),!0),i=5,s=r.insert("g",":first-child"),l=s.insert("circle"),c=s.insert("circle");return s.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+e+i).attr("width",n.width+t.padding+i*2).attr("height",n.height+t.padding+i*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+e).attr("width",n.width+t.padding).attr("height",n.height+t.padding),x.info("DoubleCircle main"),v(t,l),t.intersect=function(o){return x.info("DoubleCircle intersect",t,n.width/2+e+i,o),m.circle(t,n.width/2+e+i,o)},r},Zt=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:0,y:0},{x:e,y:0},{x:e,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:e+8,y:0},{x:e+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Ft=(a,t)=>{const r=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),v(t,n),t.intersect=function(e){return m.circle(t,7,e)},r},P=(a,t,r)=>{const n=a.insert("g").attr("class","node default").attr("id",t.domId||t.id);let e=70,i=10;r==="LR"&&(e=10,i=70);const s=n.append("rect").attr("x",-1*e/2).attr("y",-1*i/2).attr("width",e).attr("height",i).attr("class","fork-join");return v(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return m.rect(t,l)},n},Qt=(a,t)=>{const r=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),e=r.insert("circle",":first-child");return e.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),v(t,e),t.intersect=function(i){return m.circle(t,7,i)},r},Vt=(a,t)=>{const r=t.padding/2,n=4,e=8;let i;t.classes?i="node "+t.classes:i="node default";const s=a.insert("g").attr("class",i).attr("id",t.domId||t.id),l=s.insert("rect",":first-child"),c=s.insert("line"),o=s.insert("line");let h=0,f=n;const y=s.insert("g").attr("class","label");let p=0;const u=t.classData.annotations&&t.classData.annotations[0],k=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",g=y.node().appendChild(I(k,t.labelStyle,!0,!0));let d=g.getBBox();if($(w().flowchart.htmlLabels)){const L=g.children[0],S=M(g);d=L.getBoundingClientRect(),S.attr("width",d.width),S.attr("height",d.height)}t.classData.annotations[0]&&(f+=d.height+n,h+=d.width);let b=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(w().flowchart.htmlLabels?b+="<"+t.classData.type+">":b+="<"+t.classData.type+">");const B=y.node().appendChild(I(b,t.labelStyle,!0,!0));M(B).attr("class","classTitle");let C=B.getBBox();if($(w().flowchart.htmlLabels)){const L=B.children[0],S=M(B);C=L.getBoundingClientRect(),S.attr("width",C.width),S.attr("height",C.height)}f+=C.height+n,C.width>h&&(h=C.width);const X=[];t.classData.members.forEach(L=>{const S=L.getDisplayDetails();let Y=S.displayText;w().flowchart.htmlLabels&&(Y=Y.replace(//g,">"));const H=y.node().appendChild(I(Y,S.cssStyle?S.cssStyle:t.labelStyle,!0,!0));let T=H.getBBox();if($(w().flowchart.htmlLabels)){const F=H.children[0],D=M(H);T=F.getBoundingClientRect(),D.attr("width",T.width),D.attr("height",T.height)}T.width>h&&(h=T.width),f+=T.height+n,X.push(H)}),f+=e;const V=[];if(t.classData.methods.forEach(L=>{const S=L.getDisplayDetails();let Y=S.displayText;w().flowchart.htmlLabels&&(Y=Y.replace(//g,">"));const H=y.node().appendChild(I(Y,S.cssStyle?S.cssStyle:t.labelStyle,!0,!0));let T=H.getBBox();if($(w().flowchart.htmlLabels)){const F=H.children[0],D=M(H);T=F.getBoundingClientRect(),D.attr("width",T.width),D.attr("height",T.height)}T.width>h&&(h=T.width),f+=T.height+n,V.push(H)}),f+=e,u){let L=(h-d.width)/2;M(g).attr("transform","translate( "+(-1*h/2+L)+", "+-1*f/2+")"),p=d.height+n}let it=(h-C.width)/2;return M(B).attr("transform","translate( "+(-1*h/2+it)+", "+(-1*f/2+p)+")"),p+=C.height+n,c.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+e+p).attr("y2",-f/2-r+e+p),p+=e,X.forEach(L=>{M(L).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+e/2)+")");const S=L==null?void 0:L.getBBox();p+=((S==null?void 0:S.height)??0)+n}),p+=e,o.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+e+p).attr("y2",-f/2-r+e+p),p+=e,V.forEach(L=>{M(L).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");const S=L==null?void 0:L.getBBox();p+=((S==null?void 0:S.height)??0)+n}),l.attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(f/2)-r).attr("width",h+t.padding).attr("height",f+t.padding),v(t,l),t.intersect=function(L){return m.rect(t,L)},s},tt={rhombus:G,question:G,rect:Wt,labelRect:Dt,rectWithTitle:jt,choice:Tt,circle:Ut,doublecircle:zt,stadium:At,hexagon:Rt,rect_left_inv_arrow:It,lean_right:$t,lean_left:Ht,trapezoid:Nt,inv_trapezoid:Ot,rect_right_inv_arrow:Xt,cylinder:Yt,start:Ft,end:Qt,note:Ct,subroutine:Zt,fork:P,join:P,class_box:Vt};let W={};const ar=async(a,t,r)=>{let n,e;if(t.link){let i;w().securityLevel==="sandbox"?i="_top":t.linkTarget&&(i=t.linkTarget||"_blank"),n=a.insert("svg:a").attr("xlink:href",t.link).attr("target",i),e=await tt[t.shape](n,t,r)}else e=await tt[t.shape](a,t,r),n=e;return t.tooltip&&e.attr("title",t.tooltip),t.class&&e.attr("class","node default "+t.class),W[t.id]=n,t.haveCallback&&W[t.id].attr("class",W[t.id].attr("class")+" clickable"),n},er=(a,t)=>{W[t.id]=a},sr=()=>{W={}},ir=a=>{const t=W[a.id];x.trace("Transforming node",a.diff,a,"translate("+(a.x-a.width/2-5)+", "+a.width/2+")");const r=8,n=a.diff||0;return a.clusterNode?t.attr("transform","translate("+(a.x+n-a.width/2)+", "+(a.y-a.height/2-r)+")"):t.attr("transform","translate("+a.x+", "+a.y+")"),n},O={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function A(a,t){a=z(a),t=z(t);const[r,n]=[a.x,a.y],[e,i]=[t.x,t.y],s=e-r,l=i-n;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}const z=a=>Array.isArray(a)?{x:a[0],y:a[1]}:a,Jt=a=>({x:function(t,r,n){let e=0;if(r===0&&Object.hasOwn(O,a.arrowTypeStart)){const{angle:i,deltaX:s}=A(n[0],n[1]);e=O[a.arrowTypeStart]*Math.cos(i)*(s>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(O,a.arrowTypeEnd)){const{angle:i,deltaX:s}=A(n[n.length-1],n[n.length-2]);e=O[a.arrowTypeEnd]*Math.cos(i)*(s>=0?1:-1)}return z(t).x+e},y:function(t,r,n){let e=0;if(r===0&&Object.hasOwn(O,a.arrowTypeStart)){const{angle:i,deltaY:s}=A(n[0],n[1]);e=O[a.arrowTypeStart]*Math.abs(Math.sin(i))*(s>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(O,a.arrowTypeEnd)){const{angle:i,deltaY:s}=A(n[n.length-1],n[n.length-2]);e=O[a.arrowTypeEnd]*Math.abs(Math.sin(i))*(s>=0?1:-1)}return z(t).y+e}});let Z={},E={};const nr=()=>{Z={},E={}},lr=(a,t)=>{const r=$(w().flowchart.htmlLabels),n=t.labelType==="markdown"?at(a,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0}):I(t.label,t.labelStyle);x.info("abc82",t,t.labelType);const e=a.insert("g").attr("class","edgeLabel"),i=e.insert("g").attr("class","label");i.node().appendChild(n);let s=n.getBBox();if(r){const c=n.children[0],o=M(n);s=c.getBoundingClientRect(),o.attr("width",s.width),o.attr("height",s.height)}i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Z[t.id]=e,t.width=s.width,t.height=s.height;let l;if(t.startLabelLeft){const c=I(t.startLabelLeft,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),E[t.id]||(E[t.id]={}),E[t.id].startLeft=o,U(l,t.startLabelLeft)}if(t.startLabelRight){const c=I(t.startLabelRight,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=o.node().appendChild(c),h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),E[t.id]||(E[t.id]={}),E[t.id].startRight=o,U(l,t.startLabelRight)}if(t.endLabelLeft){const c=I(t.endLabelLeft,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),o.node().appendChild(c),E[t.id]||(E[t.id]={}),E[t.id].endLeft=o,U(l,t.endLabelLeft)}if(t.endLabelRight){const c=I(t.endLabelRight,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),o.node().appendChild(c),E[t.id]||(E[t.id]={}),E[t.id].endRight=o,U(l,t.endLabelRight)}return n};function U(a,t){w().flowchart.htmlLabels&&a&&(a.style.width=t.length*9+"px",a.style.height="12px")}const cr=(a,t)=>{x.info("Moving label abc78 ",a.id,a.label,Z[a.id]);let r=t.updatedPath?t.updatedPath:t.originalPath;if(a.label){const n=Z[a.id];let e=a.x,i=a.y;if(r){const s=j.calcLabelPosition(r);x.info("Moving label "+a.label+" from (",e,",",i,") to (",s.x,",",s.y,") abc78"),t.updatedPath&&(e=s.x,i=s.y)}n.attr("transform","translate("+e+", "+i+")")}if(a.startLabelLeft){const n=E[a.id].startLeft;let e=a.x,i=a.y;if(r){const s=j.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_left",r);e=s.x,i=s.y}n.attr("transform","translate("+e+", "+i+")")}if(a.startLabelRight){const n=E[a.id].startRight;let e=a.x,i=a.y;if(r){const s=j.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_right",r);e=s.x,i=s.y}n.attr("transform","translate("+e+", "+i+")")}if(a.endLabelLeft){const n=E[a.id].endLeft;let e=a.x,i=a.y;if(r){const s=j.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_left",r);e=s.x,i=s.y}n.attr("transform","translate("+e+", "+i+")")}if(a.endLabelRight){const n=E[a.id].endRight;let e=a.x,i=a.y;if(r){const s=j.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_right",r);e=s.x,i=s.y}n.attr("transform","translate("+e+", "+i+")")}},qt=(a,t)=>{const r=a.x,n=a.y,e=Math.abs(t.x-r),i=Math.abs(t.y-n),s=a.width/2,l=a.height/2;return e>=s||i>=l},Kt=(a,t,r)=>{x.warn(`intersection calc abc89: +import{p as $,c as w,d as J,aR as Q,h as M,l as x,z as j,F as nt}from"./index-e0ff10fa.js";import{a as at}from"./createText-62fc7601-0312dc07.js";import{l as lt}from"./line-434e5c73.js";const ct=(a,t,r,n)=>{t.forEach(e=>{ut[e](a,r,n)})},ht=(a,t,r)=>{x.trace("Making markers for ",r),a.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).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"),a.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).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")},ot=(a,t,r)=>{a.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).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"),a.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).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")},ft=(a,t,r)=>{a.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).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"),a.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).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")},pt=(a,t,r)=>{a.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).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"),a.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).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")},yt=(a,t,r)=>{a.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).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),a.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).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)},dt=(a,t,r)=>{a.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).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"),a.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).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")},xt=(a,t,r)=>{a.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).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"),a.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).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")},bt=(a,t,r)=>{a.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).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"),a.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).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")},gt=(a,t,r)=>{a.append("defs").append("marker").attr("id",r+"_"+t+"-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")},ut={extension:ht,composition:ot,aggregation:ft,dependency:pt,lollipop:yt,point:dt,circle:xt,cross:bt,barb:gt},rr=ct;function wt(a,t){t&&a.attr("style",t)}function mt(a){const t=M(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=a.label,e=a.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+""),wt(r,a.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}const kt=(a,t,r,n)=>{let e=a||"";if(typeof e=="object"&&(e=e[0]),$(w().flowchart.htmlLabels)){e=e.replace(/\\n|\n/g,"
"),x.info("vertexText"+e);const i={isNode:n,label:Q(e).replace(/fa[blrs]?:fa-[\w-]+/g,l=>``),labelStyle:t.replace("fill:","color:")};return mt(i)}else{const i=document.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof e=="string"?s=e.split(/\\n|\n|/gi):Array.isArray(e)?s=e:s=[];for(const l of s){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=l.trim(),i.appendChild(c)}return i}},I=kt,_=async(a,t,r,n)=>{let e;const i=t.useHtmlLabels||$(w().flowchart.htmlLabels);r?e=r:e="node default";const s=a.insert("g").attr("class",e).attr("id",t.domId||t.id),l=s.insert("g").attr("class","label").attr("style",t.labelStyle);let c;t.labelText===void 0?c="":c=typeof t.labelText=="string"?t.labelText:t.labelText[0];const o=l.node();let h;t.labelType==="markdown"?h=at(l,J(Q(c),w()),{useHtmlLabels:i,width:t.width||w().flowchart.wrappingWidth,classes:"markdown-node-label"}):h=o.appendChild(I(J(Q(c),w()),t.labelStyle,!1,n));let f=h.getBBox();const y=t.padding/2;if($(w().flowchart.htmlLabels)){const p=h.children[0],u=M(h),k=p.getElementsByTagName("img");if(k){const g=c.replace(/]*>/g,"").trim()==="";await Promise.all([...k].map(d=>new Promise(b=>{function B(){if(d.style.display="flex",d.style.flexDirection="column",g){const C=w().fontSize?w().fontSize:window.getComputedStyle(document.body).fontSize,X=5;d.style.width=parseInt(C,10)*X+"px"}else d.style.width="100%";b(d)}setTimeout(()=>{d.complete&&B()}),d.addEventListener("error",B),d.addEventListener("load",B)})))}f=p.getBoundingClientRect(),u.attr("width",f.width),u.attr("height",f.height)}return i?l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):l.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:s,bbox:f,halfPadding:y,label:l}},v=(a,t)=>{const r=t.node().getBBox();a.width=r.width,a.height=r.height};function N(a,t,r,n){return a.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}function vt(a,t){return a.intersect(t)}function et(a,t,r,n){var e=a.x,i=a.y,s=e-n.x,l=i-n.y,c=Math.sqrt(t*t*l*l+r*r*s*s),o=Math.abs(t*r*s/c);n.x0}function Et(a,t,r){var n=a.x,e=a.y,i=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(u){s=Math.min(s,u.x),l=Math.min(l,u.y)}):(s=Math.min(s,t.x),l=Math.min(l,t.y));for(var c=n-a.width/2-s,o=e-a.height/2-l,h=0;h1&&i.sort(function(u,k){var g=u.x-r.x,d=u.y-r.y,b=Math.sqrt(g*g+d*d),B=k.x-r.x,C=k.y-r.y,X=Math.sqrt(B*B+C*C);return b{var r=a.x,n=a.y,e=t.x-r,i=t.y-n,s=a.width/2,l=a.height/2,c,o;return Math.abs(i)*s>Math.abs(e)*l?(i<0&&(l=-l),c=i===0?0:l*e/i,o=l):(e<0&&(s=-s),c=s,o=e===0?0:s*i/e),{x:r+c,y:n+o}},Mt=Bt,m={node:vt,circle:Lt,ellipse:et,polygon:Et,rect:Mt},_t=async(a,t)=>{t.useHtmlLabels||w().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:e,halfPadding:i}=await _(a,t,"node "+t.classes,!0);x.info("Classes = ",t.classes);const s=n.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-e.width/2-i).attr("y",-e.height/2-i).attr("width",e.width+t.padding).attr("height",e.height+t.padding),v(t,s),t.intersect=function(l){return m.rect(t,l)},n},Ct=_t,K=a=>a?" "+a:"",R=(a,t)=>`${t||"node default"}${K(a.classes)} ${K(a.class)}`,G=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=e+i,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];x.info("Question main (Circle)");const c=N(r,s,s,l);return c.attr("style",t.style),v(t,c),t.intersect=function(o){return x.warn("Intersect called"),m.polygon(t,l,o)},r},Tt=(a,t)=>{const r=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,e=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",e.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return m.circle(t,14,s)},r},Rt=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=4,i=n.height+t.padding,s=i/e,l=n.width+2*s+t.padding,c=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-i/2},{x:l-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],o=N(r,l,i,c);return o.attr("style",t.style),v(t,o),t.intersect=function(h){return m.polygon(t,c,h)},r},It=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:-i/2,y:0},{x:e,y:0},{x:e,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return N(r,e,i,s).attr("style",t.style),t.width=e+i,t.height=i,t.intersect=function(c){return m.polygon(t,s,c)},r},$t=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:-2*i/6,y:0},{x:e-i/6,y:0},{x:e+2*i/6,y:-i},{x:i/6,y:-i}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Ht=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:2*i/6,y:0},{x:e+i/6,y:0},{x:e-2*i/6,y:-i},{x:-i/6,y:-i}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Nt=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:-2*i/6,y:0},{x:e+2*i/6,y:0},{x:e-i/6,y:-i},{x:i/6,y:-i}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Ot=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:i/6,y:0},{x:e-i/6,y:0},{x:e+2*i/6,y:-i},{x:-2*i/6,y:-i}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Xt=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:0,y:0},{x:e+i/2,y:0},{x:e,y:-i/2},{x:e+i/2,y:-i},{x:0,y:-i}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Yt=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=e/2,s=i/(2.5+e/50),l=n.height+s+t.padding,c="M 0,"+s+" a "+i+","+s+" 0,0,0 "+e+" 0 a "+i+","+s+" 0,0,0 "+-e+" 0 l 0,"+l+" a "+i+","+s+" 0,0,0 "+e+" 0 l 0,"+-l,o=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-e/2+","+-(l/2+s)+")");return v(t,o),t.intersect=function(h){const f=m.rect(t,h),y=f.x-t.x;if(i!=0&&(Math.abs(y)t.height/2-s)){let p=s*s*(1-y*y/(i*i));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-t.y>0&&(p=-p),f.y+=p}return f},r},Wt=async(a,t)=>{const{shapeSvg:r,bbox:n,halfPadding:e}=await _(a,t,"node "+t.classes+" "+t.class,!0),i=r.insert("rect",":first-child"),s=n.width+t.padding,l=n.height+t.padding;if(i.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",-n.width/2-e).attr("y",-n.height/2-e).attr("width",s).attr("height",l),t.props){const c=new Set(Object.keys(t.props));t.props.borders&&(st(i,t.props.borders,s,l),c.delete("borders")),c.forEach(o=>{x.warn(`Unknown node property ${o}`)})}return v(t,i),t.intersect=function(c){return m.rect(t,c)},r},Dt=async(a,t)=>{const{shapeSvg:r}=await _(a,t,"label",!0);x.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),e=0,i=0;if(n.attr("width",e).attr("height",i),r.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(st(n,t.props.borders,e,i),s.delete("borders")),s.forEach(l=>{x.warn(`Unknown node property ${l}`)})}return v(t,n),t.intersect=function(s){return m.rect(t,s)},r};function st(a,t,r,n){const e=[],i=l=>{e.push(l,0)},s=l=>{e.push(0,l)};t.includes("t")?(x.debug("add top border"),i(r)):s(r),t.includes("r")?(x.debug("add right border"),i(n)):s(n),t.includes("b")?(x.debug("add bottom border"),i(r)):s(r),t.includes("l")?(x.debug("add left border"),i(n)):s(n),a.attr("stroke-dasharray",e.join(" "))}const jt=(a,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=a.insert("g").attr("class",r).attr("id",t.domId||t.id),e=n.insert("rect",":first-child"),i=n.insert("line"),s=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof l=="object"?c=l[0]:c=l,x.info("Label text abc79",c,l,typeof l=="object");const o=s.node().appendChild(I(c,t.labelStyle,!0,!0));let h={width:0,height:0};if($(w().flowchart.htmlLabels)){const k=o.children[0],g=M(o);h=k.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}x.info("Text 2",l);const f=l.slice(1,l.length);let y=o.getBBox();const p=s.node().appendChild(I(f.join?f.join("
"):f,t.labelStyle,!0,!0));if($(w().flowchart.htmlLabels)){const k=p.children[0],g=M(p);h=k.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}const u=t.padding/2;return M(p).attr("transform","translate( "+(h.width>y.width?0:(y.width-h.width)/2)+", "+(y.height+u+5)+")"),M(o).attr("transform","translate( "+(h.width{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.height+t.padding,i=n.width+e/4+t.padding,s=r.insert("rect",":first-child").attr("style",t.style).attr("rx",e/2).attr("ry",e/2).attr("x",-i/2).attr("y",-e/2).attr("width",i).attr("height",e);return v(t,s),t.intersect=function(l){return m.rect(t,l)},r},Ut=async(a,t)=>{const{shapeSvg:r,bbox:n,halfPadding:e}=await _(a,t,R(t,void 0),!0),i=r.insert("circle",":first-child");return i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+e).attr("width",n.width+t.padding).attr("height",n.height+t.padding),x.info("Circle main"),v(t,i),t.intersect=function(s){return x.info("Circle intersect",t,n.width/2+e,s),m.circle(t,n.width/2+e,s)},r},zt=async(a,t)=>{const{shapeSvg:r,bbox:n,halfPadding:e}=await _(a,t,R(t,void 0),!0),i=5,s=r.insert("g",":first-child"),l=s.insert("circle"),c=s.insert("circle");return s.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+e+i).attr("width",n.width+t.padding+i*2).attr("height",n.height+t.padding+i*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+e).attr("width",n.width+t.padding).attr("height",n.height+t.padding),x.info("DoubleCircle main"),v(t,l),t.intersect=function(o){return x.info("DoubleCircle intersect",t,n.width/2+e+i,o),m.circle(t,n.width/2+e+i,o)},r},Zt=async(a,t)=>{const{shapeSvg:r,bbox:n}=await _(a,t,R(t,void 0),!0),e=n.width+t.padding,i=n.height+t.padding,s=[{x:0,y:0},{x:e,y:0},{x:e,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:e+8,y:0},{x:e+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],l=N(r,e,i,s);return l.attr("style",t.style),v(t,l),t.intersect=function(c){return m.polygon(t,s,c)},r},Ft=(a,t)=>{const r=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),v(t,n),t.intersect=function(e){return m.circle(t,7,e)},r},P=(a,t,r)=>{const n=a.insert("g").attr("class","node default").attr("id",t.domId||t.id);let e=70,i=10;r==="LR"&&(e=10,i=70);const s=n.append("rect").attr("x",-1*e/2).attr("y",-1*i/2).attr("width",e).attr("height",i).attr("class","fork-join");return v(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return m.rect(t,l)},n},Qt=(a,t)=>{const r=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),e=r.insert("circle",":first-child");return e.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),v(t,e),t.intersect=function(i){return m.circle(t,7,i)},r},Vt=(a,t)=>{const r=t.padding/2,n=4,e=8;let i;t.classes?i="node "+t.classes:i="node default";const s=a.insert("g").attr("class",i).attr("id",t.domId||t.id),l=s.insert("rect",":first-child"),c=s.insert("line"),o=s.insert("line");let h=0,f=n;const y=s.insert("g").attr("class","label");let p=0;const u=t.classData.annotations&&t.classData.annotations[0],k=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",g=y.node().appendChild(I(k,t.labelStyle,!0,!0));let d=g.getBBox();if($(w().flowchart.htmlLabels)){const L=g.children[0],S=M(g);d=L.getBoundingClientRect(),S.attr("width",d.width),S.attr("height",d.height)}t.classData.annotations[0]&&(f+=d.height+n,h+=d.width);let b=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(w().flowchart.htmlLabels?b+="<"+t.classData.type+">":b+="<"+t.classData.type+">");const B=y.node().appendChild(I(b,t.labelStyle,!0,!0));M(B).attr("class","classTitle");let C=B.getBBox();if($(w().flowchart.htmlLabels)){const L=B.children[0],S=M(B);C=L.getBoundingClientRect(),S.attr("width",C.width),S.attr("height",C.height)}f+=C.height+n,C.width>h&&(h=C.width);const X=[];t.classData.members.forEach(L=>{const S=L.getDisplayDetails();let Y=S.displayText;w().flowchart.htmlLabels&&(Y=Y.replace(//g,">"));const H=y.node().appendChild(I(Y,S.cssStyle?S.cssStyle:t.labelStyle,!0,!0));let T=H.getBBox();if($(w().flowchart.htmlLabels)){const F=H.children[0],D=M(H);T=F.getBoundingClientRect(),D.attr("width",T.width),D.attr("height",T.height)}T.width>h&&(h=T.width),f+=T.height+n,X.push(H)}),f+=e;const V=[];if(t.classData.methods.forEach(L=>{const S=L.getDisplayDetails();let Y=S.displayText;w().flowchart.htmlLabels&&(Y=Y.replace(//g,">"));const H=y.node().appendChild(I(Y,S.cssStyle?S.cssStyle:t.labelStyle,!0,!0));let T=H.getBBox();if($(w().flowchart.htmlLabels)){const F=H.children[0],D=M(H);T=F.getBoundingClientRect(),D.attr("width",T.width),D.attr("height",T.height)}T.width>h&&(h=T.width),f+=T.height+n,V.push(H)}),f+=e,u){let L=(h-d.width)/2;M(g).attr("transform","translate( "+(-1*h/2+L)+", "+-1*f/2+")"),p=d.height+n}let it=(h-C.width)/2;return M(B).attr("transform","translate( "+(-1*h/2+it)+", "+(-1*f/2+p)+")"),p+=C.height+n,c.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+e+p).attr("y2",-f/2-r+e+p),p+=e,X.forEach(L=>{M(L).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+e/2)+")");const S=L==null?void 0:L.getBBox();p+=((S==null?void 0:S.height)??0)+n}),p+=e,o.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+e+p).attr("y2",-f/2-r+e+p),p+=e,V.forEach(L=>{M(L).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");const S=L==null?void 0:L.getBBox();p+=((S==null?void 0:S.height)??0)+n}),l.attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(f/2)-r).attr("width",h+t.padding).attr("height",f+t.padding),v(t,l),t.intersect=function(L){return m.rect(t,L)},s},tt={rhombus:G,question:G,rect:Wt,labelRect:Dt,rectWithTitle:jt,choice:Tt,circle:Ut,doublecircle:zt,stadium:At,hexagon:Rt,rect_left_inv_arrow:It,lean_right:$t,lean_left:Ht,trapezoid:Nt,inv_trapezoid:Ot,rect_right_inv_arrow:Xt,cylinder:Yt,start:Ft,end:Qt,note:Ct,subroutine:Zt,fork:P,join:P,class_box:Vt};let W={};const ar=async(a,t,r)=>{let n,e;if(t.link){let i;w().securityLevel==="sandbox"?i="_top":t.linkTarget&&(i=t.linkTarget||"_blank"),n=a.insert("svg:a").attr("xlink:href",t.link).attr("target",i),e=await tt[t.shape](n,t,r)}else e=await tt[t.shape](a,t,r),n=e;return t.tooltip&&e.attr("title",t.tooltip),t.class&&e.attr("class","node default "+t.class),W[t.id]=n,t.haveCallback&&W[t.id].attr("class",W[t.id].attr("class")+" clickable"),n},er=(a,t)=>{W[t.id]=a},sr=()=>{W={}},ir=a=>{const t=W[a.id];x.trace("Transforming node",a.diff,a,"translate("+(a.x-a.width/2-5)+", "+a.width/2+")");const r=8,n=a.diff||0;return a.clusterNode?t.attr("transform","translate("+(a.x+n-a.width/2)+", "+(a.y-a.height/2-r)+")"):t.attr("transform","translate("+a.x+", "+a.y+")"),n},O={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function A(a,t){a=z(a),t=z(t);const[r,n]=[a.x,a.y],[e,i]=[t.x,t.y],s=e-r,l=i-n;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}const z=a=>Array.isArray(a)?{x:a[0],y:a[1]}:a,Jt=a=>({x:function(t,r,n){let e=0;if(r===0&&Object.hasOwn(O,a.arrowTypeStart)){const{angle:i,deltaX:s}=A(n[0],n[1]);e=O[a.arrowTypeStart]*Math.cos(i)*(s>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(O,a.arrowTypeEnd)){const{angle:i,deltaX:s}=A(n[n.length-1],n[n.length-2]);e=O[a.arrowTypeEnd]*Math.cos(i)*(s>=0?1:-1)}return z(t).x+e},y:function(t,r,n){let e=0;if(r===0&&Object.hasOwn(O,a.arrowTypeStart)){const{angle:i,deltaY:s}=A(n[0],n[1]);e=O[a.arrowTypeStart]*Math.abs(Math.sin(i))*(s>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(O,a.arrowTypeEnd)){const{angle:i,deltaY:s}=A(n[n.length-1],n[n.length-2]);e=O[a.arrowTypeEnd]*Math.abs(Math.sin(i))*(s>=0?1:-1)}return z(t).y+e}});let Z={},E={};const nr=()=>{Z={},E={}},lr=(a,t)=>{const r=$(w().flowchart.htmlLabels),n=t.labelType==="markdown"?at(a,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0}):I(t.label,t.labelStyle);x.info("abc82",t,t.labelType);const e=a.insert("g").attr("class","edgeLabel"),i=e.insert("g").attr("class","label");i.node().appendChild(n);let s=n.getBBox();if(r){const c=n.children[0],o=M(n);s=c.getBoundingClientRect(),o.attr("width",s.width),o.attr("height",s.height)}i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Z[t.id]=e,t.width=s.width,t.height=s.height;let l;if(t.startLabelLeft){const c=I(t.startLabelLeft,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),E[t.id]||(E[t.id]={}),E[t.id].startLeft=o,U(l,t.startLabelLeft)}if(t.startLabelRight){const c=I(t.startLabelRight,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=o.node().appendChild(c),h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),E[t.id]||(E[t.id]={}),E[t.id].startRight=o,U(l,t.startLabelRight)}if(t.endLabelLeft){const c=I(t.endLabelLeft,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),o.node().appendChild(c),E[t.id]||(E[t.id]={}),E[t.id].endLeft=o,U(l,t.endLabelLeft)}if(t.endLabelRight){const c=I(t.endLabelRight,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),o.node().appendChild(c),E[t.id]||(E[t.id]={}),E[t.id].endRight=o,U(l,t.endLabelRight)}return n};function U(a,t){w().flowchart.htmlLabels&&a&&(a.style.width=t.length*9+"px",a.style.height="12px")}const cr=(a,t)=>{x.info("Moving label abc78 ",a.id,a.label,Z[a.id]);let r=t.updatedPath?t.updatedPath:t.originalPath;if(a.label){const n=Z[a.id];let e=a.x,i=a.y;if(r){const s=j.calcLabelPosition(r);x.info("Moving label "+a.label+" from (",e,",",i,") to (",s.x,",",s.y,") abc78"),t.updatedPath&&(e=s.x,i=s.y)}n.attr("transform","translate("+e+", "+i+")")}if(a.startLabelLeft){const n=E[a.id].startLeft;let e=a.x,i=a.y;if(r){const s=j.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_left",r);e=s.x,i=s.y}n.attr("transform","translate("+e+", "+i+")")}if(a.startLabelRight){const n=E[a.id].startRight;let e=a.x,i=a.y;if(r){const s=j.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_right",r);e=s.x,i=s.y}n.attr("transform","translate("+e+", "+i+")")}if(a.endLabelLeft){const n=E[a.id].endLeft;let e=a.x,i=a.y;if(r){const s=j.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_left",r);e=s.x,i=s.y}n.attr("transform","translate("+e+", "+i+")")}if(a.endLabelRight){const n=E[a.id].endRight;let e=a.x,i=a.y;if(r){const s=j.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_right",r);e=s.x,i=s.y}n.attr("transform","translate("+e+", "+i+")")}},qt=(a,t)=>{const r=a.x,n=a.y,e=Math.abs(t.x-r),i=Math.abs(t.y-n),s=a.width/2,l=a.height/2;return e>=s||i>=l},Kt=(a,t,r)=>{x.warn(`intersection calc abc89: outsidePoint: ${JSON.stringify(t)} insidePoint : ${JSON.stringify(r)} node : x:${a.x} y:${a.y} w:${a.width} h:${a.height}`);const n=a.x,e=a.y,i=Math.abs(n-r.x),s=a.width/2;let l=r.xMath.abs(n-t.x)*c){let f=r.y{x.warn("abc88 cutPathAtIntersect",a,t);let r=[],n=a[0],e=!1;return a.forEach(i=>{if(x.info("abc88 checking point",i,t),!qt(t,i)&&!e){const s=Kt(t,n,i);x.warn("abc88 inside",i,n,s),x.warn("abc88 intersection",s);let l=!1;r.forEach(c=>{l=l||c.x===s.x&&c.y===s.y}),r.some(c=>c.x===s.x&&c.y===s.y)?x.warn("abc88 no intersect",s,r):r.push(s),e=!0}else x.warn("abc88 outside",i,n),n=i,e||r.push(i)}),x.warn("abc88 returning points",r),r},hr=function(a,t,r,n,e,i,s){let l=r.points,c=!1;const o=i.node(t.v);var h=i.node(t.w);x.info("abc88 InsertEdge: ",r),h.intersect&&o.intersect&&(l=l.slice(1,r.points.length-1),l.unshift(o.intersect(l[0])),x.info("Last point",l[l.length-1],h,h.intersect(l[l.length-1])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(x.info("to cluster abc88",n[r.toCluster]),l=rt(r.points,n[r.toCluster].node),c=!0),r.fromCluster&&(x.info("from cluster abc88",n[r.fromCluster]),l=rt(l.reverse(),n[r.fromCluster].node).reverse(),c=!0);const f=l.filter(C=>!Number.isNaN(C.y));let y=nt;r.curve&&(e==="graph"||e==="flowchart")&&(y=r.curve);const{x:p,y:u}=Jt(r),k=lt().x(p).y(u).curve(y);let g;switch(r.thickness){case"normal":g="edge-thickness-normal";break;case"thick":g="edge-thickness-thick";break;case"invisible":g="edge-thickness-thick";break;default:g=""}switch(r.pattern){case"solid":g+=" edge-pattern-solid";break;case"dotted":g+=" edge-pattern-dotted";break;case"dashed":g+=" edge-pattern-dashed";break}const d=a.append("path").attr("d",k(f)).attr("id",r.id).attr("class"," "+g+(r.classes?" "+r.classes:"")).attr("style",r.style);let b="";switch((w().flowchart.arrowMarkerAbsolute||w().state.arrowMarkerAbsolute)&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),x.info("arrowTypeStart",r.arrowTypeStart),x.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":d.attr("marker-start","url("+b+"#"+s+"_"+e+"-crossStart)");break;case"arrow_point":d.attr("marker-start","url("+b+"#"+s+"_"+e+"-pointStart)");break;case"arrow_barb":d.attr("marker-start","url("+b+"#"+s+"_"+e+"-barbStart)");break;case"arrow_circle":d.attr("marker-start","url("+b+"#"+s+"_"+e+"-circleStart)");break;case"aggregation":d.attr("marker-start","url("+b+"#"+s+"_"+e+"-aggregationStart)");break;case"extension":d.attr("marker-start","url("+b+"#"+s+"_"+e+"-extensionStart)");break;case"composition":d.attr("marker-start","url("+b+"#"+s+"_"+e+"-compositionStart)");break;case"dependency":d.attr("marker-start","url("+b+"#"+s+"_"+e+"-dependencyStart)");break;case"lollipop":d.attr("marker-start","url("+b+"#"+s+"_"+e+"-lollipopStart)");break}switch(r.arrowTypeEnd){case"arrow_cross":d.attr("marker-end","url("+b+"#"+s+"_"+e+"-crossEnd)");break;case"arrow_point":d.attr("marker-end","url("+b+"#"+s+"_"+e+"-pointEnd)");break;case"arrow_barb":d.attr("marker-end","url("+b+"#"+s+"_"+e+"-barbEnd)");break;case"arrow_circle":d.attr("marker-end","url("+b+"#"+s+"_"+e+"-circleEnd)");break;case"aggregation":d.attr("marker-end","url("+b+"#"+s+"_"+e+"-aggregationEnd)");break;case"extension":d.attr("marker-end","url("+b+"#"+s+"_"+e+"-extensionEnd)");break;case"composition":d.attr("marker-end","url("+b+"#"+s+"_"+e+"-compositionEnd)");break;case"dependency":d.attr("marker-end","url("+b+"#"+s+"_"+e+"-dependencyEnd)");break;case"lollipop":d.attr("marker-end","url("+b+"#"+s+"_"+e+"-lollipopEnd)");break}let B={};return c&&(B.updatedPath=l),B.originalPath=r.points,B};export{ar as a,lr as b,hr as c,cr as d,sr as e,nr as f,I as g,Mt as h,rr as i,Jt as j,_ as l,ir as p,er as s,v as u}; diff --git a/assets/erDiagram-9d236eb7-e170ceb2.js b/assets/erDiagram-9d236eb7-5f4da687.js similarity index 99% rename from assets/erDiagram-9d236eb7-e170ceb2.js rename to assets/erDiagram-9d236eb7-5f4da687.js index 84a7628..f916f3a 100644 --- a/assets/erDiagram-9d236eb7-e170ceb2.js +++ b/assets/erDiagram-9d236eb7-5f4da687.js @@ -1,4 +1,4 @@ -import{c as Z,s as Et,g as mt,b as gt,a as kt,B as xt,D as Rt,l as V,E as Ot,h as rt,z as bt,i as Nt,F as Tt,G as At}from"./index-b371ab76.js";import{G as Mt,l as St}from"./layout-fa84e821.js";import{l as wt}from"./line-63c0ea4d.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const It=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Dt(t){return typeof t=="string"&&It.test(t)}const A=[];for(let t=0;t<256;++t)A.push((t+256).toString(16).slice(1));function vt(t,e=0){return A[t[e+0]]+A[t[e+1]]+A[t[e+2]]+A[t[e+3]]+"-"+A[t[e+4]]+A[t[e+5]]+"-"+A[t[e+6]]+A[t[e+7]]+"-"+A[t[e+8]]+A[t[e+9]]+"-"+A[t[e+10]]+A[t[e+11]]+A[t[e+12]]+A[t[e+13]]+A[t[e+14]]+A[t[e+15]]}function Lt(t){if(!Dt(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Bt(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>32-e}function Ft(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const f=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;x=g,g=m,m=it(_,30)>>>0,_=h,h=I}r[0]=r[0]+h>>>0,r[1]=r[1]+_>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+g>>>0,r[4]=r[4]+x>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const Wt=Yt("v5",80,Ft),Ut=Wt;var at=function(){var t=function(S,a,n,c){for(n=n||{},c=S.length;c--;n[S[c]]=a);return n},e=[6,8,10,20,22,24,26,27,28],r=[1,10],u=[1,11],l=[1,12],p=[1,13],f=[1,14],o=[1,15],h=[1,21],_=[1,22],m=[1,23],g=[1,24],x=[1,25],y=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],N=[1,34],I=[27,28,46,47],F=[41,42,43,44,45],W=[17,34],C=[1,54],T=[1,53],M=[17,34,36,38],R={trace:function(){},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,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:function(a,n,c,d,E,i,K){var s=i.length-1;switch(E){case 1:break;case 2:this.$=[];break;case 3:i[s-1].push(i[s]),this.$=i[s-1];break;case 4:case 5:this.$=i[s];break;case 6:case 7:this.$=[];break;case 8:d.addEntity(i[s-4]),d.addEntity(i[s-2]),d.addRelationship(i[s-4],i[s],i[s-2],i[s-3]);break;case 9:d.addEntity(i[s-3]),d.addAttributes(i[s-3],i[s-1]);break;case 10:d.addEntity(i[s-2]);break;case 11:d.addEntity(i[s]);break;case 12:d.addEntity(i[s-6],i[s-4]),d.addAttributes(i[s-6],i[s-1]);break;case 13:d.addEntity(i[s-5],i[s-3]);break;case 14:d.addEntity(i[s-3],i[s-1]);break;case 15:case 16:this.$=i[s].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=i[s].trim(),d.setAccDescription(this.$);break;case 19:case 43:this.$=i[s];break;case 20:case 41:case 42:this.$=i[s].replace(/"/g,"");break;case 21:case 29:this.$=[i[s]];break;case 22:i[s].push(i[s-1]),this.$=i[s];break;case 23:this.$={attributeType:i[s-1],attributeName:i[s]};break;case 24:this.$={attributeType:i[s-2],attributeName:i[s-1],attributeKeyTypeList:i[s]};break;case 25:this.$={attributeType:i[s-2],attributeName:i[s-1],attributeComment:i[s]};break;case 26:this.$={attributeType:i[s-3],attributeName:i[s-2],attributeKeyTypeList:i[s-1],attributeComment:i[s]};break;case 27:case 28:case 31:this.$=i[s];break;case 30:i[s-2].push(i[s]),this.$=i[s-2];break;case 32:this.$=i[s].replace(/"/g,"");break;case 33:this.$={cardA:i[s],relType:i[s-1],cardB:i[s-2]};break;case 34:this.$=d.Cardinality.ZERO_OR_ONE;break;case 35:this.$=d.Cardinality.ZERO_OR_MORE;break;case 36:this.$=d.Cardinality.ONE_OR_MORE;break;case 37:this.$=d.Cardinality.ONLY_ONE;break;case 38:this.$=d.Cardinality.MD_PARENT;break;case 39:this.$=d.Identification.NON_IDENTIFYING;break;case 40:this.$=d.Identification.IDENTIFYING;break}},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,20:r,22:u,24:l,26:p,27:f,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:u,24:l,26:p,27:f,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:h,42:_,43:m,44:g,45:x}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(y,[2,19]),t(y,[2,20]),t(e,[2,4]),{11:29,27:f,28:o},{16:30,17:[1,31],29:32,30:33,34:N},{11:35,27:f,28:o},{40:36,46:[1,37],47:[1,38]},t(I,[2,34]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:N},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:h,42:_,43:m,44:g,45:x},t(F,[2,39]),t(F,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(W,[2,23],{32:50,33:51,35:52,37:C,38:T}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(W,[2,24],{33:56,36:[1,57],38:T}),t(W,[2,25]),t(M,[2,29]),t(W,[2,32]),t(M,[2,31]),{16:58,17:[1,59],29:32,30:33,34:N},t(W,[2,26]),{35:60,37:C},{17:[1,61]},t(e,[2,13]),t(M,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:function(a,n){if(n.recoverable)this.trace(a);else{var c=new Error(a);throw c.hash=n,c}},parse:function(a){var n=this,c=[0],d=[],E=[null],i=[],K=this.table,s="",Q=0,st=0,ft=2,ot=1,yt=i.slice.call(arguments,1),b=Object.create(this.lexer),z={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(z.yy[J]=this.yy[J]);b.setInput(a,z.yy),z.yy.lexer=b,z.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var $=b.yylloc;i.push($);var pt=b.options&&b.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _t(){var Y;return Y=d.pop()||b.lex()||ot,typeof Y!="number"&&(Y instanceof Array&&(d=Y,Y=d.pop()),Y=n.symbols_[Y]||Y),Y}for(var w,G,D,tt,H={},j,P,lt,q;;){if(G=c[c.length-1],this.defaultActions[G]?D=this.defaultActions[G]:((w===null||typeof w>"u")&&(w=_t()),D=K[G]&&K[G][w]),typeof D>"u"||!D.length||!D[0]){var et="";q=[];for(j in K[G])this.terminals_[j]&&j>ft&&q.push("'"+this.terminals_[j]+"'");b.showPosition?et="Parse error on line "+(Q+1)+`: +import{c as Z,s as Et,g as mt,b as gt,a as kt,B as xt,D as Rt,l as V,E as Ot,h as rt,z as bt,i as Nt,F as Tt,G as At}from"./index-e0ff10fa.js";import{G as Mt,l as St}from"./layout-608b290b.js";import{l as wt}from"./line-434e5c73.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const It=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Dt(t){return typeof t=="string"&&It.test(t)}const A=[];for(let t=0;t<256;++t)A.push((t+256).toString(16).slice(1));function vt(t,e=0){return A[t[e+0]]+A[t[e+1]]+A[t[e+2]]+A[t[e+3]]+"-"+A[t[e+4]]+A[t[e+5]]+"-"+A[t[e+6]]+A[t[e+7]]+"-"+A[t[e+8]]+A[t[e+9]]+"-"+A[t[e+10]]+A[t[e+11]]+A[t[e+12]]+A[t[e+13]]+A[t[e+14]]+A[t[e+15]]}function Lt(t){if(!Dt(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Bt(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>32-e}function Ft(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const f=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;x=g,g=m,m=it(_,30)>>>0,_=h,h=I}r[0]=r[0]+h>>>0,r[1]=r[1]+_>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+g>>>0,r[4]=r[4]+x>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const Wt=Yt("v5",80,Ft),Ut=Wt;var at=function(){var t=function(S,a,n,c){for(n=n||{},c=S.length;c--;n[S[c]]=a);return n},e=[6,8,10,20,22,24,26,27,28],r=[1,10],u=[1,11],l=[1,12],p=[1,13],f=[1,14],o=[1,15],h=[1,21],_=[1,22],m=[1,23],g=[1,24],x=[1,25],y=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],N=[1,34],I=[27,28,46,47],F=[41,42,43,44,45],W=[17,34],C=[1,54],T=[1,53],M=[17,34,36,38],R={trace:function(){},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,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:function(a,n,c,d,E,i,K){var s=i.length-1;switch(E){case 1:break;case 2:this.$=[];break;case 3:i[s-1].push(i[s]),this.$=i[s-1];break;case 4:case 5:this.$=i[s];break;case 6:case 7:this.$=[];break;case 8:d.addEntity(i[s-4]),d.addEntity(i[s-2]),d.addRelationship(i[s-4],i[s],i[s-2],i[s-3]);break;case 9:d.addEntity(i[s-3]),d.addAttributes(i[s-3],i[s-1]);break;case 10:d.addEntity(i[s-2]);break;case 11:d.addEntity(i[s]);break;case 12:d.addEntity(i[s-6],i[s-4]),d.addAttributes(i[s-6],i[s-1]);break;case 13:d.addEntity(i[s-5],i[s-3]);break;case 14:d.addEntity(i[s-3],i[s-1]);break;case 15:case 16:this.$=i[s].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=i[s].trim(),d.setAccDescription(this.$);break;case 19:case 43:this.$=i[s];break;case 20:case 41:case 42:this.$=i[s].replace(/"/g,"");break;case 21:case 29:this.$=[i[s]];break;case 22:i[s].push(i[s-1]),this.$=i[s];break;case 23:this.$={attributeType:i[s-1],attributeName:i[s]};break;case 24:this.$={attributeType:i[s-2],attributeName:i[s-1],attributeKeyTypeList:i[s]};break;case 25:this.$={attributeType:i[s-2],attributeName:i[s-1],attributeComment:i[s]};break;case 26:this.$={attributeType:i[s-3],attributeName:i[s-2],attributeKeyTypeList:i[s-1],attributeComment:i[s]};break;case 27:case 28:case 31:this.$=i[s];break;case 30:i[s-2].push(i[s]),this.$=i[s-2];break;case 32:this.$=i[s].replace(/"/g,"");break;case 33:this.$={cardA:i[s],relType:i[s-1],cardB:i[s-2]};break;case 34:this.$=d.Cardinality.ZERO_OR_ONE;break;case 35:this.$=d.Cardinality.ZERO_OR_MORE;break;case 36:this.$=d.Cardinality.ONE_OR_MORE;break;case 37:this.$=d.Cardinality.ONLY_ONE;break;case 38:this.$=d.Cardinality.MD_PARENT;break;case 39:this.$=d.Identification.NON_IDENTIFYING;break;case 40:this.$=d.Identification.IDENTIFYING;break}},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,20:r,22:u,24:l,26:p,27:f,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:u,24:l,26:p,27:f,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:h,42:_,43:m,44:g,45:x}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(y,[2,19]),t(y,[2,20]),t(e,[2,4]),{11:29,27:f,28:o},{16:30,17:[1,31],29:32,30:33,34:N},{11:35,27:f,28:o},{40:36,46:[1,37],47:[1,38]},t(I,[2,34]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:N},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:h,42:_,43:m,44:g,45:x},t(F,[2,39]),t(F,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(W,[2,23],{32:50,33:51,35:52,37:C,38:T}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(W,[2,24],{33:56,36:[1,57],38:T}),t(W,[2,25]),t(M,[2,29]),t(W,[2,32]),t(M,[2,31]),{16:58,17:[1,59],29:32,30:33,34:N},t(W,[2,26]),{35:60,37:C},{17:[1,61]},t(e,[2,13]),t(M,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:function(a,n){if(n.recoverable)this.trace(a);else{var c=new Error(a);throw c.hash=n,c}},parse:function(a){var n=this,c=[0],d=[],E=[null],i=[],K=this.table,s="",Q=0,st=0,ft=2,ot=1,yt=i.slice.call(arguments,1),b=Object.create(this.lexer),z={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(z.yy[J]=this.yy[J]);b.setInput(a,z.yy),z.yy.lexer=b,z.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var $=b.yylloc;i.push($);var pt=b.options&&b.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _t(){var Y;return Y=d.pop()||b.lex()||ot,typeof Y!="number"&&(Y instanceof Array&&(d=Y,Y=d.pop()),Y=n.symbols_[Y]||Y),Y}for(var w,G,D,tt,H={},j,P,lt,q;;){if(G=c[c.length-1],this.defaultActions[G]?D=this.defaultActions[G]:((w===null||typeof w>"u")&&(w=_t()),D=K[G]&&K[G][w]),typeof D>"u"||!D.length||!D[0]){var et="";q=[];for(j in K[G])this.terminals_[j]&&j>ft&&q.push("'"+this.terminals_[j]+"'");b.showPosition?et="Parse error on line "+(Q+1)+`: `+b.showPosition()+` Expecting `+q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":et="Parse error on line "+(Q+1)+": Unexpected "+(w==ot?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(et,{text:b.match,token:this.terminals_[w]||w,line:b.yylineno,loc:$,expected:q})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+w);switch(D[0]){case 1:c.push(w),E.push(b.yytext),i.push(b.yylloc),c.push(D[1]),w=null,st=b.yyleng,s=b.yytext,Q=b.yylineno,$=b.yylloc;break;case 2:if(P=this.productions_[D[1]][1],H.$=E[E.length-P],H._$={first_line:i[i.length-(P||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(P||1)].first_column,last_column:i[i.length-1].last_column},pt&&(H._$.range=[i[i.length-(P||1)].range[0],i[i.length-1].range[1]]),tt=this.performAction.apply(H,[s,st,Q,z.yy,D[1],E,i].concat(yt)),typeof tt<"u")return tt;P&&(c=c.slice(0,-1*P*2),E=E.slice(0,-1*P),i=i.slice(0,-1*P)),c.push(this.productions_[D[1]][0]),E.push(H.$),i.push(H._$),lt=K[c[c.length-2]][c[c.length-1]],c.push(lt);break;case 3:return!0}}return!0}},O=function(){var S={EOF:1,parseError:function(n,c){if(this.yy.parser)this.yy.parser.parseError(n,c);else throw new Error(n)},setInput:function(a,n){return this.yy=n||this.yy||{},this._input=a,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},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var n=a.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var n=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var d=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),c.length-1&&(this.yylineno-=c.length-1);var E=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:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),n=new Array(a.length+1).join("-");return a+this.upcomingInput()+` diff --git a/assets/flowDb-1972c806-1899fd0a.js b/assets/flowDb-1972c806-d31c77fd.js similarity index 99% rename from assets/flowDb-1972c806-1899fd0a.js rename to assets/flowDb-1972c806-d31c77fd.js index 8427402..65e6a51 100644 --- a/assets/flowDb-1972c806-1899fd0a.js +++ b/assets/flowDb-1972c806-d31c77fd.js @@ -1,4 +1,4 @@ -import{c as ft,aQ as ye,s as me,g as ve,a as Ve,b as Le,B as Ie,D as Re,l as Z1,z as At,E as Ne,j as Oe,h as N1}from"./index-b371ab76.js";var ht=function(){var e=function(h1,a,o,p){for(o=o||{},p=h1.length;p--;o[h1[p]]=a);return o},u=[1,4],i=[1,3],n=[1,5],c=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],l=[2,2],h=[1,13],U=[1,14],F=[1,15],O=[1,16],z=[1,23],c1=[1,25],f1=[1,26],A1=[1,27],S=[1,49],k=[1,48],o1=[1,29],w1=[1,30],U1=[1,31],G1=[1,32],M1=[1,33],B=[1,44],x=[1,46],y=[1,42],m=[1,47],v=[1,43],V=[1,50],L=[1,45],I=[1,51],R=[1,52],K1=[1,34],j1=[1,35],Y1=[1,36],X1=[1,37],L1=[1,57],b=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],Q=[1,61],W=[1,60],q=[1,62],z1=[8,9,11,73,75],k1=[1,88],b1=[1,93],g1=[1,92],D1=[1,89],F1=[1,85],T1=[1,91],C1=[1,87],S1=[1,94],_1=[1,90],B1=[1,95],x1=[1,86],H1=[8,9,10,11,73,75],N=[8,9,10,11,44,73,75],M=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],Et=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],I1=[42,58,86,99,102,103,106,108,111,112,113],kt=[1,121],bt=[1,120],gt=[1,128],Dt=[1,142],Ft=[1,143],Tt=[1,144],Ct=[1,145],St=[1,130],_t=[1,132],Bt=[1,136],xt=[1,137],yt=[1,138],mt=[1,139],vt=[1,140],Vt=[1,141],Lt=[1,146],It=[1,147],Rt=[1,126],Nt=[1,127],Ot=[1,134],Pt=[1,129],wt=[1,133],Ut=[1,131],it=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],Gt=[1,149],T=[8,9,11],K=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],f=[1,169],P=[1,165],w=[1,166],A=[1,170],d=[1,167],E=[1,168],y1=[75,113,116],g=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],Mt=[10,103],l1=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],Z=[1,235],J=[1,233],$=[1,237],t1=[1,231],e1=[1,232],s1=[1,234],u1=[1,236],i1=[1,238],m1=[1,255],Kt=[8,9,11,103],H=[8,9,10,11,58,81,102,103,106,107,108,109],rt={trace:function(){},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,FirstStmtSeperator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,verticeStatement: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,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$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",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"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],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,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],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:function(a,o,p,r,C,t,R1){var s=t.length-1;switch(C){case 2:this.$=[];break;case 3:(!Array.isArray(t[s])||t[s].length>0)&&t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 176:this.$=t[s];break;case 11:r.setDirection("TB"),this.$="TB";break;case 12:r.setDirection(t[s-1]),this.$=t[s-1];break;case 27:this.$=t[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=r.addSubGraph(t[s-6],t[s-1],t[s-4]);break;case 34:this.$=r.addSubGraph(t[s-3],t[s-1],t[s-3]);break;case 35:this.$=r.addSubGraph(void 0,t[s-1],void 0);break;case 37:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 38:case 39:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 43:r.addLink(t[s-2].stmt,t[s],t[s-1]),this.$={stmt:t[s],nodes:t[s].concat(t[s-2].nodes)};break;case 44:r.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 45:this.$={stmt:t[s-1],nodes:t[s-1]};break;case 46:this.$={stmt:t[s],nodes:t[s]};break;case 47:this.$=[t[s]];break;case 48:this.$=t[s-4].concat(t[s]);break;case 49:this.$=t[s];break;case 50:this.$=t[s-2],r.setClass(t[s-2],t[s]);break;case 51:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"square");break;case 52:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"doublecircle");break;case 53:this.$=t[s-5],r.addVertex(t[s-5],t[s-2],"circle");break;case 54:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"ellipse");break;case 55:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"stadium");break;case 56:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"subroutine");break;case 57:this.$=t[s-7],r.addVertex(t[s-7],t[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[s-5],t[s-3]]]));break;case 58:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"cylinder");break;case 59:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"round");break;case 60:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"diamond");break;case 61:this.$=t[s-5],r.addVertex(t[s-5],t[s-2],"hexagon");break;case 62:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"odd");break;case 63:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"trapezoid");break;case 64:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"inv_trapezoid");break;case 65:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"lean_right");break;case 66:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"lean_left");break;case 67:this.$=t[s],r.addVertex(t[s]);break;case 68:t[s-1].text=t[s],this.$=t[s-1];break;case 69:case 70:t[s-2].text=t[s-1],this.$=t[s-2];break;case 71:this.$=t[s];break;case 72:var j=r.destructLink(t[s],t[s-2]);this.$={type:j.type,stroke:j.stroke,length:j.length,text:t[s-1]};break;case 73:this.$={text:t[s],type:"text"};break;case 74:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 75:this.$={text:t[s],type:"string"};break;case 76:this.$={text:t[s],type:"markdown"};break;case 77:var j=r.destructLink(t[s]);this.$={type:j.type,stroke:j.stroke,length:j.length};break;case 78:this.$=t[s-1];break;case 79:this.$={text:t[s],type:"text"};break;case 80:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 81:this.$={text:t[s],type:"string"};break;case 82:case 97:this.$={text:t[s],type:"markdown"};break;case 94:this.$={text:t[s],type:"text"};break;case 95:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 96:this.$={text:t[s],type:"text"};break;case 98:this.$=t[s-4],r.addClass(t[s-2],t[s]);break;case 99:this.$=t[s-4],r.setClass(t[s-2],t[s]);break;case 100:case 108:this.$=t[s-1],r.setClickEvent(t[s-1],t[s]);break;case 101:case 109:this.$=t[s-3],r.setClickEvent(t[s-3],t[s-2]),r.setTooltip(t[s-3],t[s]);break;case 102:this.$=t[s-2],r.setClickEvent(t[s-2],t[s-1],t[s]);break;case 103:this.$=t[s-4],r.setClickEvent(t[s-4],t[s-3],t[s-2]),r.setTooltip(t[s-4],t[s]);break;case 104:this.$=t[s-2],r.setLink(t[s-2],t[s]);break;case 105:this.$=t[s-4],r.setLink(t[s-4],t[s-2]),r.setTooltip(t[s-4],t[s]);break;case 106:this.$=t[s-4],r.setLink(t[s-4],t[s-2],t[s]);break;case 107:this.$=t[s-6],r.setLink(t[s-6],t[s-4],t[s]),r.setTooltip(t[s-6],t[s-2]);break;case 110:this.$=t[s-1],r.setLink(t[s-1],t[s]);break;case 111:this.$=t[s-3],r.setLink(t[s-3],t[s-2]),r.setTooltip(t[s-3],t[s]);break;case 112:this.$=t[s-3],r.setLink(t[s-3],t[s-2],t[s]);break;case 113:this.$=t[s-5],r.setLink(t[s-5],t[s-4],t[s]),r.setTooltip(t[s-5],t[s-2]);break;case 114:this.$=t[s-4],r.addVertex(t[s-2],void 0,void 0,t[s]);break;case 115:this.$=t[s-4],r.updateLink([t[s-2]],t[s]);break;case 116:this.$=t[s-4],r.updateLink(t[s-2],t[s]);break;case 117:this.$=t[s-8],r.updateLinkInterpolate([t[s-6]],t[s-2]),r.updateLink([t[s-6]],t[s]);break;case 118:this.$=t[s-8],r.updateLinkInterpolate(t[s-6],t[s-2]),r.updateLink(t[s-6],t[s]);break;case 119:this.$=t[s-6],r.updateLinkInterpolate([t[s-4]],t[s]);break;case 120:this.$=t[s-6],r.updateLinkInterpolate(t[s-4],t[s]);break;case 121:case 123:this.$=[t[s]];break;case 122:case 124:t[s-2].push(t[s]),this.$=t[s-2];break;case 126:this.$=t[s-1]+t[s];break;case 174:this.$=t[s];break;case 175:this.$=t[s-1]+""+t[s];break;case 177:this.$=t[s-1]+""+t[s];break;case 178:this.$={stmt:"dir",value:"TB"};break;case 179:this.$={stmt:"dir",value:"BT"};break;case 180:this.$={stmt:"dir",value:"RL"};break;case 181:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,9:u,10:i,12:n},{1:[3]},e(c,l,{5:6}),{4:7,9:u,10:i,12:n},{4:8,9:u,10:i,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:h,9:U,10:F,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:z,33:24,34:c1,36:f1,38:A1,40:28,41:38,42:S,43:39,45:40,58:k,81:o1,82:w1,83:U1,84:G1,85:M1,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R,118:K1,119:j1,120:Y1,121:X1},e(c,[2,9]),e(c,[2,10]),e(c,[2,11]),{8:[1,54],9:[1,55],10:L1,15:53,18:56},e(b,[2,3]),e(b,[2,4]),e(b,[2,5]),e(b,[2,6]),e(b,[2,7]),e(b,[2,8]),{8:Q,9:W,11:q,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:Q,9:W,11:q,21:66},{8:Q,9:W,11:q,21:67},{8:Q,9:W,11:q,21:68},{8:Q,9:W,11:q,21:69},{8:Q,9:W,11:q,21:70},{8:Q,9:W,10:[1,71],11:q,21:72},e(b,[2,36]),{35:[1,73]},{37:[1,74]},e(b,[2,39]),e(z1,[2,46],{18:75,10:L1}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:k1,42:b1,58:g1,77:[1,83],86:D1,92:[1,80],94:[1,81],98:82,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1,117:84},e(b,[2,178]),e(b,[2,179]),e(b,[2,180]),e(b,[2,181]),e(H1,[2,47]),e(H1,[2,49],{44:[1,96]}),e(N,[2,67],{110:109,29:[1,97],42:S,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:k,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:B,99:x,102:y,103:m,106:v,108:V,111:L,112:I,113:R}),e(M,[2,174]),e(M,[2,135]),e(M,[2,136]),e(M,[2,137]),e(M,[2,138]),e(M,[2,139]),e(M,[2,140]),e(M,[2,141]),e(M,[2,142]),e(M,[2,143]),e(M,[2,144]),e(M,[2,145]),e(c,[2,12]),e(c,[2,18]),e(c,[2,19]),{9:[1,110]},e(Et,[2,26],{18:111,10:L1}),e(b,[2,27]),{40:112,41:38,42:S,43:39,45:40,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},e(b,[2,40]),e(b,[2,41]),e(b,[2,42]),e(I1,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:kt,116:bt},e([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),e(b,[2,28]),e(b,[2,29]),e(b,[2,30]),e(b,[2,31]),e(b,[2,32]),{10:gt,12:Dt,14:Ft,27:Tt,28:122,32:Ct,42:St,58:_t,73:Bt,77:[1,124],78:[1,125],80:135,81:xt,82:yt,83:mt,84:vt,85:Vt,86:Lt,87:It,88:123,102:Rt,106:Nt,108:Ot,111:Pt,112:wt,113:Ut},e(it,l,{5:148}),e(b,[2,37]),e(b,[2,38]),e(z1,[2,45],{42:Gt}),{42:S,45:150,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},{99:[1,151],100:152,102:[1,153]},{42:S,45:154,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},{42:S,45:155,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},e(T,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},e(T,[2,108],{117:160,10:[1,159],14:k1,42:b1,58:g1,86:D1,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1}),e(T,[2,110],{10:[1,161]}),e(K,[2,176]),e(K,[2,163]),e(K,[2,164]),e(K,[2,165]),e(K,[2,166]),e(K,[2,167]),e(K,[2,168]),e(K,[2,169]),e(K,[2,170]),e(K,[2,171]),e(K,[2,172]),e(K,[2,173]),{42:S,45:162,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},{30:163,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:171,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:173,48:[1,172],65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:174,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:175,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:176,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{106:[1,177]},{30:178,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:179,63:[1,180],65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:181,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:182,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:183,65:f,77:P,78:w,79:164,113:A,114:d,115:E},e(M,[2,175]),e(c,[2,20]),e(Et,[2,25]),e(z1,[2,43],{18:184,10:L1}),e(I1,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{75:[1,188],76:189,113:kt,116:bt},e(y1,[2,73]),e(y1,[2,75]),e(y1,[2,76]),e(y1,[2,161]),e(y1,[2,162]),{8:Q,9:W,10:gt,11:q,12:Dt,14:Ft,21:191,27:Tt,29:[1,190],32:Ct,42:St,58:_t,73:Bt,80:135,81:xt,82:yt,83:mt,84:vt,85:Vt,86:Lt,87:It,88:192,102:Rt,106:Nt,108:Ot,111:Pt,112:wt,113:Ut},e(g,[2,94]),e(g,[2,96]),e(g,[2,97]),e(g,[2,150]),e(g,[2,151]),e(g,[2,152]),e(g,[2,153]),e(g,[2,154]),e(g,[2,155]),e(g,[2,156]),e(g,[2,157]),e(g,[2,158]),e(g,[2,159]),e(g,[2,160]),e(g,[2,83]),e(g,[2,84]),e(g,[2,85]),e(g,[2,86]),e(g,[2,87]),e(g,[2,88]),e(g,[2,89]),e(g,[2,90]),e(g,[2,91]),e(g,[2,92]),e(g,[2,93]),{6:11,7:12,8:h,9:U,10:F,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:z,32:[1,193],33:24,34:c1,36:f1,38:A1,40:28,41:38,42:S,43:39,45:40,58:k,81:o1,82:w1,83:U1,84:G1,85:M1,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R,118:K1,119:j1,120:Y1,121:X1},{10:L1,18:194},{10:[1,195],42:S,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:109,111:L,112:I,113:R},{10:[1,196]},{10:[1,197],103:[1,198]},e(Mt,[2,121]),{10:[1,199],42:S,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:109,111:L,112:I,113:R},{10:[1,200],42:S,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:109,111:L,112:I,113:R},{77:[1,201]},e(T,[2,102],{10:[1,202]}),e(T,[2,104],{10:[1,203]}),{77:[1,204]},e(K,[2,177]),{77:[1,205],95:[1,206]},e(H1,[2,50],{110:109,42:S,58:k,86:B,99:x,102:y,103:m,106:v,108:V,111:L,112:I,113:R}),{31:[1,207],65:f,79:208,113:A,114:d,115:E},e(l1,[2,79]),e(l1,[2,81]),e(l1,[2,82]),e(l1,[2,146]),e(l1,[2,147]),e(l1,[2,148]),e(l1,[2,149]),{47:[1,209],65:f,79:208,113:A,114:d,115:E},{30:210,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{49:[1,211],65:f,79:208,113:A,114:d,115:E},{51:[1,212],65:f,79:208,113:A,114:d,115:E},{53:[1,213],65:f,79:208,113:A,114:d,115:E},{55:[1,214],65:f,79:208,113:A,114:d,115:E},{58:[1,215]},{62:[1,216],65:f,79:208,113:A,114:d,115:E},{64:[1,217],65:f,79:208,113:A,114:d,115:E},{30:218,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{31:[1,219],65:f,79:208,113:A,114:d,115:E},{65:f,67:[1,220],69:[1,221],79:208,113:A,114:d,115:E},{65:f,67:[1,223],69:[1,222],79:208,113:A,114:d,115:E},e(z1,[2,44],{42:Gt}),e(I1,[2,70]),e(I1,[2,69]),{60:[1,224],65:f,79:208,113:A,114:d,115:E},e(I1,[2,72]),e(y1,[2,74]),{30:225,65:f,77:P,78:w,79:164,113:A,114:d,115:E},e(it,l,{5:226}),e(g,[2,95]),e(b,[2,35]),{41:227,42:S,43:39,45:40,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},{10:Z,58:J,81:$,89:228,102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},{10:Z,58:J,81:$,89:239,101:[1,240],102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},{10:Z,58:J,81:$,89:241,101:[1,242],102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},{102:[1,243]},{10:Z,58:J,81:$,89:244,102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},{42:S,45:245,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},e(T,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},e(T,[2,109]),e(T,[2,111],{10:[1,249]}),e(T,[2,112]),e(N,[2,51]),e(l1,[2,80]),e(N,[2,52]),{49:[1,250],65:f,79:208,113:A,114:d,115:E},e(N,[2,59]),e(N,[2,54]),e(N,[2,55]),e(N,[2,56]),{106:[1,251]},e(N,[2,58]),e(N,[2,60]),{64:[1,252],65:f,79:208,113:A,114:d,115:E},e(N,[2,62]),e(N,[2,63]),e(N,[2,65]),e(N,[2,64]),e(N,[2,66]),e([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:f,79:208,113:A,114:d,115:E},{6:11,7:12,8:h,9:U,10:F,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:z,32:[1,254],33:24,34:c1,36:f1,38:A1,40:28,41:38,42:S,43:39,45:40,58:k,81:o1,82:w1,83:U1,84:G1,85:M1,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R,118:K1,119:j1,120:Y1,121:X1},e(H1,[2,48]),e(T,[2,114],{103:m1}),e(Kt,[2,123],{105:256,10:Z,58:J,81:$,102:t1,106:e1,107:s1,108:u1,109:i1}),e(H,[2,125]),e(H,[2,127]),e(H,[2,128]),e(H,[2,129]),e(H,[2,130]),e(H,[2,131]),e(H,[2,132]),e(H,[2,133]),e(H,[2,134]),e(T,[2,115],{103:m1}),{10:[1,257]},e(T,[2,116],{103:m1}),{10:[1,258]},e(Mt,[2,122]),e(T,[2,98],{103:m1}),e(T,[2,99],{110:109,42:S,58:k,86:B,99:x,102:y,103:m,106:v,108:V,111:L,112:I,113:R}),e(T,[2,103]),e(T,[2,105],{10:[1,259]}),e(T,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:Q,9:W,11:q,21:264},e(b,[2,34]),{10:Z,58:J,81:$,102:t1,104:265,105:230,106:e1,107:s1,108:u1,109:i1},e(H,[2,126]),{14:k1,42:b1,58:g1,86:D1,98:266,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1,117:84},{14:k1,42:b1,58:g1,86:D1,98:267,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1,117:84},{95:[1,268]},e(T,[2,113]),e(N,[2,53]),{30:269,65:f,77:P,78:w,79:164,113:A,114:d,115:E},e(N,[2,61]),e(it,l,{5:270}),e(Kt,[2,124],{105:256,10:Z,58:J,81:$,102:t1,106:e1,107:s1,108:u1,109:i1}),e(T,[2,119],{117:160,10:[1,271],14:k1,42:b1,58:g1,86:D1,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1}),e(T,[2,120],{117:160,10:[1,272],14:k1,42:b1,58:g1,86:D1,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1}),e(T,[2,107]),{31:[1,273],65:f,79:208,113:A,114:d,115:E},{6:11,7:12,8:h,9:U,10:F,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:z,32:[1,274],33:24,34:c1,36:f1,38:A1,40:28,41:38,42:S,43:39,45:40,58:k,81:o1,82:w1,83:U1,84:G1,85:M1,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R,118:K1,119:j1,120:Y1,121:X1},{10:Z,58:J,81:$,89:275,102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},{10:Z,58:J,81:$,89:276,102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},e(N,[2,57]),e(b,[2,33]),e(T,[2,117],{103:m1}),e(T,[2,118],{103:m1})],defaultActions:{},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var p=new Error(a);throw p.hash=o,p}},parse:function(a){var o=this,p=[0],r=[],C=[null],t=[],R1=this.table,s="",j=0,jt=0,Se=2,Yt=1,_e=t.slice.call(arguments,1),_=Object.create(this.lexer),d1={yy:{}};for(var at in this.yy)Object.prototype.hasOwnProperty.call(this.yy,at)&&(d1.yy[at]=this.yy[at]);_.setInput(a,d1.yy),d1.yy.lexer=_,d1.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ct=_.yylloc;t.push(ct);var Be=_.options&&_.options.ranges;typeof d1.yy.parseError=="function"?this.parseError=d1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function xe(){var n1;return n1=r.pop()||_.lex()||Yt,typeof n1!="number"&&(n1 instanceof Array&&(r=n1,n1=r.pop()),n1=o.symbols_[n1]||n1),n1}for(var G,E1,Y,ot,v1={},Q1,r1,Xt,W1;;){if(E1=p[p.length-1],this.defaultActions[E1]?Y=this.defaultActions[E1]:((G===null||typeof G>"u")&&(G=xe()),Y=R1[E1]&&R1[E1][G]),typeof Y>"u"||!Y.length||!Y[0]){var lt="";W1=[];for(Q1 in R1[E1])this.terminals_[Q1]&&Q1>Se&&W1.push("'"+this.terminals_[Q1]+"'");_.showPosition?lt="Parse error on line "+(j+1)+`: +import{c as ft,aQ as ye,s as me,g as ve,a as Ve,b as Le,B as Ie,D as Re,l as Z1,z as At,E as Ne,j as Oe,h as N1}from"./index-e0ff10fa.js";var ht=function(){var e=function(h1,a,o,p){for(o=o||{},p=h1.length;p--;o[h1[p]]=a);return o},u=[1,4],i=[1,3],n=[1,5],c=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],l=[2,2],h=[1,13],U=[1,14],F=[1,15],O=[1,16],z=[1,23],c1=[1,25],f1=[1,26],A1=[1,27],S=[1,49],k=[1,48],o1=[1,29],w1=[1,30],U1=[1,31],G1=[1,32],M1=[1,33],B=[1,44],x=[1,46],y=[1,42],m=[1,47],v=[1,43],V=[1,50],L=[1,45],I=[1,51],R=[1,52],K1=[1,34],j1=[1,35],Y1=[1,36],X1=[1,37],L1=[1,57],b=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],Q=[1,61],W=[1,60],q=[1,62],z1=[8,9,11,73,75],k1=[1,88],b1=[1,93],g1=[1,92],D1=[1,89],F1=[1,85],T1=[1,91],C1=[1,87],S1=[1,94],_1=[1,90],B1=[1,95],x1=[1,86],H1=[8,9,10,11,73,75],N=[8,9,10,11,44,73,75],M=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],Et=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],I1=[42,58,86,99,102,103,106,108,111,112,113],kt=[1,121],bt=[1,120],gt=[1,128],Dt=[1,142],Ft=[1,143],Tt=[1,144],Ct=[1,145],St=[1,130],_t=[1,132],Bt=[1,136],xt=[1,137],yt=[1,138],mt=[1,139],vt=[1,140],Vt=[1,141],Lt=[1,146],It=[1,147],Rt=[1,126],Nt=[1,127],Ot=[1,134],Pt=[1,129],wt=[1,133],Ut=[1,131],it=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],Gt=[1,149],T=[8,9,11],K=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],f=[1,169],P=[1,165],w=[1,166],A=[1,170],d=[1,167],E=[1,168],y1=[75,113,116],g=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],Mt=[10,103],l1=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],Z=[1,235],J=[1,233],$=[1,237],t1=[1,231],e1=[1,232],s1=[1,234],u1=[1,236],i1=[1,238],m1=[1,255],Kt=[8,9,11,103],H=[8,9,10,11,58,81,102,103,106,107,108,109],rt={trace:function(){},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,FirstStmtSeperator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,verticeStatement: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,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$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",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"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],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,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],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:function(a,o,p,r,C,t,R1){var s=t.length-1;switch(C){case 2:this.$=[];break;case 3:(!Array.isArray(t[s])||t[s].length>0)&&t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 176:this.$=t[s];break;case 11:r.setDirection("TB"),this.$="TB";break;case 12:r.setDirection(t[s-1]),this.$=t[s-1];break;case 27:this.$=t[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=r.addSubGraph(t[s-6],t[s-1],t[s-4]);break;case 34:this.$=r.addSubGraph(t[s-3],t[s-1],t[s-3]);break;case 35:this.$=r.addSubGraph(void 0,t[s-1],void 0);break;case 37:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 38:case 39:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 43:r.addLink(t[s-2].stmt,t[s],t[s-1]),this.$={stmt:t[s],nodes:t[s].concat(t[s-2].nodes)};break;case 44:r.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 45:this.$={stmt:t[s-1],nodes:t[s-1]};break;case 46:this.$={stmt:t[s],nodes:t[s]};break;case 47:this.$=[t[s]];break;case 48:this.$=t[s-4].concat(t[s]);break;case 49:this.$=t[s];break;case 50:this.$=t[s-2],r.setClass(t[s-2],t[s]);break;case 51:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"square");break;case 52:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"doublecircle");break;case 53:this.$=t[s-5],r.addVertex(t[s-5],t[s-2],"circle");break;case 54:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"ellipse");break;case 55:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"stadium");break;case 56:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"subroutine");break;case 57:this.$=t[s-7],r.addVertex(t[s-7],t[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[s-5],t[s-3]]]));break;case 58:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"cylinder");break;case 59:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"round");break;case 60:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"diamond");break;case 61:this.$=t[s-5],r.addVertex(t[s-5],t[s-2],"hexagon");break;case 62:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"odd");break;case 63:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"trapezoid");break;case 64:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"inv_trapezoid");break;case 65:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"lean_right");break;case 66:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"lean_left");break;case 67:this.$=t[s],r.addVertex(t[s]);break;case 68:t[s-1].text=t[s],this.$=t[s-1];break;case 69:case 70:t[s-2].text=t[s-1],this.$=t[s-2];break;case 71:this.$=t[s];break;case 72:var j=r.destructLink(t[s],t[s-2]);this.$={type:j.type,stroke:j.stroke,length:j.length,text:t[s-1]};break;case 73:this.$={text:t[s],type:"text"};break;case 74:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 75:this.$={text:t[s],type:"string"};break;case 76:this.$={text:t[s],type:"markdown"};break;case 77:var j=r.destructLink(t[s]);this.$={type:j.type,stroke:j.stroke,length:j.length};break;case 78:this.$=t[s-1];break;case 79:this.$={text:t[s],type:"text"};break;case 80:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 81:this.$={text:t[s],type:"string"};break;case 82:case 97:this.$={text:t[s],type:"markdown"};break;case 94:this.$={text:t[s],type:"text"};break;case 95:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 96:this.$={text:t[s],type:"text"};break;case 98:this.$=t[s-4],r.addClass(t[s-2],t[s]);break;case 99:this.$=t[s-4],r.setClass(t[s-2],t[s]);break;case 100:case 108:this.$=t[s-1],r.setClickEvent(t[s-1],t[s]);break;case 101:case 109:this.$=t[s-3],r.setClickEvent(t[s-3],t[s-2]),r.setTooltip(t[s-3],t[s]);break;case 102:this.$=t[s-2],r.setClickEvent(t[s-2],t[s-1],t[s]);break;case 103:this.$=t[s-4],r.setClickEvent(t[s-4],t[s-3],t[s-2]),r.setTooltip(t[s-4],t[s]);break;case 104:this.$=t[s-2],r.setLink(t[s-2],t[s]);break;case 105:this.$=t[s-4],r.setLink(t[s-4],t[s-2]),r.setTooltip(t[s-4],t[s]);break;case 106:this.$=t[s-4],r.setLink(t[s-4],t[s-2],t[s]);break;case 107:this.$=t[s-6],r.setLink(t[s-6],t[s-4],t[s]),r.setTooltip(t[s-6],t[s-2]);break;case 110:this.$=t[s-1],r.setLink(t[s-1],t[s]);break;case 111:this.$=t[s-3],r.setLink(t[s-3],t[s-2]),r.setTooltip(t[s-3],t[s]);break;case 112:this.$=t[s-3],r.setLink(t[s-3],t[s-2],t[s]);break;case 113:this.$=t[s-5],r.setLink(t[s-5],t[s-4],t[s]),r.setTooltip(t[s-5],t[s-2]);break;case 114:this.$=t[s-4],r.addVertex(t[s-2],void 0,void 0,t[s]);break;case 115:this.$=t[s-4],r.updateLink([t[s-2]],t[s]);break;case 116:this.$=t[s-4],r.updateLink(t[s-2],t[s]);break;case 117:this.$=t[s-8],r.updateLinkInterpolate([t[s-6]],t[s-2]),r.updateLink([t[s-6]],t[s]);break;case 118:this.$=t[s-8],r.updateLinkInterpolate(t[s-6],t[s-2]),r.updateLink(t[s-6],t[s]);break;case 119:this.$=t[s-6],r.updateLinkInterpolate([t[s-4]],t[s]);break;case 120:this.$=t[s-6],r.updateLinkInterpolate(t[s-4],t[s]);break;case 121:case 123:this.$=[t[s]];break;case 122:case 124:t[s-2].push(t[s]),this.$=t[s-2];break;case 126:this.$=t[s-1]+t[s];break;case 174:this.$=t[s];break;case 175:this.$=t[s-1]+""+t[s];break;case 177:this.$=t[s-1]+""+t[s];break;case 178:this.$={stmt:"dir",value:"TB"};break;case 179:this.$={stmt:"dir",value:"BT"};break;case 180:this.$={stmt:"dir",value:"RL"};break;case 181:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,9:u,10:i,12:n},{1:[3]},e(c,l,{5:6}),{4:7,9:u,10:i,12:n},{4:8,9:u,10:i,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:h,9:U,10:F,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:z,33:24,34:c1,36:f1,38:A1,40:28,41:38,42:S,43:39,45:40,58:k,81:o1,82:w1,83:U1,84:G1,85:M1,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R,118:K1,119:j1,120:Y1,121:X1},e(c,[2,9]),e(c,[2,10]),e(c,[2,11]),{8:[1,54],9:[1,55],10:L1,15:53,18:56},e(b,[2,3]),e(b,[2,4]),e(b,[2,5]),e(b,[2,6]),e(b,[2,7]),e(b,[2,8]),{8:Q,9:W,11:q,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:Q,9:W,11:q,21:66},{8:Q,9:W,11:q,21:67},{8:Q,9:W,11:q,21:68},{8:Q,9:W,11:q,21:69},{8:Q,9:W,11:q,21:70},{8:Q,9:W,10:[1,71],11:q,21:72},e(b,[2,36]),{35:[1,73]},{37:[1,74]},e(b,[2,39]),e(z1,[2,46],{18:75,10:L1}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:k1,42:b1,58:g1,77:[1,83],86:D1,92:[1,80],94:[1,81],98:82,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1,117:84},e(b,[2,178]),e(b,[2,179]),e(b,[2,180]),e(b,[2,181]),e(H1,[2,47]),e(H1,[2,49],{44:[1,96]}),e(N,[2,67],{110:109,29:[1,97],42:S,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:k,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:B,99:x,102:y,103:m,106:v,108:V,111:L,112:I,113:R}),e(M,[2,174]),e(M,[2,135]),e(M,[2,136]),e(M,[2,137]),e(M,[2,138]),e(M,[2,139]),e(M,[2,140]),e(M,[2,141]),e(M,[2,142]),e(M,[2,143]),e(M,[2,144]),e(M,[2,145]),e(c,[2,12]),e(c,[2,18]),e(c,[2,19]),{9:[1,110]},e(Et,[2,26],{18:111,10:L1}),e(b,[2,27]),{40:112,41:38,42:S,43:39,45:40,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},e(b,[2,40]),e(b,[2,41]),e(b,[2,42]),e(I1,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:kt,116:bt},e([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),e(b,[2,28]),e(b,[2,29]),e(b,[2,30]),e(b,[2,31]),e(b,[2,32]),{10:gt,12:Dt,14:Ft,27:Tt,28:122,32:Ct,42:St,58:_t,73:Bt,77:[1,124],78:[1,125],80:135,81:xt,82:yt,83:mt,84:vt,85:Vt,86:Lt,87:It,88:123,102:Rt,106:Nt,108:Ot,111:Pt,112:wt,113:Ut},e(it,l,{5:148}),e(b,[2,37]),e(b,[2,38]),e(z1,[2,45],{42:Gt}),{42:S,45:150,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},{99:[1,151],100:152,102:[1,153]},{42:S,45:154,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},{42:S,45:155,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},e(T,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},e(T,[2,108],{117:160,10:[1,159],14:k1,42:b1,58:g1,86:D1,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1}),e(T,[2,110],{10:[1,161]}),e(K,[2,176]),e(K,[2,163]),e(K,[2,164]),e(K,[2,165]),e(K,[2,166]),e(K,[2,167]),e(K,[2,168]),e(K,[2,169]),e(K,[2,170]),e(K,[2,171]),e(K,[2,172]),e(K,[2,173]),{42:S,45:162,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},{30:163,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:171,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:173,48:[1,172],65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:174,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:175,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:176,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{106:[1,177]},{30:178,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:179,63:[1,180],65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:181,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:182,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{30:183,65:f,77:P,78:w,79:164,113:A,114:d,115:E},e(M,[2,175]),e(c,[2,20]),e(Et,[2,25]),e(z1,[2,43],{18:184,10:L1}),e(I1,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{75:[1,188],76:189,113:kt,116:bt},e(y1,[2,73]),e(y1,[2,75]),e(y1,[2,76]),e(y1,[2,161]),e(y1,[2,162]),{8:Q,9:W,10:gt,11:q,12:Dt,14:Ft,21:191,27:Tt,29:[1,190],32:Ct,42:St,58:_t,73:Bt,80:135,81:xt,82:yt,83:mt,84:vt,85:Vt,86:Lt,87:It,88:192,102:Rt,106:Nt,108:Ot,111:Pt,112:wt,113:Ut},e(g,[2,94]),e(g,[2,96]),e(g,[2,97]),e(g,[2,150]),e(g,[2,151]),e(g,[2,152]),e(g,[2,153]),e(g,[2,154]),e(g,[2,155]),e(g,[2,156]),e(g,[2,157]),e(g,[2,158]),e(g,[2,159]),e(g,[2,160]),e(g,[2,83]),e(g,[2,84]),e(g,[2,85]),e(g,[2,86]),e(g,[2,87]),e(g,[2,88]),e(g,[2,89]),e(g,[2,90]),e(g,[2,91]),e(g,[2,92]),e(g,[2,93]),{6:11,7:12,8:h,9:U,10:F,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:z,32:[1,193],33:24,34:c1,36:f1,38:A1,40:28,41:38,42:S,43:39,45:40,58:k,81:o1,82:w1,83:U1,84:G1,85:M1,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R,118:K1,119:j1,120:Y1,121:X1},{10:L1,18:194},{10:[1,195],42:S,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:109,111:L,112:I,113:R},{10:[1,196]},{10:[1,197],103:[1,198]},e(Mt,[2,121]),{10:[1,199],42:S,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:109,111:L,112:I,113:R},{10:[1,200],42:S,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:109,111:L,112:I,113:R},{77:[1,201]},e(T,[2,102],{10:[1,202]}),e(T,[2,104],{10:[1,203]}),{77:[1,204]},e(K,[2,177]),{77:[1,205],95:[1,206]},e(H1,[2,50],{110:109,42:S,58:k,86:B,99:x,102:y,103:m,106:v,108:V,111:L,112:I,113:R}),{31:[1,207],65:f,79:208,113:A,114:d,115:E},e(l1,[2,79]),e(l1,[2,81]),e(l1,[2,82]),e(l1,[2,146]),e(l1,[2,147]),e(l1,[2,148]),e(l1,[2,149]),{47:[1,209],65:f,79:208,113:A,114:d,115:E},{30:210,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{49:[1,211],65:f,79:208,113:A,114:d,115:E},{51:[1,212],65:f,79:208,113:A,114:d,115:E},{53:[1,213],65:f,79:208,113:A,114:d,115:E},{55:[1,214],65:f,79:208,113:A,114:d,115:E},{58:[1,215]},{62:[1,216],65:f,79:208,113:A,114:d,115:E},{64:[1,217],65:f,79:208,113:A,114:d,115:E},{30:218,65:f,77:P,78:w,79:164,113:A,114:d,115:E},{31:[1,219],65:f,79:208,113:A,114:d,115:E},{65:f,67:[1,220],69:[1,221],79:208,113:A,114:d,115:E},{65:f,67:[1,223],69:[1,222],79:208,113:A,114:d,115:E},e(z1,[2,44],{42:Gt}),e(I1,[2,70]),e(I1,[2,69]),{60:[1,224],65:f,79:208,113:A,114:d,115:E},e(I1,[2,72]),e(y1,[2,74]),{30:225,65:f,77:P,78:w,79:164,113:A,114:d,115:E},e(it,l,{5:226}),e(g,[2,95]),e(b,[2,35]),{41:227,42:S,43:39,45:40,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},{10:Z,58:J,81:$,89:228,102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},{10:Z,58:J,81:$,89:239,101:[1,240],102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},{10:Z,58:J,81:$,89:241,101:[1,242],102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},{102:[1,243]},{10:Z,58:J,81:$,89:244,102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},{42:S,45:245,58:k,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R},e(T,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},e(T,[2,109]),e(T,[2,111],{10:[1,249]}),e(T,[2,112]),e(N,[2,51]),e(l1,[2,80]),e(N,[2,52]),{49:[1,250],65:f,79:208,113:A,114:d,115:E},e(N,[2,59]),e(N,[2,54]),e(N,[2,55]),e(N,[2,56]),{106:[1,251]},e(N,[2,58]),e(N,[2,60]),{64:[1,252],65:f,79:208,113:A,114:d,115:E},e(N,[2,62]),e(N,[2,63]),e(N,[2,65]),e(N,[2,64]),e(N,[2,66]),e([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:f,79:208,113:A,114:d,115:E},{6:11,7:12,8:h,9:U,10:F,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:z,32:[1,254],33:24,34:c1,36:f1,38:A1,40:28,41:38,42:S,43:39,45:40,58:k,81:o1,82:w1,83:U1,84:G1,85:M1,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R,118:K1,119:j1,120:Y1,121:X1},e(H1,[2,48]),e(T,[2,114],{103:m1}),e(Kt,[2,123],{105:256,10:Z,58:J,81:$,102:t1,106:e1,107:s1,108:u1,109:i1}),e(H,[2,125]),e(H,[2,127]),e(H,[2,128]),e(H,[2,129]),e(H,[2,130]),e(H,[2,131]),e(H,[2,132]),e(H,[2,133]),e(H,[2,134]),e(T,[2,115],{103:m1}),{10:[1,257]},e(T,[2,116],{103:m1}),{10:[1,258]},e(Mt,[2,122]),e(T,[2,98],{103:m1}),e(T,[2,99],{110:109,42:S,58:k,86:B,99:x,102:y,103:m,106:v,108:V,111:L,112:I,113:R}),e(T,[2,103]),e(T,[2,105],{10:[1,259]}),e(T,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:Q,9:W,11:q,21:264},e(b,[2,34]),{10:Z,58:J,81:$,102:t1,104:265,105:230,106:e1,107:s1,108:u1,109:i1},e(H,[2,126]),{14:k1,42:b1,58:g1,86:D1,98:266,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1,117:84},{14:k1,42:b1,58:g1,86:D1,98:267,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1,117:84},{95:[1,268]},e(T,[2,113]),e(N,[2,53]),{30:269,65:f,77:P,78:w,79:164,113:A,114:d,115:E},e(N,[2,61]),e(it,l,{5:270}),e(Kt,[2,124],{105:256,10:Z,58:J,81:$,102:t1,106:e1,107:s1,108:u1,109:i1}),e(T,[2,119],{117:160,10:[1,271],14:k1,42:b1,58:g1,86:D1,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1}),e(T,[2,120],{117:160,10:[1,272],14:k1,42:b1,58:g1,86:D1,102:F1,103:T1,106:C1,108:S1,111:_1,112:B1,113:x1}),e(T,[2,107]),{31:[1,273],65:f,79:208,113:A,114:d,115:E},{6:11,7:12,8:h,9:U,10:F,11:O,20:17,22:18,23:19,24:20,25:21,26:22,27:z,32:[1,274],33:24,34:c1,36:f1,38:A1,40:28,41:38,42:S,43:39,45:40,58:k,81:o1,82:w1,83:U1,84:G1,85:M1,86:B,99:x,102:y,103:m,106:v,108:V,110:41,111:L,112:I,113:R,118:K1,119:j1,120:Y1,121:X1},{10:Z,58:J,81:$,89:275,102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},{10:Z,58:J,81:$,89:276,102:t1,104:229,105:230,106:e1,107:s1,108:u1,109:i1},e(N,[2,57]),e(b,[2,33]),e(T,[2,117],{103:m1}),e(T,[2,118],{103:m1})],defaultActions:{},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var p=new Error(a);throw p.hash=o,p}},parse:function(a){var o=this,p=[0],r=[],C=[null],t=[],R1=this.table,s="",j=0,jt=0,Se=2,Yt=1,_e=t.slice.call(arguments,1),_=Object.create(this.lexer),d1={yy:{}};for(var at in this.yy)Object.prototype.hasOwnProperty.call(this.yy,at)&&(d1.yy[at]=this.yy[at]);_.setInput(a,d1.yy),d1.yy.lexer=_,d1.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ct=_.yylloc;t.push(ct);var Be=_.options&&_.options.ranges;typeof d1.yy.parseError=="function"?this.parseError=d1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function xe(){var n1;return n1=r.pop()||_.lex()||Yt,typeof n1!="number"&&(n1 instanceof Array&&(r=n1,n1=r.pop()),n1=o.symbols_[n1]||n1),n1}for(var G,E1,Y,ot,v1={},Q1,r1,Xt,W1;;){if(E1=p[p.length-1],this.defaultActions[E1]?Y=this.defaultActions[E1]:((G===null||typeof G>"u")&&(G=xe()),Y=R1[E1]&&R1[E1][G]),typeof Y>"u"||!Y.length||!Y[0]){var lt="";W1=[];for(Q1 in R1[E1])this.terminals_[Q1]&&Q1>Se&&W1.push("'"+this.terminals_[Q1]+"'");_.showPosition?lt="Parse error on line "+(j+1)+`: `+_.showPosition()+` Expecting `+W1.join(", ")+", got '"+(this.terminals_[G]||G)+"'":lt="Parse error on line "+(j+1)+": Unexpected "+(G==Yt?"end of input":"'"+(this.terminals_[G]||G)+"'"),this.parseError(lt,{text:_.match,token:this.terminals_[G]||G,line:_.yylineno,loc:ct,expected:W1})}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E1+", token: "+G);switch(Y[0]){case 1:p.push(G),C.push(_.yytext),t.push(_.yylloc),p.push(Y[1]),G=null,jt=_.yyleng,s=_.yytext,j=_.yylineno,ct=_.yylloc;break;case 2:if(r1=this.productions_[Y[1]][1],v1.$=C[C.length-r1],v1._$={first_line:t[t.length-(r1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(r1||1)].first_column,last_column:t[t.length-1].last_column},Be&&(v1._$.range=[t[t.length-(r1||1)].range[0],t[t.length-1].range[1]]),ot=this.performAction.apply(v1,[s,jt,j,d1.yy,Y[1],C,t].concat(_e)),typeof ot<"u")return ot;r1&&(p=p.slice(0,-1*r1*2),C=C.slice(0,-1*r1),t=t.slice(0,-1*r1)),p.push(this.productions_[Y[1]][0]),C.push(v1.$),t.push(v1._$),Xt=R1[p[p.length-2]][p[p.length-1]],p.push(Xt);break;case 3:return!0}}return!0}},Ce=function(){var h1={EOF:1,parseError:function(o,p){if(this.yy.parser)this.yy.parser.parseError(o,p);else throw new Error(o)},setInput:function(a,o){return this.yy=o||this.yy||{},this._input=a,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},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var o=a.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var o=a.length,p=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;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),p.length-1&&(this.yylineno-=p.length-1);var C=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:p?(p.length===r.length?this.yylloc.first_column:0)+r[r.length-p.length].length-p[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),o=new Array(a.length+1).join("-");return a+this.upcomingInput()+` diff --git a/assets/flowDiagram-7ea5b25a-2ec2ff72.js b/assets/flowDiagram-7ea5b25a-802bdd2f.js similarity index 97% rename from assets/flowDiagram-7ea5b25a-2ec2ff72.js rename to assets/flowDiagram-7ea5b25a-802bdd2f.js index e1ce030..bdbe69a 100644 --- a/assets/flowDiagram-7ea5b25a-2ec2ff72.js +++ b/assets/flowDiagram-7ea5b25a-802bdd2f.js @@ -1,4 +1,4 @@ -import{p as St,f as W}from"./flowDb-1972c806-1899fd0a.js";import{h as S,u as Lt,r as Et,p as _t,l as Tt,d as M,f as tt,G as Nt}from"./layout-fa84e821.js";import{h as m,n as P,o as z,p as et,c as J,j as rt,l as R,q as V,r as At}from"./index-b371ab76.js";import{a as N,b as at,i as nt,c as _,e as st,d as it,f as Ct,g as It,s as Bt}from"./styles-080da4f6-2a42e0c3.js";import{l as Mt}from"./line-63c0ea4d.js";import"./index-2c4b9a3b-7c73707d.js";import"./edges-f2ad444c-795ea1c8.js";import"./createText-62fc7601-6b649b67.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";function Dt(r){if(!r.ok)throw new Error(r.status+" "+r.statusText);return r.text()}function Rt(r,e){return fetch(r,e).then(Dt)}function Gt(r){return(e,t)=>Rt(e,t).then(n=>new DOMParser().parseFromString(n,r))}var Pt=Gt("image/svg+xml"),Y={normal:$t,vee:Wt,undirected:Vt};function Ut(r){Y=r}function $t(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");N(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function Wt(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");N(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function Vt(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");N(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function zt(r,e){var t=r;return t.node().appendChild(e.label),N(t,e.labelStyle),t}function Yt(r,e){for(var t=r.append("text"),n=Ht(e.label).split(` +import{p as St,f as W}from"./flowDb-1972c806-d31c77fd.js";import{h as S,u as Lt,r as Et,p as _t,l as Tt,d as M,f as tt,G as Nt}from"./layout-608b290b.js";import{h as m,n as P,o as z,p as et,c as J,j as rt,l as R,q as V,r as At}from"./index-e0ff10fa.js";import{a as N,b as at,i as nt,c as _,e as st,d as it,f as Ct,g as It,s as Bt}from"./styles-080da4f6-3483b67d.js";import{l as Mt}from"./line-434e5c73.js";import"./index-2c4b9a3b-bbd91aa2.js";import"./edges-f2ad444c-7df4797c.js";import"./createText-62fc7601-0312dc07.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";function Dt(r){if(!r.ok)throw new Error(r.status+" "+r.statusText);return r.text()}function Rt(r,e){return fetch(r,e).then(Dt)}function Gt(r){return(e,t)=>Rt(e,t).then(n=>new DOMParser().parseFromString(n,r))}var Pt=Gt("image/svg+xml"),Y={normal:$t,vee:Wt,undirected:Vt};function Ut(r){Y=r}function $t(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");N(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function Wt(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");N(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function Vt(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");N(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function zt(r,e){var t=r;return t.node().appendChild(e.label),N(t,e.labelStyle),t}function Yt(r,e){for(var t=r.append("text"),n=Ht(e.label).split(` `),a=0;a0}function T(r,e,t){var n=r.x,a=r.y,s=[],i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(p){i=Math.min(i,p.x),o=Math.min(o,p.y)});for(var c=n-r.width/2-i,d=a-r.height/2-o,l=0;l1&&s.sort(function(p,g){var f=p.x-t.x,y=p.y-t.y,k=Math.sqrt(f*f+y*y),I=g.x-t.x,E=g.y-t.y,U=Math.sqrt(I*I+E*E);return kMath.abs(a)*o?(s<0&&(o=-o),c=s===0?0:o*a/s,d=o):(a<0&&(i=-i),c=i,d=a===0?0:i*s/a),{x:t+c,y:n+d}}var Q={rect:ie,ellipse:oe,circle:le,diamond:ce};function se(r){Q=r}function ie(r,e,t){var n=r.insert("rect",":first-child").attr("rx",t.rx).attr("ry",t.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return t.intersect=function(a){return Z(t,a)},n}function oe(r,e,t){var n=e.width/2,a=e.height/2,s=r.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",n).attr("ry",a);return t.intersect=function(i){return lt(t,n,a,i)},s}function le(r,e,t){var n=Math.max(e.width,e.height)/2,a=r.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",n);return t.intersect=function(s){return ae(t,n,s)},a}function ce(r,e,t){var n=e.width*Math.SQRT2/2,a=e.height*Math.SQRT2/2,s=[{x:0,y:-a},{x:-n,y:0},{x:0,y:a},{x:n,y:0}],i=r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" "));return t.intersect=function(o){return T(t,s,o)},i}function de(){var r=function(e,t){fe(t);var n=D(e,"output"),a=D(n,"clusters"),s=D(n,"edgePaths"),i=X(D(n,"edgeLabels"),t),o=q(D(n,"nodes"),t,Q);Tt(t),re(o,t),ee(i,t),F(s,t,Y);var c=H(a,t);te(c,t),pe(t)};return r.createNodes=function(e){return arguments.length?(jt(e),r):q},r.createClusters=function(e){return arguments.length?(Xt(e),r):H},r.createEdgeLabels=function(e){return arguments.length?(Ft(e),r):X},r.createEdgePaths=function(e){return arguments.length?(qt(e),r):F},r.shapes=function(e){return arguments.length?(se(e),r):Q},r.arrows=function(e){return arguments.length?(Ut(e),r):Y},r}var he={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},ue={arrowhead:"normal",curve:P};function fe(r){r.nodes().forEach(function(e){var t=r.node(e);!S(t,"label")&&!r.children(e).length&&(t.label=e),S(t,"paddingX")&&M(t,{paddingLeft:t.paddingX,paddingRight:t.paddingX}),S(t,"paddingY")&&M(t,{paddingTop:t.paddingY,paddingBottom:t.paddingY}),S(t,"padding")&&M(t,{paddingLeft:t.padding,paddingRight:t.padding,paddingTop:t.padding,paddingBottom:t.padding}),M(t,he),tt(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(n){t[n]=Number(t[n])}),S(t,"width")&&(t._prevWidth=t.width),S(t,"height")&&(t._prevHeight=t.height)}),r.edges().forEach(function(e){var t=r.edge(e);S(t,"label")||(t.label=""),M(t,ue)})}function pe(r){tt(r.nodes(),function(e){var t=r.node(e);S(t,"_prevWidth")?t.width=t._prevWidth:delete t.width,S(t,"_prevHeight")?t.height=t._prevHeight:delete t.height,delete t._prevWidth,delete t._prevHeight})}function D(r,e){var t=r.select("g."+e);return t.empty()&&(t=r.append("g").attr("class",e)),t}function ct(r,e,t){const n=e.width,a=e.height,s=(n+a)*.9,i=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}],o=A(r,s,s,i);return t.intersect=function(c){return T(t,i,c)},o}function dt(r,e,t){const a=e.height,s=a/4,i=e.width+2*s,o=[{x:s,y:0},{x:i-s,y:0},{x:i,y:-a/2},{x:i-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],c=A(r,i,a,o);return t.intersect=function(d){return T(t,o,d)},c}function ht(r,e,t){const n=e.width,a=e.height,s=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function ut(r,e,t){const n=e.width,a=e.height,s=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function ft(r,e,t){const n=e.width,a=e.height,s=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function pt(r,e,t){const n=e.width,a=e.height,s=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function vt(r,e,t){const n=e.width,a=e.height,s=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function yt(r,e,t){const n=e.width,a=e.height,s=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function gt(r,e,t){const n=e.height,a=e.width+n/4,s=r.insert("rect",":first-child").attr("rx",n/2).attr("ry",n/2).attr("x",-a/2).attr("y",-n/2).attr("width",a).attr("height",n);return t.intersect=function(i){return Z(t,i)},s}function wt(r,e,t){const n=e.width,a=e.height,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function xt(r,e,t){const n=e.width,a=n/2,s=a/(2.5+n/50),i=e.height+s,o="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+i+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-i,c=r.attr("label-offset-y",s).insert("path",":first-child").attr("d",o).attr("transform","translate("+-n/2+","+-(i/2+s)+")");return t.intersect=function(d){const l=Z(t,d),v=l.x-t.x;if(a!=0&&(Math.abs(v)t.height/2-s)){let h=s*s*(1-v*v/(a*a));h!=0&&(h=Math.sqrt(h)),h=s-h,d.y-t.y>0&&(h=-h),l.y+=h}return l},c}function ve(r){r.shapes().question=ct,r.shapes().hexagon=dt,r.shapes().stadium=gt,r.shapes().subroutine=wt,r.shapes().cylinder=xt,r.shapes().rect_left_inv_arrow=ht,r.shapes().lean_right=ut,r.shapes().lean_left=ft,r.shapes().trapezoid=pt,r.shapes().inv_trapezoid=vt,r.shapes().rect_right_inv_arrow=yt}function ye(r){r({question:ct}),r({hexagon:dt}),r({stadium:gt}),r({subroutine:wt}),r({cylinder:xt}),r({rect_left_inv_arrow:ht}),r({lean_right:ut}),r({lean_left:ft}),r({trapezoid:pt}),r({inv_trapezoid:vt}),r({rect_right_inv_arrow:yt})}function A(r,e,t,n){return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("transform","translate("+-e/2+","+t/2+")")}const ge={addToRender:ve,addToRenderV2:ye},mt={},we=function(r){const e=Object.keys(r);for(const t of e)mt[t]=r[t]},bt=function(r,e,t,n,a,s){const i=n?n.select(`[id="${t}"]`):m(`[id="${t}"]`),o=a||document;Object.keys(r).forEach(function(d){const l=r[d];let v="default";l.classes.length>0&&(v=l.classes.join(" "));const h=z(l.styles);let u=l.text!==void 0?l.text:l.id,p;if(et(J().flowchart.htmlLabels)){const y={label:u.replace(/fa[blrs]?:fa-[\w-]+/g,k=>``)};p=at(i,y).node(),p.parentNode.removeChild(p)}else{const y=o.createElementNS("http://www.w3.org/2000/svg","text");y.setAttribute("style",h.labelStyle.replace("color:","fill:"));const k=u.split(rt.lineBreakRegex);for(const I of k){const E=o.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","1"),E.textContent=I,y.appendChild(E)}p=y}let g=0,f="";switch(l.type){case"round":g=5,f="rect";break;case"square":f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":f="rect_left_inv_arrow";break;case"lean_right":f="lean_right";break;case"lean_left":f="lean_left";break;case"trapezoid":f="trapezoid";break;case"inv_trapezoid":f="inv_trapezoid";break;case"odd_right":f="rect_left_inv_arrow";break;case"circle":f="circle";break;case"ellipse":f="ellipse";break;case"stadium":f="stadium";break;case"subroutine":f="subroutine";break;case"cylinder":f="cylinder";break;case"group":f="rect";break;default:f="rect"}R.warn("Adding node",l.id,l.domId),e.setNode(s.db.lookUpDomId(l.id),{labelType:"svg",labelStyle:h.labelStyle,shape:f,label:p,rx:g,ry:g,class:v,style:h.style,id:s.db.lookUpDomId(l.id)})})},kt=function(r,e,t){let n=0,a,s;if(r.defaultStyle!==void 0){const i=z(r.defaultStyle);a=i.style,s=i.labelStyle}r.forEach(function(i){n++;const o="L-"+i.start+"-"+i.end,c="LS-"+i.start,d="LE-"+i.end,l={};i.type==="arrow_open"?l.arrowhead="none":l.arrowhead="normal";let v="",h="";if(i.style!==void 0){const u=z(i.style);v=u.style,h=u.labelStyle}else switch(i.stroke){case"normal":v="fill:none",a!==void 0&&(v=a),s!==void 0&&(h=s);break;case"dotted":v="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":v=" stroke-width: 3.5px;fill:none";break}l.style=v,l.labelStyle=h,i.interpolate!==void 0?l.curve=V(i.interpolate,P):r.defaultInterpolate!==void 0?l.curve=V(r.defaultInterpolate,P):l.curve=V(mt.curve,P),i.text===void 0?i.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",et(J().flowchart.htmlLabels)?(l.labelType="html",l.label=`${i.text.replace(/fa[blrs]?:fa-[\w-]+/g,u=>``)}`):(l.labelType="text",l.label=i.text.replace(rt.lineBreakRegex,` `),i.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),l.id=o,l.class=c+" "+d,l.minlen=i.length||1,e.setEdge(t.db.lookUpDomId(i.start),t.db.lookUpDomId(i.end),l,n)})},xe=function(r,e){return R.info("Extracting classes"),e.db.getClasses()},me=function(r,e,t,n){R.info("Drawing flowchart");const{securityLevel:a,flowchart:s}=J();let i;a==="sandbox"&&(i=m("#i"+e));const o=a==="sandbox"?m(i.nodes()[0].contentDocument.body):m("body"),c=a==="sandbox"?i.nodes()[0].contentDocument:document;let d=n.db.getDirection();d===void 0&&(d="TD");const l=s.nodeSpacing||50,v=s.rankSpacing||50,h=new Nt({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:l,ranksep:v,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let u;const p=n.db.getSubGraphs();for(let w=p.length-1;w>=0;w--)u=p[w],n.db.addVertex(u.id,u.title,"group",void 0,u.classes);const g=n.db.getVertices();R.warn("Get vertices",g);const f=n.db.getEdges();let y=0;for(y=p.length-1;y>=0;y--){u=p[y],Bt("cluster").append("text");for(let w=0;w{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,be.setConf(r.flowchart),W.clear(),W.setGen("gen-1")}};export{Be as diagram}; diff --git a/assets/flowDiagram-v2-855bc5b3-3d40ebb1.js b/assets/flowDiagram-v2-855bc5b3-3d40ebb1.js new file mode 100644 index 0000000..96e2ab6 --- /dev/null +++ b/assets/flowDiagram-v2-855bc5b3-3d40ebb1.js @@ -0,0 +1 @@ +import{p as e,f as o}from"./flowDb-1972c806-d31c77fd.js";import{f as t,g as a}from"./styles-080da4f6-3483b67d.js";import{t as s}from"./index-e0ff10fa.js";import"./layout-608b290b.js";import"./index-2c4b9a3b-bbd91aa2.js";import"./edges-f2ad444c-7df4797c.js";import"./createText-62fc7601-0312dc07.js";import"./line-434e5c73.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const k={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,s({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{k as diagram}; diff --git a/assets/flowDiagram-v2-855bc5b3-908b141e.js b/assets/flowDiagram-v2-855bc5b3-908b141e.js deleted file mode 100644 index f7114ba..0000000 --- a/assets/flowDiagram-v2-855bc5b3-908b141e.js +++ /dev/null @@ -1 +0,0 @@ -import{p as e,f as o}from"./flowDb-1972c806-1899fd0a.js";import{f as t,g as a}from"./styles-080da4f6-2a42e0c3.js";import{t as s}from"./index-b371ab76.js";import"./layout-fa84e821.js";import"./index-2c4b9a3b-7c73707d.js";import"./edges-f2ad444c-795ea1c8.js";import"./createText-62fc7601-6b649b67.js";import"./line-63c0ea4d.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const k={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,s({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{k as diagram}; diff --git a/assets/flowchart-elk-definition-abe16c3d-57c0d888.js b/assets/flowchart-elk-definition-abe16c3d-82de085c.js similarity index 99% rename from assets/flowchart-elk-definition-abe16c3d-57c0d888.js rename to assets/flowchart-elk-definition-abe16c3d-82de085c.js index e3ed2da..3f3a3b8 100644 --- a/assets/flowchart-elk-definition-abe16c3d-57c0d888.js +++ b/assets/flowchart-elk-definition-abe16c3d-82de085c.js @@ -1,4 +1,4 @@ -import{d as bMe,p as wMe}from"./flowDb-1972c806-1899fd0a.js";import{P as Hee,Q as gMe,l as K1,h as lI,$ as OH,r as pMe,o as V1n,q as X1n,n as IH,j as vMe}from"./index-b371ab76.js";import{i as mMe,a as kMe,l as yMe,b as jMe,j as EMe}from"./edges-f2ad444c-795ea1c8.js";import{l as CMe}from"./line-63c0ea4d.js";import"./createText-62fc7601-6b649b67.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";function PH(Ae){throw new Error('Could not dynamically require "'+Ae+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Uee={exports:{}};(function(Ae,At){(function(ft){Ae.exports=ft()})(function(){return function(){function ft(dt,Vt,Et){function y(Bt,qt){if(!Vt[Bt]){if(!dt[Bt]){var Ge=typeof PH=="function"&&PH;if(!qt&&Ge)return Ge(Bt,!0);if(Ht)return Ht(Bt,!0);var Ki=new Error("Cannot find module '"+Bt+"'");throw Ki.code="MODULE_NOT_FOUND",Ki}var Ii=Vt[Bt]={exports:{}};dt[Bt][0].call(Ii.exports,function(An){var Uc=dt[Bt][1][An];return y(Uc||An)},Ii,Ii.exports,ft,dt,Vt,Et)}return Vt[Bt].exports}for(var Ht=typeof PH=="function"&&PH,Lc=0;Lc0&&arguments[0]!==void 0?arguments[0]:{},Ki=Ge.defaultLayoutOptions,Ii=Ki===void 0?{}:Ki,An=Ge.algorithms,Uc=An===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:An,Nc=Ge.workerFactory,ju=Ge.workerUrl;if(y(this,Bt),this.defaultLayoutOptions=Ii,this.initialized=!1,typeof ju>"u"&&typeof Nc>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var vr=Nc;typeof ju<"u"&&typeof Nc>"u"&&(vr=function(q1){return new Worker(q1)});var Jo=vr(ju);if(typeof Jo.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new Lc(Jo),this.worker.postMessage({cmd:"register",algorithms:Uc}).then(function(H1){return qt.initialized=!0}).catch(console.err)}return Et(Bt,[{key:"layout",value:function(Ge){var Ki=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ii=Ki.layoutOptions,An=Ii===void 0?this.defaultLayoutOptions:Ii,Uc=Ki.logging,Nc=Uc===void 0?!1:Uc,ju=Ki.measureExecutionTime,vr=ju===void 0?!1:ju;return Ge?this.worker.postMessage({cmd:"layout",graph:Ge,layoutOptions:An,options:{logging:Nc,measureExecutionTime:vr}}):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.terminate()}}]),Bt}();Vt.default=Ht;var Lc=function(){function Bt(qt){var Ge=this;if(y(this,Bt),qt===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=qt,this.worker.onmessage=function(Ki){setTimeout(function(){Ge.receive(Ge,Ki)},0)}}return Et(Bt,[{key:"postMessage",value:function(Ge){var Ki=this.id||0;this.id=Ki+1,Ge.id=Ki;var Ii=this;return new Promise(function(An,Uc){Ii.resolvers[Ki]=function(Nc,ju){Nc?(Ii.convertGwtStyleError(Nc),Uc(Nc)):An(ju)},Ii.worker.postMessage(Ge)})}},{key:"receive",value:function(Ge,Ki){var Ii=Ki.data,An=Ge.resolvers[Ii.id];An&&(delete Ge.resolvers[Ii.id],Ii.error?An(Ii.error):An(null,Ii.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(Ge){if(Ge){var Ki=Ge.__java$exception;Ki&&(Ki.cause&&Ki.cause.backingJsObject&&(Ge.cause=Ki.cause.backingJsObject,this.convertGwtStyleError(Ge.cause)),delete Ge.__java$exception)}}}]),Bt}()},{}],2:[function(ft,dt,Vt){(function(Et){(function(){var y;typeof window<"u"?y=window:typeof Et<"u"?y=Et:typeof self<"u"&&(y=self);var Ht;function Lc(){}function Bt(){}function qt(){}function Ge(){}function Ki(){}function Ii(){}function An(){}function Uc(){}function Nc(){}function ju(){}function vr(){}function Jo(){}function H1(){}function q1(){}function ww(){}function Np(){}function G1(){}function Th(){}function Q1n(){}function J1n(){}function zy(){}function Y1n(){}function Z1n(){}function nln(){}function eln(){}function Xg(){}function N(){}function tln(){}function aI(){}function iln(){}function rln(){}function cln(){}function uln(){}function DH(){}function sln(){}function oln(){}function fln(){}function z1(){}function U1(){}function dI(){}function hln(){}function lln(){}function aln(){}function $H(){}function dln(){}function bln(){}function Vg(){}function Qg(){}function wln(){}function gln(){}function pln(){}function vln(){}function FH(){}function W1(){}function Jg(){}function Yg(){}function mln(){}function Vee(){}function bI(){}function kln(){}function yln(){}function jln(){}function Eln(){}function Cln(){}function Tln(){}function Mln(){}function Aln(){}function Sln(){}function Pln(){}function Iln(){}function Oln(){}function Dln(){}function $ln(){}function Fln(){}function xln(){}function Lln(){}function Nln(){}function Bln(){}function Rln(){}function _ln(){}function Kln(){}function Hln(){}function qln(){}function Gln(){}function zln(){}function Uln(){}function Wln(){}function Xln(){}function Vln(){}function Qln(){}function Jln(){}function Yln(){}function xH(){}function Zln(){}function nan(){}function ean(){}function tan(){}function wI(){}function gI(){}function Uy(){}function ian(){}function ran(){}function pI(){}function can(){}function uan(){}function san(){}function Wy(){}function oan(){}function fan(){}function han(){}function lan(){}function aan(){}function dan(){}function ban(){}function wan(){}function gan(){}function LH(){}function pan(){}function van(){}function man(){}function kan(){}function yan(){}function NH(){}function jan(){}function Ean(){}function Can(){}function Tan(){}function Man(){}function Aan(){}function San(){}function Pan(){}function Ian(){}function Oan(){}function Dan(){}function $an(){}function Fan(){}function xan(){}function vI(){}function Lan(){}function Nan(){}function Ban(){}function Ran(){}function _an(){}function BH(){}function Kan(){}function Han(){}function qan(){}function Gan(){}function zan(){}function Uan(){}function Wan(){}function Xan(){}function Van(){}function Qan(){}function Jan(){}function Yan(){}function Zan(){}function ndn(){}function edn(){}function tdn(){}function idn(){}function rdn(){}function cdn(){}function udn(){}function sdn(){}function odn(){}function fdn(){}function hdn(){}function ldn(){}function adn(){}function ddn(){}function bdn(){}function wdn(){}function gdn(){}function pdn(){}function vdn(){}function mdn(){}function kdn(){}function ydn(){}function jdn(){}function Edn(){}function Cdn(){}function Tdn(){}function Mdn(){}function Adn(){}function Sdn(){}function Pdn(){}function Idn(){}function Odn(){}function Ddn(){}function $dn(){}function Fdn(){}function xdn(){}function Ldn(){}function Ndn(){}function Bdn(){}function Rdn(){}function _dn(){}function Kdn(){}function Hdn(){}function qdn(){}function Gdn(){}function zdn(){}function Udn(){}function Wdn(){}function Xdn(){}function Vdn(){}function Qdn(){}function Jdn(){}function Ydn(){}function Zdn(){}function n0n(){}function e0n(){}function t0n(){}function i0n(){}function r0n(){}function c0n(){}function u0n(){}function s0n(){}function o0n(){}function f0n(){}function h0n(){}function l0n(){}function a0n(){}function d0n(){}function b0n(){}function w0n(){}function g0n(){}function p0n(){}function v0n(){}function m0n(){}function k0n(){}function y0n(){}function j0n(){}function E0n(){}function C0n(){}function T0n(){}function M0n(){}function A0n(){}function S0n(){}function P0n(){}function I0n(){}function O0n(){}function D0n(){}function RH(){}function $0n(){}function F0n(){}function x0n(){}function L0n(){}function N0n(){}function B0n(){}function R0n(){}function _0n(){}function K0n(){}function H0n(){}function q0n(){}function G0n(){}function z0n(){}function U0n(){}function W0n(){}function X0n(){}function V0n(){}function Q0n(){}function J0n(){}function Y0n(){}function Z0n(){}function nbn(){}function ebn(){}function tbn(){}function ibn(){}function rbn(){}function cbn(){}function ubn(){}function sbn(){}function obn(){}function fbn(){}function hbn(){}function lbn(){}function abn(){}function dbn(){}function bbn(){}function wbn(){}function gbn(){}function pbn(){}function vbn(){}function mbn(){}function kbn(){}function ybn(){}function jbn(){}function Ebn(){}function Cbn(){}function Tbn(){}function Mbn(){}function Abn(){}function Sbn(){}function Pbn(){}function Ibn(){}function Obn(){}function Dbn(){}function $bn(){}function Fbn(){}function xbn(){}function Lbn(){}function Nbn(){}function Bbn(){}function Rbn(){}function _bn(){}function Kbn(){}function Hbn(){}function qbn(){}function Gbn(){}function zbn(){}function _H(){}function Ubn(){}function Wbn(){}function Xbn(){}function Vbn(){}function Qbn(){}function Jbn(){}function Ybn(){}function Zbn(){}function nwn(){}function ewn(){}function twn(){}function iwn(){}function rwn(){}function cwn(){}function uwn(){}function swn(){}function own(){}function fwn(){}function hwn(){}function lwn(){}function KH(){}function awn(){}function dwn(){}function bwn(){}function wwn(){}function gwn(){}function pwn(){}function HH(){}function qH(){}function vwn(){}function GH(){}function zH(){}function mwn(){}function kwn(){}function ywn(){}function jwn(){}function Ewn(){}function Cwn(){}function Twn(){}function Mwn(){}function Awn(){}function UH(){}function Swn(){}function Pwn(){}function Iwn(){}function Own(){}function Dwn(){}function $wn(){}function Fwn(){}function xwn(){}function Lwn(){}function Nwn(){}function Bwn(){}function Rwn(){}function _wn(){}function Kwn(){}function Hwn(){}function qwn(){}function Gwn(){}function zwn(){}function Uwn(){}function Wwn(){}function Xwn(){}function Vwn(){}function Qwn(){}function Jwn(){}function Ywn(){}function Zwn(){}function ngn(){}function egn(){}function tgn(){}function ign(){}function rgn(){}function cgn(){}function ugn(){}function sgn(){}function ogn(){}function fgn(){}function hgn(){}function lgn(){}function agn(){}function dgn(){}function bgn(){}function wgn(){}function ggn(){}function pgn(){}function vgn(){}function mgn(){}function kgn(){}function ygn(){}function jgn(){}function Egn(){}function Cgn(){}function Tgn(){}function Mgn(){}function Agn(){}function Sgn(){}function Pgn(){}function Ign(){}function Ogn(){}function Dgn(){}function $gn(){}function Fgn(){}function xgn(){}function Lgn(){}function Ngn(){}function Bgn(){}function Rgn(){}function _gn(){}function Kgn(){}function mI(){}function kI(){}function yI(){}function Hgn(){}function qgn(){}function Ggn(){}function zgn(){}function Ugn(){}function WH(){}function Wgn(){}function Xgn(){}function Qee(){}function Vgn(){}function Qgn(){}function Jgn(){}function Ygn(){}function Zgn(){}function n2n(){}function e2n(){}function Zl(){}function t2n(){}function Zg(){}function XH(){}function i2n(){}function r2n(){}function c2n(){}function u2n(){}function s2n(){}function o2n(){}function f2n(){}function h2n(){}function l2n(){}function a2n(){}function d2n(){}function b2n(){}function w2n(){}function g2n(){}function p2n(){}function v2n(){}function m2n(){}function k2n(){}function y2n(){}function j2n(){}function E2n(){}function dn(){}function C2n(){}function T2n(){}function M2n(){}function A2n(){}function S2n(){}function P2n(){}function I2n(){}function O2n(){}function D2n(){}function $2n(){}function jI(){}function F2n(){}function x2n(){}function L2n(){}function N2n(){}function B2n(){}function VH(){}function Xy(){}function Vy(){}function R2n(){}function QH(){}function Qy(){}function _2n(){}function K2n(){}function H2n(){}function q2n(){}function G2n(){}function z2n(){}function Jy(){}function U2n(){}function W2n(){}function X2n(){}function Yy(){}function V2n(){}function JH(){}function Q2n(){}function EI(){}function YH(){}function J2n(){}function Y2n(){}function Z2n(){}function npn(){}function Jee(){}function epn(){}function tpn(){}function ipn(){}function rpn(){}function cpn(){}function upn(){}function spn(){}function opn(){}function fpn(){}function hpn(){}function Bp(){}function CI(){}function lpn(){}function apn(){}function dpn(){}function bpn(){}function wpn(){}function gpn(){}function ppn(){}function vpn(){}function mpn(){}function kpn(){}function ypn(){}function jpn(){}function Epn(){}function Cpn(){}function Tpn(){}function Mpn(){}function Apn(){}function Spn(){}function Ppn(){}function Ipn(){}function Opn(){}function Dpn(){}function $pn(){}function Fpn(){}function xpn(){}function Lpn(){}function Npn(){}function Bpn(){}function Rpn(){}function _pn(){}function Kpn(){}function Hpn(){}function qpn(){}function Gpn(){}function zpn(){}function Upn(){}function Wpn(){}function Xpn(){}function Vpn(){}function Qpn(){}function Jpn(){}function Ypn(){}function Zpn(){}function n3n(){}function e3n(){}function t3n(){}function i3n(){}function r3n(){}function c3n(){}function u3n(){}function s3n(){}function o3n(){}function f3n(){}function h3n(){}function l3n(){}function a3n(){}function d3n(){}function b3n(){}function w3n(){}function g3n(){}function p3n(){}function v3n(){}function m3n(){}function k3n(){}function y3n(){}function j3n(){}function E3n(){}function C3n(){}function T3n(){}function M3n(){}function A3n(){}function S3n(){}function P3n(){}function I3n(){}function O3n(){}function D3n(){}function $3n(){}function F3n(){}function x3n(){}function L3n(){}function N3n(){}function B3n(){}function R3n(){}function _3n(){}function K3n(){}function H3n(){}function q3n(){}function G3n(){}function z3n(){}function U3n(){}function W3n(){}function X3n(){}function V3n(){}function Q3n(){}function J3n(){}function Y3n(){}function Z3n(){}function n4n(){}function e4n(){}function t4n(){}function i4n(){}function ZH(){}function r4n(){}function c4n(){}function TI(){Rv()}function u4n(){pF()}function s4n(){a6()}function o4n(){WT()}function f4n(){YJ()}function h4n(){Go()}function l4n(){fJ()}function a4n(){C7()}function d4n(){q9()}function b4n(){H9()}function w4n(){w8()}function g4n(){v7n()}function p4n(){x2()}function v4n(){Sj()}function m4n(){PSn()}function k4n(){HIn()}function y4n(){sPn()}function j4n(){CMn()}function E4n(){V3()}function C4n(){yl()}function T4n(){qIn()}function M4n(){pAn()}function A4n(){zZ()}function S4n(){IFn()}function P4n(){TMn()}function I4n(){nn()}function O4n(){EMn()}function D4n(){GIn()}function $4n(){WOn()}function F4n(){AMn()}function x4n(){aPn()}function L4n(){m7n()}function N4n(){$Y()}function B4n(){gb()}function R4n(){pOn()}function _4n(){S7()}function K4n(){Ux()}function H4n(){ZF()}function q4n(){Zd()}function G4n(){PV()}function z4n(){MMn()}function U4n(){BBn()}function W4n(){IY()}function X4n(){Bx()}function V4n(){DC()}function Q4n(){nM()}function nq(){Xe()}function J4n(){wT()}function Y4n(){NQ()}function eq(){mM()}function Fo(){dEn()}function tq(){eF()}function Z4n(){pZ()}function iq(n){_n(n)}function nvn(n){this.a=n}function Zy(n){this.a=n}function evn(n){this.a=n}function tvn(n){this.a=n}function ivn(n){this.a=n}function rvn(n){this.a=n}function cvn(n){this.a=n}function uvn(n){this.a=n}function rq(n){this.a=n}function cq(n){this.a=n}function svn(n){this.a=n}function MI(n){this.a=n}function ovn(n){this.a=n}function AI(n){this.a=n}function fvn(n){this.a=n}function SI(n){this.a=n}function hvn(n){this.a=n}function PI(n){this.a=n}function lvn(n){this.a=n}function avn(n){this.a=n}function dvn(n){this.a=n}function uq(n){this.b=n}function bvn(n){this.c=n}function wvn(n){this.a=n}function gvn(n){this.a=n}function pvn(n){this.a=n}function vvn(n){this.a=n}function mvn(n){this.a=n}function kvn(n){this.a=n}function yvn(n){this.a=n}function jvn(n){this.a=n}function Evn(n){this.a=n}function Cvn(n){this.a=n}function Tvn(n){this.a=n}function Mvn(n){this.a=n}function Avn(n){this.a=n}function sq(n){this.a=n}function oq(n){this.a=n}function nj(n){this.a=n}function M9(n){this.a=n}function na(){this.a=[]}function Svn(n,e){n.a=e}function Yee(n,e){n.a=e}function Zee(n,e){n.b=e}function nte(n,e){n.b=e}function ete(n,e){n.b=e}function fq(n,e){n.j=e}function tte(n,e){n.g=e}function ite(n,e){n.i=e}function rte(n,e){n.c=e}function cte(n,e){n.d=e}function ute(n,e){n.d=e}function ste(n,e){n.c=e}function ea(n,e){n.k=e}function ote(n,e){n.c=e}function hq(n,e){n.c=e}function lq(n,e){n.a=e}function fte(n,e){n.a=e}function hte(n,e){n.f=e}function lte(n,e){n.a=e}function ate(n,e){n.b=e}function II(n,e){n.d=e}function ej(n,e){n.i=e}function aq(n,e){n.o=e}function dte(n,e){n.r=e}function bte(n,e){n.a=e}function wte(n,e){n.b=e}function Pvn(n,e){n.e=e}function gte(n,e){n.f=e}function dq(n,e){n.g=e}function pte(n,e){n.e=e}function vte(n,e){n.f=e}function mte(n,e){n.f=e}function kte(n,e){n.n=e}function yte(n,e){n.a=e}function jte(n,e){n.a=e}function Ete(n,e){n.c=e}function Cte(n,e){n.c=e}function Tte(n,e){n.d=e}function Mte(n,e){n.e=e}function Ate(n,e){n.g=e}function Ste(n,e){n.a=e}function Pte(n,e){n.c=e}function Ite(n,e){n.d=e}function Ote(n,e){n.e=e}function Dte(n,e){n.f=e}function $te(n,e){n.j=e}function Fte(n,e){n.a=e}function xte(n,e){n.b=e}function Lte(n,e){n.a=e}function Ivn(n){n.b=n.a}function Ovn(n){n.c=n.d.d}function $v(n){this.d=n}function ta(n){this.a=n}function Rp(n){this.a=n}function bq(n){this.a=n}function Mh(n){this.a=n}function A9(n){this.a=n}function Dvn(n){this.a=n}function wq(n){this.a=n}function S9(n){this.a=n}function gq(n){this.a=n}function pq(n){this.a=n}function vq(n){this.a=n}function L0(n){this.a=n}function P9(n){this.a=n}function I9(n){this.a=n}function mq(n){this.b=n}function _p(n){this.b=n}function Kp(n){this.b=n}function OI(n){this.a=n}function $vn(n){this.a=n}function kq(n){this.a=n}function DI(n){this.c=n}function E(n){this.c=n}function Fvn(n){this.c=n}function yq(n){this.a=n}function jq(n){this.a=n}function Eq(n){this.a=n}function Cq(n){this.a=n}function ut(n){this.a=n}function xvn(n){this.a=n}function Tq(n){this.a=n}function Mq(n){this.a=n}function Lvn(n){this.a=n}function Nvn(n){this.a=n}function Fv(n){this.a=n}function Bvn(n){this.a=n}function Rvn(n){this.a=n}function _vn(n){this.a=n}function Kvn(n){this.a=n}function Hvn(n){this.a=n}function qvn(n){this.a=n}function Gvn(n){this.a=n}function zvn(n){this.a=n}function Uvn(n){this.a=n}function Wvn(n){this.a=n}function Xvn(n){this.a=n}function Vvn(n){this.a=n}function Qvn(n){this.a=n}function Jvn(n){this.a=n}function Yvn(n){this.a=n}function Zvn(n){this.a=n}function n5n(n){this.a=n}function O9(n){this.a=n}function e5n(n){this.a=n}function t5n(n){this.a=n}function tj(n){this.a=n}function i5n(n){this.a=n}function r5n(n){this.a=n}function Hp(n){this.a=n}function Aq(n){this.a=n}function c5n(n){this.a=n}function u5n(n){this.a=n}function s5n(n){this.a=n}function o5n(n){this.a=n}function f5n(n){this.a=n}function Sq(n){this.a=n}function Pq(n){this.a=n}function Iq(n){this.a=n}function ij(n){this.a=n}function rj(n){this.e=n}function qp(n){this.a=n}function h5n(n){this.a=n}function n2(n){this.a=n}function Oq(n){this.a=n}function l5n(n){this.a=n}function a5n(n){this.a=n}function d5n(n){this.a=n}function b5n(n){this.a=n}function w5n(n){this.a=n}function g5n(n){this.a=n}function p5n(n){this.a=n}function v5n(n){this.a=n}function m5n(n){this.a=n}function k5n(n){this.a=n}function y5n(n){this.a=n}function Dq(n){this.a=n}function j5n(n){this.a=n}function E5n(n){this.a=n}function C5n(n){this.a=n}function T5n(n){this.a=n}function M5n(n){this.a=n}function A5n(n){this.a=n}function S5n(n){this.a=n}function P5n(n){this.a=n}function I5n(n){this.a=n}function O5n(n){this.a=n}function D5n(n){this.a=n}function $5n(n){this.a=n}function F5n(n){this.a=n}function x5n(n){this.a=n}function L5n(n){this.a=n}function N5n(n){this.a=n}function B5n(n){this.a=n}function R5n(n){this.a=n}function _5n(n){this.a=n}function K5n(n){this.a=n}function H5n(n){this.a=n}function q5n(n){this.a=n}function G5n(n){this.a=n}function z5n(n){this.a=n}function U5n(n){this.a=n}function W5n(n){this.a=n}function X5n(n){this.a=n}function V5n(n){this.a=n}function Q5n(n){this.a=n}function J5n(n){this.a=n}function Y5n(n){this.a=n}function Z5n(n){this.a=n}function n6n(n){this.a=n}function e6n(n){this.a=n}function t6n(n){this.a=n}function i6n(n){this.a=n}function r6n(n){this.a=n}function c6n(n){this.c=n}function u6n(n){this.b=n}function s6n(n){this.a=n}function o6n(n){this.a=n}function f6n(n){this.a=n}function h6n(n){this.a=n}function l6n(n){this.a=n}function a6n(n){this.a=n}function d6n(n){this.a=n}function b6n(n){this.a=n}function w6n(n){this.a=n}function g6n(n){this.a=n}function p6n(n){this.a=n}function v6n(n){this.a=n}function m6n(n){this.a=n}function k6n(n){this.a=n}function y6n(n){this.a=n}function j6n(n){this.a=n}function E6n(n){this.a=n}function C6n(n){this.a=n}function T6n(n){this.a=n}function M6n(n){this.a=n}function A6n(n){this.a=n}function S6n(n){this.a=n}function P6n(n){this.a=n}function I6n(n){this.a=n}function X1(n){this.a=n}function e2(n){this.a=n}function O6n(n){this.a=n}function D6n(n){this.a=n}function $6n(n){this.a=n}function F6n(n){this.a=n}function x6n(n){this.a=n}function L6n(n){this.a=n}function N6n(n){this.a=n}function B6n(n){this.a=n}function R6n(n){this.a=n}function _6n(n){this.a=n}function K6n(n){this.a=n}function H6n(n){this.a=n}function q6n(n){this.a=n}function G6n(n){this.a=n}function z6n(n){this.a=n}function U6n(n){this.a=n}function cj(n){this.a=n}function W6n(n){this.a=n}function X6n(n){this.a=n}function V6n(n){this.a=n}function Q6n(n){this.a=n}function J6n(n){this.a=n}function Y6n(n){this.a=n}function Z6n(n){this.a=n}function nmn(n){this.a=n}function emn(n){this.a=n}function tmn(n){this.a=n}function imn(n){this.a=n}function rmn(n){this.a=n}function cmn(n){this.a=n}function umn(n){this.a=n}function smn(n){this.a=n}function omn(n){this.a=n}function fmn(n){this.a=n}function hmn(n){this.a=n}function lmn(n){this.a=n}function amn(n){this.a=n}function dmn(n){this.a=n}function bmn(n){this.a=n}function wmn(n){this.a=n}function gmn(n){this.a=n}function pmn(n){this.a=n}function vmn(n){this.a=n}function mmn(n){this.a=n}function kmn(n){this.a=n}function $q(n){this.a=n}function kt(n){this.b=n}function ymn(n){this.f=n}function Fq(n){this.a=n}function jmn(n){this.a=n}function Emn(n){this.a=n}function Cmn(n){this.a=n}function Tmn(n){this.a=n}function Mmn(n){this.a=n}function Amn(n){this.a=n}function Smn(n){this.a=n}function Pmn(n){this.a=n}function D9(n){this.a=n}function Imn(n){this.a=n}function Omn(n){this.b=n}function xq(n){this.c=n}function uj(n){this.e=n}function Dmn(n){this.a=n}function sj(n){this.a=n}function oj(n){this.a=n}function $I(n){this.a=n}function $mn(n){this.a=n}function Fmn(n){this.d=n}function Lq(n){this.a=n}function Nq(n){this.a=n}function cd(n){this.e=n}function Nte(){this.a=0}function gw(){dyn(this)}function X(){RO(this)}function we(){Cu(this)}function FI(){pTn(this)}function xmn(){}function ud(){this.c=p1n}function Bte(n,e){e.Wb(n)}function Lmn(n,e){n.b+=e}function Nmn(n){n.b=new JI}function T(n){return n.e}function Rte(n){return n.a}function _te(n){return n.a}function Kte(n){return n.a}function Hte(n){return n.a}function qte(n){return n.a}function Gte(){return null}function zte(){return null}function Ute(){EG(),iTe()}function Wte(n){n.b.tf(n.e)}function xv(n,e){n.b=e-n.b}function Lv(n,e){n.a=e-n.a}function Bmn(n,e){e.ad(n.a)}function Xte(n,e){si(e,n)}function Vte(n,e,t){n.Od(t,e)}function $9(n,e){n.e=e,e.b=n}function Bq(n){$f(),this.a=n}function Rmn(n){$f(),this.a=n}function _mn(n){$f(),this.a=n}function Rq(n){nb(),this.a=n}function Kmn(n){k3(),aR.be(n)}function ia(){Qyn.call(this)}function _q(){Qyn.call(this)}function Kq(){ia.call(this)}function xI(){ia.call(this)}function Hmn(){ia.call(this)}function F9(){ia.call(this)}function fu(){ia.call(this)}function Nv(){ia.call(this)}function ye(){ia.call(this)}function vs(){ia.call(this)}function qmn(){ia.call(this)}function ic(){ia.call(this)}function Gmn(){ia.call(this)}function zmn(){this.a=this}function fj(){this.Bb|=256}function Umn(){this.b=new Xkn}function Hq(){Hq=N,new we}function qq(){Kq.call(this)}function Wmn(n,e){n.length=e}function hj(n,e){W(n.a,e)}function Qte(n,e){nY(n.c,e)}function Jte(n,e){ci(n.b,e)}function Yte(n,e){KT(n.a,e)}function Zte(n,e){MF(n.a,e)}function Gp(n,e){et(n.e,e)}function t2(n){iM(n.c,n.b)}function nie(n,e){n.kc().Nb(e)}function Gq(n){this.a=Yge(n)}function hi(){this.a=new we}function Xmn(){this.a=new we}function lj(){this.a=new X}function LI(){this.a=new X}function zq(){this.a=new X}function Ns(){this.a=new Oln}function ra(){this.a=new TSn}function Uq(){this.a=new LH}function Wq(){this.a=new h7n}function Vmn(){this.a=new YMn}function Xq(){this.a=new bMn}function Vq(){this.a=new Bjn}function Qmn(){this.a=new X}function Qq(){this.a=new X}function Jmn(){this.a=new X}function Ymn(){this.a=new X}function Zmn(){this.d=new X}function n9n(){this.a=new hi}function e9n(){this.a=new we}function t9n(){this.b=new we}function i9n(){this.b=new X}function Jq(){this.e=new X}function r9n(){this.d=new X}function c9n(){this.a=new C4n}function u9n(){X.call(this)}function Yq(){lj.call(this)}function s9n(){kE.call(this)}function o9n(){Qq.call(this)}function NI(){Bv.call(this)}function Bv(){xmn.call(this)}function i2(){xmn.call(this)}function Zq(){i2.call(this)}function f9n(){zTn.call(this)}function h9n(){zTn.call(this)}function l9n(){uG.call(this)}function a9n(){uG.call(this)}function d9n(){uG.call(this)}function b9n(){sG.call(this)}function hu(){Tt.call(this)}function nG(){B2n.call(this)}function eG(){B2n.call(this)}function w9n(){O9n.call(this)}function g9n(){O9n.call(this)}function p9n(){we.call(this)}function v9n(){we.call(this)}function m9n(){we.call(this)}function k9n(){hi.call(this)}function BI(){RIn.call(this)}function y9n(){fj.call(this)}function RI(){Oz.call(this)}function _I(){Oz.call(this)}function tG(){we.call(this)}function KI(){we.call(this)}function j9n(){we.call(this)}function iG(){Yy.call(this)}function E9n(){Yy.call(this)}function C9n(){iG.call(this)}function T9n(){ZH.call(this)}function M9n(n){hIn.call(this,n)}function A9n(n){hIn.call(this,n)}function rG(n){rq.call(this,n)}function cG(n){n7n.call(this,n)}function eie(n){cG.call(this,n)}function tie(n){n7n.call(this,n)}function zp(){this.a=new Tt}function uG(){this.a=new hi}function sG(){this.a=new we}function S9n(){this.a=new X}function P9n(){this.j=new X}function oG(){this.a=new Rgn}function I9n(){this.a=new T8n}function O9n(){this.a=new X2n}function HI(){HI=N,uR=new V9n}function qI(){qI=N,cR=new X9n}function Rv(){Rv=N,rR=new Bt}function aj(){aj=N,fR=new Xyn}function iie(n){cG.call(this,n)}function rie(n){cG.call(this,n)}function D9n(n){m$.call(this,n)}function $9n(n){m$.call(this,n)}function F9n(n){uEn.call(this,n)}function GI(n){C5e.call(this,n)}function sd(n){_0.call(this,n)}function _v(n){Cj.call(this,n)}function fG(n){Cj.call(this,n)}function x9n(n){Cj.call(this,n)}function _r(n){kCn.call(this,n)}function L9n(n){_r.call(this,n)}function r2(){M9.call(this,{})}function dj(n){c3(),this.a=n}function Kv(n){n.b=null,n.c=0}function cie(n,e){n.e=e,NNn(n,e)}function uie(n,e){n.a=e,h6e(n)}function zI(n,e,t){n.a[e.g]=t}function sie(n,e,t){M4e(t,n,e)}function oie(n,e){$ue(e.i,n.n)}function N9n(n,e){Fwe(n).td(e)}function fie(n,e){return n*n/e}function B9n(n,e){return n.g-e.g}function hie(n){return new nj(n)}function lie(n){return new Z0(n)}function bj(n){_r.call(this,n)}function mr(n){_r.call(this,n)}function R9n(n){_r.call(this,n)}function UI(n){kCn.call(this,n)}function WI(n){AV(),this.a=n}function _9n(n){aEn(),this.a=n}function N0(n){ED(),this.f=n}function XI(n){ED(),this.f=n}function Up(n){_r.call(this,n)}function Hn(n){_r.call(this,n)}function $r(n){_r.call(this,n)}function K9n(n){_r.call(this,n)}function c2(n){_r.call(this,n)}function on(n){return _n(n),n}function K(n){return _n(n),n}function x9(n){return _n(n),n}function hG(n){return _n(n),n}function aie(n){return _n(n),n}function Hv(n){return n.b==n.c}function B0(n){return!!n&&n.b}function die(n){return!!n&&n.k}function bie(n){return!!n&&n.j}function Hu(n){_n(n),this.a=n}function lG(n){return ja(n),n}function qv(n){EW(n,n.length)}function t1(n){_r.call(this,n)}function Sf(n){_r.call(this,n)}function VI(n){_r.call(this,n)}function pw(n){_r.call(this,n)}function Gv(n){_r.call(this,n)}function Ee(n){_r.call(this,n)}function QI(n){Vz.call(this,n,0)}function JI(){iX.call(this,12,3)}function aG(){aG=N,din=new Q1n}function H9n(){H9n=N,ain=new Lc}function wj(){wj=N,dm=new H1}function q9n(){q9n=N,vzn=new ww}function G9n(){throw T(new ye)}function dG(){throw T(new ye)}function z9n(){throw T(new ye)}function wie(){throw T(new ye)}function gie(){throw T(new ye)}function pie(){throw T(new ye)}function YI(){this.a=Ce(pe(Ji))}function u2(n){$f(),this.a=pe(n)}function U9n(n,e){n.Td(e),e.Sd(n)}function vie(n,e){n.a.ec().Mc(e)}function mie(n,e,t){n.c.lf(e,t)}function bG(n){mr.call(this,n)}function Pf(n){Hn.call(this,n)}function i1(){A9.call(this,"")}function zv(){A9.call(this,"")}function V1(){A9.call(this,"")}function R0(){A9.call(this,"")}function wG(n){mr.call(this,n)}function Wp(n){_p.call(this,n)}function ZI(n){lE.call(this,n)}function W9n(n){Wp.call(this,n)}function X9n(){AI.call(this,null)}function V9n(){AI.call(this,null)}function gj(){gj=N,k3()}function Q9n(){Q9n=N,Szn=Z4e()}function J9n(n){return n.a?n.b:0}function kie(n){return n.a?n.b:0}function yie(n,e){return n.a-e.a}function jie(n,e){return n.a-e.a}function Eie(n,e){return n.a-e.a}function pj(n,e){return WX(n,e)}function M(n,e){return pMn(n,e)}function Cie(n,e){return e in n.a}function Y9n(n,e){return n.f=e,n}function Tie(n,e){return n.b=e,n}function Z9n(n,e){return n.c=e,n}function Mie(n,e){return n.g=e,n}function gG(n,e){return n.a=e,n}function pG(n,e){return n.f=e,n}function Aie(n,e){return n.k=e,n}function vG(n,e){return n.a=e,n}function Sie(n,e){return n.e=e,n}function mG(n,e){return n.e=e,n}function Pie(n,e){return n.f=e,n}function Iie(n,e){n.b=!0,n.d=e}function Oie(n,e){n.b=new kr(e)}function Die(n,e,t){e.td(n.a[t])}function $ie(n,e,t){e.we(n.a[t])}function Fie(n,e){return n.b-e.b}function xie(n,e){return n.g-e.g}function Lie(n,e){return n.s-e.s}function Nie(n,e){return n?0:e-1}function n8n(n,e){return n?0:e-1}function Bie(n,e){return n?e-1:0}function Rie(n,e){return e.Yf(n)}function od(n,e){return n.b=e,n}function vj(n,e){return n.a=e,n}function fd(n,e){return n.c=e,n}function hd(n,e){return n.d=e,n}function ld(n,e){return n.e=e,n}function kG(n,e){return n.f=e,n}function Uv(n,e){return n.a=e,n}function Xp(n,e){return n.b=e,n}function Vp(n,e){return n.c=e,n}function gn(n,e){return n.c=e,n}function Dn(n,e){return n.b=e,n}function pn(n,e){return n.d=e,n}function vn(n,e){return n.e=e,n}function _ie(n,e){return n.f=e,n}function mn(n,e){return n.g=e,n}function kn(n,e){return n.a=e,n}function yn(n,e){return n.i=e,n}function jn(n,e){return n.j=e,n}function e8n(n,e){return n.k=e,n}function Kie(n,e){return n.j=e,n}function Hie(n,e){yl(),Hr(e,n)}function qie(n,e,t){Nfe(n.a,e,t)}function t8n(n){mTn.call(this,n)}function yG(n){mTn.call(this,n)}function mj(n){uD.call(this,n)}function i8n(n){u2e.call(this,n)}function Q1(n){Ld.call(this,n)}function r8n(n){XD.call(this,n)}function c8n(n){XD.call(this,n)}function u8n(){Mz.call(this,"")}function Li(){this.a=0,this.b=0}function s8n(){this.b=0,this.a=0}function o8n(n,e){n.b=0,hb(n,e)}function Gie(n,e){n.c=e,n.b=!0}function f8n(n,e){return n.c._b(e)}function xo(n){return n.e&&n.e()}function nO(n){return n?n.d:null}function h8n(n,e){return LDn(n.b,e)}function zie(n){return n?n.g:null}function Uie(n){return n?n.i:null}function J1(n){return Ph(n),n.o}function ad(){ad=N,Mne=h4e()}function l8n(){l8n=N,mi=jve()}function Qp(){Qp=N,g1n=a4e()}function a8n(){a8n=N,hee=l4e()}function jG(){jG=N,oc=s6e()}function EG(){EG=N,Wl=N3()}function d8n(){throw T(new ye)}function b8n(){throw T(new ye)}function w8n(){throw T(new ye)}function g8n(){throw T(new ye)}function p8n(){throw T(new ye)}function v8n(){throw T(new ye)}function kj(n){this.a=new s2(n)}function CG(n){d_n(),gTe(this,n)}function Y1(n){this.a=new AD(n)}function vw(n,e){for(;n.ye(e););}function TG(n,e){for(;n.sd(e););}function mw(n,e){return n.a+=e,n}function eO(n,e){return n.a+=e,n}function r1(n,e){return n.a+=e,n}function dd(n,e){return n.a+=e,n}function Wv(n){return fl(n),n.a}function yj(n){return n.b!=n.d.c}function m8n(n){return n.l|n.m<<22}function MG(n,e){return n.d[e.p]}function k8n(n,e){return Q8e(n,e)}function AG(n,e,t){n.splice(e,t)}function y8n(n){n.c?rBn(n):cBn(n)}function jj(n){this.a=0,this.b=n}function j8n(){this.a=new B7(Pon)}function E8n(){this.b=new B7(won)}function C8n(){this.b=new B7(OK)}function T8n(){this.b=new B7(OK)}function M8n(){throw T(new ye)}function A8n(){throw T(new ye)}function S8n(){throw T(new ye)}function P8n(){throw T(new ye)}function I8n(){throw T(new ye)}function O8n(){throw T(new ye)}function D8n(){throw T(new ye)}function $8n(){throw T(new ye)}function F8n(){throw T(new ye)}function x8n(){throw T(new ye)}function Wie(){throw T(new ic)}function Xie(){throw T(new ic)}function L9(n){this.a=new L8n(n)}function L8n(n){cbe(this,n,cve())}function N9(n){return!n||iTn(n)}function B9(n){return Mf[n]!=-1}function Vie(){_A!=0&&(_A=0),KA=-1}function N8n(){iR==null&&(iR=[])}function Qie(n,e){$x(R(n.a),e)}function Jie(n,e){$x(R(n.a),e)}function R9(n,e){Sw.call(this,n,e)}function Jp(n,e){R9.call(this,n,e)}function SG(n,e){this.b=n,this.c=e}function B8n(n,e){this.b=n,this.a=e}function R8n(n,e){this.a=n,this.b=e}function _8n(n,e){this.a=n,this.b=e}function K8n(n,e){this.a=n,this.b=e}function H8n(n,e){this.a=n,this.b=e}function q8n(n,e){this.a=n,this.b=e}function G8n(n,e){this.a=n,this.b=e}function z8n(n,e){this.a=n,this.b=e}function U8n(n,e){this.a=n,this.b=e}function W8n(n,e){this.b=n,this.a=e}function X8n(n,e){this.b=n,this.a=e}function V8n(n,e){this.b=n,this.a=e}function Q8n(n,e){this.b=n,this.a=e}function Oe(n,e){this.f=n,this.g=e}function Yp(n,e){this.e=n,this.d=e}function bd(n,e){this.g=n,this.i=e}function tO(n,e){this.a=n,this.b=e}function J8n(n,e){this.a=n,this.f=e}function Y8n(n,e){this.b=n,this.c=e}function Yie(n,e){this.a=n,this.b=e}function Z8n(n,e){this.a=n,this.b=e}function iO(n,e){this.a=n,this.b=e}function n7n(n){Bz(n.dc()),this.c=n}function Ej(n){this.b=u(pe(n),83)}function e7n(n){this.a=u(pe(n),83)}function _0(n){this.a=u(pe(n),15)}function t7n(n){this.a=u(pe(n),15)}function Cj(n){this.b=u(pe(n),47)}function Tj(){this.q=new y.Date}function nh(){nh=N,Sin=new tln}function Zp(){Zp=N,X4=new nln}function Xv(n){return n.f.c+n.g.c}function _9(n,e){return n.b.Hc(e)}function i7n(n,e){return n.b.Ic(e)}function r7n(n,e){return n.b.Qc(e)}function c7n(n,e){return n.b.Hc(e)}function u7n(n,e){return n.c.uc(e)}function Ah(n,e){return n.a._b(e)}function s7n(n,e){return tt(n.c,e)}function o7n(n,e){return Uu(n.b,e)}function f7n(n,e){return n>e&&e0}function cO(n,e){return fc(n,e)<0}function n5(n,e){return n.a.get(e)}function lre(n,e){return e.split(n)}function S7n(n,e){return Uu(n.e,e)}function LG(n){return _n(n),!1}function xj(n){xn.call(this,n,21)}function are(n,e){cMn.call(this,n,e)}function Lj(n,e){Oe.call(this,n,e)}function uO(n,e){Oe.call(this,n,e)}function NG(n){_D(),uEn.call(this,n)}function BG(n,e){fCn(n,n.length,e)}function z9(n,e){BCn(n,n.length,e)}function dre(n,e,t){e.ud(n.a.Ge(t))}function bre(n,e,t){e.we(n.a.Fe(t))}function wre(n,e,t){e.td(n.a.Kb(t))}function gre(n,e,t){n.Mb(t)&&e.td(t)}function e5(n,e,t){n.splice(e,0,t)}function pre(n,e){return au(n.e,e)}function Nj(n,e){this.d=n,this.e=e}function P7n(n,e){this.b=n,this.a=e}function I7n(n,e){this.b=n,this.a=e}function RG(n,e){this.b=n,this.a=e}function O7n(n,e){this.a=n,this.b=e}function D7n(n,e){this.a=n,this.b=e}function $7n(n,e){this.a=n,this.b=e}function F7n(n,e){this.a=n,this.b=e}function f2(n,e){this.a=n,this.b=e}function _G(n,e){this.b=n,this.a=e}function KG(n,e){this.b=n,this.a=e}function Bj(n,e){Oe.call(this,n,e)}function Rj(n,e){Oe.call(this,n,e)}function HG(n,e){Oe.call(this,n,e)}function qG(n,e){Oe.call(this,n,e)}function kw(n,e){Oe.call(this,n,e)}function sO(n,e){Oe.call(this,n,e)}function oO(n,e){Oe.call(this,n,e)}function fO(n,e){Oe.call(this,n,e)}function _j(n,e){Oe.call(this,n,e)}function GG(n,e){Oe.call(this,n,e)}function hO(n,e){Oe.call(this,n,e)}function U9(n,e){Oe.call(this,n,e)}function Kj(n,e){Oe.call(this,n,e)}function lO(n,e){Oe.call(this,n,e)}function t5(n,e){Oe.call(this,n,e)}function zG(n,e){Oe.call(this,n,e)}function zt(n,e){Oe.call(this,n,e)}function Hj(n,e){Oe.call(this,n,e)}function x7n(n,e){this.a=n,this.b=e}function L7n(n,e){this.a=n,this.b=e}function N7n(n,e){this.a=n,this.b=e}function B7n(n,e){this.a=n,this.b=e}function R7n(n,e){this.a=n,this.b=e}function _7n(n,e){this.a=n,this.b=e}function K7n(n,e){this.a=n,this.b=e}function H7n(n,e){this.a=n,this.b=e}function q7n(n,e){this.a=n,this.b=e}function UG(n,e){this.b=n,this.a=e}function G7n(n,e){this.b=n,this.a=e}function z7n(n,e){this.b=n,this.a=e}function U7n(n,e){this.b=n,this.a=e}function t3(n,e){this.c=n,this.d=e}function W7n(n,e){this.e=n,this.d=e}function X7n(n,e){this.a=n,this.b=e}function V7n(n,e){this.b=e,this.c=n}function qj(n,e){Oe.call(this,n,e)}function W9(n,e){Oe.call(this,n,e)}function aO(n,e){Oe.call(this,n,e)}function i5(n,e){Oe.call(this,n,e)}function WG(n,e){Oe.call(this,n,e)}function dO(n,e){Oe.call(this,n,e)}function bO(n,e){Oe.call(this,n,e)}function X9(n,e){Oe.call(this,n,e)}function XG(n,e){Oe.call(this,n,e)}function wO(n,e){Oe.call(this,n,e)}function r5(n,e){Oe.call(this,n,e)}function VG(n,e){Oe.call(this,n,e)}function c5(n,e){Oe.call(this,n,e)}function u5(n,e){Oe.call(this,n,e)}function H0(n,e){Oe.call(this,n,e)}function gO(n,e){Oe.call(this,n,e)}function pO(n,e){Oe.call(this,n,e)}function QG(n,e){Oe.call(this,n,e)}function s5(n,e){Oe.call(this,n,e)}function vO(n,e){Oe.call(this,n,e)}function Gj(n,e){Oe.call(this,n,e)}function V9(n,e){Oe.call(this,n,e)}function Q9(n,e){Oe.call(this,n,e)}function h2(n,e){Oe.call(this,n,e)}function mO(n,e){Oe.call(this,n,e)}function JG(n,e){Oe.call(this,n,e)}function kO(n,e){Oe.call(this,n,e)}function yO(n,e){Oe.call(this,n,e)}function YG(n,e){Oe.call(this,n,e)}function jO(n,e){Oe.call(this,n,e)}function EO(n,e){Oe.call(this,n,e)}function CO(n,e){Oe.call(this,n,e)}function TO(n,e){Oe.call(this,n,e)}function ZG(n,e){Oe.call(this,n,e)}function Q7n(n,e){this.b=n,this.a=e}function J7n(n,e){this.a=n,this.b=e}function Y7n(n,e){this.a=n,this.b=e}function Z7n(n,e){this.a=n,this.b=e}function nkn(n,e){this.a=n,this.b=e}function nz(n,e){Oe.call(this,n,e)}function ez(n,e){Oe.call(this,n,e)}function ekn(n,e){this.b=n,this.d=e}function tz(n,e){Oe.call(this,n,e)}function iz(n,e){Oe.call(this,n,e)}function tkn(n,e){this.a=n,this.b=e}function ikn(n,e){this.a=n,this.b=e}function zj(n,e){Oe.call(this,n,e)}function o5(n,e){Oe.call(this,n,e)}function rz(n,e){Oe.call(this,n,e)}function cz(n,e){Oe.call(this,n,e)}function uz(n,e){Oe.call(this,n,e)}function MO(n,e){Oe.call(this,n,e)}function sz(n,e){Oe.call(this,n,e)}function AO(n,e){Oe.call(this,n,e)}function Uj(n,e){Oe.call(this,n,e)}function SO(n,e){Oe.call(this,n,e)}function PO(n,e){Oe.call(this,n,e)}function J9(n,e){Oe.call(this,n,e)}function IO(n,e){Oe.call(this,n,e)}function oz(n,e){Oe.call(this,n,e)}function Y9(n,e){Oe.call(this,n,e)}function fz(n,e){Oe.call(this,n,e)}function vre(n,e){return au(n.c,e)}function mre(n,e){return au(e.b,n)}function kre(n,e){return-n.b.Je(e)}function hz(n,e){return au(n.g,e)}function Z9(n,e){Oe.call(this,n,e)}function l2(n,e){Oe.call(this,n,e)}function rkn(n,e){this.a=n,this.b=e}function ckn(n,e){this.a=n,this.b=e}function fn(n,e){this.a=n,this.b=e}function f5(n,e){Oe.call(this,n,e)}function h5(n,e){Oe.call(this,n,e)}function n8(n,e){Oe.call(this,n,e)}function OO(n,e){Oe.call(this,n,e)}function Wj(n,e){Oe.call(this,n,e)}function l5(n,e){Oe.call(this,n,e)}function DO(n,e){Oe.call(this,n,e)}function Xj(n,e){Oe.call(this,n,e)}function yw(n,e){Oe.call(this,n,e)}function e8(n,e){Oe.call(this,n,e)}function a5(n,e){Oe.call(this,n,e)}function d5(n,e){Oe.call(this,n,e)}function t8(n,e){Oe.call(this,n,e)}function Vj(n,e){Oe.call(this,n,e)}function jw(n,e){Oe.call(this,n,e)}function Qj(n,e){Oe.call(this,n,e)}function ukn(n,e){this.a=n,this.b=e}function skn(n,e){this.a=n,this.b=e}function okn(n,e){this.a=n,this.b=e}function fkn(n,e){this.a=n,this.b=e}function hkn(n,e){this.a=n,this.b=e}function lkn(n,e){this.a=n,this.b=e}function Si(n,e){this.a=n,this.b=e}function Jj(n,e){Oe.call(this,n,e)}function akn(n,e){this.a=n,this.b=e}function dkn(n,e){this.a=n,this.b=e}function bkn(n,e){this.a=n,this.b=e}function wkn(n,e){this.a=n,this.b=e}function gkn(n,e){this.a=n,this.b=e}function pkn(n,e){this.a=n,this.b=e}function vkn(n,e){this.b=n,this.a=e}function mkn(n,e){this.b=n,this.a=e}function kkn(n,e){this.b=n,this.a=e}function ykn(n,e){this.b=n,this.a=e}function jkn(n,e){this.a=n,this.b=e}function Ekn(n,e){this.a=n,this.b=e}function yre(n,e){J9e(n.a,u(e,56))}function Ckn(n,e){f0e(n.a,u(e,11))}function jre(n,e){return h3(),e!=n}function Tkn(){return Q9n(),new Szn}function Mkn(){c$(),this.b=new hi}function Akn(){hM(),this.a=new hi}function Skn(){tX(),lW.call(this)}function a2(n,e){Oe.call(this,n,e)}function Pkn(n,e){this.a=n,this.b=e}function Ikn(n,e){this.a=n,this.b=e}function Yj(n,e){this.a=n,this.b=e}function Okn(n,e){this.a=n,this.b=e}function Dkn(n,e){this.a=n,this.b=e}function $kn(n,e){this.a=n,this.b=e}function Fkn(n,e){this.d=n,this.b=e}function lz(n,e){this.d=n,this.e=e}function xkn(n,e){this.f=n,this.c=e}function i8(n,e){this.b=n,this.c=e}function az(n,e){this.i=n,this.g=e}function Lkn(n,e){this.e=n,this.a=e}function Nkn(n,e){this.a=n,this.b=e}function dz(n,e){n.i=null,nT(n,e)}function Ere(n,e){n&&it($y,n,e)}function Bkn(n,e){return NF(n.a,e)}function Zj(n){return g7(n.c,n.b)}function Vr(n){return n?n.dd():null}function B(n){return n??null}function q0(n){return typeof n===X2}function G0(n){return typeof n===UZ}function ki(n){return typeof n===EL}function el(n,e){return n.Hd().Xb(e)}function nE(n,e){return Rbe(n.Kc(),e)}function gd(n,e){return fc(n,e)==0}function Cre(n,e){return fc(n,e)>=0}function b5(n,e){return fc(n,e)!=0}function Tre(n){return""+(_n(n),n)}function r8(n,e){return n.substr(e)}function Rkn(n){return Fu(n),n.d.gc()}function $O(n){return yme(n,n.c),n}function eE(n){return A5(n==null),n}function w5(n,e){return n.a+=""+e,n}function dr(n,e){return n.a+=""+e,n}function g5(n,e){return n.a+=""+e,n}function rc(n,e){return n.a+=""+e,n}function De(n,e){return n.a+=""+e,n}function bz(n,e){return n.a+=""+e,n}function _kn(n,e){Kt(n,e,n.a,n.a.a)}function ua(n,e){Kt(n,e,n.c.b,n.c)}function Mre(n,e,t){VFn(e,Mx(n,t))}function Are(n,e,t){VFn(e,Mx(n,t))}function Sre(n,e){k0e(new ie(n),e)}function Kkn(n,e){n.q.setTime($d(e))}function Hkn(n,e){kW.call(this,n,e)}function qkn(n,e){kW.call(this,n,e)}function FO(n,e){kW.call(this,n,e)}function Gkn(n){Cu(this),Z5(this,n)}function wz(n){return Ln(n,0),null}function Lo(n){return n.a=0,n.b=0,n}function zkn(n,e){return n.a=e.g+1,n}function Pre(n,e){return n.j[e.p]==2}function gz(n){return lhe(u(n,79))}function Ukn(){Ukn=N,jUn=Fe(qF())}function Wkn(){Wkn=N,RWn=Fe(PNn())}function Xkn(){this.b=new s2(sb(12))}function Vkn(){this.b=0,this.a=!1}function Qkn(){this.b=0,this.a=!1}function p5(n){this.a=n,TI.call(this)}function Jkn(n){this.a=n,TI.call(this)}function In(n,e){ri.call(this,n,e)}function xO(n,e){V0.call(this,n,e)}function Ew(n,e){az.call(this,n,e)}function LO(n,e){H3.call(this,n,e)}function Ykn(n,e){c8.call(this,n,e)}function He(n,e){$j(),it(eI,n,e)}function NO(n,e){return Zu(n.a,0,e)}function Zkn(n,e){return n.a.a.a.cc(e)}function nyn(n,e){return B(n)===B(e)}function Ire(n,e){return ni(n.a,e.a)}function Ore(n,e){return Wc(n.a,e.a)}function Dre(n,e){return xCn(n.a,e.a)}function If(n,e){return n.indexOf(e)}function pd(n,e){return n==e?0:n?1:-1}function tE(n){return n<10?"0"+n:""+n}function $re(n){return pe(n),new p5(n)}function eyn(n){return Bc(n.l,n.m,n.h)}function i3(n){return Gt((_n(n),n))}function Fre(n){return Gt((_n(n),n))}function tyn(n,e){return Wc(n.g,e.g)}function Fr(n){return typeof n===UZ}function xre(n){return n==b0||n==Hb}function Lre(n){return n==b0||n==Kb}function pz(n){return xr(n.b.b,n,0)}function iyn(n){this.a=Tkn(),this.b=n}function ryn(n){this.a=Tkn(),this.b=n}function Nre(n,e){return W(n.a,e),e}function Bre(n,e){return W(n.c,e),n}function cyn(n,e){return cs(n.a,e),n}function Rre(n,e){return wo(),e.a+=n}function _re(n,e){return wo(),e.a+=n}function Kre(n,e){return wo(),e.c+=n}function vz(n,e){S3(n,0,n.length,e)}function Sh(){Tq.call(this,new ba)}function uyn(){xE.call(this,0,0,0,0)}function d2(){ys.call(this,0,0,0,0)}function kr(n){this.a=n.a,this.b=n.b}function tl(n){return n==Zs||n==Ao}function r3(n){return n==Yh||n==Jh}function syn(n){return n==xg||n==Fg}function Cw(n){return n!=Ef&&n!=ql}function qu(n){return n.Lg()&&n.Mg()}function oyn(n){return JE(u(n,118))}function iE(n){return cs(new li,n)}function fyn(n,e){return new H3(e,n)}function Hre(n,e){return new H3(e,n)}function mz(n,e,t){UC(n,e),WC(n,t)}function rE(n,e,t){Rd(n,e),Bd(n,t)}function Yo(n,e,t){nu(n,e),eu(n,t)}function cE(n,e,t){D3(n,e),F3(n,t)}function uE(n,e,t){$3(n,e),x3(n,t)}function BO(n,e){X3(n,e),L3(n,n.D)}function kz(n){xkn.call(this,n,!0)}function hyn(n,e,t){fU.call(this,n,e,t)}function il(n){jl(),qbe.call(this,n)}function lyn(){Lj.call(this,"Head",1)}function ayn(){Lj.call(this,"Tail",3)}function RO(n){n.c=F(Zn,rn,1,0,5,1)}function dyn(n){n.a=F(Zn,rn,1,8,5,1)}function byn(n){Zc(n.xf(),new t5n(n))}function Tw(n){return n!=null?mt(n):0}function qre(n,e){return ob(e,ef(n))}function Gre(n,e){return ob(e,ef(n))}function zre(n,e){return n[n.length]=e}function Ure(n,e){return n[n.length]=e}function yz(n){return zoe(n.b.Kc(),n.a)}function Wre(n,e){return ZC(BD(n.d),e)}function Xre(n,e){return ZC(BD(n.g),e)}function Vre(n,e){return ZC(BD(n.j),e)}function tr(n,e){ri.call(this,n.b,e)}function vd(n){xE.call(this,n,n,n,n)}function jz(n){return n.b&&uL(n),n.a}function Ez(n){return n.b&&uL(n),n.c}function Qre(n,e){vf||(n.b=e)}function _O(n,e,t){return St(n,e,t),t}function wyn(n,e,t){St(n.c[e.g],e.g,t)}function Jre(n,e,t){u(n.c,69).Xh(e,t)}function Yre(n,e,t){Yo(t,t.i+n,t.j+e)}function Zre(n,e){me(bc(n.a),PMn(e))}function nce(n,e){me(Du(n.a),IMn(e))}function v5(n){Je(),cd.call(this,n)}function ece(n){return n==null?0:mt(n)}function gyn(){gyn=N,hK=new f6(cH)}function je(){je=N,new pyn,new X}function pyn(){new we,new we,new we}function Cz(){Cz=N,Hq(),bin=new we}function Zo(){Zo=N,y.Math.log(2)}function ms(){ms=N,Ch=(E7n(),Dne)}function tce(){throw T(new t1(izn))}function ice(){throw T(new t1(izn))}function rce(){throw T(new t1(rzn))}function cce(){throw T(new t1(rzn))}function vyn(n){this.a=n,HU.call(this,n)}function KO(n){this.a=n,Ej.call(this,n)}function HO(n){this.a=n,Ej.call(this,n)}function wi(n,e){mD(n.c,n.c.length,e)}function Kr(n){return n.ae?1:0}function kyn(n,e){return fc(n,e)>0?n:e}function Bc(n,e,t){return{l:n,m:e,h:t}}function uce(n,e){n.a!=null&&Ckn(e,n.a)}function yyn(n){n.a=new aI,n.c=new aI}function sE(n){this.b=n,this.a=new X}function jyn(n){this.b=new san,this.a=n}function Mz(n){vU.call(this),this.a=n}function Eyn(){Lj.call(this,"Range",2)}function Cyn(){kJ(),this.a=new B7(Hrn)}function sce(n,e){pe(e),Iw(n).Jc(new ju)}function oce(n,e){return ns(),e.n.b+=n}function fce(n,e,t){return it(n.g,t,e)}function hce(n,e,t){return it(n.k,t,e)}function lce(n,e){return it(n.a,e.a,e)}function Mw(n,e,t){return _Q(e,t,n.c)}function Az(n){return new fn(n.c,n.d)}function ace(n){return new fn(n.c,n.d)}function Qr(n){return new fn(n.a,n.b)}function Tyn(n,e){return xEe(n.a,e,null)}function dce(n){Hi(n,null),Ci(n,null)}function Myn(n){s$(n,null),o$(n,null)}function Ayn(){c8.call(this,null,null)}function Syn(){wE.call(this,null,null)}function Sz(n){this.a=n,we.call(this)}function bce(n){this.b=(Pn(),new DI(n))}function oE(n){n.j=F(Ain,q,310,0,0,1)}function wce(n,e,t){n.c.Vc(e,u(t,133))}function gce(n,e,t){n.c.ji(e,u(t,133))}function Pyn(n,e){de(n),n.Gc(u(e,15))}function m5(n,e){return Jje(n.c,n.b,e)}function pce(n,e){return new Jyn(n.Kc(),e)}function qO(n,e){return gwe(n.Kc(),e)!=-1}function Pz(n,e){return n.a.Bc(e)!=null}function fE(n){return n.Ob()?n.Pb():null}function Iyn(n){return Hs(n,0,n.length)}function I(n,e){return n!=null&&WF(n,e)}function vce(n,e){n.q.setHours(e),S6(n,e)}function Oyn(n,e){n.c&&(ZU(e),iMn(e))}function mce(n,e,t){u(n.Kb(t),164).Nb(e)}function kce(n,e,t){return SEe(n,e,t),t}function Dyn(n,e,t){n.a=e^1502,n.b=t^tN}function GO(n,e,t){return n.a[e.g][t.g]}function nf(n,e){return n.a[e.c.p][e.p]}function yce(n,e){return n.e[e.c.p][e.p]}function jce(n,e){return n.c[e.c.p][e.p]}function Ece(n,e){return n.j[e.p]=D9e(e)}function Cce(n,e){return DX(n.f,e.tg())}function Tce(n,e){return DX(n.b,e.tg())}function Mce(n,e){return n.a0?e*e/n:e*e*100}function Jce(n,e){return n>0?e/(n*n):e*100}function Yce(n,e,t){return W(e,e$n(n,t))}function Zce(n,e,t){DC(),n.Xe(e)&&t.td(n)}function s3(n,e,t){var i;i=n.Zc(e),i.Rb(t)}function U0(n,e,t){return n.a+=e,n.b+=t,n}function nue(n,e,t){return n.a*=e,n.b*=t,n}function o8(n,e,t){return n.a-=e,n.b-=t,n}function Zz(n,e){return n.a=e.a,n.b=e.b,n}function vE(n){return n.a=-n.a,n.b=-n.b,n}function fjn(n){this.c=n,this.a=1,this.b=1}function hjn(n){this.c=n,nu(n,0),eu(n,0)}function ljn(n){Tt.call(this),V5(this,n)}function ajn(n){yL(),Nmn(this),this.mf(n)}function djn(n,e){Zv(),c8.call(this,n,e)}function nU(n,e){c1(),wE.call(this,n,e)}function bjn(n,e){c1(),wE.call(this,n,e)}function wjn(n,e){c1(),nU.call(this,n,e)}function Gu(n,e,t){Xu.call(this,n,e,t,2)}function JO(n,e){ms(),FE.call(this,n,e)}function gjn(n,e){ms(),JO.call(this,n,e)}function eU(n,e){ms(),JO.call(this,n,e)}function pjn(n,e){ms(),eU.call(this,n,e)}function tU(n,e){ms(),FE.call(this,n,e)}function vjn(n,e){ms(),tU.call(this,n,e)}function mjn(n,e){ms(),FE.call(this,n,e)}function eue(n,e){return n.c.Fc(u(e,133))}function iU(n,e,t){return jM(G8(n,e),t)}function tue(n,e,t){return e.Qk(n.e,n.c,t)}function iue(n,e,t){return e.Rk(n.e,n.c,t)}function YO(n,e){return pl(n.e,u(e,49))}function rue(n,e,t){s6(Du(n.a),e,IMn(t))}function cue(n,e,t){s6(bc(n.a),e,PMn(t))}function rU(n,e){e.$modCount=n.$modCount}function C5(){C5=N,Xm=new kt("root")}function o3(){o3=N,xy=new w9n,new g9n}function kjn(){this.a=new Od,this.b=new Od}function cU(){RIn.call(this),this.Bb|=Yi}function yjn(){Oe.call(this,"GROW_TREE",0)}function uue(n){return n==null?null:CCe(n)}function sue(n){return n==null?null:D5e(n)}function oue(n){return n==null?null:Nr(n)}function fue(n){return n==null?null:Nr(n)}function Ph(n){n.o==null&&u9e(n)}function sn(n){return A5(n==null||q0(n)),n}function Y(n){return A5(n==null||G0(n)),n}function Ce(n){return A5(n==null||ki(n)),n}function uU(n){this.q=new y.Date($d(n))}function f8(n,e){this.c=n,Yp.call(this,n,e)}function mE(n,e){this.a=n,f8.call(this,n,e)}function hue(n,e){this.d=n,Ovn(this),this.b=e}function sU(n,e){P$.call(this,n),this.a=e}function oU(n,e){P$.call(this,n),this.a=e}function lue(n){xQ.call(this,0,0),this.f=n}function fU(n,e,t){IC.call(this,n,e,t,null)}function jjn(n,e,t){IC.call(this,n,e,t,null)}function aue(n,e,t){return n.ue(e,t)<=0?t:e}function due(n,e,t){return n.ue(e,t)<=0?e:t}function bue(n,e){return u(xd(n.b,e),149)}function wue(n,e){return u(xd(n.c,e),229)}function ZO(n){return u(un(n.a,n.b),287)}function Ejn(n){return new fn(n.c,n.d+n.a)}function Cjn(n){return ns(),syn(u(n,197))}function W0(){W0=N,prn=Cn((Qu(),id))}function gue(n,e){e.a?e7e(n,e):zO(n.a,e.b)}function Tjn(n,e){vf||W(n.a,e)}function pue(n,e){return H9(),K3(e.d.i,n)}function vue(n,e){return x2(),new ABn(e,n)}function Df(n,e){return T8(e,ann),n.f=e,n}function hU(n,e,t){return t=os(n,e,3,t),t}function lU(n,e,t){return t=os(n,e,6,t),t}function aU(n,e,t){return t=os(n,e,9,t),t}function h8(n,e,t){++n.j,n.Ki(),A$(n,e,t)}function Mjn(n,e,t){++n.j,n.Hi(e,n.oi(e,t))}function Ajn(n,e,t){var i;i=n.Zc(e),i.Rb(t)}function Sjn(n,e,t){return MZ(n.c,n.b,e,t)}function dU(n,e){return(e&nt)%n.d.length}function ri(n,e){kt.call(this,n),this.a=e}function bU(n,e){xq.call(this,n),this.a=e}function nD(n,e){xq.call(this,n),this.a=e}function Pjn(n,e){this.c=n,Ld.call(this,e)}function Ijn(n,e){this.a=n,Omn.call(this,e)}function l8(n,e){this.a=n,Omn.call(this,e)}function Ojn(n){this.a=(rs(n,Pb),new Pc(n))}function Djn(n){this.a=(rs(n,Pb),new Pc(n))}function a8(n){return!n.a&&(n.a=new vr),n.a}function $jn(n){return n>8?0:n+1}function mue(n,e){return qn(),n==e?0:n?1:-1}function wU(n,e,t){return m2(n,u(e,22),t)}function kue(n,e,t){return n.apply(e,t)}function Fjn(n,e,t){return n.a+=Hs(e,0,t),n}function gU(n,e){var t;return t=n.e,n.e=e,t}function yue(n,e){var t;t=n[eN],t.call(n,e)}function jue(n,e){var t;t=n[eN],t.call(n,e)}function X0(n,e){n.a.Vc(n.b,e),++n.b,n.c=-1}function xjn(n){Cu(n.e),n.d.b=n.d,n.d.a=n.d}function d8(n){n.b?d8(n.b):n.f.c.zc(n.e,n.d)}function Eue(n,e,t){ca(),Svn(n,e.Ce(n.a,t))}function Cue(n,e){return nO(p$n(n.a,e,!0))}function Tue(n,e){return nO(v$n(n.a,e,!0))}function bo(n,e){return pj(new Array(e),n)}function eD(n){return String.fromCharCode(n)}function Mue(n){return n==null?null:n.message}function Ljn(){this.a=new X,this.b=new X}function Njn(){this.a=new LH,this.b=new Umn}function Bjn(){this.b=new Li,this.c=new X}function pU(){this.d=new Li,this.e=new Li}function vU(){this.n=new Li,this.o=new Li}function kE(){this.n=new i2,this.i=new d2}function Rjn(){this.a=new v4n,this.b=new cwn}function _jn(){this.a=new X,this.d=new X}function Kjn(){this.b=new hi,this.a=new hi}function Hjn(){this.b=new we,this.a=new we}function qjn(){this.b=new E8n,this.a=new sgn}function Gjn(){kE.call(this),this.a=new Li}function T5(n){Jbe.call(this,n,(FC(),vR))}function mU(n,e,t,i){xE.call(this,n,e,t,i)}function Aue(n,e,t){t!=null&&JC(e,rx(n,t))}function Sue(n,e,t){t!=null&&YC(e,rx(n,t))}function kU(n,e,t){return t=os(n,e,11,t),t}function st(n,e){return n.a+=e.a,n.b+=e.b,n}function yi(n,e){return n.a-=e.a,n.b-=e.b,n}function Pue(n,e){return n.n.a=(_n(e),e+10)}function Iue(n,e){return n.n.a=(_n(e),e+10)}function Oue(n,e){return e==n||o4(sM(e),n)}function zjn(n,e){return it(n.a,e,"")==null}function Due(n,e){return H9(),!K3(e.d.i,n)}function $ue(n,e){tl(n.f)?Qme(n,e):Fve(n,e)}function Fue(n,e){var t;return t=e.Hh(n.a),t}function V0(n,e){mr.call(this,rm+n+Ra+e)}function g2(n,e,t,i){V.call(this,n,e,t,i)}function yU(n,e,t,i){V.call(this,n,e,t,i)}function Ujn(n,e,t,i){yU.call(this,n,e,t,i)}function Wjn(n,e,t,i){zE.call(this,n,e,t,i)}function tD(n,e,t,i){zE.call(this,n,e,t,i)}function jU(n,e,t,i){zE.call(this,n,e,t,i)}function Xjn(n,e,t,i){tD.call(this,n,e,t,i)}function EU(n,e,t,i){tD.call(this,n,e,t,i)}function Fn(n,e,t,i){jU.call(this,n,e,t,i)}function Vjn(n,e,t,i){EU.call(this,n,e,t,i)}function Qjn(n,e,t,i){yW.call(this,n,e,t,i)}function Jjn(n,e,t){this.a=n,Vz.call(this,e,t)}function Yjn(n,e,t){this.c=e,this.b=t,this.a=n}function xue(n,e,t){return n.d=u(e.Kb(t),164)}function CU(n,e){return n.Aj().Nh().Kh(n,e)}function TU(n,e){return n.Aj().Nh().Ih(n,e)}function Zjn(n,e){return _n(n),B(n)===B(e)}function Mn(n,e){return _n(n),B(n)===B(e)}function iD(n,e){return nO(p$n(n.a,e,!1))}function rD(n,e){return nO(v$n(n.a,e,!1))}function Lue(n,e){return n.b.sd(new D7n(n,e))}function Nue(n,e){return n.b.sd(new $7n(n,e))}function nEn(n,e){return n.b.sd(new F7n(n,e))}function MU(n,e,t){return n.lastIndexOf(e,t)}function Bue(n,e,t){return ni(n[e.b],n[t.b])}function Rue(n,e){return H(e,(nn(),Jk),n)}function _ue(n,e){return Wc(e.a.d.p,n.a.d.p)}function Kue(n,e){return Wc(n.a.d.p,e.a.d.p)}function Hue(n,e){return ni(n.c-n.s,e.c-e.s)}function eEn(n){return n.c?xr(n.c.a,n,0):-1}function que(n){return n<100?null:new Q1(n)}function p2(n){return n==td||n==Eh||n==Ac}function tEn(n,e){return I(e,15)&&oBn(n.c,e)}function Gue(n,e){vf||e&&(n.d=e)}function cD(n,e){var t;return t=e,!!VV(n,t)}function AU(n,e){this.c=n,DD.call(this,n,e)}function iEn(n){this.c=n,FO.call(this,IM,0)}function rEn(n,e){Voe.call(this,n,n.length,e)}function zue(n,e,t){return u(n.c,69).lk(e,t)}function yE(n,e,t){return u(n.c,69).mk(e,t)}function Uue(n,e,t){return tue(n,u(e,332),t)}function SU(n,e,t){return iue(n,u(e,332),t)}function Wue(n,e,t){return txn(n,u(e,332),t)}function cEn(n,e,t){return zve(n,u(e,332),t)}function M5(n,e){return e==null?null:ab(n.b,e)}function PU(n){return G0(n)?(_n(n),n):n.ke()}function jE(n){return!isNaN(n)&&!isFinite(n)}function uEn(n){$f(),this.a=(Pn(),new Wp(n))}function b8(n){h3(),this.d=n,this.a=new gw}function ks(n,e,t){this.a=n,this.b=e,this.c=t}function sEn(n,e,t){this.a=n,this.b=e,this.c=t}function oEn(n,e,t){this.d=n,this.b=t,this.a=e}function uD(n){yyn(this),_s(this),Vi(this,n)}function du(n){RO(this),GU(this.c,0,n.Pc())}function fEn(n){Wu(n.a),uPn(n.c,n.b),n.b=null}function hEn(n){this.a=n,nh(),tu(Date.now())}function lEn(){lEn=N,Xin=new Lc,XA=new Lc}function sD(){sD=N,Rin=new iln,Pzn=new rln}function aEn(){aEn=N,Nne=F(Zn,rn,1,0,5,1)}function dEn(){dEn=N,eee=F(Zn,rn,1,0,5,1)}function IU(){IU=N,tee=F(Zn,rn,1,0,5,1)}function $f(){$f=N,new Bq((Pn(),Pn(),cr))}function Xue(n){return FC(),$e((pPn(),Dzn),n)}function Vue(n){return lf(),$e((LSn(),Bzn),n)}function Que(n){return $T(),$e((qAn(),Gzn),n)}function Jue(n){return RC(),$e((GAn(),zzn),n)}function Yue(n){return dM(),$e((IOn(),Uzn),n)}function Zue(n){return _o(),$e(($Sn(),Vzn),n)}function nse(n){return Tu(),$e((FSn(),Jzn),n)}function ese(n){return Yc(),$e((xSn(),Zzn),n)}function tse(n){return SM(),$e((Ukn(),jUn),n)}function ise(n){return Hd(),$e((mPn(),CUn),n)}function rse(n){return K2(),$e((kPn(),MUn),n)}function cse(n){return d6(),$e((yPn(),PUn),n)}function use(n){return Aj(),$e((yAn(),IUn),n)}function sse(n){return _C(),$e((zAn(),WUn),n)}function ose(n){return W5(),$e((NSn(),bWn),n)}function fse(n){return Qi(),$e((JPn(),vWn),n)}function hse(n){return G3(),$e((vPn(),EWn),n)}function lse(n){return qd(),$e((BSn(),PWn),n)}function OU(n,e){if(!n)throw T(new Hn(e))}function ase(n){return Qn(),$e((vIn(),$Wn),n)}function DU(n){xE.call(this,n.d,n.c,n.a,n.b)}function oD(n){xE.call(this,n.d,n.c,n.a,n.b)}function $U(n,e,t){this.b=n,this.c=e,this.a=t}function EE(n,e,t){this.b=n,this.a=e,this.c=t}function bEn(n,e,t){this.a=n,this.b=e,this.c=t}function FU(n,e,t){this.a=n,this.b=e,this.c=t}function wEn(n,e,t){this.a=n,this.b=e,this.c=t}function xU(n,e,t){this.a=n,this.b=e,this.c=t}function gEn(n,e,t){this.b=n,this.a=e,this.c=t}function CE(n,e,t){this.e=e,this.b=n,this.d=t}function dse(n,e,t){return ca(),n.a.Od(e,t),e}function fD(n){var e;return e=new Dln,e.e=n,e}function LU(n){var e;return e=new Zmn,e.b=n,e}function w8(){w8=N,sS=new Fdn,oS=new xdn}function wo(){wo=N,WWn=new pbn,XWn=new vbn}function bse(n){return aT(),$e((EPn(),HWn),n)}function wse(n){return hf(),$e((TPn(),JWn),n)}function gse(n){return lM(),$e((mOn(),cXn),n)}function pse(n){return q2(),$e((yIn(),uXn),n)}function vse(n){return OC(),$e((JAn(),sXn),n)}function mse(n){return F2(),$e((RSn(),oXn),n)}function kse(n){return Vw(),$e((UPn(),ZWn),n)}function yse(n){return Kd(),$e((HSn(),rXn),n)}function jse(n){return VC(),$e((_Sn(),fXn),n)}function Ese(n){return Pa(),$e((GPn(),hXn),n)}function Cse(n){return V8(),$e((WAn(),lXn),n)}function Tse(n){return ya(),$e((KSn(),dXn),n)}function Mse(n){return eM(),$e((TIn(),bXn),n)}function Ase(n){return K8(),$e((XAn(),wXn),n)}function Sse(n){return A7(),$e((EIn(),gXn),n)}function Pse(n){return h4(),$e((jIn(),pXn),n)}function Ise(n){return or(),$e((zOn(),vXn),n)}function Ose(n){return q3(),$e((GSn(),mXn),n)}function Dse(n){return Nh(),$e((qSn(),yXn),n)}function $se(n){return kC(),$e((YAn(),jXn),n)}function Fse(n){return Ss(),$e((WPn(),EXn),n)}function xse(n){return JT(),$e((CIn(),BQn),n)}function Lse(n){return i6(),$e((zSn(),RQn),n)}function Nse(n){return wb(),$e((MPn(),_Qn),n)}function Bse(n){return ur(),$e((XSn(),UQn),n)}function Rse(n){return Zw(),$e((vOn(),HQn),n)}function _se(n){return Rh(),$e((WSn(),qQn),n)}function Kse(n){return z8(),$e((QAn(),GQn),n)}function Hse(n){return oT(),$e((USn(),WQn),n)}function qse(n){return b6(),$e((zPn(),KQn),n)}function Gse(n){return x8(),$e((VAn(),XQn),n)}function zse(n){return Q3(),$e((QSn(),VQn),n)}function Use(n){return uT(),$e((JSn(),QQn),n)}function Wse(n){return dT(),$e((VSn(),JQn),n)}function Xse(n){return _d(),$e((YSn(),hJn),n)}function Vse(n){return z5(),$e((nSn(),wJn),n)}function Qse(n){return xf(),$e((eSn(),jJn),n)}function Jse(n){return tf(),$e((tSn(),CJn),n)}function Yse(n){return No(),$e((ZAn(),RJn),n)}function Zse(n){return Id(),$e((iSn(),UJn),n)}function noe(n){return c4(),$e((jPn(),WJn),n)}function eoe(n){return k6(),$e((MIn(),VJn),n)}function toe(n){return aC(),$e((uSn(),fYn),n)}function ioe(n){return iT(),$e((cSn(),wYn),n)}function roe(n){return gC(),$e((rSn(),hYn),n)}function coe(n){return CT(),$e((ZSn(),pYn),n)}function uoe(n){return $C(),$e((sSn(),vYn),n)}function soe(n){return f7(),$e((nPn(),mYn),n)}function ooe(n){return qT(),$e((CPn(),FYn),n)}function foe(n){return sT(),$e((tPn(),xYn),n)}function hoe(n){return ET(),$e((ePn(),LYn),n)}function loe(n){return g4(),$e((QPn(),tZn),n)}function aoe(n){return w7(),$e((iPn(),iZn),n)}function doe(n){return Pj(),$e((mAn(),rZn),n)}function boe(n){return Ij(),$e((vAn(),uZn),n)}function woe(n){return L8(),$e((fSn(),sZn),n)}function goe(n){return P7(),$e((XPn(),oZn),n)}function poe(n){return Jv(),$e((kAn(),CZn),n)}function voe(n){return c7(),$e((oSn(),TZn),n)}function moe(n){return Ho(),$e((VPn(),OZn),n)}function koe(n){return y1(),$e((kOn(),$Zn),n)}function yoe(n){return fh(),$e((kIn(),FZn),n)}function joe(n){return vb(),$e((mIn(),_Zn),n)}function Eoe(n){return rr(),$e((Wkn(),RWn),n)}function Coe(n){return B3(),$e((UAn(),BWn),n)}function Toe(n){return sr(),$e((YPn(),ene),n)}function Moe(n){return of(),$e((cPn(),tne),n)}function Aoe(n){return Hh(),$e((PPn(),ine),n)}function Soe(n){return ZT(),$e((SIn(),rne),n)}function Poe(n){return _h(),$e((rPn(),une),n)}function Ioe(n){return us(),$e((SPn(),one),n)}function Ooe(n){return jb(),$e((POn(),fne),n)}function Doe(n){return qw(),$e((ZPn(),hne),n)}function $oe(n){return Mi(),$e((bIn(),lne),n)}function Foe(n){return Mu(),$e((AIn(),ane),n)}function xoe(n){return Qu(),$e((OPn(),vne),n)}function Loe(n){return Lu(),$e((UOn(),mne),n)}function Noe(n){return J(),$e((nIn(),dne),n)}function Boe(n){return AT(),$e((IPn(),kne),n)}function Roe(n){return Vu(),$e((APn(),Ene),n)}function _oe(n){return d4(),$e((yOn(),Lne),n)}function Koe(n,e){return _n(n),n+(_n(e),e)}function Hoe(n,e){return nh(),me(R(n.a),e)}function qoe(n,e){return nh(),me(R(n.a),e)}function hD(n,e){this.c=n,this.a=e,this.b=e-n}function pEn(n,e,t){this.a=n,this.b=e,this.c=t}function NU(n,e,t){this.a=n,this.b=e,this.c=t}function BU(n,e,t){this.a=n,this.b=e,this.c=t}function vEn(n,e,t){this.a=n,this.b=e,this.c=t}function mEn(n,e,t){this.a=n,this.b=e,this.c=t}function s1(n,e,t){this.e=n,this.a=e,this.c=t}function kEn(n,e,t){ms(),QW.call(this,n,e,t)}function lD(n,e,t){ms(),FW.call(this,n,e,t)}function RU(n,e,t){ms(),FW.call(this,n,e,t)}function _U(n,e,t){ms(),FW.call(this,n,e,t)}function yEn(n,e,t){ms(),lD.call(this,n,e,t)}function KU(n,e,t){ms(),lD.call(this,n,e,t)}function jEn(n,e,t){ms(),KU.call(this,n,e,t)}function EEn(n,e,t){ms(),RU.call(this,n,e,t)}function CEn(n,e,t){ms(),_U.call(this,n,e,t)}function g8(n,e){return pe(n),pe(e),new z8n(n,e)}function v2(n,e){return pe(n),pe(e),new NEn(n,e)}function Goe(n,e){return pe(n),pe(e),new BEn(n,e)}function zoe(n,e){return pe(n),pe(e),new W8n(n,e)}function u(n,e){return A5(n==null||WF(n,e)),n}function f3(n){var e;return e=new X,_$(e,n),e}function Uoe(n){var e;return e=new hi,_$(e,n),e}function TEn(n){var e;return e=new Wq,nF(e,n),e}function p8(n){var e;return e=new Tt,nF(e,n),e}function Woe(n){return!n.e&&(n.e=new X),n.e}function Xoe(n){return!n.c&&(n.c=new Bp),n.c}function W(n,e){return n.c[n.c.length]=e,!0}function MEn(n,e){this.c=n,this.b=e,this.a=!1}function HU(n){this.d=n,Ovn(this),this.b=_fe(n.d)}function AEn(){this.a=";,;",this.b="",this.c=""}function Voe(n,e,t){SCn.call(this,e,t),this.a=n}function SEn(n,e,t){this.b=n,Hkn.call(this,e,t)}function qU(n,e,t){this.c=n,Nj.call(this,e,t)}function GU(n,e,t){aY(t,0,n,e,t.length,!1)}function th(n,e,t,i,r){n.b=e,n.c=t,n.d=i,n.a=r}function Qoe(n,e){e&&(n.b=e,n.a=(fl(e),e.a))}function zU(n,e,t,i,r){n.d=e,n.c=t,n.a=i,n.b=r}function UU(n){var e,t;e=n.b,t=n.c,n.b=t,n.c=e}function WU(n){var e,t;t=n.d,e=n.a,n.d=e,n.a=t}function XU(n){return bl(the(Fr(n)?Ks(n):n))}function Joe(n,e){return Wc(GEn(n.d),GEn(e.d))}function Yoe(n,e){return e==(J(),Gn)?n.c:n.d}function h3(){h3=N,don=(J(),Gn),dP=Vn}function PEn(){this.b=K(Y(cn((Go(),xR))))}function IEn(n){return ca(),F(Zn,rn,1,n,5,1)}function Zoe(n){return new fn(n.c+n.b,n.d+n.a)}function nfe(n,e){return Sj(),Wc(n.d.p,e.d.p)}function aD(n){return ne(n.b!=0),Ts(n,n.a.a)}function efe(n){return ne(n.b!=0),Ts(n,n.c.b)}function VU(n,e){if(!n)throw T(new R9n(e))}function TE(n,e){if(!n)throw T(new Hn(e))}function QU(n,e,t){t3.call(this,n,e),this.b=t}function v8(n,e,t){lz.call(this,n,e),this.c=t}function OEn(n,e,t){oIn.call(this,e,t),this.d=n}function JU(n){IU(),Yy.call(this),this.th(n)}function DEn(n,e,t){this.a=n,Ew.call(this,e,t)}function $En(n,e,t){this.a=n,Ew.call(this,e,t)}function ME(n,e,t){lz.call(this,n,e),this.c=t}function FEn(){T3(),khe.call(this,(Z1(),uo))}function xEn(n){return n!=null&&!$F(n,a9,d9)}function tfe(n,e){return(GDn(n)<<4|GDn(e))&Ut}function ife(n,e){return QE(),ex(n,e),new oTn(n,e)}function sa(n,e){var t;n.n&&(t=e,W(n.f,t))}function l3(n,e,t){var i;i=new Z0(t),Ro(n,e,i)}function rfe(n,e){var t;return t=n.c,wV(n,e),t}function YU(n,e){return e<0?n.g=-1:n.g=e,n}function AE(n,e){return H0e(n),n.a*=e,n.b*=e,n}function LEn(n,e,t,i,r){n.c=e,n.d=t,n.b=i,n.a=r}function Ke(n,e){return Kt(n,e,n.c.b,n.c),!0}function ZU(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function dD(n){this.b=n,this.a=Ed(this.b.a).Ed()}function NEn(n,e){this.b=n,this.a=e,TI.call(this)}function BEn(n,e){this.a=n,this.b=e,TI.call(this)}function REn(n,e){SCn.call(this,e,1040),this.a=n}function m8(n){return n==0||isNaN(n)?n:n<0?-1:1}function cfe(n){return C2(),hh(n)==Pt(ml(n))}function ufe(n){return C2(),ml(n)==Pt(hh(n))}function jd(n,e){return v6(n,new t3(e.a,e.b))}function sfe(n){return!Xi(n)&&n.c.i.c==n.d.i.c}function SE(n){var e;return e=n.n,n.a.b+e.d+e.a}function _En(n){var e;return e=n.n,n.e.b+e.d+e.a}function nW(n){var e;return e=n.n,n.e.a+e.b+e.c}function KEn(n){return Je(),new ih(0,n)}function ofe(n){return n.a?n.a:WD(n)}function A5(n){if(!n)throw T(new Up(null))}function HEn(){HEn=N,mH=(Pn(),new OI(XB))}function PE(){PE=N,new JQ((HI(),uR),(qI(),cR))}function qEn(){qEn=N,jin=F(Wi,q,19,256,0,1)}function bD(n,e,t,i){MQ.call(this,n,e,t,i,0,0)}function ffe(n,e,t){return it(n.b,u(t.b,17),e)}function hfe(n,e,t){return it(n.b,u(t.b,17),e)}function lfe(n,e){return W(n,new fn(e.a,e.b))}function afe(n,e){return n.c=e)throw T(new qq)}function Xfe(n,e,t){return St(e,0,rW(e[0],t[0])),e}function Vfe(n,e,t){e.Ye(t,K(Y(te(n.b,t)))*n.a)}function ACn(n,e,t){return eg(),R3(n,e)&&R3(n,t)}function D5(n){return Mu(),!n.Hc(n1)&&!n.Hc(Gl)}function qE(n){return new fn(n.c+n.b/2,n.d+n.a/2)}function MD(n,e){return e.kh()?pl(n.b,u(e,49)):e}function kW(n,e){this.e=n,this.d=e&64?e|Bf:e}function SCn(n,e){this.c=0,this.d=n,this.b=e|64|Bf}function GE(n){this.b=new Pc(11),this.a=(Ow(),n)}function AD(n){this.b=null,this.a=(Ow(),n||Lin)}function PCn(n){this.a=Y$n(n.a),this.b=new du(n.b)}function ICn(n){this.b=n,b2.call(this,n),$yn(this)}function OCn(n){this.b=n,u8.call(this,n),Fyn(this)}function Y0(n,e,t){this.a=n,g2.call(this,e,t,5,6)}function yW(n,e,t,i){this.b=n,Yt.call(this,e,t,i)}function gi(n,e,t,i,r){D$.call(this,n,e,t,i,r,-1)}function $5(n,e,t,i,r){R8.call(this,n,e,t,i,r,-1)}function V(n,e,t,i){Yt.call(this,n,e,t),this.b=i}function zE(n,e,t,i){v8.call(this,n,e,t),this.b=i}function DCn(n){xkn.call(this,n,!1),this.a=!1}function $Cn(n,e){this.b=n,bvn.call(this,n.b),this.a=e}function FCn(n,e){nb(),Yie.call(this,n,mT(new Hu(e)))}function UE(n,e){return Je(),new xW(n,e,0)}function SD(n,e){return Je(),new xW(6,n,e)}function Qfe(n,e){return Mn(n.substr(0,e.length),e)}function Uu(n,e){return ki(e)?QD(n,e):!!Sr(n.f,e)}function Oi(n,e){for(_n(e);n.Ob();)e.td(n.Pb())}function Pw(n,e,t){jl(),this.e=n,this.d=e,this.a=t}function o1(n,e,t,i){var r;r=n.i,r.i=e,r.a=t,r.b=i}function jW(n){var e;for(e=n;e.f;)e=e.f;return e}function y2(n){var e;return e=t6(n),ne(e!=null),e}function Jfe(n){var e;return e=Lge(n),ne(e!=null),e}function d3(n,e){var t;return t=n.a.gc(),$X(e,t),t-e}function EW(n,e){var t;for(t=0;t0?y.Math.log(n/e):-100}function xCn(n,e){return fc(n,e)<0?-1:fc(n,e)>0?1:0}function SW(n,e,t){return MRn(n,u(e,46),u(t,167))}function LCn(n,e){return u(vW(Ed(n.a)).Xb(e),42).cd()}function uhe(n,e){return P0e(e,n.length),new REn(n,e)}function DD(n,e){this.d=n,ie.call(this,n),this.e=e}function Cd(n){this.d=(_n(n),n),this.a=0,this.c=IM}function PW(n,e){cd.call(this,1),this.a=n,this.b=e}function NCn(n,e){return n.c?NCn(n.c,e):W(n.b,e),n}function she(n,e,t){var i;return i=ub(n,e),g$(n,e,t),i}function IW(n,e){var t;return t=n.slice(0,e),WX(t,n)}function BCn(n,e,t){var i;for(i=0;i=n.g}function KD(n,e,t){var i;return i=Y$(n,e,t),rZ(n,i)}function j2(n,e){var t;t=n.a.length,ub(n,t),g$(n,t,e)}function ZCn(n,e){var t;t=console[n],t.call(console,e)}function nTn(n,e){var t;++n.j,t=n.Vi(),n.Ii(n.oi(t,e))}function mhe(n,e,t){u(e.b,65),Zc(e.a,new NU(n,t,e))}function FW(n,e,t){uj.call(this,e),this.a=n,this.b=t}function xW(n,e,t){cd.call(this,n),this.a=e,this.b=t}function LW(n,e,t){this.a=n,xq.call(this,e),this.b=t}function eTn(n,e,t){this.a=n,aX.call(this,8,e,null,t)}function khe(n){this.a=(_n(xe),xe),this.b=n,new tG}function tTn(n){this.c=n,this.b=this.c.a,this.a=this.c.e}function NW(n){this.c=n,this.b=n.a.d.a,rU(n.a.e,this)}function Wu(n){z0(n.c!=-1),n.d.$c(n.c),n.b=n.c,n.c=-1}function L5(n){return y.Math.sqrt(n.a*n.a+n.b*n.b)}function Md(n,e){return a3(e,n.a.c.length),un(n.a,e)}function Ff(n,e){return B(n)===B(e)||n!=null&&tt(n,e)}function yhe(n){return 0>=n?new PG:sbe(n-1)}function jhe(n){return aw?QD(aw,n):!1}function iTn(n){return n?n.dc():!n.Kc().Ob()}function Gi(n){return!n.a&&n.c?n.c.b:n.a}function Ehe(n){return!n.a&&(n.a=new Yt(zl,n,4)),n.a}function Ad(n){return!n.d&&(n.d=new Yt(ar,n,1)),n.d}function _n(n){if(n==null)throw T(new Nv);return n}function N5(n){n.c?n.c.He():(n.d=!0,S8e(n))}function fl(n){n.c?fl(n.c):(Ta(n),n.d=!0)}function rTn(n){KW(n.a),n.b=F(Zn,rn,1,n.b.length,5,1)}function Che(n,e){return Wc(e.j.c.length,n.j.c.length)}function The(n,e){n.c<0||n.b.b=0?n.Bh(t):bY(n,e)}function cTn(n){var e,t;return e=n.c.i.c,t=n.d.i.c,e==t}function Ahe(n){if(n.p!=4)throw T(new fu);return n.e}function She(n){if(n.p!=3)throw T(new fu);return n.e}function Phe(n){if(n.p!=6)throw T(new fu);return n.f}function Ihe(n){if(n.p!=6)throw T(new fu);return n.k}function Ohe(n){if(n.p!=3)throw T(new fu);return n.j}function Dhe(n){if(n.p!=4)throw T(new fu);return n.j}function BW(n){return!n.b&&(n.b=new sj(new KI)),n.b}function Sd(n){return n.c==-2&&Pte(n,Qve(n.g,n.b)),n.c}function g3(n,e){var t;return t=LD("",n),t.n=e,t.i=1,t}function $he(n,e){yD(u(e.b,65),n),Zc(e.a,new Aq(n))}function Fhe(n,e){me((!n.a&&(n.a=new l8(n,n)),n.a),e)}function uTn(n,e){this.b=n,DD.call(this,n,e),$yn(this)}function sTn(n,e){this.b=n,AU.call(this,n,e),Fyn(this)}function RW(n,e,t,i){bd.call(this,n,e),this.d=t,this.a=i}function VE(n,e,t,i){bd.call(this,n,t),this.a=e,this.f=i}function oTn(n,e){bce.call(this,obe(pe(n),pe(e))),this.a=e}function fTn(){UJ.call(this,Ka,(a8n(),hee)),tEe(this)}function hTn(){UJ.call(this,Vs,(Qp(),g1n)),lje(this)}function lTn(){Oe.call(this,"DELAUNAY_TRIANGULATION",0)}function xhe(n){return String.fromCharCode.apply(null,n)}function it(n,e,t){return ki(e)?yr(n,e,t):_c(n.f,e,t)}function _W(n){return Pn(),n?n.ve():(Ow(),Ow(),Bin)}function Lhe(n,e,t){return L2(),t.pg(n,u(e.cd(),146))}function aTn(n,e){return PE(),new JQ(new Wyn(n),new Uyn(e))}function Nhe(n){return rs(n,AL),KC(qi(qi(5,n),n/10|0))}function QE(){QE=N,fzn=new GI(A(M(Ha,1),OM,42,0,[]))}function dTn(n){return!n.d&&(n.d=new _p(n.c.Cc())),n.d}function p3(n){return!n.a&&(n.a=new W9n(n.c.vc())),n.a}function bTn(n){return!n.b&&(n.b=new Wp(n.c.ec())),n.b}function ch(n,e){for(;e-- >0;)n=n<<1|(n<0?1:0);return n}function pc(n,e){return B(n)===B(e)||n!=null&&tt(n,e)}function Bhe(n,e){return qn(),u(e.b,19).ai&&++i,i}function Oh(n){var e,t;return t=(e=new ud,e),O3(t,n),t}function UD(n){var e,t;return t=(e=new ud,e),VJ(t,n),t}function Zhe(n,e){var t;return t=te(n.f,e),MV(e,t),null}function WD(n){var e;return e=hbe(n),e||null}function CTn(n){return!n.b&&(n.b=new V(bi,n,12,3)),n.b}function n1e(n){return n!=null&&_9(tI,n.toLowerCase())}function e1e(n,e){return ni(bu(n)*zu(n),bu(e)*zu(e))}function t1e(n,e){return ni(bu(n)*zu(n),bu(e)*zu(e))}function i1e(n,e){return ni(n.d.c+n.d.b/2,e.d.c+e.d.b/2)}function r1e(n,e){return ni(n.g.c+n.g.b/2,e.g.c+e.g.b/2)}function TTn(n,e,t){t.a?eu(n,e.b-n.f/2):nu(n,e.a-n.g/2)}function MTn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function ATn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function ha(n,e,t,i){this.e=n,this.a=e,this.c=t,this.d=i}function STn(n,e,t,i){this.a=n,this.c=e,this.d=t,this.b=i}function PTn(n,e,t,i){ms(),ySn.call(this,e,t,i),this.a=n}function ITn(n,e,t,i){ms(),ySn.call(this,e,t,i),this.a=n}function OTn(n,e){this.a=n,hue.call(this,n,u(n.d,15).Zc(e))}function XD(n){this.f=n,this.c=this.f.e,n.f>0&&qFn(this)}function DTn(n,e,t,i){this.b=n,this.c=i,FO.call(this,e,t)}function $Tn(n){return ne(n.b=0&&Mn(n.substr(t,e.length),e)}function hl(n,e,t,i,r,c,o){return new v$(n.e,e,t,i,r,c,o)}function QTn(n,e,t,i,r,c){this.a=n,z$.call(this,e,t,i,r,c)}function JTn(n,e,t,i,r,c){this.a=n,z$.call(this,e,t,i,r,c)}function YTn(n,e){this.g=n,this.d=A(M(mh,1),E1,10,0,[e])}function f1(n,e){this.e=n,this.a=Zn,this.b=yBn(e),this.c=e}function ZTn(n,e){kE.call(this),eV(this),this.a=n,this.c=e}function M8(n,e,t,i){St(n.c[e.g],t.g,i),St(n.c[t.g],e.g,i)}function ZD(n,e,t,i){St(n.c[e.g],e.g,t),St(n.b[e.g],e.g,i)}function M1e(){return x8(),A(M(ron,1),z,376,0,[uK,iy])}function A1e(){return K8(),A(M(Qcn,1),z,479,0,[Vcn,xS])}function S1e(){return V8(),A(M(Wcn,1),z,419,0,[$S,Ucn])}function P1e(){return OC(),A(M(Rcn,1),z,422,0,[Bcn,s_])}function I1e(){return kC(),A(M(fun,1),z,420,0,[j_,oun])}function O1e(){return z8(),A(M(non,1),z,421,0,[iK,rK])}function D1e(){return z5(),A(M(bJn,1),z,523,0,[Hm,Km])}function $1e(){return No(),A(M(BJn,1),z,520,0,[tw,Bl])}function F1e(){return xf(),A(M(yJn,1),z,516,0,[M0,I1])}function x1e(){return tf(),A(M(EJn,1),z,515,0,[Ja,yf])}function L1e(){return Id(),A(M(zJn,1),z,455,0,[Rl,Lg])}function N1e(){return gC(),A(M(Son,1),z,425,0,[yK,Aon])}function B1e(){return aC(),A(M(Mon,1),z,480,0,[kK,Ton])}function R1e(){return iT(),A(M(Pon,1),z,495,0,[EP,mv])}function _1e(){return $C(),A(M(Oon,1),z,426,0,[Ion,TK])}function K1e(){return c7(),A(M(Ffn,1),z,429,0,[DP,$fn])}function H1e(){return L8(),A(M(afn,1),z,430,0,[FK,IP])}function q1e(){return $T(),A(M(Jin,1),z,428,0,[yR,Qin])}function G1e(){return RC(),A(M(Zin,1),z,427,0,[Yin,jR])}function z1e(){return _C(),A(M(Arn,1),z,424,0,[$R,tS])}function U1e(){return B3(),A(M(NWn,1),z,511,0,[_k,UR])}function sC(n,e,t,i){return t>=0?n.jh(e,t,i):n.Sg(null,t,i)}function n$(n){return n.b.b==0?n.a.$e():aD(n.b)}function W1e(n){if(n.p!=5)throw T(new fu);return ge(n.f)}function X1e(n){if(n.p!=5)throw T(new fu);return ge(n.k)}function VW(n){return B(n.a)===B((eF(),gH))&&Vje(n),n.a}function nMn(n){this.a=u(pe(n),271),this.b=(Pn(),new Hz(n))}function eMn(n,e){bte(this,new fn(n.a,n.b)),wte(this,p8(e))}function Id(){Id=N,Rl=new iz(Y2,0),Lg=new iz(Z2,1)}function xf(){xf=N,M0=new ez(Z2,0),I1=new ez(Y2,1)}function Od(){rie.call(this,new s2(sb(12))),Bz(!0),this.a=2}function e$(n,e,t){Je(),cd.call(this,n),this.b=e,this.a=t}function QW(n,e,t){ms(),uj.call(this,e),this.a=n,this.b=t}function tMn(n){kE.call(this),eV(this),this.a=n,this.c=!0}function iMn(n){var e;e=n.c.d.b,n.b=e,n.a=n.c.d,e.a=n.c.d.b=n}function oC(n){var e;ebe(n.a),byn(n.a),e=new tj(n.a),TQ(e)}function V1e(n,e){aBn(n,!0),Zc(n.e.wf(),new $U(n,!0,e))}function fC(n,e){return LAn(e),Y0e(n,F(be,Le,25,e,15,1),e)}function Q1e(n,e){return C2(),n==Pt(hh(e))||n==Pt(ml(e))}function vc(n,e){return e==null?Vr(Sr(n.f,null)):n5(n.g,e)}function J1e(n){return n.b==0?null:(ne(n.b!=0),Ts(n,n.a.a))}function Gt(n){return Math.max(Math.min(n,nt),-2147483648)|0}function Y1e(n,e){var t=lR[n.charCodeAt(0)];return t??n}function hC(n,e){return tC(n,"set1"),tC(e,"set2"),new Z8n(n,e)}function Z1e(n,e){var t;return t=W0e(n.f,e),st(vE(t),n.f.d)}function R5(n,e){var t,i;return t=e,i=new dI,n_n(n,t,i),i.d}function t$(n,e,t,i){var r;r=new Gjn,e.a[t.g]=r,m2(n.b,i,r)}function JW(n,e,t){var i;i=n.Yg(e),i>=0?n.sh(i,t):_Y(n,e,t)}function Dw(n,e,t){dC(),n&&it(dH,n,e),n&&it($y,n,t)}function rMn(n,e,t){this.i=new X,this.b=n,this.g=e,this.a=t}function lC(n,e,t){this.c=new X,this.e=n,this.f=e,this.b=t}function YW(n,e,t){this.a=new X,this.e=n,this.f=e,this.c=t}function cMn(n,e){oE(this),this.f=e,this.g=n,eC(this),this._d()}function A8(n,e){var t;t=n.q.getHours(),n.q.setDate(e),S6(n,t)}function uMn(n,e){var t;for(pe(e),t=n.a;t;t=t.c)e.Od(t.g,t.i)}function sMn(n){var e;return e=new kj(sb(n.length)),qV(e,n),e}function nle(n){function e(){}return e.prototype=n||{},new e}function ele(n,e){return LOn(n,e)?(FIn(n),!0):!1}function Dh(n,e){if(e==null)throw T(new Nv);return Y2e(n,e)}function tle(n){if(n.qe())return null;var e=n.n;return RA[e]}function S8(n){return n.Db>>16!=3?null:u(n.Cb,33)}function ef(n){return n.Db>>16!=9?null:u(n.Cb,33)}function oMn(n){return n.Db>>16!=6?null:u(n.Cb,79)}function fMn(n){return n.Db>>16!=7?null:u(n.Cb,235)}function hMn(n){return n.Db>>16!=7?null:u(n.Cb,160)}function Pt(n){return n.Db>>16!=11?null:u(n.Cb,33)}function lMn(n,e){var t;return t=n.Yg(e),t>=0?n.lh(t):Ox(n,e)}function aMn(n,e){var t;return t=new iW(e),dxn(t,n),new du(t)}function ZW(n){var e;return e=n.d,e=n.si(n.f),me(n,e),e.Ob()}function dMn(n,e){return n.b+=e.b,n.c+=e.c,n.d+=e.d,n.a+=e.a,n}function i$(n,e){return y.Math.abs(n)0}function bMn(){this.a=new Sh,this.e=new hi,this.g=0,this.i=0}function wMn(n){this.a=n,this.b=F(lJn,q,1944,n.e.length,0,2)}function r$(n,e,t){var i;i=tDn(n,e,t),n.b=new tT(i.c.length)}function tf(){tf=N,Ja=new nz(hN,0),yf=new nz("UP",1)}function aC(){aC=N,kK=new rz(PHn,0),Ton=new rz("FAN",1)}function dC(){dC=N,dH=new we,$y=new we,Ere(Azn,new z2n)}function rle(n){if(n.p!=0)throw T(new fu);return b5(n.f,0)}function cle(n){if(n.p!=0)throw T(new fu);return b5(n.k,0)}function gMn(n){return n.Db>>16!=3?null:u(n.Cb,147)}function y3(n){return n.Db>>16!=6?null:u(n.Cb,235)}function eb(n){return n.Db>>16!=17?null:u(n.Cb,26)}function pMn(n,e){var t=n.a=n.a||[];return t[e]||(t[e]=n.le(e))}function ule(n,e){var t;return t=n.a.get(e),t??new Array}function sle(n,e){var t;t=n.q.getHours(),n.q.setMonth(e),S6(n,t)}function yr(n,e,t){return e==null?_c(n.f,null,t):Gd(n.g,e,t)}function _5(n,e,t,i,r,c){return new Lh(n.e,e,n.aj(),t,i,r,c)}function P8(n,e,t){return n.a=Zu(n.a,0,e)+(""+t)+r8(n.a,e),n}function ole(n,e,t){return W(n.a,(QE(),ex(e,t),new bd(e,t))),n}function nX(n){return _z(n.c),n.e=n.a=n.c,n.c=n.c.c,++n.d,n.a.f}function vMn(n){return _z(n.e),n.c=n.a=n.e,n.e=n.e.e,--n.d,n.a.f}function Ci(n,e){n.d&&Jc(n.d.e,n),n.d=e,n.d&&W(n.d.e,n)}function Hi(n,e){n.c&&Jc(n.c.g,n),n.c=e,n.c&&W(n.c.g,n)}function jr(n,e){n.c&&Jc(n.c.a,n),n.c=e,n.c&&W(n.c.a,n)}function Hr(n,e){n.i&&Jc(n.i.j,n),n.i=e,n.i&&W(n.i.j,n)}function mMn(n,e,t){this.a=e,this.c=n,this.b=(pe(t),new du(t))}function kMn(n,e,t){this.a=e,this.c=n,this.b=(pe(t),new du(t))}function yMn(n,e){this.a=n,this.c=Qr(this.a),this.b=new uC(e)}function fle(n){var e;return Ta(n),e=new hi,gt(n,new Vvn(e))}function tb(n,e){if(n<0||n>e)throw T(new mr(cnn+n+unn+e))}function eX(n,e){return lCn(n.a,e)?TW(n,u(e,22).g,null):null}function hle(n){return yF(),qn(),u(n.a,81).d.e!=0}function jMn(){jMn=N,azn=Fe((aj(),A(M(lzn,1),z,538,0,[fR])))}function EMn(){EMn=N,YQn=Eu(new li,(Qi(),Or),(rr(),Kk))}function tX(){tX=N,ZQn=Eu(new li,(Qi(),Or),(rr(),Kk))}function CMn(){CMn=N,eJn=Eu(new li,(Qi(),Or),(rr(),Kk))}function TMn(){TMn=N,gJn=Ze(new li,(Qi(),Or),(rr(),km))}function ns(){ns=N,mJn=Ze(new li,(Qi(),Or),(rr(),km))}function MMn(){MMn=N,kJn=Ze(new li,(Qi(),Or),(rr(),km))}function c$(){c$=N,TJn=Ze(new li,(Qi(),Or),(rr(),km))}function AMn(){AMn=N,lYn=Eu(new li,(c4(),Gm),(k6(),lK))}function aa(n,e,t,i){this.c=n,this.d=i,s$(this,e),o$(this,t)}function M2(n){this.c=new Tt,this.b=n.b,this.d=n.c,this.a=n.a}function u$(n){this.a=y.Math.cos(n),this.b=y.Math.sin(n)}function s$(n,e){n.a&&Jc(n.a.k,n),n.a=e,n.a&&W(n.a.k,n)}function o$(n,e){n.b&&Jc(n.b.f,n),n.b=e,n.b&&W(n.b.f,n)}function SMn(n,e){mhe(n,n.b,n.c),u(n.b.b,65),e&&u(e.b,65).b}function lle(n,e){vQ(n,e),I(n.Cb,88)&&yb(Ou(u(n.Cb,88)),2)}function f$(n,e){I(n.Cb,88)&&yb(Ou(u(n.Cb,88)),4),Ic(n,e)}function bC(n,e){I(n.Cb,179)&&(u(n.Cb,179).tb=null),Ic(n,e)}function mc(n,e){return er(),R$(e)?new IE(e,n):new i8(e,n)}function ale(n,e){var t,i;t=e.c,i=t!=null,i&&j2(n,new Z0(e.c))}function PMn(n){var e,t;return t=(Qp(),e=new ud,e),O3(t,n),t}function IMn(n){var e,t;return t=(Qp(),e=new ud,e),O3(t,n),t}function OMn(n,e){var t;return t=new Rs(n),e.c[e.c.length]=t,t}function DMn(n,e){var t;return t=u(ab(T2(n.a),e),14),t?t.gc():0}function $Mn(n){var e;return Ta(n),e=(Ow(),Ow(),Nin),qC(n,e)}function FMn(n){for(var e;;)if(e=n.Pb(),!n.Ob())return e}function iX(n,e){tie.call(this,new s2(sb(n))),rs(e,W_n),this.a=e}function uh(n,e,t){KDn(e,t,n.gc()),this.c=n,this.a=e,this.b=t-e}function xMn(n,e,t){var i;KDn(e,t,n.c.length),i=t-e,AG(n.c,e,i)}function dle(n,e){Dyn(n,ge(ui(cl(e,24),FM)),ge(ui(e,FM)))}function Ln(n,e){if(n<0||n>=e)throw T(new mr(cnn+n+unn+e))}function Te(n,e){if(n<0||n>=e)throw T(new wG(cnn+n+unn+e))}function xn(n,e){this.b=(_n(n),n),this.a=e&Ib?e:e|64|Bf}function LMn(n){dyn(this),Wmn(this.a,KV(y.Math.max(8,n))<<1)}function rf(n){return Gr(A(M(di,1),q,8,0,[n.i.n,n.n,n.a]))}function ble(){return lf(),A(M(Bu,1),z,132,0,[Win,ls,Rb])}function wle(){return _o(),A(M(_b,1),z,232,0,[Zr,Fc,nc])}function gle(){return Tu(),A(M(Qzn,1),z,461,0,[Vf,Ol,Co])}function ple(){return Yc(),A(M(Yzn,1),z,462,0,[Wo,Dl,To])}function vle(){return qd(),A(M(zrn,1),z,423,0,[yg,Grn,qR])}function mle(){return W5(),A(M(Krn,1),z,379,0,[NR,LR,BR])}function kle(){return i6(),A(M(Gsn,1),z,378,0,[J_,qsn,oP])}function yle(){return F2(),A(M(Kcn,1),z,314,0,[ap,qk,_cn])}function jle(){return VC(),A(M(qcn,1),z,337,0,[Hcn,DS,o_])}function Ele(){return ya(),A(M(aXn,1),z,450,0,[l_,cv,Tg])}function Cle(){return Kd(),A(M(YR,1),z,361,0,[g0,Fl,w0])}function Tle(){return Nh(),A(M(kXn,1),z,303,0,[zk,Ag,dp])}function Mle(){return q3(),A(M(y_,1),z,292,0,[m_,k_,Gk])}function Ale(){return ur(),A(M(zQn,1),z,452,0,[Bm,Su,xc])}function Sle(){return Rh(),A(M(Zsn,1),z,339,0,[Nl,Ysn,tK])}function Ple(){return oT(),A(M(ion,1),z,375,0,[eon,cK,ton])}function Ile(){return dT(),A(M(hon,1),z,377,0,[fK,pv,ew])}function Ole(){return Q3(),A(M(uon,1),z,336,0,[sK,con,Rm])}function Dle(){return uT(),A(M(fon,1),z,338,0,[oon,oK,son])}function $le(){return _d(),A(M(fJn,1),z,454,0,[ry,_m,aP])}function Fle(){return CT(),A(M(gYn,1),z,442,0,[CK,jK,EK])}function xle(){return f7(),A(M(Fon,1),z,380,0,[CP,Don,$on])}function Lle(){return ET(),A(M(Yon,1),z,381,0,[Jon,IK,Qon])}function Nle(){return sT(),A(M(Xon,1),z,293,0,[PK,Won,Uon])}function Ble(){return w7(),A(M(OK,1),z,437,0,[AP,SP,PP])}function Rle(){return _h(),A(M(Khn,1),z,334,0,[HP,F1,i9])}function _le(){return of(),A(M(Phn,1),z,272,0,[jv,cw,Ev])}function Kle(n,e){return o9e(n,e,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function Hle(n,e,t){var i;return i=O6(n,e,!1),i.b<=e&&i.a<=t}function NMn(n,e,t){var i;i=new Jwn,i.b=e,i.a=t,++e.b,W(n.d,i)}function qle(n,e){var t;return t=(_n(n),n).g,Yz(!!t),_n(e),t(e)}function rX(n,e){var t,i;return i=d3(n,e),t=n.a.Zc(i),new Y8n(n,t)}function Gle(n){return n.Db>>16!=6?null:u(Fx(n),235)}function zle(n){if(n.p!=2)throw T(new fu);return ge(n.f)&Ut}function Ule(n){if(n.p!=2)throw T(new fu);return ge(n.k)&Ut}function Wle(n){return n.a==(T3(),uI)&&Ste(n,C9e(n.g,n.b)),n.a}function A2(n){return n.d==(T3(),uI)&&Ite(n,pke(n.g,n.b)),n.d}function j(n){return ne(n.ai?1:0}function BMn(n,e){var t,i;return t=F$(e),i=t,u(te(n.c,i),19).a}function RMn(n,e){var t;for(t=n+"";t.length0&&n.a[--n.d]==0;);n.a[n.d++]==0&&(n.e=0)}function rAn(n){return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function rae(n){return!!n.a&&Du(n.a.a).i!=0&&!(n.b&&YF(n.b))}function cae(n){return!!n.u&&bc(n.u.a).i!=0&&!(n.n&&JF(n.n))}function cAn(n){return gD(n.e.Hd().gc()*n.c.Hd().gc(),16,new tvn(n))}function uae(n,e){return xCn(tu(n.q.getTime()),tu(e.q.getTime()))}function Lf(n){return u(af(n,F(GR,MN,17,n.c.length,0,1)),474)}function I8(n){return u(af(n,F(mh,E1,10,n.c.length,0,1)),193)}function sae(n){return ns(),!Xi(n)&&!(!Xi(n)&&n.c.i.c==n.d.i.c)}function uAn(n,e,t){var i;i=(pe(n),new du(n)),N3e(new mMn(i,e,t))}function O8(n,e,t){var i;i=(pe(n),new du(n)),B3e(new kMn(i,e,t))}function sAn(n,e){var t;return t=1-e,n.a[t]=eT(n.a[t],t),eT(n,e)}function oAn(n,e){var t;n.e=new oG,t=Cb(e),wi(t,n.c),eBn(n,t,0)}function Ti(n,e,t,i){var r;r=new XH,r.a=e,r.b=t,r.c=i,Ke(n.a,r)}function Z(n,e,t,i){var r;r=new XH,r.a=e,r.b=t,r.c=i,Ke(n.b,r)}function po(n){var e,t,i;return e=new HCn,t=Zx(e,n),UEe(e),i=t,i}function hX(){var n,e,t;return e=(t=(n=new ud,n),t),W(M1n,e),e}function pC(n){return n.j.c=F(Zn,rn,1,0,5,1),KW(n.c),Khe(n.a),n}function $w(n){return Qv(),I(n.g,10)?u(n.g,10):null}function oae(n){return Iw(n).dc()?!1:(sce(n,new Np),!0)}function fae(n){if(!("stack"in n))try{throw n}catch{}return n}function D8(n,e){if(n<0||n>=e)throw T(new mr(j6e(n,e)));return n}function fAn(n,e,t){if(n<0||et)throw T(new mr(W5e(n,e,t)))}function d$(n,e){if(ci(n.a,e),e.d)throw T(new _r(wKn));e.d=n}function b$(n,e){if(e.$modCount!=n.$modCount)throw T(new vs)}function hAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function lAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function aAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function hae(n,e){return n.a<=n.b?(e.ud(n.a++),!0):!1}function $d(n){var e;return Fr(n)?(e=n,e==-0?0:e):m0e(n)}function vC(n){var e;return fl(n),e=new fln,vw(n.a,new Wvn(e)),e}function dAn(n){var e;return fl(n),e=new oln,vw(n.a,new Uvn(e)),e}function Pi(n,e){this.a=n,$v.call(this,n),tb(e,n.gc()),this.b=e}function lX(n){this.e=n,this.b=this.e.a.entries(),this.a=new Array}function lae(n){return gD(n.e.Hd().gc()*n.c.Hd().gc(),273,new evn(n))}function mC(n){return new Pc((rs(n,AL),KC(qi(qi(5,n),n/10|0))))}function bAn(n){return u(af(n,F(FWn,UKn,11,n.c.length,0,1)),1943)}function aae(n,e,t){return t.f.c.length>0?SW(n.a,e,t):SW(n.b,e,t)}function dae(n,e,t){n.d&&Jc(n.d.e,n),n.d=e,n.d&&Q0(n.d.e,t,n)}function w$(n,e){uTe(e,n),WU(n.d),WU(u(k(n,(nn(),eP)),207))}function H5(n,e){cTe(e,n),UU(n.d),UU(u(k(n,(nn(),eP)),207))}function Fd(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=t.fe()),i}function j3(n,e){var t,i;return t=ub(n,e),i=null,t&&(i=t.ie()),i}function q5(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=t.ie()),i}function $h(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=tY(t)),i}function bae(n,e,t){var i;return i=i4(t),gM(n.g,i,e),gM(n.i,e,t),e}function wae(n,e,t){var i;i=q2e();try{return kue(n,e,t)}finally{Mae(i)}}function wAn(n){var e;e=n.Wg(),this.a=I(e,69)?u(e,69).Zh():e.Kc()}function li(){P9n.call(this),this.j.c=F(Zn,rn,1,0,5,1),this.a=-1}function aX(n,e,t,i){this.d=n,this.n=e,this.g=t,this.o=i,this.p=-1}function gAn(n,e,t,i){this.e=i,this.d=null,this.c=n,this.a=e,this.b=t}function dX(n,e,t){this.d=new r6n(this),this.e=n,this.i=e,this.f=t}function kC(){kC=N,j_=new QG(I4,0),oun=new QG("TOP_LEFT",1)}function pAn(){pAn=N,aon=aTn(Q(1),Q(4)),lon=aTn(Q(1),Q(2))}function vAn(){vAn=N,uZn=Fe((Ij(),A(M(cZn,1),z,551,0,[$K])))}function mAn(){mAn=N,rZn=Fe((Pj(),A(M(lfn,1),z,482,0,[DK])))}function kAn(){kAn=N,CZn=Fe((Jv(),A(M(Dfn,1),z,530,0,[hy])))}function yAn(){yAn=N,IUn=Fe((Aj(),A(M(krn,1),z,481,0,[SR])))}function gae(){return Hd(),A(M(EUn,1),z,406,0,[Ok,Ik,MR,AR])}function pae(){return FC(),A(M(WA,1),z,297,0,[vR,qin,Gin,zin])}function vae(){return d6(),A(M(SUn,1),z,394,0,[Lk,YA,ZA,Nk])}function mae(){return K2(),A(M(TUn,1),z,323,0,[$k,Dk,Fk,xk])}function kae(){return G3(),A(M(jWn,1),z,405,0,[b0,Hb,Kb,kg])}function yae(){return aT(),A(M(KWn,1),z,360,0,[QR,TS,MS,Hk])}function jAn(n,e,t,i){return I(t,54)?new ojn(n,e,t,i):new pW(n,e,t,i)}function jae(){return hf(),A(M(QWn,1),z,411,0,[lp,nv,ev,JR])}function Eae(n){var e;return n.j==(J(),ae)&&(e=GLn(n),au(e,Vn))}function Cae(n,e){var t;t=e.a,Hi(t,e.c.d),Ci(t,e.d.d),fb(t.a,n.n)}function EAn(n,e){return u(yd(KE(u(ct(n.k,e),15).Oc(),jg)),113)}function CAn(n,e){return u(yd(HE(u(ct(n.k,e),15).Oc(),jg)),113)}function Tae(n){return new xn(jbe(u(n.a.dd(),14).gc(),n.a.cd()),16)}function E3(n){return I(n,14)?u(n,14).dc():!n.Kc().Ob()}function S2(n){return Qv(),I(n.g,145)?u(n.g,145):null}function TAn(n){if(n.e.g!=n.b)throw T(new vs);return!!n.c&&n.d>0}function Re(n){return ne(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function bX(n,e){_n(e),St(n.a,n.c,e),n.c=n.c+1&n.a.length-1,MFn(n)}function ll(n,e){_n(e),n.b=n.b-1&n.a.length-1,St(n.a,n.b,e),MFn(n)}function MAn(n,e){var t;for(t=n.j.c.length;t0&&gc(n.g,0,e,0,n.i),e}function IAn(n,e){$j();var t;return t=u(te(eI,n),55),!t||t.wj(e)}function Bae(n){if(n.p!=1)throw T(new fu);return ge(n.f)<<24>>24}function Rae(n){if(n.p!=1)throw T(new fu);return ge(n.k)<<24>>24}function _ae(n){if(n.p!=7)throw T(new fu);return ge(n.k)<<16>>16}function Kae(n){if(n.p!=7)throw T(new fu);return ge(n.f)<<16>>16}function Fh(n){var e;for(e=0;n.Ob();)n.Pb(),e=qi(e,1);return KC(e)}function OAn(n,e){var t;return t=new R0,n.xd(t),t.a+="..",e.yd(t),t.a}function Hae(n,e,t){var i;i=u(te(n.g,t),57),W(n.a.c,new Si(e,i))}function qae(n,e,t){return TD(Y(Vr(Sr(n.f,e))),Y(Vr(Sr(n.f,t))))}function yC(n,e,t){return vM(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function Gae(n,e,t){return m4(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function zae(n,e,t){return b9e(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function pX(n,e){return n==(Qn(),ii)&&e==ii?4:n==ii||e==ii?8:32}function DAn(n,e){return B(e)===B(n)?"(this Map)":e==null?ru:Nr(e)}function Uae(n,e){return u(e==null?Vr(Sr(n.f,null)):n5(n.g,e),281)}function $An(n,e,t){var i;return i=i4(t),it(n.b,i,e),it(n.c,e,t),e}function FAn(n,e){var t;for(t=e;t;)U0(n,t.i,t.j),t=Pt(t);return n}function vX(n,e){var t;return t=C8(f3(new x$(n,e))),DE(new x$(n,e)),t}function sh(n,e){er();var t;return t=u(n,66).Mj(),M5e(t,e),t.Ok(e)}function Wae(n,e,t,i,r){var c;c=m9e(r,t,i),W(e,p6e(r,c)),o5e(n,r,e)}function xAn(n,e,t){n.i=0,n.e=0,e!=t&&(uDn(n,e,t),cDn(n,e,t))}function mX(n,e){var t;t=n.q.getHours(),n.q.setFullYear(e+Tl),S6(n,t)}function Xae(n,e,t){if(t){var i=t.ee();n.a[e]=i(t)}else delete n.a[e]}function g$(n,e,t){if(t){var i=t.ee();t=i(t)}else t=void 0;n.a[e]=t}function LAn(n){if(n<0)throw T(new K9n("Negative array size: "+n))}function bc(n){return n.n||(Ou(n),n.n=new wCn(n,ar,n),Ar(n)),n.n}function G5(n){return ne(n.a=0&&n.a[t]===e[t];t--);return t<0}function KAn(n,e){V3();var t;return t=n.j.g-e.j.g,t!=0?t:0}function HAn(n,e){return _n(e),n.a!=null?$fe(e.Kb(n.a)):UA}function jC(n){var e;return n?new iW(n):(e=new Sh,nF(e,n),e)}function ts(n,e){var t;return e.b.Kb(FPn(n,e.c.Ee(),(t=new Jvn(e),t)))}function EC(n){_J(),Dyn(this,ge(ui(cl(n,24),FM)),ge(ui(n,FM)))}function qAn(){qAn=N,Gzn=Fe(($T(),A(M(Jin,1),z,428,0,[yR,Qin])))}function GAn(){GAn=N,zzn=Fe((RC(),A(M(Zin,1),z,427,0,[Yin,jR])))}function zAn(){zAn=N,WUn=Fe((_C(),A(M(Arn,1),z,424,0,[$R,tS])))}function UAn(){UAn=N,BWn=Fe((B3(),A(M(NWn,1),z,511,0,[_k,UR])))}function WAn(){WAn=N,lXn=Fe((V8(),A(M(Wcn,1),z,419,0,[$S,Ucn])))}function XAn(){XAn=N,wXn=Fe((K8(),A(M(Qcn,1),z,479,0,[Vcn,xS])))}function VAn(){VAn=N,XQn=Fe((x8(),A(M(ron,1),z,376,0,[uK,iy])))}function QAn(){QAn=N,GQn=Fe((z8(),A(M(non,1),z,421,0,[iK,rK])))}function JAn(){JAn=N,sXn=Fe((OC(),A(M(Rcn,1),z,422,0,[Bcn,s_])))}function YAn(){YAn=N,jXn=Fe((kC(),A(M(fun,1),z,420,0,[j_,oun])))}function ZAn(){ZAn=N,RJn=Fe((No(),A(M(BJn,1),z,520,0,[tw,Bl])))}function nSn(){nSn=N,wJn=Fe((z5(),A(M(bJn,1),z,523,0,[Hm,Km])))}function eSn(){eSn=N,jJn=Fe((xf(),A(M(yJn,1),z,516,0,[M0,I1])))}function tSn(){tSn=N,CJn=Fe((tf(),A(M(EJn,1),z,515,0,[Ja,yf])))}function iSn(){iSn=N,UJn=Fe((Id(),A(M(zJn,1),z,455,0,[Rl,Lg])))}function rSn(){rSn=N,hYn=Fe((gC(),A(M(Son,1),z,425,0,[yK,Aon])))}function cSn(){cSn=N,wYn=Fe((iT(),A(M(Pon,1),z,495,0,[EP,mv])))}function uSn(){uSn=N,fYn=Fe((aC(),A(M(Mon,1),z,480,0,[kK,Ton])))}function sSn(){sSn=N,vYn=Fe(($C(),A(M(Oon,1),z,426,0,[Ion,TK])))}function oSn(){oSn=N,TZn=Fe((c7(),A(M(Ffn,1),z,429,0,[DP,$fn])))}function fSn(){fSn=N,sZn=Fe((L8(),A(M(afn,1),z,430,0,[FK,IP])))}function z5(){z5=N,Hm=new ZG("UPPER",0),Km=new ZG("LOWER",1)}function Yae(n,e){var t;t=new r2,la(t,"x",e.a),la(t,"y",e.b),j2(n,t)}function Zae(n,e){var t;t=new r2,la(t,"x",e.a),la(t,"y",e.b),j2(n,t)}function nde(n,e){var t,i;i=!1;do t=JOn(n,e),i=i|t;while(t);return i}function jX(n,e){var t,i;for(t=e,i=0;t>0;)i+=n.a[t],t-=t&-t;return i}function hSn(n,e){var t;for(t=e;t;)U0(n,-t.i,-t.j),t=Pt(t);return n}function $i(n,e){var t,i;for(_n(e),i=n.Kc();i.Ob();)t=i.Pb(),e.td(t)}function lSn(n,e){var t;return t=e.cd(),new bd(t,n.e.pc(t,u(e.dd(),14)))}function Kt(n,e,t,i){var r;r=new aI,r.c=e,r.b=t,r.a=i,i.b=t.a=r,++n.b}function Es(n,e,t){var i;return i=(Ln(e,n.c.length),n.c[e]),n.c[e]=t,i}function ede(n,e,t){return u(e==null?_c(n.f,null,t):Gd(n.g,e,t),281)}function k$(n){return n.c&&n.d?cX(n.c)+"->"+cX(n.d):"e_"+md(n)}function C3(n,e){return(Ta(n),Wv(new $n(n,new UX(e,n.a)))).sd(V4)}function tde(){return Qi(),A(M(Hrn,1),z,356,0,[Qf,$l,Hc,Cc,Or])}function ide(){return J(),A(M(Zi,1),hc,61,0,[Xr,Kn,Vn,ae,Gn])}function rde(n){return gj(),function(){return wae(n,this,arguments)}}function cde(){return Date.now?Date.now():new Date().getTime()}function Xi(n){return!n.c||!n.d?!1:!!n.c.i&&n.c.i==n.d.i}function aSn(n){if(!n.c.Sb())throw T(new ic);return n.a=!0,n.c.Ub()}function $8(n){n.i=0,z9(n.b,null),z9(n.c,null),n.a=null,n.e=null,++n.g}function EX(n){are.call(this,n==null?ru:Nr(n),I(n,78)?u(n,78):null)}function dSn(n){B_n(),Nmn(this),this.a=new Tt,QV(this,n),Ke(this.a,n)}function bSn(){RO(this),this.b=new fn(Ft,Ft),this.a=new fn(Qt,Qt)}function wSn(n,e){this.c=0,this.b=e,qkn.call(this,n,17493),this.a=this.c}function y$(n){CC(),!vf&&(this.c=n,this.e=!0,this.a=new X)}function CC(){CC=N,vf=!0,Fzn=!1,xzn=!1,Nzn=!1,Lzn=!1}function CX(n,e){return I(e,149)?Mn(n.c,u(e,149).c):!1}function TX(n,e){var t;return t=0,n&&(t+=n.f.a/2),e&&(t+=e.f.a/2),t}function j$(n,e){var t;return t=u(xd(n.d,e),23),t||u(xd(n.e,e),23)}function gSn(n){this.b=n,ie.call(this,n),this.a=u(Rn(this.b.a,4),126)}function pSn(n){this.b=n,w2.call(this,n),this.a=u(Rn(this.b.a,4),126)}function Ou(n){return n.t||(n.t=new Amn(n),s6(new _9n(n),0,n.t)),n.t}function ude(){return sr(),A(M(e9,1),z,103,0,[kh,Ao,Zs,Jh,Yh])}function sde(){return qw(),A(M(c9,1),z,249,0,[Hl,Cy,Hhn,r9,qhn])}function ode(){return Ho(),A(M($1,1),z,175,0,[Xn,vi,Zf,Ya,D1])}function fde(){return P7(),A(M(gfn,1),z,316,0,[dfn,xK,wfn,LK,bfn])}function hde(){return b6(),A(M(Usn,1),z,315,0,[zsn,nK,eK,Lm,Nm])}function lde(){return Pa(),A(M(zcn,1),z,335,0,[f_,Gcn,h_,Em,jm])}function ade(){return g4(),A(M(eZn,1),z,355,0,[Ng,Ep,Qm,Vm,Jm])}function dde(){return Vw(),A(M(YWn,1),z,363,0,[SS,IS,OS,PS,AS])}function bde(){return Ss(),A(M(jun,1),z,163,0,[Qk,Sm,xl,Pm,Ub])}function T3(){T3=N;var n,e;cI=(Qp(),e=new fj,e),uI=(n=new BI,n)}function vSn(n){var e;return n.c||(e=n.r,I(e,88)&&(n.c=u(e,26))),n.c}function wde(n){return n.e=3,n.d=n.Yb(),n.e!=2?(n.e=0,!0):!1}function E$(n){var e,t,i;return e=n&Nu,t=n>>22&Nu,i=n<0?Wh:0,Bc(e,t,i)}function gde(n){var e,t,i,r;for(t=n,i=0,r=t.length;i0?g$n(n,e):BNn(n,-e)}function MX(n,e){return e==0||n.e==0?n:e>0?BNn(n,e):g$n(n,-e)}function ve(n){if(Se(n))return n.c=n.a,n.a.Pb();throw T(new ic)}function kSn(n){var e,t;return e=n.c.i,t=n.d.i,e.k==(Qn(),Xt)&&t.k==Xt}function C$(n){var e;return e=new Pd,Pr(e,n),H(e,(nn(),Mr),null),e}function T$(n,e,t){var i;return i=n.Yg(e),i>=0?n._g(i,t,!0):Yd(n,e,t)}function AX(n,e,t,i){var r;for(r=0;re)throw T(new mr(fY(n,e,"index")));return n}function M$(n,e,t,i){var r;return r=F(be,Le,25,e,15,1),Pve(r,n,e,t,i),r}function vde(n,e){var t;t=n.q.getHours()+(e/60|0),n.q.setMinutes(e),S6(n,t)}function mde(n,e){return y.Math.min(al(e.a,n.d.d.c),al(e.b,n.d.d.c))}function O2(n,e){return ki(e)?e==null?MY(n.f,null):$On(n.g,e):MY(n.f,e)}function sf(n){this.c=n,this.a=new E(this.c.a),this.b=new E(this.c.b)}function TC(){this.e=new X,this.c=new X,this.d=new X,this.b=new X}function TSn(){this.g=new zq,this.b=new zq,this.a=new X,this.k=new X}function MSn(n,e,t){this.a=n,this.c=e,this.d=t,W(e.e,this),W(t.b,this)}function ASn(n,e){Hkn.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function SSn(n,e){qkn.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function FX(n,e){FO.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function MC(n,e,t){this.a=n,this.b=e,this.c=t,W(n.t,this),W(e.i,this)}function AC(){this.b=new Tt,this.a=new Tt,this.b=new Tt,this.a=new Tt}function SC(){SC=N,Ym=new kt("org.eclipse.elk.labels.labelManager")}function PSn(){PSn=N,$cn=new ri("separateLayerConnections",(aT(),QR))}function No(){No=N,tw=new tz("REGULAR",0),Bl=new tz("CRITICAL",1)}function x8(){x8=N,uK=new YG("STACKED",0),iy=new YG("SEQUENCED",1)}function L8(){L8=N,FK=new oz("FIXED",0),IP=new oz("CENTER_NODE",1)}function kde(n,e){var t;return t=CEe(n,e),n.b=new tT(t.c.length),Lje(n,t)}function yde(n,e,t){var i;return++n.e,--n.f,i=u(n.d[e].$c(t),133),i.dd()}function ISn(n){var e;return n.a||(e=n.r,I(e,148)&&(n.a=u(e,148))),n.a}function xX(n){if(n.a){if(n.e)return xX(n.e)}else return n;return null}function jde(n,e){return n.pe.p?-1:0}function PC(n,e){return _n(e),n.c=0,"Initial capacity must not be negative")}function $Sn(){$Sn=N,Vzn=Fe((_o(),A(M(_b,1),z,232,0,[Zr,Fc,nc])))}function FSn(){FSn=N,Jzn=Fe((Tu(),A(M(Qzn,1),z,461,0,[Vf,Ol,Co])))}function xSn(){xSn=N,Zzn=Fe((Yc(),A(M(Yzn,1),z,462,0,[Wo,Dl,To])))}function LSn(){LSn=N,Bzn=Fe((lf(),A(M(Bu,1),z,132,0,[Win,ls,Rb])))}function NSn(){NSn=N,bWn=Fe((W5(),A(M(Krn,1),z,379,0,[NR,LR,BR])))}function BSn(){BSn=N,PWn=Fe((qd(),A(M(zrn,1),z,423,0,[yg,Grn,qR])))}function RSn(){RSn=N,oXn=Fe((F2(),A(M(Kcn,1),z,314,0,[ap,qk,_cn])))}function _Sn(){_Sn=N,fXn=Fe((VC(),A(M(qcn,1),z,337,0,[Hcn,DS,o_])))}function KSn(){KSn=N,dXn=Fe((ya(),A(M(aXn,1),z,450,0,[l_,cv,Tg])))}function HSn(){HSn=N,rXn=Fe((Kd(),A(M(YR,1),z,361,0,[g0,Fl,w0])))}function qSn(){qSn=N,yXn=Fe((Nh(),A(M(kXn,1),z,303,0,[zk,Ag,dp])))}function GSn(){GSn=N,mXn=Fe((q3(),A(M(y_,1),z,292,0,[m_,k_,Gk])))}function zSn(){zSn=N,RQn=Fe((i6(),A(M(Gsn,1),z,378,0,[J_,qsn,oP])))}function USn(){USn=N,WQn=Fe((oT(),A(M(ion,1),z,375,0,[eon,cK,ton])))}function WSn(){WSn=N,qQn=Fe((Rh(),A(M(Zsn,1),z,339,0,[Nl,Ysn,tK])))}function XSn(){XSn=N,UQn=Fe((ur(),A(M(zQn,1),z,452,0,[Bm,Su,xc])))}function VSn(){VSn=N,JQn=Fe((dT(),A(M(hon,1),z,377,0,[fK,pv,ew])))}function QSn(){QSn=N,VQn=Fe((Q3(),A(M(uon,1),z,336,0,[sK,con,Rm])))}function JSn(){JSn=N,QQn=Fe((uT(),A(M(fon,1),z,338,0,[oon,oK,son])))}function YSn(){YSn=N,hJn=Fe((_d(),A(M(fJn,1),z,454,0,[ry,_m,aP])))}function ZSn(){ZSn=N,pYn=Fe((CT(),A(M(gYn,1),z,442,0,[CK,jK,EK])))}function nPn(){nPn=N,mYn=Fe((f7(),A(M(Fon,1),z,380,0,[CP,Don,$on])))}function ePn(){ePn=N,LYn=Fe((ET(),A(M(Yon,1),z,381,0,[Jon,IK,Qon])))}function tPn(){tPn=N,xYn=Fe((sT(),A(M(Xon,1),z,293,0,[PK,Won,Uon])))}function iPn(){iPn=N,iZn=Fe((w7(),A(M(OK,1),z,437,0,[AP,SP,PP])))}function rPn(){rPn=N,une=Fe((_h(),A(M(Khn,1),z,334,0,[HP,F1,i9])))}function cPn(){cPn=N,tne=Fe((of(),A(M(Phn,1),z,272,0,[jv,cw,Ev])))}function Pde(){return Mi(),A(M(Ghn,1),z,98,0,[ql,Ef,Tv,td,Eh,Ac])}function wa(n,e){return!n.o&&(n.o=new Xu((Dc(),Ul),S0,n,0)),NF(n.o,e)}function Ide(n){return!n.g&&(n.g=new Qy),!n.g.d&&(n.g.d=new Cmn(n)),n.g.d}function Ode(n){return!n.g&&(n.g=new Qy),!n.g.a&&(n.g.a=new Tmn(n)),n.g.a}function Dde(n){return!n.g&&(n.g=new Qy),!n.g.b&&(n.g.b=new Emn(n)),n.g.b}function N8(n){return!n.g&&(n.g=new Qy),!n.g.c&&(n.g.c=new Mmn(n)),n.g.c}function $de(n,e,t){var i,r;for(r=new H3(e,n),i=0;it||e=0?n._g(t,!0,!0):Yd(n,e,!0)}function Qde(n,e){return ni(K(Y(k(n,(G(),k0)))),K(Y(k(e,k0))))}function aPn(){aPn=N,aYn=Xd(Xd(Dj(new li,(c4(),qm)),(k6(),pP)),aK)}function Jde(n,e,t){var i;return i=tDn(n,e,t),n.b=new tT(i.c.length),JY(n,i)}function Yde(n){if(n.b<=0)throw T(new ic);return--n.b,n.a-=n.c.c,Q(n.a)}function Zde(n){var e;if(!n.a)throw T(new gTn);return e=n.a,n.a=Pt(n.a),e}function n0e(n){for(;!n.a;)if(!nEn(n.c,new Xvn(n)))return!1;return!0}function $2(n){var e;return pe(n),I(n,198)?(e=u(n,198),e):new dvn(n)}function e0e(n){DC(),u(n.We((Xe(),rw)),174).Fc((Mu(),Ty)),n.Ye(eH,null)}function DC(){DC=N,SZn=new n2n,IZn=new e2n,PZn=Rwe((Xe(),eH),SZn,_l,IZn)}function $C(){$C=N,Ion=new sz("LEAF_NUMBER",0),TK=new sz("NODE_SIZE",1)}function t0e(n,e,t){n.a=e,n.c=t,n.b.a.$b(),_s(n.d),n.e.a.c=F(Zn,rn,1,0,5,1)}function $$(n){n.a=F(be,Le,25,n.b+1,15,1),n.c=F(be,Le,25,n.b,15,1),n.d=0}function i0e(n,e){n.a.ue(e.d,n.b)>0&&(W(n.c,new QU(e.c,e.d,n.d)),n.b=e.d)}function zX(n,e){if(n.g==null||e>=n.i)throw T(new xO(e,n.i));return n.g[e]}function dPn(n,e,t){if(W3(n,t),t!=null&&!n.wj(t))throw T(new xI);return t}function bPn(n){var e;if(n.Ek())for(e=n.i-1;e>=0;--e)D(n,e);return gX(n)}function r0e(n){var e,t;if(!n.b)return null;for(t=n.b;e=t.a[0];)t=e;return t}function c0e(n,e){var t,i;return LAn(e),t=(i=n.slice(0,e),WX(i,n)),t.length=e,t}function S3(n,e,t,i){var r;i=(Ow(),i||Lin),r=n.slice(e,t),hY(r,n,e,t,-e,i)}function Cs(n,e,t,i,r){return e<0?Yd(n,t,i):u(t,66).Nj().Pj(n,n.yh(),e,i,r)}function u0e(n){return I(n,172)?""+u(n,172).a:n==null?null:Nr(n)}function s0e(n){return I(n,172)?""+u(n,172).a:n==null?null:Nr(n)}function wPn(n,e){if(e.a)throw T(new _r(wKn));ci(n.a,e),e.a=n,!n.j&&(n.j=e)}function UX(n,e){FO.call(this,e.rd(),e.qd()&-16449),_n(n),this.a=n,this.c=e}function gPn(n,e){var t,i;return i=e/n.c.Hd().gc()|0,t=e%n.c.Hd().gc(),D2(n,i,t)}function Tu(){Tu=N,Vf=new oO(Y2,0),Ol=new oO(I4,1),Co=new oO(Z2,2)}function FC(){FC=N,vR=new Lj("All",0),qin=new lyn,Gin=new Eyn,zin=new ayn}function pPn(){pPn=N,Dzn=Fe((FC(),A(M(WA,1),z,297,0,[vR,qin,Gin,zin])))}function vPn(){vPn=N,EWn=Fe((G3(),A(M(jWn,1),z,405,0,[b0,Hb,Kb,kg])))}function mPn(){mPn=N,CUn=Fe((Hd(),A(M(EUn,1),z,406,0,[Ok,Ik,MR,AR])))}function kPn(){kPn=N,MUn=Fe((K2(),A(M(TUn,1),z,323,0,[$k,Dk,Fk,xk])))}function yPn(){yPn=N,PUn=Fe((d6(),A(M(SUn,1),z,394,0,[Lk,YA,ZA,Nk])))}function jPn(){jPn=N,WJn=Fe((c4(),A(M(won,1),z,393,0,[gP,qm,uy,Gm])))}function EPn(){EPn=N,HWn=Fe((aT(),A(M(KWn,1),z,360,0,[QR,TS,MS,Hk])))}function CPn(){CPn=N,FYn=Fe((qT(),A(M(zon,1),z,340,0,[SK,qon,Gon,Hon])))}function TPn(){TPn=N,JWn=Fe((hf(),A(M(QWn,1),z,411,0,[lp,nv,ev,JR])))}function MPn(){MPn=N,_Qn=Fe((wb(),A(M(Z_,1),z,197,0,[fP,Y_,xg,Fg])))}function APn(){APn=N,Ene=Fe((Vu(),A(M(jne,1),z,396,0,[gs,Yhn,Jhn,Zhn])))}function SPn(){SPn=N,one=Fe((us(),A(M(sne,1),z,285,0,[Ey,yh,Kl,jy])))}function PPn(){PPn=N,ine=Fe((Hh(),A(M(cH,1),z,218,0,[rH,yy,Cv,Sp])))}function IPn(){IPn=N,kne=Fe((AT(),A(M(Qhn,1),z,311,0,[oH,Whn,Vhn,Xhn])))}function OPn(){OPn=N,vne=Fe((Qu(),A(M(o9,1),z,374,0,[Ay,id,My,uw])))}function DPn(){DPn=N,mM(),F1n=Ft,Tee=Qt,x1n=new S9(Ft),Mee=new S9(Qt)}function K8(){K8=N,Vcn=new VG(Xh,0),xS=new VG("IMPROVE_STRAIGHTNESS",1)}function o0e(n,e){return h3(),W(n,new Si(e,Q(e.e.c.length+e.g.c.length)))}function f0e(n,e){return h3(),W(n,new Si(e,Q(e.e.c.length+e.g.c.length)))}function WX(n,e){return U8(e)!=10&&A($u(e),e.hm,e.__elementTypeId$,U8(e),n),n}function Jc(n,e){var t;return t=xr(n,e,0),t==-1?!1:(h1(n,t),!0)}function $Pn(n,e){var t;return t=u(O2(n.e,e),387),t?(ZU(t),t.e):null}function P3(n){var e;return Fr(n)&&(e=0-n,!isNaN(e))?e:bl(z3(n))}function xr(n,e,t){for(;t=0?BT(n,t,!0,!0):Yd(n,e,!0)}function YX(n,e){Qv();var t,i;return t=S2(n),i=S2(e),!!t&&!!i&&!V$n(t.k,i.k)}function a0e(n,e){nu(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function d0e(n,e){eu(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function b0e(n,e){Rd(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function w0e(n,e){Bd(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function BPn(n){(this.q?this.q:(Pn(),Pn(),vh)).Ac(n.q?n.q:(Pn(),Pn(),vh))}function g0e(n,e){return I(e,99)&&u(e,18).Bb&Yi?new LO(e,n):new H3(e,n)}function p0e(n,e){return I(e,99)&&u(e,18).Bb&Yi?new LO(e,n):new H3(e,n)}function RPn(n,e){vrn=new Wy,AUn=e,gm=n,u(gm.b,65),BX(gm,vrn,null),DRn(gm)}function B$(n,e,t){var i;return i=n.g[e],k5(n,e,n.oi(e,t)),n.gi(e,t,i),n.ci(),i}function BC(n,e){var t;return t=n.Xc(e),t>=0?(n.$c(t),!0):!1}function R$(n){var e;return n.d!=n.r&&(e=qs(n),n.e=!!e&&e.Cj()==kGn,n.d=e),n.e}function _$(n,e){var t;for(pe(n),pe(e),t=!1;e.Ob();)t=t|n.Fc(e.Pb());return t}function xd(n,e){var t;return t=u(te(n.e,e),387),t?(Oyn(n,t),t.e):null}function _Pn(n){var e,t;return e=n/60|0,t=n%60,t==0?""+e:""+e+":"+(""+t)}function qr(n,e){var t,i;return Ta(n),i=new FX(e,n.a),t=new iEn(i),new $n(n,t)}function ub(n,e){var t=n.a[e],i=(cF(),dR)[typeof t];return i?i(t):tQ(typeof t)}function v0e(n){switch(n.g){case 0:return nt;case 1:return-1;default:return 0}}function m0e(n){return mJ(n,(I3(),pin))<0?-xce(z3(n)):n.l+n.m*J2+n.h*$a}function U8(n){return n.__elementTypeCategory$==null?10:n.__elementTypeCategory$}function K$(n){var e;return e=n.b.c.length==0?null:un(n.b,0),e!=null&&J$(n,0),e}function KPn(n,e){for(;e[0]0&&arguments[0]!==void 0?arguments[0]:{},Ki=Ge.defaultLayoutOptions,Ii=Ki===void 0?{}:Ki,An=Ge.algorithms,Uc=An===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:An,Nc=Ge.workerFactory,ju=Ge.workerUrl;if(y(this,Bt),this.defaultLayoutOptions=Ii,this.initialized=!1,typeof ju>"u"&&typeof Nc>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var vr=Nc;typeof ju<"u"&&typeof Nc>"u"&&(vr=function(q1){return new Worker(q1)});var Jo=vr(ju);if(typeof Jo.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new Lc(Jo),this.worker.postMessage({cmd:"register",algorithms:Uc}).then(function(H1){return qt.initialized=!0}).catch(console.err)}return Et(Bt,[{key:"layout",value:function(Ge){var Ki=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ii=Ki.layoutOptions,An=Ii===void 0?this.defaultLayoutOptions:Ii,Uc=Ki.logging,Nc=Uc===void 0?!1:Uc,ju=Ki.measureExecutionTime,vr=ju===void 0?!1:ju;return Ge?this.worker.postMessage({cmd:"layout",graph:Ge,layoutOptions:An,options:{logging:Nc,measureExecutionTime:vr}}):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.terminate()}}]),Bt}();Vt.default=Ht;var Lc=function(){function Bt(qt){var Ge=this;if(y(this,Bt),qt===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=qt,this.worker.onmessage=function(Ki){setTimeout(function(){Ge.receive(Ge,Ki)},0)}}return Et(Bt,[{key:"postMessage",value:function(Ge){var Ki=this.id||0;this.id=Ki+1,Ge.id=Ki;var Ii=this;return new Promise(function(An,Uc){Ii.resolvers[Ki]=function(Nc,ju){Nc?(Ii.convertGwtStyleError(Nc),Uc(Nc)):An(ju)},Ii.worker.postMessage(Ge)})}},{key:"receive",value:function(Ge,Ki){var Ii=Ki.data,An=Ge.resolvers[Ii.id];An&&(delete Ge.resolvers[Ii.id],Ii.error?An(Ii.error):An(null,Ii.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(Ge){if(Ge){var Ki=Ge.__java$exception;Ki&&(Ki.cause&&Ki.cause.backingJsObject&&(Ge.cause=Ki.cause.backingJsObject,this.convertGwtStyleError(Ge.cause)),delete Ge.__java$exception)}}}]),Bt}()},{}],2:[function(ft,dt,Vt){(function(Et){(function(){var y;typeof window<"u"?y=window:typeof Et<"u"?y=Et:typeof self<"u"&&(y=self);var Ht;function Lc(){}function Bt(){}function qt(){}function Ge(){}function Ki(){}function Ii(){}function An(){}function Uc(){}function Nc(){}function ju(){}function vr(){}function Jo(){}function H1(){}function q1(){}function ww(){}function Np(){}function G1(){}function Th(){}function Q1n(){}function J1n(){}function zy(){}function Y1n(){}function Z1n(){}function nln(){}function eln(){}function Xg(){}function N(){}function tln(){}function aI(){}function iln(){}function rln(){}function cln(){}function uln(){}function DH(){}function sln(){}function oln(){}function fln(){}function z1(){}function U1(){}function dI(){}function hln(){}function lln(){}function aln(){}function $H(){}function dln(){}function bln(){}function Vg(){}function Qg(){}function wln(){}function gln(){}function pln(){}function vln(){}function FH(){}function W1(){}function Jg(){}function Yg(){}function mln(){}function Vee(){}function bI(){}function kln(){}function yln(){}function jln(){}function Eln(){}function Cln(){}function Tln(){}function Mln(){}function Aln(){}function Sln(){}function Pln(){}function Iln(){}function Oln(){}function Dln(){}function $ln(){}function Fln(){}function xln(){}function Lln(){}function Nln(){}function Bln(){}function Rln(){}function _ln(){}function Kln(){}function Hln(){}function qln(){}function Gln(){}function zln(){}function Uln(){}function Wln(){}function Xln(){}function Vln(){}function Qln(){}function Jln(){}function Yln(){}function xH(){}function Zln(){}function nan(){}function ean(){}function tan(){}function wI(){}function gI(){}function Uy(){}function ian(){}function ran(){}function pI(){}function can(){}function uan(){}function san(){}function Wy(){}function oan(){}function fan(){}function han(){}function lan(){}function aan(){}function dan(){}function ban(){}function wan(){}function gan(){}function LH(){}function pan(){}function van(){}function man(){}function kan(){}function yan(){}function NH(){}function jan(){}function Ean(){}function Can(){}function Tan(){}function Man(){}function Aan(){}function San(){}function Pan(){}function Ian(){}function Oan(){}function Dan(){}function $an(){}function Fan(){}function xan(){}function vI(){}function Lan(){}function Nan(){}function Ban(){}function Ran(){}function _an(){}function BH(){}function Kan(){}function Han(){}function qan(){}function Gan(){}function zan(){}function Uan(){}function Wan(){}function Xan(){}function Van(){}function Qan(){}function Jan(){}function Yan(){}function Zan(){}function ndn(){}function edn(){}function tdn(){}function idn(){}function rdn(){}function cdn(){}function udn(){}function sdn(){}function odn(){}function fdn(){}function hdn(){}function ldn(){}function adn(){}function ddn(){}function bdn(){}function wdn(){}function gdn(){}function pdn(){}function vdn(){}function mdn(){}function kdn(){}function ydn(){}function jdn(){}function Edn(){}function Cdn(){}function Tdn(){}function Mdn(){}function Adn(){}function Sdn(){}function Pdn(){}function Idn(){}function Odn(){}function Ddn(){}function $dn(){}function Fdn(){}function xdn(){}function Ldn(){}function Ndn(){}function Bdn(){}function Rdn(){}function _dn(){}function Kdn(){}function Hdn(){}function qdn(){}function Gdn(){}function zdn(){}function Udn(){}function Wdn(){}function Xdn(){}function Vdn(){}function Qdn(){}function Jdn(){}function Ydn(){}function Zdn(){}function n0n(){}function e0n(){}function t0n(){}function i0n(){}function r0n(){}function c0n(){}function u0n(){}function s0n(){}function o0n(){}function f0n(){}function h0n(){}function l0n(){}function a0n(){}function d0n(){}function b0n(){}function w0n(){}function g0n(){}function p0n(){}function v0n(){}function m0n(){}function k0n(){}function y0n(){}function j0n(){}function E0n(){}function C0n(){}function T0n(){}function M0n(){}function A0n(){}function S0n(){}function P0n(){}function I0n(){}function O0n(){}function D0n(){}function RH(){}function $0n(){}function F0n(){}function x0n(){}function L0n(){}function N0n(){}function B0n(){}function R0n(){}function _0n(){}function K0n(){}function H0n(){}function q0n(){}function G0n(){}function z0n(){}function U0n(){}function W0n(){}function X0n(){}function V0n(){}function Q0n(){}function J0n(){}function Y0n(){}function Z0n(){}function nbn(){}function ebn(){}function tbn(){}function ibn(){}function rbn(){}function cbn(){}function ubn(){}function sbn(){}function obn(){}function fbn(){}function hbn(){}function lbn(){}function abn(){}function dbn(){}function bbn(){}function wbn(){}function gbn(){}function pbn(){}function vbn(){}function mbn(){}function kbn(){}function ybn(){}function jbn(){}function Ebn(){}function Cbn(){}function Tbn(){}function Mbn(){}function Abn(){}function Sbn(){}function Pbn(){}function Ibn(){}function Obn(){}function Dbn(){}function $bn(){}function Fbn(){}function xbn(){}function Lbn(){}function Nbn(){}function Bbn(){}function Rbn(){}function _bn(){}function Kbn(){}function Hbn(){}function qbn(){}function Gbn(){}function zbn(){}function _H(){}function Ubn(){}function Wbn(){}function Xbn(){}function Vbn(){}function Qbn(){}function Jbn(){}function Ybn(){}function Zbn(){}function nwn(){}function ewn(){}function twn(){}function iwn(){}function rwn(){}function cwn(){}function uwn(){}function swn(){}function own(){}function fwn(){}function hwn(){}function lwn(){}function KH(){}function awn(){}function dwn(){}function bwn(){}function wwn(){}function gwn(){}function pwn(){}function HH(){}function qH(){}function vwn(){}function GH(){}function zH(){}function mwn(){}function kwn(){}function ywn(){}function jwn(){}function Ewn(){}function Cwn(){}function Twn(){}function Mwn(){}function Awn(){}function UH(){}function Swn(){}function Pwn(){}function Iwn(){}function Own(){}function Dwn(){}function $wn(){}function Fwn(){}function xwn(){}function Lwn(){}function Nwn(){}function Bwn(){}function Rwn(){}function _wn(){}function Kwn(){}function Hwn(){}function qwn(){}function Gwn(){}function zwn(){}function Uwn(){}function Wwn(){}function Xwn(){}function Vwn(){}function Qwn(){}function Jwn(){}function Ywn(){}function Zwn(){}function ngn(){}function egn(){}function tgn(){}function ign(){}function rgn(){}function cgn(){}function ugn(){}function sgn(){}function ogn(){}function fgn(){}function hgn(){}function lgn(){}function agn(){}function dgn(){}function bgn(){}function wgn(){}function ggn(){}function pgn(){}function vgn(){}function mgn(){}function kgn(){}function ygn(){}function jgn(){}function Egn(){}function Cgn(){}function Tgn(){}function Mgn(){}function Agn(){}function Sgn(){}function Pgn(){}function Ign(){}function Ogn(){}function Dgn(){}function $gn(){}function Fgn(){}function xgn(){}function Lgn(){}function Ngn(){}function Bgn(){}function Rgn(){}function _gn(){}function Kgn(){}function mI(){}function kI(){}function yI(){}function Hgn(){}function qgn(){}function Ggn(){}function zgn(){}function Ugn(){}function WH(){}function Wgn(){}function Xgn(){}function Qee(){}function Vgn(){}function Qgn(){}function Jgn(){}function Ygn(){}function Zgn(){}function n2n(){}function e2n(){}function Zl(){}function t2n(){}function Zg(){}function XH(){}function i2n(){}function r2n(){}function c2n(){}function u2n(){}function s2n(){}function o2n(){}function f2n(){}function h2n(){}function l2n(){}function a2n(){}function d2n(){}function b2n(){}function w2n(){}function g2n(){}function p2n(){}function v2n(){}function m2n(){}function k2n(){}function y2n(){}function j2n(){}function E2n(){}function dn(){}function C2n(){}function T2n(){}function M2n(){}function A2n(){}function S2n(){}function P2n(){}function I2n(){}function O2n(){}function D2n(){}function $2n(){}function jI(){}function F2n(){}function x2n(){}function L2n(){}function N2n(){}function B2n(){}function VH(){}function Xy(){}function Vy(){}function R2n(){}function QH(){}function Qy(){}function _2n(){}function K2n(){}function H2n(){}function q2n(){}function G2n(){}function z2n(){}function Jy(){}function U2n(){}function W2n(){}function X2n(){}function Yy(){}function V2n(){}function JH(){}function Q2n(){}function EI(){}function YH(){}function J2n(){}function Y2n(){}function Z2n(){}function npn(){}function Jee(){}function epn(){}function tpn(){}function ipn(){}function rpn(){}function cpn(){}function upn(){}function spn(){}function opn(){}function fpn(){}function hpn(){}function Bp(){}function CI(){}function lpn(){}function apn(){}function dpn(){}function bpn(){}function wpn(){}function gpn(){}function ppn(){}function vpn(){}function mpn(){}function kpn(){}function ypn(){}function jpn(){}function Epn(){}function Cpn(){}function Tpn(){}function Mpn(){}function Apn(){}function Spn(){}function Ppn(){}function Ipn(){}function Opn(){}function Dpn(){}function $pn(){}function Fpn(){}function xpn(){}function Lpn(){}function Npn(){}function Bpn(){}function Rpn(){}function _pn(){}function Kpn(){}function Hpn(){}function qpn(){}function Gpn(){}function zpn(){}function Upn(){}function Wpn(){}function Xpn(){}function Vpn(){}function Qpn(){}function Jpn(){}function Ypn(){}function Zpn(){}function n3n(){}function e3n(){}function t3n(){}function i3n(){}function r3n(){}function c3n(){}function u3n(){}function s3n(){}function o3n(){}function f3n(){}function h3n(){}function l3n(){}function a3n(){}function d3n(){}function b3n(){}function w3n(){}function g3n(){}function p3n(){}function v3n(){}function m3n(){}function k3n(){}function y3n(){}function j3n(){}function E3n(){}function C3n(){}function T3n(){}function M3n(){}function A3n(){}function S3n(){}function P3n(){}function I3n(){}function O3n(){}function D3n(){}function $3n(){}function F3n(){}function x3n(){}function L3n(){}function N3n(){}function B3n(){}function R3n(){}function _3n(){}function K3n(){}function H3n(){}function q3n(){}function G3n(){}function z3n(){}function U3n(){}function W3n(){}function X3n(){}function V3n(){}function Q3n(){}function J3n(){}function Y3n(){}function Z3n(){}function n4n(){}function e4n(){}function t4n(){}function i4n(){}function ZH(){}function r4n(){}function c4n(){}function TI(){Rv()}function u4n(){pF()}function s4n(){a6()}function o4n(){WT()}function f4n(){YJ()}function h4n(){Go()}function l4n(){fJ()}function a4n(){C7()}function d4n(){q9()}function b4n(){H9()}function w4n(){w8()}function g4n(){v7n()}function p4n(){x2()}function v4n(){Sj()}function m4n(){PSn()}function k4n(){HIn()}function y4n(){sPn()}function j4n(){CMn()}function E4n(){V3()}function C4n(){yl()}function T4n(){qIn()}function M4n(){pAn()}function A4n(){zZ()}function S4n(){IFn()}function P4n(){TMn()}function I4n(){nn()}function O4n(){EMn()}function D4n(){GIn()}function $4n(){WOn()}function F4n(){AMn()}function x4n(){aPn()}function L4n(){m7n()}function N4n(){$Y()}function B4n(){gb()}function R4n(){pOn()}function _4n(){S7()}function K4n(){Ux()}function H4n(){ZF()}function q4n(){Zd()}function G4n(){PV()}function z4n(){MMn()}function U4n(){BBn()}function W4n(){IY()}function X4n(){Bx()}function V4n(){DC()}function Q4n(){nM()}function nq(){Xe()}function J4n(){wT()}function Y4n(){NQ()}function eq(){mM()}function Fo(){dEn()}function tq(){eF()}function Z4n(){pZ()}function iq(n){_n(n)}function nvn(n){this.a=n}function Zy(n){this.a=n}function evn(n){this.a=n}function tvn(n){this.a=n}function ivn(n){this.a=n}function rvn(n){this.a=n}function cvn(n){this.a=n}function uvn(n){this.a=n}function rq(n){this.a=n}function cq(n){this.a=n}function svn(n){this.a=n}function MI(n){this.a=n}function ovn(n){this.a=n}function AI(n){this.a=n}function fvn(n){this.a=n}function SI(n){this.a=n}function hvn(n){this.a=n}function PI(n){this.a=n}function lvn(n){this.a=n}function avn(n){this.a=n}function dvn(n){this.a=n}function uq(n){this.b=n}function bvn(n){this.c=n}function wvn(n){this.a=n}function gvn(n){this.a=n}function pvn(n){this.a=n}function vvn(n){this.a=n}function mvn(n){this.a=n}function kvn(n){this.a=n}function yvn(n){this.a=n}function jvn(n){this.a=n}function Evn(n){this.a=n}function Cvn(n){this.a=n}function Tvn(n){this.a=n}function Mvn(n){this.a=n}function Avn(n){this.a=n}function sq(n){this.a=n}function oq(n){this.a=n}function nj(n){this.a=n}function M9(n){this.a=n}function na(){this.a=[]}function Svn(n,e){n.a=e}function Yee(n,e){n.a=e}function Zee(n,e){n.b=e}function nte(n,e){n.b=e}function ete(n,e){n.b=e}function fq(n,e){n.j=e}function tte(n,e){n.g=e}function ite(n,e){n.i=e}function rte(n,e){n.c=e}function cte(n,e){n.d=e}function ute(n,e){n.d=e}function ste(n,e){n.c=e}function ea(n,e){n.k=e}function ote(n,e){n.c=e}function hq(n,e){n.c=e}function lq(n,e){n.a=e}function fte(n,e){n.a=e}function hte(n,e){n.f=e}function lte(n,e){n.a=e}function ate(n,e){n.b=e}function II(n,e){n.d=e}function ej(n,e){n.i=e}function aq(n,e){n.o=e}function dte(n,e){n.r=e}function bte(n,e){n.a=e}function wte(n,e){n.b=e}function Pvn(n,e){n.e=e}function gte(n,e){n.f=e}function dq(n,e){n.g=e}function pte(n,e){n.e=e}function vte(n,e){n.f=e}function mte(n,e){n.f=e}function kte(n,e){n.n=e}function yte(n,e){n.a=e}function jte(n,e){n.a=e}function Ete(n,e){n.c=e}function Cte(n,e){n.c=e}function Tte(n,e){n.d=e}function Mte(n,e){n.e=e}function Ate(n,e){n.g=e}function Ste(n,e){n.a=e}function Pte(n,e){n.c=e}function Ite(n,e){n.d=e}function Ote(n,e){n.e=e}function Dte(n,e){n.f=e}function $te(n,e){n.j=e}function Fte(n,e){n.a=e}function xte(n,e){n.b=e}function Lte(n,e){n.a=e}function Ivn(n){n.b=n.a}function Ovn(n){n.c=n.d.d}function $v(n){this.d=n}function ta(n){this.a=n}function Rp(n){this.a=n}function bq(n){this.a=n}function Mh(n){this.a=n}function A9(n){this.a=n}function Dvn(n){this.a=n}function wq(n){this.a=n}function S9(n){this.a=n}function gq(n){this.a=n}function pq(n){this.a=n}function vq(n){this.a=n}function L0(n){this.a=n}function P9(n){this.a=n}function I9(n){this.a=n}function mq(n){this.b=n}function _p(n){this.b=n}function Kp(n){this.b=n}function OI(n){this.a=n}function $vn(n){this.a=n}function kq(n){this.a=n}function DI(n){this.c=n}function E(n){this.c=n}function Fvn(n){this.c=n}function yq(n){this.a=n}function jq(n){this.a=n}function Eq(n){this.a=n}function Cq(n){this.a=n}function ut(n){this.a=n}function xvn(n){this.a=n}function Tq(n){this.a=n}function Mq(n){this.a=n}function Lvn(n){this.a=n}function Nvn(n){this.a=n}function Fv(n){this.a=n}function Bvn(n){this.a=n}function Rvn(n){this.a=n}function _vn(n){this.a=n}function Kvn(n){this.a=n}function Hvn(n){this.a=n}function qvn(n){this.a=n}function Gvn(n){this.a=n}function zvn(n){this.a=n}function Uvn(n){this.a=n}function Wvn(n){this.a=n}function Xvn(n){this.a=n}function Vvn(n){this.a=n}function Qvn(n){this.a=n}function Jvn(n){this.a=n}function Yvn(n){this.a=n}function Zvn(n){this.a=n}function n5n(n){this.a=n}function O9(n){this.a=n}function e5n(n){this.a=n}function t5n(n){this.a=n}function tj(n){this.a=n}function i5n(n){this.a=n}function r5n(n){this.a=n}function Hp(n){this.a=n}function Aq(n){this.a=n}function c5n(n){this.a=n}function u5n(n){this.a=n}function s5n(n){this.a=n}function o5n(n){this.a=n}function f5n(n){this.a=n}function Sq(n){this.a=n}function Pq(n){this.a=n}function Iq(n){this.a=n}function ij(n){this.a=n}function rj(n){this.e=n}function qp(n){this.a=n}function h5n(n){this.a=n}function n2(n){this.a=n}function Oq(n){this.a=n}function l5n(n){this.a=n}function a5n(n){this.a=n}function d5n(n){this.a=n}function b5n(n){this.a=n}function w5n(n){this.a=n}function g5n(n){this.a=n}function p5n(n){this.a=n}function v5n(n){this.a=n}function m5n(n){this.a=n}function k5n(n){this.a=n}function y5n(n){this.a=n}function Dq(n){this.a=n}function j5n(n){this.a=n}function E5n(n){this.a=n}function C5n(n){this.a=n}function T5n(n){this.a=n}function M5n(n){this.a=n}function A5n(n){this.a=n}function S5n(n){this.a=n}function P5n(n){this.a=n}function I5n(n){this.a=n}function O5n(n){this.a=n}function D5n(n){this.a=n}function $5n(n){this.a=n}function F5n(n){this.a=n}function x5n(n){this.a=n}function L5n(n){this.a=n}function N5n(n){this.a=n}function B5n(n){this.a=n}function R5n(n){this.a=n}function _5n(n){this.a=n}function K5n(n){this.a=n}function H5n(n){this.a=n}function q5n(n){this.a=n}function G5n(n){this.a=n}function z5n(n){this.a=n}function U5n(n){this.a=n}function W5n(n){this.a=n}function X5n(n){this.a=n}function V5n(n){this.a=n}function Q5n(n){this.a=n}function J5n(n){this.a=n}function Y5n(n){this.a=n}function Z5n(n){this.a=n}function n6n(n){this.a=n}function e6n(n){this.a=n}function t6n(n){this.a=n}function i6n(n){this.a=n}function r6n(n){this.a=n}function c6n(n){this.c=n}function u6n(n){this.b=n}function s6n(n){this.a=n}function o6n(n){this.a=n}function f6n(n){this.a=n}function h6n(n){this.a=n}function l6n(n){this.a=n}function a6n(n){this.a=n}function d6n(n){this.a=n}function b6n(n){this.a=n}function w6n(n){this.a=n}function g6n(n){this.a=n}function p6n(n){this.a=n}function v6n(n){this.a=n}function m6n(n){this.a=n}function k6n(n){this.a=n}function y6n(n){this.a=n}function j6n(n){this.a=n}function E6n(n){this.a=n}function C6n(n){this.a=n}function T6n(n){this.a=n}function M6n(n){this.a=n}function A6n(n){this.a=n}function S6n(n){this.a=n}function P6n(n){this.a=n}function I6n(n){this.a=n}function X1(n){this.a=n}function e2(n){this.a=n}function O6n(n){this.a=n}function D6n(n){this.a=n}function $6n(n){this.a=n}function F6n(n){this.a=n}function x6n(n){this.a=n}function L6n(n){this.a=n}function N6n(n){this.a=n}function B6n(n){this.a=n}function R6n(n){this.a=n}function _6n(n){this.a=n}function K6n(n){this.a=n}function H6n(n){this.a=n}function q6n(n){this.a=n}function G6n(n){this.a=n}function z6n(n){this.a=n}function U6n(n){this.a=n}function cj(n){this.a=n}function W6n(n){this.a=n}function X6n(n){this.a=n}function V6n(n){this.a=n}function Q6n(n){this.a=n}function J6n(n){this.a=n}function Y6n(n){this.a=n}function Z6n(n){this.a=n}function nmn(n){this.a=n}function emn(n){this.a=n}function tmn(n){this.a=n}function imn(n){this.a=n}function rmn(n){this.a=n}function cmn(n){this.a=n}function umn(n){this.a=n}function smn(n){this.a=n}function omn(n){this.a=n}function fmn(n){this.a=n}function hmn(n){this.a=n}function lmn(n){this.a=n}function amn(n){this.a=n}function dmn(n){this.a=n}function bmn(n){this.a=n}function wmn(n){this.a=n}function gmn(n){this.a=n}function pmn(n){this.a=n}function vmn(n){this.a=n}function mmn(n){this.a=n}function kmn(n){this.a=n}function $q(n){this.a=n}function kt(n){this.b=n}function ymn(n){this.f=n}function Fq(n){this.a=n}function jmn(n){this.a=n}function Emn(n){this.a=n}function Cmn(n){this.a=n}function Tmn(n){this.a=n}function Mmn(n){this.a=n}function Amn(n){this.a=n}function Smn(n){this.a=n}function Pmn(n){this.a=n}function D9(n){this.a=n}function Imn(n){this.a=n}function Omn(n){this.b=n}function xq(n){this.c=n}function uj(n){this.e=n}function Dmn(n){this.a=n}function sj(n){this.a=n}function oj(n){this.a=n}function $I(n){this.a=n}function $mn(n){this.a=n}function Fmn(n){this.d=n}function Lq(n){this.a=n}function Nq(n){this.a=n}function cd(n){this.e=n}function Nte(){this.a=0}function gw(){dyn(this)}function X(){RO(this)}function we(){Cu(this)}function FI(){pTn(this)}function xmn(){}function ud(){this.c=p1n}function Bte(n,e){e.Wb(n)}function Lmn(n,e){n.b+=e}function Nmn(n){n.b=new JI}function T(n){return n.e}function Rte(n){return n.a}function _te(n){return n.a}function Kte(n){return n.a}function Hte(n){return n.a}function qte(n){return n.a}function Gte(){return null}function zte(){return null}function Ute(){EG(),iTe()}function Wte(n){n.b.tf(n.e)}function xv(n,e){n.b=e-n.b}function Lv(n,e){n.a=e-n.a}function Bmn(n,e){e.ad(n.a)}function Xte(n,e){si(e,n)}function Vte(n,e,t){n.Od(t,e)}function $9(n,e){n.e=e,e.b=n}function Bq(n){$f(),this.a=n}function Rmn(n){$f(),this.a=n}function _mn(n){$f(),this.a=n}function Rq(n){nb(),this.a=n}function Kmn(n){k3(),aR.be(n)}function ia(){Qyn.call(this)}function _q(){Qyn.call(this)}function Kq(){ia.call(this)}function xI(){ia.call(this)}function Hmn(){ia.call(this)}function F9(){ia.call(this)}function fu(){ia.call(this)}function Nv(){ia.call(this)}function ye(){ia.call(this)}function vs(){ia.call(this)}function qmn(){ia.call(this)}function ic(){ia.call(this)}function Gmn(){ia.call(this)}function zmn(){this.a=this}function fj(){this.Bb|=256}function Umn(){this.b=new Xkn}function Hq(){Hq=N,new we}function qq(){Kq.call(this)}function Wmn(n,e){n.length=e}function hj(n,e){W(n.a,e)}function Qte(n,e){nY(n.c,e)}function Jte(n,e){ci(n.b,e)}function Yte(n,e){KT(n.a,e)}function Zte(n,e){MF(n.a,e)}function Gp(n,e){et(n.e,e)}function t2(n){iM(n.c,n.b)}function nie(n,e){n.kc().Nb(e)}function Gq(n){this.a=Yge(n)}function hi(){this.a=new we}function Xmn(){this.a=new we}function lj(){this.a=new X}function LI(){this.a=new X}function zq(){this.a=new X}function Ns(){this.a=new Oln}function ra(){this.a=new TSn}function Uq(){this.a=new LH}function Wq(){this.a=new h7n}function Vmn(){this.a=new YMn}function Xq(){this.a=new bMn}function Vq(){this.a=new Bjn}function Qmn(){this.a=new X}function Qq(){this.a=new X}function Jmn(){this.a=new X}function Ymn(){this.a=new X}function Zmn(){this.d=new X}function n9n(){this.a=new hi}function e9n(){this.a=new we}function t9n(){this.b=new we}function i9n(){this.b=new X}function Jq(){this.e=new X}function r9n(){this.d=new X}function c9n(){this.a=new C4n}function u9n(){X.call(this)}function Yq(){lj.call(this)}function s9n(){kE.call(this)}function o9n(){Qq.call(this)}function NI(){Bv.call(this)}function Bv(){xmn.call(this)}function i2(){xmn.call(this)}function Zq(){i2.call(this)}function f9n(){zTn.call(this)}function h9n(){zTn.call(this)}function l9n(){uG.call(this)}function a9n(){uG.call(this)}function d9n(){uG.call(this)}function b9n(){sG.call(this)}function hu(){Tt.call(this)}function nG(){B2n.call(this)}function eG(){B2n.call(this)}function w9n(){O9n.call(this)}function g9n(){O9n.call(this)}function p9n(){we.call(this)}function v9n(){we.call(this)}function m9n(){we.call(this)}function k9n(){hi.call(this)}function BI(){RIn.call(this)}function y9n(){fj.call(this)}function RI(){Oz.call(this)}function _I(){Oz.call(this)}function tG(){we.call(this)}function KI(){we.call(this)}function j9n(){we.call(this)}function iG(){Yy.call(this)}function E9n(){Yy.call(this)}function C9n(){iG.call(this)}function T9n(){ZH.call(this)}function M9n(n){hIn.call(this,n)}function A9n(n){hIn.call(this,n)}function rG(n){rq.call(this,n)}function cG(n){n7n.call(this,n)}function eie(n){cG.call(this,n)}function tie(n){n7n.call(this,n)}function zp(){this.a=new Tt}function uG(){this.a=new hi}function sG(){this.a=new we}function S9n(){this.a=new X}function P9n(){this.j=new X}function oG(){this.a=new Rgn}function I9n(){this.a=new T8n}function O9n(){this.a=new X2n}function HI(){HI=N,uR=new V9n}function qI(){qI=N,cR=new X9n}function Rv(){Rv=N,rR=new Bt}function aj(){aj=N,fR=new Xyn}function iie(n){cG.call(this,n)}function rie(n){cG.call(this,n)}function D9n(n){m$.call(this,n)}function $9n(n){m$.call(this,n)}function F9n(n){uEn.call(this,n)}function GI(n){C5e.call(this,n)}function sd(n){_0.call(this,n)}function _v(n){Cj.call(this,n)}function fG(n){Cj.call(this,n)}function x9n(n){Cj.call(this,n)}function _r(n){kCn.call(this,n)}function L9n(n){_r.call(this,n)}function r2(){M9.call(this,{})}function dj(n){c3(),this.a=n}function Kv(n){n.b=null,n.c=0}function cie(n,e){n.e=e,NNn(n,e)}function uie(n,e){n.a=e,h6e(n)}function zI(n,e,t){n.a[e.g]=t}function sie(n,e,t){M4e(t,n,e)}function oie(n,e){$ue(e.i,n.n)}function N9n(n,e){Fwe(n).td(e)}function fie(n,e){return n*n/e}function B9n(n,e){return n.g-e.g}function hie(n){return new nj(n)}function lie(n){return new Z0(n)}function bj(n){_r.call(this,n)}function mr(n){_r.call(this,n)}function R9n(n){_r.call(this,n)}function UI(n){kCn.call(this,n)}function WI(n){AV(),this.a=n}function _9n(n){aEn(),this.a=n}function N0(n){ED(),this.f=n}function XI(n){ED(),this.f=n}function Up(n){_r.call(this,n)}function Hn(n){_r.call(this,n)}function $r(n){_r.call(this,n)}function K9n(n){_r.call(this,n)}function c2(n){_r.call(this,n)}function on(n){return _n(n),n}function K(n){return _n(n),n}function x9(n){return _n(n),n}function hG(n){return _n(n),n}function aie(n){return _n(n),n}function Hv(n){return n.b==n.c}function B0(n){return!!n&&n.b}function die(n){return!!n&&n.k}function bie(n){return!!n&&n.j}function Hu(n){_n(n),this.a=n}function lG(n){return ja(n),n}function qv(n){EW(n,n.length)}function t1(n){_r.call(this,n)}function Sf(n){_r.call(this,n)}function VI(n){_r.call(this,n)}function pw(n){_r.call(this,n)}function Gv(n){_r.call(this,n)}function Ee(n){_r.call(this,n)}function QI(n){Vz.call(this,n,0)}function JI(){iX.call(this,12,3)}function aG(){aG=N,din=new Q1n}function H9n(){H9n=N,ain=new Lc}function wj(){wj=N,dm=new H1}function q9n(){q9n=N,vzn=new ww}function G9n(){throw T(new ye)}function dG(){throw T(new ye)}function z9n(){throw T(new ye)}function wie(){throw T(new ye)}function gie(){throw T(new ye)}function pie(){throw T(new ye)}function YI(){this.a=Ce(pe(Ji))}function u2(n){$f(),this.a=pe(n)}function U9n(n,e){n.Td(e),e.Sd(n)}function vie(n,e){n.a.ec().Mc(e)}function mie(n,e,t){n.c.lf(e,t)}function bG(n){mr.call(this,n)}function Pf(n){Hn.call(this,n)}function i1(){A9.call(this,"")}function zv(){A9.call(this,"")}function V1(){A9.call(this,"")}function R0(){A9.call(this,"")}function wG(n){mr.call(this,n)}function Wp(n){_p.call(this,n)}function ZI(n){lE.call(this,n)}function W9n(n){Wp.call(this,n)}function X9n(){AI.call(this,null)}function V9n(){AI.call(this,null)}function gj(){gj=N,k3()}function Q9n(){Q9n=N,Szn=Z4e()}function J9n(n){return n.a?n.b:0}function kie(n){return n.a?n.b:0}function yie(n,e){return n.a-e.a}function jie(n,e){return n.a-e.a}function Eie(n,e){return n.a-e.a}function pj(n,e){return WX(n,e)}function M(n,e){return pMn(n,e)}function Cie(n,e){return e in n.a}function Y9n(n,e){return n.f=e,n}function Tie(n,e){return n.b=e,n}function Z9n(n,e){return n.c=e,n}function Mie(n,e){return n.g=e,n}function gG(n,e){return n.a=e,n}function pG(n,e){return n.f=e,n}function Aie(n,e){return n.k=e,n}function vG(n,e){return n.a=e,n}function Sie(n,e){return n.e=e,n}function mG(n,e){return n.e=e,n}function Pie(n,e){return n.f=e,n}function Iie(n,e){n.b=!0,n.d=e}function Oie(n,e){n.b=new kr(e)}function Die(n,e,t){e.td(n.a[t])}function $ie(n,e,t){e.we(n.a[t])}function Fie(n,e){return n.b-e.b}function xie(n,e){return n.g-e.g}function Lie(n,e){return n.s-e.s}function Nie(n,e){return n?0:e-1}function n8n(n,e){return n?0:e-1}function Bie(n,e){return n?e-1:0}function Rie(n,e){return e.Yf(n)}function od(n,e){return n.b=e,n}function vj(n,e){return n.a=e,n}function fd(n,e){return n.c=e,n}function hd(n,e){return n.d=e,n}function ld(n,e){return n.e=e,n}function kG(n,e){return n.f=e,n}function Uv(n,e){return n.a=e,n}function Xp(n,e){return n.b=e,n}function Vp(n,e){return n.c=e,n}function gn(n,e){return n.c=e,n}function Dn(n,e){return n.b=e,n}function pn(n,e){return n.d=e,n}function vn(n,e){return n.e=e,n}function _ie(n,e){return n.f=e,n}function mn(n,e){return n.g=e,n}function kn(n,e){return n.a=e,n}function yn(n,e){return n.i=e,n}function jn(n,e){return n.j=e,n}function e8n(n,e){return n.k=e,n}function Kie(n,e){return n.j=e,n}function Hie(n,e){yl(),Hr(e,n)}function qie(n,e,t){Nfe(n.a,e,t)}function t8n(n){mTn.call(this,n)}function yG(n){mTn.call(this,n)}function mj(n){uD.call(this,n)}function i8n(n){u2e.call(this,n)}function Q1(n){Ld.call(this,n)}function r8n(n){XD.call(this,n)}function c8n(n){XD.call(this,n)}function u8n(){Mz.call(this,"")}function Li(){this.a=0,this.b=0}function s8n(){this.b=0,this.a=0}function o8n(n,e){n.b=0,hb(n,e)}function Gie(n,e){n.c=e,n.b=!0}function f8n(n,e){return n.c._b(e)}function xo(n){return n.e&&n.e()}function nO(n){return n?n.d:null}function h8n(n,e){return LDn(n.b,e)}function zie(n){return n?n.g:null}function Uie(n){return n?n.i:null}function J1(n){return Ph(n),n.o}function ad(){ad=N,Mne=h4e()}function l8n(){l8n=N,mi=jve()}function Qp(){Qp=N,g1n=a4e()}function a8n(){a8n=N,hee=l4e()}function jG(){jG=N,oc=s6e()}function EG(){EG=N,Wl=N3()}function d8n(){throw T(new ye)}function b8n(){throw T(new ye)}function w8n(){throw T(new ye)}function g8n(){throw T(new ye)}function p8n(){throw T(new ye)}function v8n(){throw T(new ye)}function kj(n){this.a=new s2(n)}function CG(n){d_n(),gTe(this,n)}function Y1(n){this.a=new AD(n)}function vw(n,e){for(;n.ye(e););}function TG(n,e){for(;n.sd(e););}function mw(n,e){return n.a+=e,n}function eO(n,e){return n.a+=e,n}function r1(n,e){return n.a+=e,n}function dd(n,e){return n.a+=e,n}function Wv(n){return fl(n),n.a}function yj(n){return n.b!=n.d.c}function m8n(n){return n.l|n.m<<22}function MG(n,e){return n.d[e.p]}function k8n(n,e){return Q8e(n,e)}function AG(n,e,t){n.splice(e,t)}function y8n(n){n.c?rBn(n):cBn(n)}function jj(n){this.a=0,this.b=n}function j8n(){this.a=new B7(Pon)}function E8n(){this.b=new B7(won)}function C8n(){this.b=new B7(OK)}function T8n(){this.b=new B7(OK)}function M8n(){throw T(new ye)}function A8n(){throw T(new ye)}function S8n(){throw T(new ye)}function P8n(){throw T(new ye)}function I8n(){throw T(new ye)}function O8n(){throw T(new ye)}function D8n(){throw T(new ye)}function $8n(){throw T(new ye)}function F8n(){throw T(new ye)}function x8n(){throw T(new ye)}function Wie(){throw T(new ic)}function Xie(){throw T(new ic)}function L9(n){this.a=new L8n(n)}function L8n(n){cbe(this,n,cve())}function N9(n){return!n||iTn(n)}function B9(n){return Mf[n]!=-1}function Vie(){_A!=0&&(_A=0),KA=-1}function N8n(){iR==null&&(iR=[])}function Qie(n,e){$x(R(n.a),e)}function Jie(n,e){$x(R(n.a),e)}function R9(n,e){Sw.call(this,n,e)}function Jp(n,e){R9.call(this,n,e)}function SG(n,e){this.b=n,this.c=e}function B8n(n,e){this.b=n,this.a=e}function R8n(n,e){this.a=n,this.b=e}function _8n(n,e){this.a=n,this.b=e}function K8n(n,e){this.a=n,this.b=e}function H8n(n,e){this.a=n,this.b=e}function q8n(n,e){this.a=n,this.b=e}function G8n(n,e){this.a=n,this.b=e}function z8n(n,e){this.a=n,this.b=e}function U8n(n,e){this.a=n,this.b=e}function W8n(n,e){this.b=n,this.a=e}function X8n(n,e){this.b=n,this.a=e}function V8n(n,e){this.b=n,this.a=e}function Q8n(n,e){this.b=n,this.a=e}function Oe(n,e){this.f=n,this.g=e}function Yp(n,e){this.e=n,this.d=e}function bd(n,e){this.g=n,this.i=e}function tO(n,e){this.a=n,this.b=e}function J8n(n,e){this.a=n,this.f=e}function Y8n(n,e){this.b=n,this.c=e}function Yie(n,e){this.a=n,this.b=e}function Z8n(n,e){this.a=n,this.b=e}function iO(n,e){this.a=n,this.b=e}function n7n(n){Bz(n.dc()),this.c=n}function Ej(n){this.b=u(pe(n),83)}function e7n(n){this.a=u(pe(n),83)}function _0(n){this.a=u(pe(n),15)}function t7n(n){this.a=u(pe(n),15)}function Cj(n){this.b=u(pe(n),47)}function Tj(){this.q=new y.Date}function nh(){nh=N,Sin=new tln}function Zp(){Zp=N,X4=new nln}function Xv(n){return n.f.c+n.g.c}function _9(n,e){return n.b.Hc(e)}function i7n(n,e){return n.b.Ic(e)}function r7n(n,e){return n.b.Qc(e)}function c7n(n,e){return n.b.Hc(e)}function u7n(n,e){return n.c.uc(e)}function Ah(n,e){return n.a._b(e)}function s7n(n,e){return tt(n.c,e)}function o7n(n,e){return Uu(n.b,e)}function f7n(n,e){return n>e&&e0}function cO(n,e){return fc(n,e)<0}function n5(n,e){return n.a.get(e)}function lre(n,e){return e.split(n)}function S7n(n,e){return Uu(n.e,e)}function LG(n){return _n(n),!1}function xj(n){xn.call(this,n,21)}function are(n,e){cMn.call(this,n,e)}function Lj(n,e){Oe.call(this,n,e)}function uO(n,e){Oe.call(this,n,e)}function NG(n){_D(),uEn.call(this,n)}function BG(n,e){fCn(n,n.length,e)}function z9(n,e){BCn(n,n.length,e)}function dre(n,e,t){e.ud(n.a.Ge(t))}function bre(n,e,t){e.we(n.a.Fe(t))}function wre(n,e,t){e.td(n.a.Kb(t))}function gre(n,e,t){n.Mb(t)&&e.td(t)}function e5(n,e,t){n.splice(e,0,t)}function pre(n,e){return au(n.e,e)}function Nj(n,e){this.d=n,this.e=e}function P7n(n,e){this.b=n,this.a=e}function I7n(n,e){this.b=n,this.a=e}function RG(n,e){this.b=n,this.a=e}function O7n(n,e){this.a=n,this.b=e}function D7n(n,e){this.a=n,this.b=e}function $7n(n,e){this.a=n,this.b=e}function F7n(n,e){this.a=n,this.b=e}function f2(n,e){this.a=n,this.b=e}function _G(n,e){this.b=n,this.a=e}function KG(n,e){this.b=n,this.a=e}function Bj(n,e){Oe.call(this,n,e)}function Rj(n,e){Oe.call(this,n,e)}function HG(n,e){Oe.call(this,n,e)}function qG(n,e){Oe.call(this,n,e)}function kw(n,e){Oe.call(this,n,e)}function sO(n,e){Oe.call(this,n,e)}function oO(n,e){Oe.call(this,n,e)}function fO(n,e){Oe.call(this,n,e)}function _j(n,e){Oe.call(this,n,e)}function GG(n,e){Oe.call(this,n,e)}function hO(n,e){Oe.call(this,n,e)}function U9(n,e){Oe.call(this,n,e)}function Kj(n,e){Oe.call(this,n,e)}function lO(n,e){Oe.call(this,n,e)}function t5(n,e){Oe.call(this,n,e)}function zG(n,e){Oe.call(this,n,e)}function zt(n,e){Oe.call(this,n,e)}function Hj(n,e){Oe.call(this,n,e)}function x7n(n,e){this.a=n,this.b=e}function L7n(n,e){this.a=n,this.b=e}function N7n(n,e){this.a=n,this.b=e}function B7n(n,e){this.a=n,this.b=e}function R7n(n,e){this.a=n,this.b=e}function _7n(n,e){this.a=n,this.b=e}function K7n(n,e){this.a=n,this.b=e}function H7n(n,e){this.a=n,this.b=e}function q7n(n,e){this.a=n,this.b=e}function UG(n,e){this.b=n,this.a=e}function G7n(n,e){this.b=n,this.a=e}function z7n(n,e){this.b=n,this.a=e}function U7n(n,e){this.b=n,this.a=e}function t3(n,e){this.c=n,this.d=e}function W7n(n,e){this.e=n,this.d=e}function X7n(n,e){this.a=n,this.b=e}function V7n(n,e){this.b=e,this.c=n}function qj(n,e){Oe.call(this,n,e)}function W9(n,e){Oe.call(this,n,e)}function aO(n,e){Oe.call(this,n,e)}function i5(n,e){Oe.call(this,n,e)}function WG(n,e){Oe.call(this,n,e)}function dO(n,e){Oe.call(this,n,e)}function bO(n,e){Oe.call(this,n,e)}function X9(n,e){Oe.call(this,n,e)}function XG(n,e){Oe.call(this,n,e)}function wO(n,e){Oe.call(this,n,e)}function r5(n,e){Oe.call(this,n,e)}function VG(n,e){Oe.call(this,n,e)}function c5(n,e){Oe.call(this,n,e)}function u5(n,e){Oe.call(this,n,e)}function H0(n,e){Oe.call(this,n,e)}function gO(n,e){Oe.call(this,n,e)}function pO(n,e){Oe.call(this,n,e)}function QG(n,e){Oe.call(this,n,e)}function s5(n,e){Oe.call(this,n,e)}function vO(n,e){Oe.call(this,n,e)}function Gj(n,e){Oe.call(this,n,e)}function V9(n,e){Oe.call(this,n,e)}function Q9(n,e){Oe.call(this,n,e)}function h2(n,e){Oe.call(this,n,e)}function mO(n,e){Oe.call(this,n,e)}function JG(n,e){Oe.call(this,n,e)}function kO(n,e){Oe.call(this,n,e)}function yO(n,e){Oe.call(this,n,e)}function YG(n,e){Oe.call(this,n,e)}function jO(n,e){Oe.call(this,n,e)}function EO(n,e){Oe.call(this,n,e)}function CO(n,e){Oe.call(this,n,e)}function TO(n,e){Oe.call(this,n,e)}function ZG(n,e){Oe.call(this,n,e)}function Q7n(n,e){this.b=n,this.a=e}function J7n(n,e){this.a=n,this.b=e}function Y7n(n,e){this.a=n,this.b=e}function Z7n(n,e){this.a=n,this.b=e}function nkn(n,e){this.a=n,this.b=e}function nz(n,e){Oe.call(this,n,e)}function ez(n,e){Oe.call(this,n,e)}function ekn(n,e){this.b=n,this.d=e}function tz(n,e){Oe.call(this,n,e)}function iz(n,e){Oe.call(this,n,e)}function tkn(n,e){this.a=n,this.b=e}function ikn(n,e){this.a=n,this.b=e}function zj(n,e){Oe.call(this,n,e)}function o5(n,e){Oe.call(this,n,e)}function rz(n,e){Oe.call(this,n,e)}function cz(n,e){Oe.call(this,n,e)}function uz(n,e){Oe.call(this,n,e)}function MO(n,e){Oe.call(this,n,e)}function sz(n,e){Oe.call(this,n,e)}function AO(n,e){Oe.call(this,n,e)}function Uj(n,e){Oe.call(this,n,e)}function SO(n,e){Oe.call(this,n,e)}function PO(n,e){Oe.call(this,n,e)}function J9(n,e){Oe.call(this,n,e)}function IO(n,e){Oe.call(this,n,e)}function oz(n,e){Oe.call(this,n,e)}function Y9(n,e){Oe.call(this,n,e)}function fz(n,e){Oe.call(this,n,e)}function vre(n,e){return au(n.c,e)}function mre(n,e){return au(e.b,n)}function kre(n,e){return-n.b.Je(e)}function hz(n,e){return au(n.g,e)}function Z9(n,e){Oe.call(this,n,e)}function l2(n,e){Oe.call(this,n,e)}function rkn(n,e){this.a=n,this.b=e}function ckn(n,e){this.a=n,this.b=e}function fn(n,e){this.a=n,this.b=e}function f5(n,e){Oe.call(this,n,e)}function h5(n,e){Oe.call(this,n,e)}function n8(n,e){Oe.call(this,n,e)}function OO(n,e){Oe.call(this,n,e)}function Wj(n,e){Oe.call(this,n,e)}function l5(n,e){Oe.call(this,n,e)}function DO(n,e){Oe.call(this,n,e)}function Xj(n,e){Oe.call(this,n,e)}function yw(n,e){Oe.call(this,n,e)}function e8(n,e){Oe.call(this,n,e)}function a5(n,e){Oe.call(this,n,e)}function d5(n,e){Oe.call(this,n,e)}function t8(n,e){Oe.call(this,n,e)}function Vj(n,e){Oe.call(this,n,e)}function jw(n,e){Oe.call(this,n,e)}function Qj(n,e){Oe.call(this,n,e)}function ukn(n,e){this.a=n,this.b=e}function skn(n,e){this.a=n,this.b=e}function okn(n,e){this.a=n,this.b=e}function fkn(n,e){this.a=n,this.b=e}function hkn(n,e){this.a=n,this.b=e}function lkn(n,e){this.a=n,this.b=e}function Si(n,e){this.a=n,this.b=e}function Jj(n,e){Oe.call(this,n,e)}function akn(n,e){this.a=n,this.b=e}function dkn(n,e){this.a=n,this.b=e}function bkn(n,e){this.a=n,this.b=e}function wkn(n,e){this.a=n,this.b=e}function gkn(n,e){this.a=n,this.b=e}function pkn(n,e){this.a=n,this.b=e}function vkn(n,e){this.b=n,this.a=e}function mkn(n,e){this.b=n,this.a=e}function kkn(n,e){this.b=n,this.a=e}function ykn(n,e){this.b=n,this.a=e}function jkn(n,e){this.a=n,this.b=e}function Ekn(n,e){this.a=n,this.b=e}function yre(n,e){J9e(n.a,u(e,56))}function Ckn(n,e){f0e(n.a,u(e,11))}function jre(n,e){return h3(),e!=n}function Tkn(){return Q9n(),new Szn}function Mkn(){c$(),this.b=new hi}function Akn(){hM(),this.a=new hi}function Skn(){tX(),lW.call(this)}function a2(n,e){Oe.call(this,n,e)}function Pkn(n,e){this.a=n,this.b=e}function Ikn(n,e){this.a=n,this.b=e}function Yj(n,e){this.a=n,this.b=e}function Okn(n,e){this.a=n,this.b=e}function Dkn(n,e){this.a=n,this.b=e}function $kn(n,e){this.a=n,this.b=e}function Fkn(n,e){this.d=n,this.b=e}function lz(n,e){this.d=n,this.e=e}function xkn(n,e){this.f=n,this.c=e}function i8(n,e){this.b=n,this.c=e}function az(n,e){this.i=n,this.g=e}function Lkn(n,e){this.e=n,this.a=e}function Nkn(n,e){this.a=n,this.b=e}function dz(n,e){n.i=null,nT(n,e)}function Ere(n,e){n&&it($y,n,e)}function Bkn(n,e){return NF(n.a,e)}function Zj(n){return g7(n.c,n.b)}function Vr(n){return n?n.dd():null}function B(n){return n??null}function q0(n){return typeof n===X2}function G0(n){return typeof n===UZ}function ki(n){return typeof n===EL}function el(n,e){return n.Hd().Xb(e)}function nE(n,e){return Rbe(n.Kc(),e)}function gd(n,e){return fc(n,e)==0}function Cre(n,e){return fc(n,e)>=0}function b5(n,e){return fc(n,e)!=0}function Tre(n){return""+(_n(n),n)}function r8(n,e){return n.substr(e)}function Rkn(n){return Fu(n),n.d.gc()}function $O(n){return yme(n,n.c),n}function eE(n){return A5(n==null),n}function w5(n,e){return n.a+=""+e,n}function dr(n,e){return n.a+=""+e,n}function g5(n,e){return n.a+=""+e,n}function rc(n,e){return n.a+=""+e,n}function De(n,e){return n.a+=""+e,n}function bz(n,e){return n.a+=""+e,n}function _kn(n,e){Kt(n,e,n.a,n.a.a)}function ua(n,e){Kt(n,e,n.c.b,n.c)}function Mre(n,e,t){VFn(e,Mx(n,t))}function Are(n,e,t){VFn(e,Mx(n,t))}function Sre(n,e){k0e(new ie(n),e)}function Kkn(n,e){n.q.setTime($d(e))}function Hkn(n,e){kW.call(this,n,e)}function qkn(n,e){kW.call(this,n,e)}function FO(n,e){kW.call(this,n,e)}function Gkn(n){Cu(this),Z5(this,n)}function wz(n){return Ln(n,0),null}function Lo(n){return n.a=0,n.b=0,n}function zkn(n,e){return n.a=e.g+1,n}function Pre(n,e){return n.j[e.p]==2}function gz(n){return lhe(u(n,79))}function Ukn(){Ukn=N,jUn=Fe(qF())}function Wkn(){Wkn=N,RWn=Fe(PNn())}function Xkn(){this.b=new s2(sb(12))}function Vkn(){this.b=0,this.a=!1}function Qkn(){this.b=0,this.a=!1}function p5(n){this.a=n,TI.call(this)}function Jkn(n){this.a=n,TI.call(this)}function In(n,e){ri.call(this,n,e)}function xO(n,e){V0.call(this,n,e)}function Ew(n,e){az.call(this,n,e)}function LO(n,e){H3.call(this,n,e)}function Ykn(n,e){c8.call(this,n,e)}function He(n,e){$j(),it(eI,n,e)}function NO(n,e){return Zu(n.a,0,e)}function Zkn(n,e){return n.a.a.a.cc(e)}function nyn(n,e){return B(n)===B(e)}function Ire(n,e){return ni(n.a,e.a)}function Ore(n,e){return Wc(n.a,e.a)}function Dre(n,e){return xCn(n.a,e.a)}function If(n,e){return n.indexOf(e)}function pd(n,e){return n==e?0:n?1:-1}function tE(n){return n<10?"0"+n:""+n}function $re(n){return pe(n),new p5(n)}function eyn(n){return Bc(n.l,n.m,n.h)}function i3(n){return Gt((_n(n),n))}function Fre(n){return Gt((_n(n),n))}function tyn(n,e){return Wc(n.g,e.g)}function Fr(n){return typeof n===UZ}function xre(n){return n==b0||n==Hb}function Lre(n){return n==b0||n==Kb}function pz(n){return xr(n.b.b,n,0)}function iyn(n){this.a=Tkn(),this.b=n}function ryn(n){this.a=Tkn(),this.b=n}function Nre(n,e){return W(n.a,e),e}function Bre(n,e){return W(n.c,e),n}function cyn(n,e){return cs(n.a,e),n}function Rre(n,e){return wo(),e.a+=n}function _re(n,e){return wo(),e.a+=n}function Kre(n,e){return wo(),e.c+=n}function vz(n,e){S3(n,0,n.length,e)}function Sh(){Tq.call(this,new ba)}function uyn(){xE.call(this,0,0,0,0)}function d2(){ys.call(this,0,0,0,0)}function kr(n){this.a=n.a,this.b=n.b}function tl(n){return n==Zs||n==Ao}function r3(n){return n==Yh||n==Jh}function syn(n){return n==xg||n==Fg}function Cw(n){return n!=Ef&&n!=ql}function qu(n){return n.Lg()&&n.Mg()}function oyn(n){return JE(u(n,118))}function iE(n){return cs(new li,n)}function fyn(n,e){return new H3(e,n)}function Hre(n,e){return new H3(e,n)}function mz(n,e,t){UC(n,e),WC(n,t)}function rE(n,e,t){Rd(n,e),Bd(n,t)}function Yo(n,e,t){nu(n,e),eu(n,t)}function cE(n,e,t){D3(n,e),F3(n,t)}function uE(n,e,t){$3(n,e),x3(n,t)}function BO(n,e){X3(n,e),L3(n,n.D)}function kz(n){xkn.call(this,n,!0)}function hyn(n,e,t){fU.call(this,n,e,t)}function il(n){jl(),qbe.call(this,n)}function lyn(){Lj.call(this,"Head",1)}function ayn(){Lj.call(this,"Tail",3)}function RO(n){n.c=F(Zn,rn,1,0,5,1)}function dyn(n){n.a=F(Zn,rn,1,8,5,1)}function byn(n){Zc(n.xf(),new t5n(n))}function Tw(n){return n!=null?mt(n):0}function qre(n,e){return ob(e,ef(n))}function Gre(n,e){return ob(e,ef(n))}function zre(n,e){return n[n.length]=e}function Ure(n,e){return n[n.length]=e}function yz(n){return zoe(n.b.Kc(),n.a)}function Wre(n,e){return ZC(BD(n.d),e)}function Xre(n,e){return ZC(BD(n.g),e)}function Vre(n,e){return ZC(BD(n.j),e)}function tr(n,e){ri.call(this,n.b,e)}function vd(n){xE.call(this,n,n,n,n)}function jz(n){return n.b&&uL(n),n.a}function Ez(n){return n.b&&uL(n),n.c}function Qre(n,e){vf||(n.b=e)}function _O(n,e,t){return St(n,e,t),t}function wyn(n,e,t){St(n.c[e.g],e.g,t)}function Jre(n,e,t){u(n.c,69).Xh(e,t)}function Yre(n,e,t){Yo(t,t.i+n,t.j+e)}function Zre(n,e){me(bc(n.a),PMn(e))}function nce(n,e){me(Du(n.a),IMn(e))}function v5(n){Je(),cd.call(this,n)}function ece(n){return n==null?0:mt(n)}function gyn(){gyn=N,hK=new f6(cH)}function je(){je=N,new pyn,new X}function pyn(){new we,new we,new we}function Cz(){Cz=N,Hq(),bin=new we}function Zo(){Zo=N,y.Math.log(2)}function ms(){ms=N,Ch=(E7n(),Dne)}function tce(){throw T(new t1(izn))}function ice(){throw T(new t1(izn))}function rce(){throw T(new t1(rzn))}function cce(){throw T(new t1(rzn))}function vyn(n){this.a=n,HU.call(this,n)}function KO(n){this.a=n,Ej.call(this,n)}function HO(n){this.a=n,Ej.call(this,n)}function wi(n,e){mD(n.c,n.c.length,e)}function Kr(n){return n.ae?1:0}function kyn(n,e){return fc(n,e)>0?n:e}function Bc(n,e,t){return{l:n,m:e,h:t}}function uce(n,e){n.a!=null&&Ckn(e,n.a)}function yyn(n){n.a=new aI,n.c=new aI}function sE(n){this.b=n,this.a=new X}function jyn(n){this.b=new san,this.a=n}function Mz(n){vU.call(this),this.a=n}function Eyn(){Lj.call(this,"Range",2)}function Cyn(){kJ(),this.a=new B7(Hrn)}function sce(n,e){pe(e),Iw(n).Jc(new ju)}function oce(n,e){return ns(),e.n.b+=n}function fce(n,e,t){return it(n.g,t,e)}function hce(n,e,t){return it(n.k,t,e)}function lce(n,e){return it(n.a,e.a,e)}function Mw(n,e,t){return _Q(e,t,n.c)}function Az(n){return new fn(n.c,n.d)}function ace(n){return new fn(n.c,n.d)}function Qr(n){return new fn(n.a,n.b)}function Tyn(n,e){return xEe(n.a,e,null)}function dce(n){Hi(n,null),Ci(n,null)}function Myn(n){s$(n,null),o$(n,null)}function Ayn(){c8.call(this,null,null)}function Syn(){wE.call(this,null,null)}function Sz(n){this.a=n,we.call(this)}function bce(n){this.b=(Pn(),new DI(n))}function oE(n){n.j=F(Ain,q,310,0,0,1)}function wce(n,e,t){n.c.Vc(e,u(t,133))}function gce(n,e,t){n.c.ji(e,u(t,133))}function Pyn(n,e){de(n),n.Gc(u(e,15))}function m5(n,e){return Jje(n.c,n.b,e)}function pce(n,e){return new Jyn(n.Kc(),e)}function qO(n,e){return gwe(n.Kc(),e)!=-1}function Pz(n,e){return n.a.Bc(e)!=null}function fE(n){return n.Ob()?n.Pb():null}function Iyn(n){return Hs(n,0,n.length)}function I(n,e){return n!=null&&WF(n,e)}function vce(n,e){n.q.setHours(e),S6(n,e)}function Oyn(n,e){n.c&&(ZU(e),iMn(e))}function mce(n,e,t){u(n.Kb(t),164).Nb(e)}function kce(n,e,t){return SEe(n,e,t),t}function Dyn(n,e,t){n.a=e^1502,n.b=t^tN}function GO(n,e,t){return n.a[e.g][t.g]}function nf(n,e){return n.a[e.c.p][e.p]}function yce(n,e){return n.e[e.c.p][e.p]}function jce(n,e){return n.c[e.c.p][e.p]}function Ece(n,e){return n.j[e.p]=D9e(e)}function Cce(n,e){return DX(n.f,e.tg())}function Tce(n,e){return DX(n.b,e.tg())}function Mce(n,e){return n.a0?e*e/n:e*e*100}function Jce(n,e){return n>0?e/(n*n):e*100}function Yce(n,e,t){return W(e,e$n(n,t))}function Zce(n,e,t){DC(),n.Xe(e)&&t.td(n)}function s3(n,e,t){var i;i=n.Zc(e),i.Rb(t)}function U0(n,e,t){return n.a+=e,n.b+=t,n}function nue(n,e,t){return n.a*=e,n.b*=t,n}function o8(n,e,t){return n.a-=e,n.b-=t,n}function Zz(n,e){return n.a=e.a,n.b=e.b,n}function vE(n){return n.a=-n.a,n.b=-n.b,n}function fjn(n){this.c=n,this.a=1,this.b=1}function hjn(n){this.c=n,nu(n,0),eu(n,0)}function ljn(n){Tt.call(this),V5(this,n)}function ajn(n){yL(),Nmn(this),this.mf(n)}function djn(n,e){Zv(),c8.call(this,n,e)}function nU(n,e){c1(),wE.call(this,n,e)}function bjn(n,e){c1(),wE.call(this,n,e)}function wjn(n,e){c1(),nU.call(this,n,e)}function Gu(n,e,t){Xu.call(this,n,e,t,2)}function JO(n,e){ms(),FE.call(this,n,e)}function gjn(n,e){ms(),JO.call(this,n,e)}function eU(n,e){ms(),JO.call(this,n,e)}function pjn(n,e){ms(),eU.call(this,n,e)}function tU(n,e){ms(),FE.call(this,n,e)}function vjn(n,e){ms(),tU.call(this,n,e)}function mjn(n,e){ms(),FE.call(this,n,e)}function eue(n,e){return n.c.Fc(u(e,133))}function iU(n,e,t){return jM(G8(n,e),t)}function tue(n,e,t){return e.Qk(n.e,n.c,t)}function iue(n,e,t){return e.Rk(n.e,n.c,t)}function YO(n,e){return pl(n.e,u(e,49))}function rue(n,e,t){s6(Du(n.a),e,IMn(t))}function cue(n,e,t){s6(bc(n.a),e,PMn(t))}function rU(n,e){e.$modCount=n.$modCount}function C5(){C5=N,Xm=new kt("root")}function o3(){o3=N,xy=new w9n,new g9n}function kjn(){this.a=new Od,this.b=new Od}function cU(){RIn.call(this),this.Bb|=Yi}function yjn(){Oe.call(this,"GROW_TREE",0)}function uue(n){return n==null?null:CCe(n)}function sue(n){return n==null?null:D5e(n)}function oue(n){return n==null?null:Nr(n)}function fue(n){return n==null?null:Nr(n)}function Ph(n){n.o==null&&u9e(n)}function sn(n){return A5(n==null||q0(n)),n}function Y(n){return A5(n==null||G0(n)),n}function Ce(n){return A5(n==null||ki(n)),n}function uU(n){this.q=new y.Date($d(n))}function f8(n,e){this.c=n,Yp.call(this,n,e)}function mE(n,e){this.a=n,f8.call(this,n,e)}function hue(n,e){this.d=n,Ovn(this),this.b=e}function sU(n,e){P$.call(this,n),this.a=e}function oU(n,e){P$.call(this,n),this.a=e}function lue(n){xQ.call(this,0,0),this.f=n}function fU(n,e,t){IC.call(this,n,e,t,null)}function jjn(n,e,t){IC.call(this,n,e,t,null)}function aue(n,e,t){return n.ue(e,t)<=0?t:e}function due(n,e,t){return n.ue(e,t)<=0?e:t}function bue(n,e){return u(xd(n.b,e),149)}function wue(n,e){return u(xd(n.c,e),229)}function ZO(n){return u(un(n.a,n.b),287)}function Ejn(n){return new fn(n.c,n.d+n.a)}function Cjn(n){return ns(),syn(u(n,197))}function W0(){W0=N,prn=Cn((Qu(),id))}function gue(n,e){e.a?e7e(n,e):zO(n.a,e.b)}function Tjn(n,e){vf||W(n.a,e)}function pue(n,e){return H9(),K3(e.d.i,n)}function vue(n,e){return x2(),new ABn(e,n)}function Df(n,e){return T8(e,ann),n.f=e,n}function hU(n,e,t){return t=os(n,e,3,t),t}function lU(n,e,t){return t=os(n,e,6,t),t}function aU(n,e,t){return t=os(n,e,9,t),t}function h8(n,e,t){++n.j,n.Ki(),A$(n,e,t)}function Mjn(n,e,t){++n.j,n.Hi(e,n.oi(e,t))}function Ajn(n,e,t){var i;i=n.Zc(e),i.Rb(t)}function Sjn(n,e,t){return MZ(n.c,n.b,e,t)}function dU(n,e){return(e&nt)%n.d.length}function ri(n,e){kt.call(this,n),this.a=e}function bU(n,e){xq.call(this,n),this.a=e}function nD(n,e){xq.call(this,n),this.a=e}function Pjn(n,e){this.c=n,Ld.call(this,e)}function Ijn(n,e){this.a=n,Omn.call(this,e)}function l8(n,e){this.a=n,Omn.call(this,e)}function Ojn(n){this.a=(rs(n,Pb),new Pc(n))}function Djn(n){this.a=(rs(n,Pb),new Pc(n))}function a8(n){return!n.a&&(n.a=new vr),n.a}function $jn(n){return n>8?0:n+1}function mue(n,e){return qn(),n==e?0:n?1:-1}function wU(n,e,t){return m2(n,u(e,22),t)}function kue(n,e,t){return n.apply(e,t)}function Fjn(n,e,t){return n.a+=Hs(e,0,t),n}function gU(n,e){var t;return t=n.e,n.e=e,t}function yue(n,e){var t;t=n[eN],t.call(n,e)}function jue(n,e){var t;t=n[eN],t.call(n,e)}function X0(n,e){n.a.Vc(n.b,e),++n.b,n.c=-1}function xjn(n){Cu(n.e),n.d.b=n.d,n.d.a=n.d}function d8(n){n.b?d8(n.b):n.f.c.zc(n.e,n.d)}function Eue(n,e,t){ca(),Svn(n,e.Ce(n.a,t))}function Cue(n,e){return nO(p$n(n.a,e,!0))}function Tue(n,e){return nO(v$n(n.a,e,!0))}function bo(n,e){return pj(new Array(e),n)}function eD(n){return String.fromCharCode(n)}function Mue(n){return n==null?null:n.message}function Ljn(){this.a=new X,this.b=new X}function Njn(){this.a=new LH,this.b=new Umn}function Bjn(){this.b=new Li,this.c=new X}function pU(){this.d=new Li,this.e=new Li}function vU(){this.n=new Li,this.o=new Li}function kE(){this.n=new i2,this.i=new d2}function Rjn(){this.a=new v4n,this.b=new cwn}function _jn(){this.a=new X,this.d=new X}function Kjn(){this.b=new hi,this.a=new hi}function Hjn(){this.b=new we,this.a=new we}function qjn(){this.b=new E8n,this.a=new sgn}function Gjn(){kE.call(this),this.a=new Li}function T5(n){Jbe.call(this,n,(FC(),vR))}function mU(n,e,t,i){xE.call(this,n,e,t,i)}function Aue(n,e,t){t!=null&&JC(e,rx(n,t))}function Sue(n,e,t){t!=null&&YC(e,rx(n,t))}function kU(n,e,t){return t=os(n,e,11,t),t}function st(n,e){return n.a+=e.a,n.b+=e.b,n}function yi(n,e){return n.a-=e.a,n.b-=e.b,n}function Pue(n,e){return n.n.a=(_n(e),e+10)}function Iue(n,e){return n.n.a=(_n(e),e+10)}function Oue(n,e){return e==n||o4(sM(e),n)}function zjn(n,e){return it(n.a,e,"")==null}function Due(n,e){return H9(),!K3(e.d.i,n)}function $ue(n,e){tl(n.f)?Qme(n,e):Fve(n,e)}function Fue(n,e){var t;return t=e.Hh(n.a),t}function V0(n,e){mr.call(this,rm+n+Ra+e)}function g2(n,e,t,i){V.call(this,n,e,t,i)}function yU(n,e,t,i){V.call(this,n,e,t,i)}function Ujn(n,e,t,i){yU.call(this,n,e,t,i)}function Wjn(n,e,t,i){zE.call(this,n,e,t,i)}function tD(n,e,t,i){zE.call(this,n,e,t,i)}function jU(n,e,t,i){zE.call(this,n,e,t,i)}function Xjn(n,e,t,i){tD.call(this,n,e,t,i)}function EU(n,e,t,i){tD.call(this,n,e,t,i)}function Fn(n,e,t,i){jU.call(this,n,e,t,i)}function Vjn(n,e,t,i){EU.call(this,n,e,t,i)}function Qjn(n,e,t,i){yW.call(this,n,e,t,i)}function Jjn(n,e,t){this.a=n,Vz.call(this,e,t)}function Yjn(n,e,t){this.c=e,this.b=t,this.a=n}function xue(n,e,t){return n.d=u(e.Kb(t),164)}function CU(n,e){return n.Aj().Nh().Kh(n,e)}function TU(n,e){return n.Aj().Nh().Ih(n,e)}function Zjn(n,e){return _n(n),B(n)===B(e)}function Mn(n,e){return _n(n),B(n)===B(e)}function iD(n,e){return nO(p$n(n.a,e,!1))}function rD(n,e){return nO(v$n(n.a,e,!1))}function Lue(n,e){return n.b.sd(new D7n(n,e))}function Nue(n,e){return n.b.sd(new $7n(n,e))}function nEn(n,e){return n.b.sd(new F7n(n,e))}function MU(n,e,t){return n.lastIndexOf(e,t)}function Bue(n,e,t){return ni(n[e.b],n[t.b])}function Rue(n,e){return H(e,(nn(),Jk),n)}function _ue(n,e){return Wc(e.a.d.p,n.a.d.p)}function Kue(n,e){return Wc(n.a.d.p,e.a.d.p)}function Hue(n,e){return ni(n.c-n.s,e.c-e.s)}function eEn(n){return n.c?xr(n.c.a,n,0):-1}function que(n){return n<100?null:new Q1(n)}function p2(n){return n==td||n==Eh||n==Ac}function tEn(n,e){return I(e,15)&&oBn(n.c,e)}function Gue(n,e){vf||e&&(n.d=e)}function cD(n,e){var t;return t=e,!!VV(n,t)}function AU(n,e){this.c=n,DD.call(this,n,e)}function iEn(n){this.c=n,FO.call(this,IM,0)}function rEn(n,e){Voe.call(this,n,n.length,e)}function zue(n,e,t){return u(n.c,69).lk(e,t)}function yE(n,e,t){return u(n.c,69).mk(e,t)}function Uue(n,e,t){return tue(n,u(e,332),t)}function SU(n,e,t){return iue(n,u(e,332),t)}function Wue(n,e,t){return txn(n,u(e,332),t)}function cEn(n,e,t){return zve(n,u(e,332),t)}function M5(n,e){return e==null?null:ab(n.b,e)}function PU(n){return G0(n)?(_n(n),n):n.ke()}function jE(n){return!isNaN(n)&&!isFinite(n)}function uEn(n){$f(),this.a=(Pn(),new Wp(n))}function b8(n){h3(),this.d=n,this.a=new gw}function ks(n,e,t){this.a=n,this.b=e,this.c=t}function sEn(n,e,t){this.a=n,this.b=e,this.c=t}function oEn(n,e,t){this.d=n,this.b=t,this.a=e}function uD(n){yyn(this),_s(this),Vi(this,n)}function du(n){RO(this),GU(this.c,0,n.Pc())}function fEn(n){Wu(n.a),uPn(n.c,n.b),n.b=null}function hEn(n){this.a=n,nh(),tu(Date.now())}function lEn(){lEn=N,Xin=new Lc,XA=new Lc}function sD(){sD=N,Rin=new iln,Pzn=new rln}function aEn(){aEn=N,Nne=F(Zn,rn,1,0,5,1)}function dEn(){dEn=N,eee=F(Zn,rn,1,0,5,1)}function IU(){IU=N,tee=F(Zn,rn,1,0,5,1)}function $f(){$f=N,new Bq((Pn(),Pn(),cr))}function Xue(n){return FC(),$e((pPn(),Dzn),n)}function Vue(n){return lf(),$e((LSn(),Bzn),n)}function Que(n){return $T(),$e((qAn(),Gzn),n)}function Jue(n){return RC(),$e((GAn(),zzn),n)}function Yue(n){return dM(),$e((IOn(),Uzn),n)}function Zue(n){return _o(),$e(($Sn(),Vzn),n)}function nse(n){return Tu(),$e((FSn(),Jzn),n)}function ese(n){return Yc(),$e((xSn(),Zzn),n)}function tse(n){return SM(),$e((Ukn(),jUn),n)}function ise(n){return Hd(),$e((mPn(),CUn),n)}function rse(n){return K2(),$e((kPn(),MUn),n)}function cse(n){return d6(),$e((yPn(),PUn),n)}function use(n){return Aj(),$e((yAn(),IUn),n)}function sse(n){return _C(),$e((zAn(),WUn),n)}function ose(n){return W5(),$e((NSn(),bWn),n)}function fse(n){return Qi(),$e((JPn(),vWn),n)}function hse(n){return G3(),$e((vPn(),EWn),n)}function lse(n){return qd(),$e((BSn(),PWn),n)}function OU(n,e){if(!n)throw T(new Hn(e))}function ase(n){return Qn(),$e((vIn(),$Wn),n)}function DU(n){xE.call(this,n.d,n.c,n.a,n.b)}function oD(n){xE.call(this,n.d,n.c,n.a,n.b)}function $U(n,e,t){this.b=n,this.c=e,this.a=t}function EE(n,e,t){this.b=n,this.a=e,this.c=t}function bEn(n,e,t){this.a=n,this.b=e,this.c=t}function FU(n,e,t){this.a=n,this.b=e,this.c=t}function wEn(n,e,t){this.a=n,this.b=e,this.c=t}function xU(n,e,t){this.a=n,this.b=e,this.c=t}function gEn(n,e,t){this.b=n,this.a=e,this.c=t}function CE(n,e,t){this.e=e,this.b=n,this.d=t}function dse(n,e,t){return ca(),n.a.Od(e,t),e}function fD(n){var e;return e=new Dln,e.e=n,e}function LU(n){var e;return e=new Zmn,e.b=n,e}function w8(){w8=N,sS=new Fdn,oS=new xdn}function wo(){wo=N,WWn=new pbn,XWn=new vbn}function bse(n){return aT(),$e((EPn(),HWn),n)}function wse(n){return hf(),$e((TPn(),JWn),n)}function gse(n){return lM(),$e((mOn(),cXn),n)}function pse(n){return q2(),$e((yIn(),uXn),n)}function vse(n){return OC(),$e((JAn(),sXn),n)}function mse(n){return F2(),$e((RSn(),oXn),n)}function kse(n){return Vw(),$e((UPn(),ZWn),n)}function yse(n){return Kd(),$e((HSn(),rXn),n)}function jse(n){return VC(),$e((_Sn(),fXn),n)}function Ese(n){return Pa(),$e((GPn(),hXn),n)}function Cse(n){return V8(),$e((WAn(),lXn),n)}function Tse(n){return ya(),$e((KSn(),dXn),n)}function Mse(n){return eM(),$e((TIn(),bXn),n)}function Ase(n){return K8(),$e((XAn(),wXn),n)}function Sse(n){return A7(),$e((EIn(),gXn),n)}function Pse(n){return h4(),$e((jIn(),pXn),n)}function Ise(n){return or(),$e((zOn(),vXn),n)}function Ose(n){return q3(),$e((GSn(),mXn),n)}function Dse(n){return Nh(),$e((qSn(),yXn),n)}function $se(n){return kC(),$e((YAn(),jXn),n)}function Fse(n){return Ss(),$e((WPn(),EXn),n)}function xse(n){return JT(),$e((CIn(),BQn),n)}function Lse(n){return i6(),$e((zSn(),RQn),n)}function Nse(n){return wb(),$e((MPn(),_Qn),n)}function Bse(n){return ur(),$e((XSn(),UQn),n)}function Rse(n){return Zw(),$e((vOn(),HQn),n)}function _se(n){return Rh(),$e((WSn(),qQn),n)}function Kse(n){return z8(),$e((QAn(),GQn),n)}function Hse(n){return oT(),$e((USn(),WQn),n)}function qse(n){return b6(),$e((zPn(),KQn),n)}function Gse(n){return x8(),$e((VAn(),XQn),n)}function zse(n){return Q3(),$e((QSn(),VQn),n)}function Use(n){return uT(),$e((JSn(),QQn),n)}function Wse(n){return dT(),$e((VSn(),JQn),n)}function Xse(n){return _d(),$e((YSn(),hJn),n)}function Vse(n){return z5(),$e((nSn(),wJn),n)}function Qse(n){return xf(),$e((eSn(),jJn),n)}function Jse(n){return tf(),$e((tSn(),CJn),n)}function Yse(n){return No(),$e((ZAn(),RJn),n)}function Zse(n){return Id(),$e((iSn(),UJn),n)}function noe(n){return c4(),$e((jPn(),WJn),n)}function eoe(n){return k6(),$e((MIn(),VJn),n)}function toe(n){return aC(),$e((uSn(),fYn),n)}function ioe(n){return iT(),$e((cSn(),wYn),n)}function roe(n){return gC(),$e((rSn(),hYn),n)}function coe(n){return CT(),$e((ZSn(),pYn),n)}function uoe(n){return $C(),$e((sSn(),vYn),n)}function soe(n){return f7(),$e((nPn(),mYn),n)}function ooe(n){return qT(),$e((CPn(),FYn),n)}function foe(n){return sT(),$e((tPn(),xYn),n)}function hoe(n){return ET(),$e((ePn(),LYn),n)}function loe(n){return g4(),$e((QPn(),tZn),n)}function aoe(n){return w7(),$e((iPn(),iZn),n)}function doe(n){return Pj(),$e((mAn(),rZn),n)}function boe(n){return Ij(),$e((vAn(),uZn),n)}function woe(n){return L8(),$e((fSn(),sZn),n)}function goe(n){return P7(),$e((XPn(),oZn),n)}function poe(n){return Jv(),$e((kAn(),CZn),n)}function voe(n){return c7(),$e((oSn(),TZn),n)}function moe(n){return Ho(),$e((VPn(),OZn),n)}function koe(n){return y1(),$e((kOn(),$Zn),n)}function yoe(n){return fh(),$e((kIn(),FZn),n)}function joe(n){return vb(),$e((mIn(),_Zn),n)}function Eoe(n){return rr(),$e((Wkn(),RWn),n)}function Coe(n){return B3(),$e((UAn(),BWn),n)}function Toe(n){return sr(),$e((YPn(),ene),n)}function Moe(n){return of(),$e((cPn(),tne),n)}function Aoe(n){return Hh(),$e((PPn(),ine),n)}function Soe(n){return ZT(),$e((SIn(),rne),n)}function Poe(n){return _h(),$e((rPn(),une),n)}function Ioe(n){return us(),$e((SPn(),one),n)}function Ooe(n){return jb(),$e((POn(),fne),n)}function Doe(n){return qw(),$e((ZPn(),hne),n)}function $oe(n){return Mi(),$e((bIn(),lne),n)}function Foe(n){return Mu(),$e((AIn(),ane),n)}function xoe(n){return Qu(),$e((OPn(),vne),n)}function Loe(n){return Lu(),$e((UOn(),mne),n)}function Noe(n){return J(),$e((nIn(),dne),n)}function Boe(n){return AT(),$e((IPn(),kne),n)}function Roe(n){return Vu(),$e((APn(),Ene),n)}function _oe(n){return d4(),$e((yOn(),Lne),n)}function Koe(n,e){return _n(n),n+(_n(e),e)}function Hoe(n,e){return nh(),me(R(n.a),e)}function qoe(n,e){return nh(),me(R(n.a),e)}function hD(n,e){this.c=n,this.a=e,this.b=e-n}function pEn(n,e,t){this.a=n,this.b=e,this.c=t}function NU(n,e,t){this.a=n,this.b=e,this.c=t}function BU(n,e,t){this.a=n,this.b=e,this.c=t}function vEn(n,e,t){this.a=n,this.b=e,this.c=t}function mEn(n,e,t){this.a=n,this.b=e,this.c=t}function s1(n,e,t){this.e=n,this.a=e,this.c=t}function kEn(n,e,t){ms(),QW.call(this,n,e,t)}function lD(n,e,t){ms(),FW.call(this,n,e,t)}function RU(n,e,t){ms(),FW.call(this,n,e,t)}function _U(n,e,t){ms(),FW.call(this,n,e,t)}function yEn(n,e,t){ms(),lD.call(this,n,e,t)}function KU(n,e,t){ms(),lD.call(this,n,e,t)}function jEn(n,e,t){ms(),KU.call(this,n,e,t)}function EEn(n,e,t){ms(),RU.call(this,n,e,t)}function CEn(n,e,t){ms(),_U.call(this,n,e,t)}function g8(n,e){return pe(n),pe(e),new z8n(n,e)}function v2(n,e){return pe(n),pe(e),new NEn(n,e)}function Goe(n,e){return pe(n),pe(e),new BEn(n,e)}function zoe(n,e){return pe(n),pe(e),new W8n(n,e)}function u(n,e){return A5(n==null||WF(n,e)),n}function f3(n){var e;return e=new X,_$(e,n),e}function Uoe(n){var e;return e=new hi,_$(e,n),e}function TEn(n){var e;return e=new Wq,nF(e,n),e}function p8(n){var e;return e=new Tt,nF(e,n),e}function Woe(n){return!n.e&&(n.e=new X),n.e}function Xoe(n){return!n.c&&(n.c=new Bp),n.c}function W(n,e){return n.c[n.c.length]=e,!0}function MEn(n,e){this.c=n,this.b=e,this.a=!1}function HU(n){this.d=n,Ovn(this),this.b=_fe(n.d)}function AEn(){this.a=";,;",this.b="",this.c=""}function Voe(n,e,t){SCn.call(this,e,t),this.a=n}function SEn(n,e,t){this.b=n,Hkn.call(this,e,t)}function qU(n,e,t){this.c=n,Nj.call(this,e,t)}function GU(n,e,t){aY(t,0,n,e,t.length,!1)}function th(n,e,t,i,r){n.b=e,n.c=t,n.d=i,n.a=r}function Qoe(n,e){e&&(n.b=e,n.a=(fl(e),e.a))}function zU(n,e,t,i,r){n.d=e,n.c=t,n.a=i,n.b=r}function UU(n){var e,t;e=n.b,t=n.c,n.b=t,n.c=e}function WU(n){var e,t;t=n.d,e=n.a,n.d=e,n.a=t}function XU(n){return bl(the(Fr(n)?Ks(n):n))}function Joe(n,e){return Wc(GEn(n.d),GEn(e.d))}function Yoe(n,e){return e==(J(),Gn)?n.c:n.d}function h3(){h3=N,don=(J(),Gn),dP=Vn}function PEn(){this.b=K(Y(cn((Go(),xR))))}function IEn(n){return ca(),F(Zn,rn,1,n,5,1)}function Zoe(n){return new fn(n.c+n.b,n.d+n.a)}function nfe(n,e){return Sj(),Wc(n.d.p,e.d.p)}function aD(n){return ne(n.b!=0),Ts(n,n.a.a)}function efe(n){return ne(n.b!=0),Ts(n,n.c.b)}function VU(n,e){if(!n)throw T(new R9n(e))}function TE(n,e){if(!n)throw T(new Hn(e))}function QU(n,e,t){t3.call(this,n,e),this.b=t}function v8(n,e,t){lz.call(this,n,e),this.c=t}function OEn(n,e,t){oIn.call(this,e,t),this.d=n}function JU(n){IU(),Yy.call(this),this.th(n)}function DEn(n,e,t){this.a=n,Ew.call(this,e,t)}function $En(n,e,t){this.a=n,Ew.call(this,e,t)}function ME(n,e,t){lz.call(this,n,e),this.c=t}function FEn(){T3(),khe.call(this,(Z1(),uo))}function xEn(n){return n!=null&&!$F(n,a9,d9)}function tfe(n,e){return(GDn(n)<<4|GDn(e))&Ut}function ife(n,e){return QE(),ex(n,e),new oTn(n,e)}function sa(n,e){var t;n.n&&(t=e,W(n.f,t))}function l3(n,e,t){var i;i=new Z0(t),Ro(n,e,i)}function rfe(n,e){var t;return t=n.c,wV(n,e),t}function YU(n,e){return e<0?n.g=-1:n.g=e,n}function AE(n,e){return H0e(n),n.a*=e,n.b*=e,n}function LEn(n,e,t,i,r){n.c=e,n.d=t,n.b=i,n.a=r}function Ke(n,e){return Kt(n,e,n.c.b,n.c),!0}function ZU(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function dD(n){this.b=n,this.a=Ed(this.b.a).Ed()}function NEn(n,e){this.b=n,this.a=e,TI.call(this)}function BEn(n,e){this.a=n,this.b=e,TI.call(this)}function REn(n,e){SCn.call(this,e,1040),this.a=n}function m8(n){return n==0||isNaN(n)?n:n<0?-1:1}function cfe(n){return C2(),hh(n)==Pt(ml(n))}function ufe(n){return C2(),ml(n)==Pt(hh(n))}function jd(n,e){return v6(n,new t3(e.a,e.b))}function sfe(n){return!Xi(n)&&n.c.i.c==n.d.i.c}function SE(n){var e;return e=n.n,n.a.b+e.d+e.a}function _En(n){var e;return e=n.n,n.e.b+e.d+e.a}function nW(n){var e;return e=n.n,n.e.a+e.b+e.c}function KEn(n){return Je(),new ih(0,n)}function ofe(n){return n.a?n.a:WD(n)}function A5(n){if(!n)throw T(new Up(null))}function HEn(){HEn=N,mH=(Pn(),new OI(XB))}function PE(){PE=N,new JQ((HI(),uR),(qI(),cR))}function qEn(){qEn=N,jin=F(Wi,q,19,256,0,1)}function bD(n,e,t,i){MQ.call(this,n,e,t,i,0,0)}function ffe(n,e,t){return it(n.b,u(t.b,17),e)}function hfe(n,e,t){return it(n.b,u(t.b,17),e)}function lfe(n,e){return W(n,new fn(e.a,e.b))}function afe(n,e){return n.c=e)throw T(new qq)}function Xfe(n,e,t){return St(e,0,rW(e[0],t[0])),e}function Vfe(n,e,t){e.Ye(t,K(Y(te(n.b,t)))*n.a)}function ACn(n,e,t){return eg(),R3(n,e)&&R3(n,t)}function D5(n){return Mu(),!n.Hc(n1)&&!n.Hc(Gl)}function qE(n){return new fn(n.c+n.b/2,n.d+n.a/2)}function MD(n,e){return e.kh()?pl(n.b,u(e,49)):e}function kW(n,e){this.e=n,this.d=e&64?e|Bf:e}function SCn(n,e){this.c=0,this.d=n,this.b=e|64|Bf}function GE(n){this.b=new Pc(11),this.a=(Ow(),n)}function AD(n){this.b=null,this.a=(Ow(),n||Lin)}function PCn(n){this.a=Y$n(n.a),this.b=new du(n.b)}function ICn(n){this.b=n,b2.call(this,n),$yn(this)}function OCn(n){this.b=n,u8.call(this,n),Fyn(this)}function Y0(n,e,t){this.a=n,g2.call(this,e,t,5,6)}function yW(n,e,t,i){this.b=n,Yt.call(this,e,t,i)}function gi(n,e,t,i,r){D$.call(this,n,e,t,i,r,-1)}function $5(n,e,t,i,r){R8.call(this,n,e,t,i,r,-1)}function V(n,e,t,i){Yt.call(this,n,e,t),this.b=i}function zE(n,e,t,i){v8.call(this,n,e,t),this.b=i}function DCn(n){xkn.call(this,n,!1),this.a=!1}function $Cn(n,e){this.b=n,bvn.call(this,n.b),this.a=e}function FCn(n,e){nb(),Yie.call(this,n,mT(new Hu(e)))}function UE(n,e){return Je(),new xW(n,e,0)}function SD(n,e){return Je(),new xW(6,n,e)}function Qfe(n,e){return Mn(n.substr(0,e.length),e)}function Uu(n,e){return ki(e)?QD(n,e):!!Sr(n.f,e)}function Oi(n,e){for(_n(e);n.Ob();)e.td(n.Pb())}function Pw(n,e,t){jl(),this.e=n,this.d=e,this.a=t}function o1(n,e,t,i){var r;r=n.i,r.i=e,r.a=t,r.b=i}function jW(n){var e;for(e=n;e.f;)e=e.f;return e}function y2(n){var e;return e=t6(n),ne(e!=null),e}function Jfe(n){var e;return e=Lge(n),ne(e!=null),e}function d3(n,e){var t;return t=n.a.gc(),$X(e,t),t-e}function EW(n,e){var t;for(t=0;t0?y.Math.log(n/e):-100}function xCn(n,e){return fc(n,e)<0?-1:fc(n,e)>0?1:0}function SW(n,e,t){return MRn(n,u(e,46),u(t,167))}function LCn(n,e){return u(vW(Ed(n.a)).Xb(e),42).cd()}function uhe(n,e){return P0e(e,n.length),new REn(n,e)}function DD(n,e){this.d=n,ie.call(this,n),this.e=e}function Cd(n){this.d=(_n(n),n),this.a=0,this.c=IM}function PW(n,e){cd.call(this,1),this.a=n,this.b=e}function NCn(n,e){return n.c?NCn(n.c,e):W(n.b,e),n}function she(n,e,t){var i;return i=ub(n,e),g$(n,e,t),i}function IW(n,e){var t;return t=n.slice(0,e),WX(t,n)}function BCn(n,e,t){var i;for(i=0;i=n.g}function KD(n,e,t){var i;return i=Y$(n,e,t),rZ(n,i)}function j2(n,e){var t;t=n.a.length,ub(n,t),g$(n,t,e)}function ZCn(n,e){var t;t=console[n],t.call(console,e)}function nTn(n,e){var t;++n.j,t=n.Vi(),n.Ii(n.oi(t,e))}function mhe(n,e,t){u(e.b,65),Zc(e.a,new NU(n,t,e))}function FW(n,e,t){uj.call(this,e),this.a=n,this.b=t}function xW(n,e,t){cd.call(this,n),this.a=e,this.b=t}function LW(n,e,t){this.a=n,xq.call(this,e),this.b=t}function eTn(n,e,t){this.a=n,aX.call(this,8,e,null,t)}function khe(n){this.a=(_n(xe),xe),this.b=n,new tG}function tTn(n){this.c=n,this.b=this.c.a,this.a=this.c.e}function NW(n){this.c=n,this.b=n.a.d.a,rU(n.a.e,this)}function Wu(n){z0(n.c!=-1),n.d.$c(n.c),n.b=n.c,n.c=-1}function L5(n){return y.Math.sqrt(n.a*n.a+n.b*n.b)}function Md(n,e){return a3(e,n.a.c.length),un(n.a,e)}function Ff(n,e){return B(n)===B(e)||n!=null&&tt(n,e)}function yhe(n){return 0>=n?new PG:sbe(n-1)}function jhe(n){return aw?QD(aw,n):!1}function iTn(n){return n?n.dc():!n.Kc().Ob()}function Gi(n){return!n.a&&n.c?n.c.b:n.a}function Ehe(n){return!n.a&&(n.a=new Yt(zl,n,4)),n.a}function Ad(n){return!n.d&&(n.d=new Yt(ar,n,1)),n.d}function _n(n){if(n==null)throw T(new Nv);return n}function N5(n){n.c?n.c.He():(n.d=!0,S8e(n))}function fl(n){n.c?fl(n.c):(Ta(n),n.d=!0)}function rTn(n){KW(n.a),n.b=F(Zn,rn,1,n.b.length,5,1)}function Che(n,e){return Wc(e.j.c.length,n.j.c.length)}function The(n,e){n.c<0||n.b.b=0?n.Bh(t):bY(n,e)}function cTn(n){var e,t;return e=n.c.i.c,t=n.d.i.c,e==t}function Ahe(n){if(n.p!=4)throw T(new fu);return n.e}function She(n){if(n.p!=3)throw T(new fu);return n.e}function Phe(n){if(n.p!=6)throw T(new fu);return n.f}function Ihe(n){if(n.p!=6)throw T(new fu);return n.k}function Ohe(n){if(n.p!=3)throw T(new fu);return n.j}function Dhe(n){if(n.p!=4)throw T(new fu);return n.j}function BW(n){return!n.b&&(n.b=new sj(new KI)),n.b}function Sd(n){return n.c==-2&&Pte(n,Qve(n.g,n.b)),n.c}function g3(n,e){var t;return t=LD("",n),t.n=e,t.i=1,t}function $he(n,e){yD(u(e.b,65),n),Zc(e.a,new Aq(n))}function Fhe(n,e){me((!n.a&&(n.a=new l8(n,n)),n.a),e)}function uTn(n,e){this.b=n,DD.call(this,n,e),$yn(this)}function sTn(n,e){this.b=n,AU.call(this,n,e),Fyn(this)}function RW(n,e,t,i){bd.call(this,n,e),this.d=t,this.a=i}function VE(n,e,t,i){bd.call(this,n,t),this.a=e,this.f=i}function oTn(n,e){bce.call(this,obe(pe(n),pe(e))),this.a=e}function fTn(){UJ.call(this,Ka,(a8n(),hee)),tEe(this)}function hTn(){UJ.call(this,Vs,(Qp(),g1n)),lje(this)}function lTn(){Oe.call(this,"DELAUNAY_TRIANGULATION",0)}function xhe(n){return String.fromCharCode.apply(null,n)}function it(n,e,t){return ki(e)?yr(n,e,t):_c(n.f,e,t)}function _W(n){return Pn(),n?n.ve():(Ow(),Ow(),Bin)}function Lhe(n,e,t){return L2(),t.pg(n,u(e.cd(),146))}function aTn(n,e){return PE(),new JQ(new Wyn(n),new Uyn(e))}function Nhe(n){return rs(n,AL),KC(qi(qi(5,n),n/10|0))}function QE(){QE=N,fzn=new GI(A(M(Ha,1),OM,42,0,[]))}function dTn(n){return!n.d&&(n.d=new _p(n.c.Cc())),n.d}function p3(n){return!n.a&&(n.a=new W9n(n.c.vc())),n.a}function bTn(n){return!n.b&&(n.b=new Wp(n.c.ec())),n.b}function ch(n,e){for(;e-- >0;)n=n<<1|(n<0?1:0);return n}function pc(n,e){return B(n)===B(e)||n!=null&&tt(n,e)}function Bhe(n,e){return qn(),u(e.b,19).ai&&++i,i}function Oh(n){var e,t;return t=(e=new ud,e),O3(t,n),t}function UD(n){var e,t;return t=(e=new ud,e),VJ(t,n),t}function Zhe(n,e){var t;return t=te(n.f,e),MV(e,t),null}function WD(n){var e;return e=hbe(n),e||null}function CTn(n){return!n.b&&(n.b=new V(bi,n,12,3)),n.b}function n1e(n){return n!=null&&_9(tI,n.toLowerCase())}function e1e(n,e){return ni(bu(n)*zu(n),bu(e)*zu(e))}function t1e(n,e){return ni(bu(n)*zu(n),bu(e)*zu(e))}function i1e(n,e){return ni(n.d.c+n.d.b/2,e.d.c+e.d.b/2)}function r1e(n,e){return ni(n.g.c+n.g.b/2,e.g.c+e.g.b/2)}function TTn(n,e,t){t.a?eu(n,e.b-n.f/2):nu(n,e.a-n.g/2)}function MTn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function ATn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function ha(n,e,t,i){this.e=n,this.a=e,this.c=t,this.d=i}function STn(n,e,t,i){this.a=n,this.c=e,this.d=t,this.b=i}function PTn(n,e,t,i){ms(),ySn.call(this,e,t,i),this.a=n}function ITn(n,e,t,i){ms(),ySn.call(this,e,t,i),this.a=n}function OTn(n,e){this.a=n,hue.call(this,n,u(n.d,15).Zc(e))}function XD(n){this.f=n,this.c=this.f.e,n.f>0&&qFn(this)}function DTn(n,e,t,i){this.b=n,this.c=i,FO.call(this,e,t)}function $Tn(n){return ne(n.b=0&&Mn(n.substr(t,e.length),e)}function hl(n,e,t,i,r,c,o){return new v$(n.e,e,t,i,r,c,o)}function QTn(n,e,t,i,r,c){this.a=n,z$.call(this,e,t,i,r,c)}function JTn(n,e,t,i,r,c){this.a=n,z$.call(this,e,t,i,r,c)}function YTn(n,e){this.g=n,this.d=A(M(mh,1),E1,10,0,[e])}function f1(n,e){this.e=n,this.a=Zn,this.b=yBn(e),this.c=e}function ZTn(n,e){kE.call(this),eV(this),this.a=n,this.c=e}function M8(n,e,t,i){St(n.c[e.g],t.g,i),St(n.c[t.g],e.g,i)}function ZD(n,e,t,i){St(n.c[e.g],e.g,t),St(n.b[e.g],e.g,i)}function M1e(){return x8(),A(M(ron,1),z,376,0,[uK,iy])}function A1e(){return K8(),A(M(Qcn,1),z,479,0,[Vcn,xS])}function S1e(){return V8(),A(M(Wcn,1),z,419,0,[$S,Ucn])}function P1e(){return OC(),A(M(Rcn,1),z,422,0,[Bcn,s_])}function I1e(){return kC(),A(M(fun,1),z,420,0,[j_,oun])}function O1e(){return z8(),A(M(non,1),z,421,0,[iK,rK])}function D1e(){return z5(),A(M(bJn,1),z,523,0,[Hm,Km])}function $1e(){return No(),A(M(BJn,1),z,520,0,[tw,Bl])}function F1e(){return xf(),A(M(yJn,1),z,516,0,[M0,I1])}function x1e(){return tf(),A(M(EJn,1),z,515,0,[Ja,yf])}function L1e(){return Id(),A(M(zJn,1),z,455,0,[Rl,Lg])}function N1e(){return gC(),A(M(Son,1),z,425,0,[yK,Aon])}function B1e(){return aC(),A(M(Mon,1),z,480,0,[kK,Ton])}function R1e(){return iT(),A(M(Pon,1),z,495,0,[EP,mv])}function _1e(){return $C(),A(M(Oon,1),z,426,0,[Ion,TK])}function K1e(){return c7(),A(M(Ffn,1),z,429,0,[DP,$fn])}function H1e(){return L8(),A(M(afn,1),z,430,0,[FK,IP])}function q1e(){return $T(),A(M(Jin,1),z,428,0,[yR,Qin])}function G1e(){return RC(),A(M(Zin,1),z,427,0,[Yin,jR])}function z1e(){return _C(),A(M(Arn,1),z,424,0,[$R,tS])}function U1e(){return B3(),A(M(NWn,1),z,511,0,[_k,UR])}function sC(n,e,t,i){return t>=0?n.jh(e,t,i):n.Sg(null,t,i)}function n$(n){return n.b.b==0?n.a.$e():aD(n.b)}function W1e(n){if(n.p!=5)throw T(new fu);return ge(n.f)}function X1e(n){if(n.p!=5)throw T(new fu);return ge(n.k)}function VW(n){return B(n.a)===B((eF(),gH))&&Vje(n),n.a}function nMn(n){this.a=u(pe(n),271),this.b=(Pn(),new Hz(n))}function eMn(n,e){bte(this,new fn(n.a,n.b)),wte(this,p8(e))}function Id(){Id=N,Rl=new iz(Y2,0),Lg=new iz(Z2,1)}function xf(){xf=N,M0=new ez(Z2,0),I1=new ez(Y2,1)}function Od(){rie.call(this,new s2(sb(12))),Bz(!0),this.a=2}function e$(n,e,t){Je(),cd.call(this,n),this.b=e,this.a=t}function QW(n,e,t){ms(),uj.call(this,e),this.a=n,this.b=t}function tMn(n){kE.call(this),eV(this),this.a=n,this.c=!0}function iMn(n){var e;e=n.c.d.b,n.b=e,n.a=n.c.d,e.a=n.c.d.b=n}function oC(n){var e;ebe(n.a),byn(n.a),e=new tj(n.a),TQ(e)}function V1e(n,e){aBn(n,!0),Zc(n.e.wf(),new $U(n,!0,e))}function fC(n,e){return LAn(e),Y0e(n,F(be,Le,25,e,15,1),e)}function Q1e(n,e){return C2(),n==Pt(hh(e))||n==Pt(ml(e))}function vc(n,e){return e==null?Vr(Sr(n.f,null)):n5(n.g,e)}function J1e(n){return n.b==0?null:(ne(n.b!=0),Ts(n,n.a.a))}function Gt(n){return Math.max(Math.min(n,nt),-2147483648)|0}function Y1e(n,e){var t=lR[n.charCodeAt(0)];return t??n}function hC(n,e){return tC(n,"set1"),tC(e,"set2"),new Z8n(n,e)}function Z1e(n,e){var t;return t=W0e(n.f,e),st(vE(t),n.f.d)}function R5(n,e){var t,i;return t=e,i=new dI,n_n(n,t,i),i.d}function t$(n,e,t,i){var r;r=new Gjn,e.a[t.g]=r,m2(n.b,i,r)}function JW(n,e,t){var i;i=n.Yg(e),i>=0?n.sh(i,t):_Y(n,e,t)}function Dw(n,e,t){dC(),n&&it(dH,n,e),n&&it($y,n,t)}function rMn(n,e,t){this.i=new X,this.b=n,this.g=e,this.a=t}function lC(n,e,t){this.c=new X,this.e=n,this.f=e,this.b=t}function YW(n,e,t){this.a=new X,this.e=n,this.f=e,this.c=t}function cMn(n,e){oE(this),this.f=e,this.g=n,eC(this),this._d()}function A8(n,e){var t;t=n.q.getHours(),n.q.setDate(e),S6(n,t)}function uMn(n,e){var t;for(pe(e),t=n.a;t;t=t.c)e.Od(t.g,t.i)}function sMn(n){var e;return e=new kj(sb(n.length)),qV(e,n),e}function nle(n){function e(){}return e.prototype=n||{},new e}function ele(n,e){return LOn(n,e)?(FIn(n),!0):!1}function Dh(n,e){if(e==null)throw T(new Nv);return Y2e(n,e)}function tle(n){if(n.qe())return null;var e=n.n;return RA[e]}function S8(n){return n.Db>>16!=3?null:u(n.Cb,33)}function ef(n){return n.Db>>16!=9?null:u(n.Cb,33)}function oMn(n){return n.Db>>16!=6?null:u(n.Cb,79)}function fMn(n){return n.Db>>16!=7?null:u(n.Cb,235)}function hMn(n){return n.Db>>16!=7?null:u(n.Cb,160)}function Pt(n){return n.Db>>16!=11?null:u(n.Cb,33)}function lMn(n,e){var t;return t=n.Yg(e),t>=0?n.lh(t):Ox(n,e)}function aMn(n,e){var t;return t=new iW(e),dxn(t,n),new du(t)}function ZW(n){var e;return e=n.d,e=n.si(n.f),me(n,e),e.Ob()}function dMn(n,e){return n.b+=e.b,n.c+=e.c,n.d+=e.d,n.a+=e.a,n}function i$(n,e){return y.Math.abs(n)0}function bMn(){this.a=new Sh,this.e=new hi,this.g=0,this.i=0}function wMn(n){this.a=n,this.b=F(lJn,q,1944,n.e.length,0,2)}function r$(n,e,t){var i;i=tDn(n,e,t),n.b=new tT(i.c.length)}function tf(){tf=N,Ja=new nz(hN,0),yf=new nz("UP",1)}function aC(){aC=N,kK=new rz(PHn,0),Ton=new rz("FAN",1)}function dC(){dC=N,dH=new we,$y=new we,Ere(Azn,new z2n)}function rle(n){if(n.p!=0)throw T(new fu);return b5(n.f,0)}function cle(n){if(n.p!=0)throw T(new fu);return b5(n.k,0)}function gMn(n){return n.Db>>16!=3?null:u(n.Cb,147)}function y3(n){return n.Db>>16!=6?null:u(n.Cb,235)}function eb(n){return n.Db>>16!=17?null:u(n.Cb,26)}function pMn(n,e){var t=n.a=n.a||[];return t[e]||(t[e]=n.le(e))}function ule(n,e){var t;return t=n.a.get(e),t??new Array}function sle(n,e){var t;t=n.q.getHours(),n.q.setMonth(e),S6(n,t)}function yr(n,e,t){return e==null?_c(n.f,null,t):Gd(n.g,e,t)}function _5(n,e,t,i,r,c){return new Lh(n.e,e,n.aj(),t,i,r,c)}function P8(n,e,t){return n.a=Zu(n.a,0,e)+(""+t)+r8(n.a,e),n}function ole(n,e,t){return W(n.a,(QE(),ex(e,t),new bd(e,t))),n}function nX(n){return _z(n.c),n.e=n.a=n.c,n.c=n.c.c,++n.d,n.a.f}function vMn(n){return _z(n.e),n.c=n.a=n.e,n.e=n.e.e,--n.d,n.a.f}function Ci(n,e){n.d&&Jc(n.d.e,n),n.d=e,n.d&&W(n.d.e,n)}function Hi(n,e){n.c&&Jc(n.c.g,n),n.c=e,n.c&&W(n.c.g,n)}function jr(n,e){n.c&&Jc(n.c.a,n),n.c=e,n.c&&W(n.c.a,n)}function Hr(n,e){n.i&&Jc(n.i.j,n),n.i=e,n.i&&W(n.i.j,n)}function mMn(n,e,t){this.a=e,this.c=n,this.b=(pe(t),new du(t))}function kMn(n,e,t){this.a=e,this.c=n,this.b=(pe(t),new du(t))}function yMn(n,e){this.a=n,this.c=Qr(this.a),this.b=new uC(e)}function fle(n){var e;return Ta(n),e=new hi,gt(n,new Vvn(e))}function tb(n,e){if(n<0||n>e)throw T(new mr(cnn+n+unn+e))}function eX(n,e){return lCn(n.a,e)?TW(n,u(e,22).g,null):null}function hle(n){return yF(),qn(),u(n.a,81).d.e!=0}function jMn(){jMn=N,azn=Fe((aj(),A(M(lzn,1),z,538,0,[fR])))}function EMn(){EMn=N,YQn=Eu(new li,(Qi(),Or),(rr(),Kk))}function tX(){tX=N,ZQn=Eu(new li,(Qi(),Or),(rr(),Kk))}function CMn(){CMn=N,eJn=Eu(new li,(Qi(),Or),(rr(),Kk))}function TMn(){TMn=N,gJn=Ze(new li,(Qi(),Or),(rr(),km))}function ns(){ns=N,mJn=Ze(new li,(Qi(),Or),(rr(),km))}function MMn(){MMn=N,kJn=Ze(new li,(Qi(),Or),(rr(),km))}function c$(){c$=N,TJn=Ze(new li,(Qi(),Or),(rr(),km))}function AMn(){AMn=N,lYn=Eu(new li,(c4(),Gm),(k6(),lK))}function aa(n,e,t,i){this.c=n,this.d=i,s$(this,e),o$(this,t)}function M2(n){this.c=new Tt,this.b=n.b,this.d=n.c,this.a=n.a}function u$(n){this.a=y.Math.cos(n),this.b=y.Math.sin(n)}function s$(n,e){n.a&&Jc(n.a.k,n),n.a=e,n.a&&W(n.a.k,n)}function o$(n,e){n.b&&Jc(n.b.f,n),n.b=e,n.b&&W(n.b.f,n)}function SMn(n,e){mhe(n,n.b,n.c),u(n.b.b,65),e&&u(e.b,65).b}function lle(n,e){vQ(n,e),I(n.Cb,88)&&yb(Ou(u(n.Cb,88)),2)}function f$(n,e){I(n.Cb,88)&&yb(Ou(u(n.Cb,88)),4),Ic(n,e)}function bC(n,e){I(n.Cb,179)&&(u(n.Cb,179).tb=null),Ic(n,e)}function mc(n,e){return er(),R$(e)?new IE(e,n):new i8(e,n)}function ale(n,e){var t,i;t=e.c,i=t!=null,i&&j2(n,new Z0(e.c))}function PMn(n){var e,t;return t=(Qp(),e=new ud,e),O3(t,n),t}function IMn(n){var e,t;return t=(Qp(),e=new ud,e),O3(t,n),t}function OMn(n,e){var t;return t=new Rs(n),e.c[e.c.length]=t,t}function DMn(n,e){var t;return t=u(ab(T2(n.a),e),14),t?t.gc():0}function $Mn(n){var e;return Ta(n),e=(Ow(),Ow(),Nin),qC(n,e)}function FMn(n){for(var e;;)if(e=n.Pb(),!n.Ob())return e}function iX(n,e){tie.call(this,new s2(sb(n))),rs(e,W_n),this.a=e}function uh(n,e,t){KDn(e,t,n.gc()),this.c=n,this.a=e,this.b=t-e}function xMn(n,e,t){var i;KDn(e,t,n.c.length),i=t-e,AG(n.c,e,i)}function dle(n,e){Dyn(n,ge(ui(cl(e,24),FM)),ge(ui(e,FM)))}function Ln(n,e){if(n<0||n>=e)throw T(new mr(cnn+n+unn+e))}function Te(n,e){if(n<0||n>=e)throw T(new wG(cnn+n+unn+e))}function xn(n,e){this.b=(_n(n),n),this.a=e&Ib?e:e|64|Bf}function LMn(n){dyn(this),Wmn(this.a,KV(y.Math.max(8,n))<<1)}function rf(n){return Gr(A(M(di,1),q,8,0,[n.i.n,n.n,n.a]))}function ble(){return lf(),A(M(Bu,1),z,132,0,[Win,ls,Rb])}function wle(){return _o(),A(M(_b,1),z,232,0,[Zr,Fc,nc])}function gle(){return Tu(),A(M(Qzn,1),z,461,0,[Vf,Ol,Co])}function ple(){return Yc(),A(M(Yzn,1),z,462,0,[Wo,Dl,To])}function vle(){return qd(),A(M(zrn,1),z,423,0,[yg,Grn,qR])}function mle(){return W5(),A(M(Krn,1),z,379,0,[NR,LR,BR])}function kle(){return i6(),A(M(Gsn,1),z,378,0,[J_,qsn,oP])}function yle(){return F2(),A(M(Kcn,1),z,314,0,[ap,qk,_cn])}function jle(){return VC(),A(M(qcn,1),z,337,0,[Hcn,DS,o_])}function Ele(){return ya(),A(M(aXn,1),z,450,0,[l_,cv,Tg])}function Cle(){return Kd(),A(M(YR,1),z,361,0,[g0,Fl,w0])}function Tle(){return Nh(),A(M(kXn,1),z,303,0,[zk,Ag,dp])}function Mle(){return q3(),A(M(y_,1),z,292,0,[m_,k_,Gk])}function Ale(){return ur(),A(M(zQn,1),z,452,0,[Bm,Su,xc])}function Sle(){return Rh(),A(M(Zsn,1),z,339,0,[Nl,Ysn,tK])}function Ple(){return oT(),A(M(ion,1),z,375,0,[eon,cK,ton])}function Ile(){return dT(),A(M(hon,1),z,377,0,[fK,pv,ew])}function Ole(){return Q3(),A(M(uon,1),z,336,0,[sK,con,Rm])}function Dle(){return uT(),A(M(fon,1),z,338,0,[oon,oK,son])}function $le(){return _d(),A(M(fJn,1),z,454,0,[ry,_m,aP])}function Fle(){return CT(),A(M(gYn,1),z,442,0,[CK,jK,EK])}function xle(){return f7(),A(M(Fon,1),z,380,0,[CP,Don,$on])}function Lle(){return ET(),A(M(Yon,1),z,381,0,[Jon,IK,Qon])}function Nle(){return sT(),A(M(Xon,1),z,293,0,[PK,Won,Uon])}function Ble(){return w7(),A(M(OK,1),z,437,0,[AP,SP,PP])}function Rle(){return _h(),A(M(Khn,1),z,334,0,[HP,F1,i9])}function _le(){return of(),A(M(Phn,1),z,272,0,[jv,cw,Ev])}function Kle(n,e){return o9e(n,e,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function Hle(n,e,t){var i;return i=O6(n,e,!1),i.b<=e&&i.a<=t}function NMn(n,e,t){var i;i=new Jwn,i.b=e,i.a=t,++e.b,W(n.d,i)}function qle(n,e){var t;return t=(_n(n),n).g,Yz(!!t),_n(e),t(e)}function rX(n,e){var t,i;return i=d3(n,e),t=n.a.Zc(i),new Y8n(n,t)}function Gle(n){return n.Db>>16!=6?null:u(Fx(n),235)}function zle(n){if(n.p!=2)throw T(new fu);return ge(n.f)&Ut}function Ule(n){if(n.p!=2)throw T(new fu);return ge(n.k)&Ut}function Wle(n){return n.a==(T3(),uI)&&Ste(n,C9e(n.g,n.b)),n.a}function A2(n){return n.d==(T3(),uI)&&Ite(n,pke(n.g,n.b)),n.d}function j(n){return ne(n.ai?1:0}function BMn(n,e){var t,i;return t=F$(e),i=t,u(te(n.c,i),19).a}function RMn(n,e){var t;for(t=n+"";t.length0&&n.a[--n.d]==0;);n.a[n.d++]==0&&(n.e=0)}function rAn(n){return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function rae(n){return!!n.a&&Du(n.a.a).i!=0&&!(n.b&&YF(n.b))}function cae(n){return!!n.u&&bc(n.u.a).i!=0&&!(n.n&&JF(n.n))}function cAn(n){return gD(n.e.Hd().gc()*n.c.Hd().gc(),16,new tvn(n))}function uae(n,e){return xCn(tu(n.q.getTime()),tu(e.q.getTime()))}function Lf(n){return u(af(n,F(GR,MN,17,n.c.length,0,1)),474)}function I8(n){return u(af(n,F(mh,E1,10,n.c.length,0,1)),193)}function sae(n){return ns(),!Xi(n)&&!(!Xi(n)&&n.c.i.c==n.d.i.c)}function uAn(n,e,t){var i;i=(pe(n),new du(n)),N3e(new mMn(i,e,t))}function O8(n,e,t){var i;i=(pe(n),new du(n)),B3e(new kMn(i,e,t))}function sAn(n,e){var t;return t=1-e,n.a[t]=eT(n.a[t],t),eT(n,e)}function oAn(n,e){var t;n.e=new oG,t=Cb(e),wi(t,n.c),eBn(n,t,0)}function Ti(n,e,t,i){var r;r=new XH,r.a=e,r.b=t,r.c=i,Ke(n.a,r)}function Z(n,e,t,i){var r;r=new XH,r.a=e,r.b=t,r.c=i,Ke(n.b,r)}function po(n){var e,t,i;return e=new HCn,t=Zx(e,n),UEe(e),i=t,i}function hX(){var n,e,t;return e=(t=(n=new ud,n),t),W(M1n,e),e}function pC(n){return n.j.c=F(Zn,rn,1,0,5,1),KW(n.c),Khe(n.a),n}function $w(n){return Qv(),I(n.g,10)?u(n.g,10):null}function oae(n){return Iw(n).dc()?!1:(sce(n,new Np),!0)}function fae(n){if(!("stack"in n))try{throw n}catch{}return n}function D8(n,e){if(n<0||n>=e)throw T(new mr(j6e(n,e)));return n}function fAn(n,e,t){if(n<0||et)throw T(new mr(W5e(n,e,t)))}function d$(n,e){if(ci(n.a,e),e.d)throw T(new _r(wKn));e.d=n}function b$(n,e){if(e.$modCount!=n.$modCount)throw T(new vs)}function hAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function lAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function aAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function hae(n,e){return n.a<=n.b?(e.ud(n.a++),!0):!1}function $d(n){var e;return Fr(n)?(e=n,e==-0?0:e):m0e(n)}function vC(n){var e;return fl(n),e=new fln,vw(n.a,new Wvn(e)),e}function dAn(n){var e;return fl(n),e=new oln,vw(n.a,new Uvn(e)),e}function Pi(n,e){this.a=n,$v.call(this,n),tb(e,n.gc()),this.b=e}function lX(n){this.e=n,this.b=this.e.a.entries(),this.a=new Array}function lae(n){return gD(n.e.Hd().gc()*n.c.Hd().gc(),273,new evn(n))}function mC(n){return new Pc((rs(n,AL),KC(qi(qi(5,n),n/10|0))))}function bAn(n){return u(af(n,F(FWn,UKn,11,n.c.length,0,1)),1943)}function aae(n,e,t){return t.f.c.length>0?SW(n.a,e,t):SW(n.b,e,t)}function dae(n,e,t){n.d&&Jc(n.d.e,n),n.d=e,n.d&&Q0(n.d.e,t,n)}function w$(n,e){uTe(e,n),WU(n.d),WU(u(k(n,(nn(),eP)),207))}function H5(n,e){cTe(e,n),UU(n.d),UU(u(k(n,(nn(),eP)),207))}function Fd(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=t.fe()),i}function j3(n,e){var t,i;return t=ub(n,e),i=null,t&&(i=t.ie()),i}function q5(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=t.ie()),i}function $h(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=tY(t)),i}function bae(n,e,t){var i;return i=i4(t),gM(n.g,i,e),gM(n.i,e,t),e}function wae(n,e,t){var i;i=q2e();try{return kue(n,e,t)}finally{Mae(i)}}function wAn(n){var e;e=n.Wg(),this.a=I(e,69)?u(e,69).Zh():e.Kc()}function li(){P9n.call(this),this.j.c=F(Zn,rn,1,0,5,1),this.a=-1}function aX(n,e,t,i){this.d=n,this.n=e,this.g=t,this.o=i,this.p=-1}function gAn(n,e,t,i){this.e=i,this.d=null,this.c=n,this.a=e,this.b=t}function dX(n,e,t){this.d=new r6n(this),this.e=n,this.i=e,this.f=t}function kC(){kC=N,j_=new QG(I4,0),oun=new QG("TOP_LEFT",1)}function pAn(){pAn=N,aon=aTn(Q(1),Q(4)),lon=aTn(Q(1),Q(2))}function vAn(){vAn=N,uZn=Fe((Ij(),A(M(cZn,1),z,551,0,[$K])))}function mAn(){mAn=N,rZn=Fe((Pj(),A(M(lfn,1),z,482,0,[DK])))}function kAn(){kAn=N,CZn=Fe((Jv(),A(M(Dfn,1),z,530,0,[hy])))}function yAn(){yAn=N,IUn=Fe((Aj(),A(M(krn,1),z,481,0,[SR])))}function gae(){return Hd(),A(M(EUn,1),z,406,0,[Ok,Ik,MR,AR])}function pae(){return FC(),A(M(WA,1),z,297,0,[vR,qin,Gin,zin])}function vae(){return d6(),A(M(SUn,1),z,394,0,[Lk,YA,ZA,Nk])}function mae(){return K2(),A(M(TUn,1),z,323,0,[$k,Dk,Fk,xk])}function kae(){return G3(),A(M(jWn,1),z,405,0,[b0,Hb,Kb,kg])}function yae(){return aT(),A(M(KWn,1),z,360,0,[QR,TS,MS,Hk])}function jAn(n,e,t,i){return I(t,54)?new ojn(n,e,t,i):new pW(n,e,t,i)}function jae(){return hf(),A(M(QWn,1),z,411,0,[lp,nv,ev,JR])}function Eae(n){var e;return n.j==(J(),ae)&&(e=GLn(n),au(e,Vn))}function Cae(n,e){var t;t=e.a,Hi(t,e.c.d),Ci(t,e.d.d),fb(t.a,n.n)}function EAn(n,e){return u(yd(KE(u(ct(n.k,e),15).Oc(),jg)),113)}function CAn(n,e){return u(yd(HE(u(ct(n.k,e),15).Oc(),jg)),113)}function Tae(n){return new xn(jbe(u(n.a.dd(),14).gc(),n.a.cd()),16)}function E3(n){return I(n,14)?u(n,14).dc():!n.Kc().Ob()}function S2(n){return Qv(),I(n.g,145)?u(n.g,145):null}function TAn(n){if(n.e.g!=n.b)throw T(new vs);return!!n.c&&n.d>0}function Re(n){return ne(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function bX(n,e){_n(e),St(n.a,n.c,e),n.c=n.c+1&n.a.length-1,MFn(n)}function ll(n,e){_n(e),n.b=n.b-1&n.a.length-1,St(n.a,n.b,e),MFn(n)}function MAn(n,e){var t;for(t=n.j.c.length;t0&&gc(n.g,0,e,0,n.i),e}function IAn(n,e){$j();var t;return t=u(te(eI,n),55),!t||t.wj(e)}function Bae(n){if(n.p!=1)throw T(new fu);return ge(n.f)<<24>>24}function Rae(n){if(n.p!=1)throw T(new fu);return ge(n.k)<<24>>24}function _ae(n){if(n.p!=7)throw T(new fu);return ge(n.k)<<16>>16}function Kae(n){if(n.p!=7)throw T(new fu);return ge(n.f)<<16>>16}function Fh(n){var e;for(e=0;n.Ob();)n.Pb(),e=qi(e,1);return KC(e)}function OAn(n,e){var t;return t=new R0,n.xd(t),t.a+="..",e.yd(t),t.a}function Hae(n,e,t){var i;i=u(te(n.g,t),57),W(n.a.c,new Si(e,i))}function qae(n,e,t){return TD(Y(Vr(Sr(n.f,e))),Y(Vr(Sr(n.f,t))))}function yC(n,e,t){return vM(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function Gae(n,e,t){return m4(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function zae(n,e,t){return b9e(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function pX(n,e){return n==(Qn(),ii)&&e==ii?4:n==ii||e==ii?8:32}function DAn(n,e){return B(e)===B(n)?"(this Map)":e==null?ru:Nr(e)}function Uae(n,e){return u(e==null?Vr(Sr(n.f,null)):n5(n.g,e),281)}function $An(n,e,t){var i;return i=i4(t),it(n.b,i,e),it(n.c,e,t),e}function FAn(n,e){var t;for(t=e;t;)U0(n,t.i,t.j),t=Pt(t);return n}function vX(n,e){var t;return t=C8(f3(new x$(n,e))),DE(new x$(n,e)),t}function sh(n,e){er();var t;return t=u(n,66).Mj(),M5e(t,e),t.Ok(e)}function Wae(n,e,t,i,r){var c;c=m9e(r,t,i),W(e,p6e(r,c)),o5e(n,r,e)}function xAn(n,e,t){n.i=0,n.e=0,e!=t&&(uDn(n,e,t),cDn(n,e,t))}function mX(n,e){var t;t=n.q.getHours(),n.q.setFullYear(e+Tl),S6(n,t)}function Xae(n,e,t){if(t){var i=t.ee();n.a[e]=i(t)}else delete n.a[e]}function g$(n,e,t){if(t){var i=t.ee();t=i(t)}else t=void 0;n.a[e]=t}function LAn(n){if(n<0)throw T(new K9n("Negative array size: "+n))}function bc(n){return n.n||(Ou(n),n.n=new wCn(n,ar,n),Ar(n)),n.n}function G5(n){return ne(n.a=0&&n.a[t]===e[t];t--);return t<0}function KAn(n,e){V3();var t;return t=n.j.g-e.j.g,t!=0?t:0}function HAn(n,e){return _n(e),n.a!=null?$fe(e.Kb(n.a)):UA}function jC(n){var e;return n?new iW(n):(e=new Sh,nF(e,n),e)}function ts(n,e){var t;return e.b.Kb(FPn(n,e.c.Ee(),(t=new Jvn(e),t)))}function EC(n){_J(),Dyn(this,ge(ui(cl(n,24),FM)),ge(ui(n,FM)))}function qAn(){qAn=N,Gzn=Fe(($T(),A(M(Jin,1),z,428,0,[yR,Qin])))}function GAn(){GAn=N,zzn=Fe((RC(),A(M(Zin,1),z,427,0,[Yin,jR])))}function zAn(){zAn=N,WUn=Fe((_C(),A(M(Arn,1),z,424,0,[$R,tS])))}function UAn(){UAn=N,BWn=Fe((B3(),A(M(NWn,1),z,511,0,[_k,UR])))}function WAn(){WAn=N,lXn=Fe((V8(),A(M(Wcn,1),z,419,0,[$S,Ucn])))}function XAn(){XAn=N,wXn=Fe((K8(),A(M(Qcn,1),z,479,0,[Vcn,xS])))}function VAn(){VAn=N,XQn=Fe((x8(),A(M(ron,1),z,376,0,[uK,iy])))}function QAn(){QAn=N,GQn=Fe((z8(),A(M(non,1),z,421,0,[iK,rK])))}function JAn(){JAn=N,sXn=Fe((OC(),A(M(Rcn,1),z,422,0,[Bcn,s_])))}function YAn(){YAn=N,jXn=Fe((kC(),A(M(fun,1),z,420,0,[j_,oun])))}function ZAn(){ZAn=N,RJn=Fe((No(),A(M(BJn,1),z,520,0,[tw,Bl])))}function nSn(){nSn=N,wJn=Fe((z5(),A(M(bJn,1),z,523,0,[Hm,Km])))}function eSn(){eSn=N,jJn=Fe((xf(),A(M(yJn,1),z,516,0,[M0,I1])))}function tSn(){tSn=N,CJn=Fe((tf(),A(M(EJn,1),z,515,0,[Ja,yf])))}function iSn(){iSn=N,UJn=Fe((Id(),A(M(zJn,1),z,455,0,[Rl,Lg])))}function rSn(){rSn=N,hYn=Fe((gC(),A(M(Son,1),z,425,0,[yK,Aon])))}function cSn(){cSn=N,wYn=Fe((iT(),A(M(Pon,1),z,495,0,[EP,mv])))}function uSn(){uSn=N,fYn=Fe((aC(),A(M(Mon,1),z,480,0,[kK,Ton])))}function sSn(){sSn=N,vYn=Fe(($C(),A(M(Oon,1),z,426,0,[Ion,TK])))}function oSn(){oSn=N,TZn=Fe((c7(),A(M(Ffn,1),z,429,0,[DP,$fn])))}function fSn(){fSn=N,sZn=Fe((L8(),A(M(afn,1),z,430,0,[FK,IP])))}function z5(){z5=N,Hm=new ZG("UPPER",0),Km=new ZG("LOWER",1)}function Yae(n,e){var t;t=new r2,la(t,"x",e.a),la(t,"y",e.b),j2(n,t)}function Zae(n,e){var t;t=new r2,la(t,"x",e.a),la(t,"y",e.b),j2(n,t)}function nde(n,e){var t,i;i=!1;do t=JOn(n,e),i=i|t;while(t);return i}function jX(n,e){var t,i;for(t=e,i=0;t>0;)i+=n.a[t],t-=t&-t;return i}function hSn(n,e){var t;for(t=e;t;)U0(n,-t.i,-t.j),t=Pt(t);return n}function $i(n,e){var t,i;for(_n(e),i=n.Kc();i.Ob();)t=i.Pb(),e.td(t)}function lSn(n,e){var t;return t=e.cd(),new bd(t,n.e.pc(t,u(e.dd(),14)))}function Kt(n,e,t,i){var r;r=new aI,r.c=e,r.b=t,r.a=i,i.b=t.a=r,++n.b}function Es(n,e,t){var i;return i=(Ln(e,n.c.length),n.c[e]),n.c[e]=t,i}function ede(n,e,t){return u(e==null?_c(n.f,null,t):Gd(n.g,e,t),281)}function k$(n){return n.c&&n.d?cX(n.c)+"->"+cX(n.d):"e_"+md(n)}function C3(n,e){return(Ta(n),Wv(new $n(n,new UX(e,n.a)))).sd(V4)}function tde(){return Qi(),A(M(Hrn,1),z,356,0,[Qf,$l,Hc,Cc,Or])}function ide(){return J(),A(M(Zi,1),hc,61,0,[Xr,Kn,Vn,ae,Gn])}function rde(n){return gj(),function(){return wae(n,this,arguments)}}function cde(){return Date.now?Date.now():new Date().getTime()}function Xi(n){return!n.c||!n.d?!1:!!n.c.i&&n.c.i==n.d.i}function aSn(n){if(!n.c.Sb())throw T(new ic);return n.a=!0,n.c.Ub()}function $8(n){n.i=0,z9(n.b,null),z9(n.c,null),n.a=null,n.e=null,++n.g}function EX(n){are.call(this,n==null?ru:Nr(n),I(n,78)?u(n,78):null)}function dSn(n){B_n(),Nmn(this),this.a=new Tt,QV(this,n),Ke(this.a,n)}function bSn(){RO(this),this.b=new fn(Ft,Ft),this.a=new fn(Qt,Qt)}function wSn(n,e){this.c=0,this.b=e,qkn.call(this,n,17493),this.a=this.c}function y$(n){CC(),!vf&&(this.c=n,this.e=!0,this.a=new X)}function CC(){CC=N,vf=!0,Fzn=!1,xzn=!1,Nzn=!1,Lzn=!1}function CX(n,e){return I(e,149)?Mn(n.c,u(e,149).c):!1}function TX(n,e){var t;return t=0,n&&(t+=n.f.a/2),e&&(t+=e.f.a/2),t}function j$(n,e){var t;return t=u(xd(n.d,e),23),t||u(xd(n.e,e),23)}function gSn(n){this.b=n,ie.call(this,n),this.a=u(Rn(this.b.a,4),126)}function pSn(n){this.b=n,w2.call(this,n),this.a=u(Rn(this.b.a,4),126)}function Ou(n){return n.t||(n.t=new Amn(n),s6(new _9n(n),0,n.t)),n.t}function ude(){return sr(),A(M(e9,1),z,103,0,[kh,Ao,Zs,Jh,Yh])}function sde(){return qw(),A(M(c9,1),z,249,0,[Hl,Cy,Hhn,r9,qhn])}function ode(){return Ho(),A(M($1,1),z,175,0,[Xn,vi,Zf,Ya,D1])}function fde(){return P7(),A(M(gfn,1),z,316,0,[dfn,xK,wfn,LK,bfn])}function hde(){return b6(),A(M(Usn,1),z,315,0,[zsn,nK,eK,Lm,Nm])}function lde(){return Pa(),A(M(zcn,1),z,335,0,[f_,Gcn,h_,Em,jm])}function ade(){return g4(),A(M(eZn,1),z,355,0,[Ng,Ep,Qm,Vm,Jm])}function dde(){return Vw(),A(M(YWn,1),z,363,0,[SS,IS,OS,PS,AS])}function bde(){return Ss(),A(M(jun,1),z,163,0,[Qk,Sm,xl,Pm,Ub])}function T3(){T3=N;var n,e;cI=(Qp(),e=new fj,e),uI=(n=new BI,n)}function vSn(n){var e;return n.c||(e=n.r,I(e,88)&&(n.c=u(e,26))),n.c}function wde(n){return n.e=3,n.d=n.Yb(),n.e!=2?(n.e=0,!0):!1}function E$(n){var e,t,i;return e=n&Nu,t=n>>22&Nu,i=n<0?Wh:0,Bc(e,t,i)}function gde(n){var e,t,i,r;for(t=n,i=0,r=t.length;i0?g$n(n,e):BNn(n,-e)}function MX(n,e){return e==0||n.e==0?n:e>0?BNn(n,e):g$n(n,-e)}function ve(n){if(Se(n))return n.c=n.a,n.a.Pb();throw T(new ic)}function kSn(n){var e,t;return e=n.c.i,t=n.d.i,e.k==(Qn(),Xt)&&t.k==Xt}function C$(n){var e;return e=new Pd,Pr(e,n),H(e,(nn(),Mr),null),e}function T$(n,e,t){var i;return i=n.Yg(e),i>=0?n._g(i,t,!0):Yd(n,e,t)}function AX(n,e,t,i){var r;for(r=0;re)throw T(new mr(fY(n,e,"index")));return n}function M$(n,e,t,i){var r;return r=F(be,Le,25,e,15,1),Pve(r,n,e,t,i),r}function vde(n,e){var t;t=n.q.getHours()+(e/60|0),n.q.setMinutes(e),S6(n,t)}function mde(n,e){return y.Math.min(al(e.a,n.d.d.c),al(e.b,n.d.d.c))}function O2(n,e){return ki(e)?e==null?MY(n.f,null):$On(n.g,e):MY(n.f,e)}function sf(n){this.c=n,this.a=new E(this.c.a),this.b=new E(this.c.b)}function TC(){this.e=new X,this.c=new X,this.d=new X,this.b=new X}function TSn(){this.g=new zq,this.b=new zq,this.a=new X,this.k=new X}function MSn(n,e,t){this.a=n,this.c=e,this.d=t,W(e.e,this),W(t.b,this)}function ASn(n,e){Hkn.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function SSn(n,e){qkn.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function FX(n,e){FO.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function MC(n,e,t){this.a=n,this.b=e,this.c=t,W(n.t,this),W(e.i,this)}function AC(){this.b=new Tt,this.a=new Tt,this.b=new Tt,this.a=new Tt}function SC(){SC=N,Ym=new kt("org.eclipse.elk.labels.labelManager")}function PSn(){PSn=N,$cn=new ri("separateLayerConnections",(aT(),QR))}function No(){No=N,tw=new tz("REGULAR",0),Bl=new tz("CRITICAL",1)}function x8(){x8=N,uK=new YG("STACKED",0),iy=new YG("SEQUENCED",1)}function L8(){L8=N,FK=new oz("FIXED",0),IP=new oz("CENTER_NODE",1)}function kde(n,e){var t;return t=CEe(n,e),n.b=new tT(t.c.length),Lje(n,t)}function yde(n,e,t){var i;return++n.e,--n.f,i=u(n.d[e].$c(t),133),i.dd()}function ISn(n){var e;return n.a||(e=n.r,I(e,148)&&(n.a=u(e,148))),n.a}function xX(n){if(n.a){if(n.e)return xX(n.e)}else return n;return null}function jde(n,e){return n.pe.p?-1:0}function PC(n,e){return _n(e),n.c=0,"Initial capacity must not be negative")}function $Sn(){$Sn=N,Vzn=Fe((_o(),A(M(_b,1),z,232,0,[Zr,Fc,nc])))}function FSn(){FSn=N,Jzn=Fe((Tu(),A(M(Qzn,1),z,461,0,[Vf,Ol,Co])))}function xSn(){xSn=N,Zzn=Fe((Yc(),A(M(Yzn,1),z,462,0,[Wo,Dl,To])))}function LSn(){LSn=N,Bzn=Fe((lf(),A(M(Bu,1),z,132,0,[Win,ls,Rb])))}function NSn(){NSn=N,bWn=Fe((W5(),A(M(Krn,1),z,379,0,[NR,LR,BR])))}function BSn(){BSn=N,PWn=Fe((qd(),A(M(zrn,1),z,423,0,[yg,Grn,qR])))}function RSn(){RSn=N,oXn=Fe((F2(),A(M(Kcn,1),z,314,0,[ap,qk,_cn])))}function _Sn(){_Sn=N,fXn=Fe((VC(),A(M(qcn,1),z,337,0,[Hcn,DS,o_])))}function KSn(){KSn=N,dXn=Fe((ya(),A(M(aXn,1),z,450,0,[l_,cv,Tg])))}function HSn(){HSn=N,rXn=Fe((Kd(),A(M(YR,1),z,361,0,[g0,Fl,w0])))}function qSn(){qSn=N,yXn=Fe((Nh(),A(M(kXn,1),z,303,0,[zk,Ag,dp])))}function GSn(){GSn=N,mXn=Fe((q3(),A(M(y_,1),z,292,0,[m_,k_,Gk])))}function zSn(){zSn=N,RQn=Fe((i6(),A(M(Gsn,1),z,378,0,[J_,qsn,oP])))}function USn(){USn=N,WQn=Fe((oT(),A(M(ion,1),z,375,0,[eon,cK,ton])))}function WSn(){WSn=N,qQn=Fe((Rh(),A(M(Zsn,1),z,339,0,[Nl,Ysn,tK])))}function XSn(){XSn=N,UQn=Fe((ur(),A(M(zQn,1),z,452,0,[Bm,Su,xc])))}function VSn(){VSn=N,JQn=Fe((dT(),A(M(hon,1),z,377,0,[fK,pv,ew])))}function QSn(){QSn=N,VQn=Fe((Q3(),A(M(uon,1),z,336,0,[sK,con,Rm])))}function JSn(){JSn=N,QQn=Fe((uT(),A(M(fon,1),z,338,0,[oon,oK,son])))}function YSn(){YSn=N,hJn=Fe((_d(),A(M(fJn,1),z,454,0,[ry,_m,aP])))}function ZSn(){ZSn=N,pYn=Fe((CT(),A(M(gYn,1),z,442,0,[CK,jK,EK])))}function nPn(){nPn=N,mYn=Fe((f7(),A(M(Fon,1),z,380,0,[CP,Don,$on])))}function ePn(){ePn=N,LYn=Fe((ET(),A(M(Yon,1),z,381,0,[Jon,IK,Qon])))}function tPn(){tPn=N,xYn=Fe((sT(),A(M(Xon,1),z,293,0,[PK,Won,Uon])))}function iPn(){iPn=N,iZn=Fe((w7(),A(M(OK,1),z,437,0,[AP,SP,PP])))}function rPn(){rPn=N,une=Fe((_h(),A(M(Khn,1),z,334,0,[HP,F1,i9])))}function cPn(){cPn=N,tne=Fe((of(),A(M(Phn,1),z,272,0,[jv,cw,Ev])))}function Pde(){return Mi(),A(M(Ghn,1),z,98,0,[ql,Ef,Tv,td,Eh,Ac])}function wa(n,e){return!n.o&&(n.o=new Xu((Dc(),Ul),S0,n,0)),NF(n.o,e)}function Ide(n){return!n.g&&(n.g=new Qy),!n.g.d&&(n.g.d=new Cmn(n)),n.g.d}function Ode(n){return!n.g&&(n.g=new Qy),!n.g.a&&(n.g.a=new Tmn(n)),n.g.a}function Dde(n){return!n.g&&(n.g=new Qy),!n.g.b&&(n.g.b=new Emn(n)),n.g.b}function N8(n){return!n.g&&(n.g=new Qy),!n.g.c&&(n.g.c=new Mmn(n)),n.g.c}function $de(n,e,t){var i,r;for(r=new H3(e,n),i=0;it||e=0?n._g(t,!0,!0):Yd(n,e,!0)}function Qde(n,e){return ni(K(Y(k(n,(G(),k0)))),K(Y(k(e,k0))))}function aPn(){aPn=N,aYn=Xd(Xd(Dj(new li,(c4(),qm)),(k6(),pP)),aK)}function Jde(n,e,t){var i;return i=tDn(n,e,t),n.b=new tT(i.c.length),JY(n,i)}function Yde(n){if(n.b<=0)throw T(new ic);return--n.b,n.a-=n.c.c,Q(n.a)}function Zde(n){var e;if(!n.a)throw T(new gTn);return e=n.a,n.a=Pt(n.a),e}function n0e(n){for(;!n.a;)if(!nEn(n.c,new Xvn(n)))return!1;return!0}function $2(n){var e;return pe(n),I(n,198)?(e=u(n,198),e):new dvn(n)}function e0e(n){DC(),u(n.We((Xe(),rw)),174).Fc((Mu(),Ty)),n.Ye(eH,null)}function DC(){DC=N,SZn=new n2n,IZn=new e2n,PZn=Rwe((Xe(),eH),SZn,_l,IZn)}function $C(){$C=N,Ion=new sz("LEAF_NUMBER",0),TK=new sz("NODE_SIZE",1)}function t0e(n,e,t){n.a=e,n.c=t,n.b.a.$b(),_s(n.d),n.e.a.c=F(Zn,rn,1,0,5,1)}function $$(n){n.a=F(be,Le,25,n.b+1,15,1),n.c=F(be,Le,25,n.b,15,1),n.d=0}function i0e(n,e){n.a.ue(e.d,n.b)>0&&(W(n.c,new QU(e.c,e.d,n.d)),n.b=e.d)}function zX(n,e){if(n.g==null||e>=n.i)throw T(new xO(e,n.i));return n.g[e]}function dPn(n,e,t){if(W3(n,t),t!=null&&!n.wj(t))throw T(new xI);return t}function bPn(n){var e;if(n.Ek())for(e=n.i-1;e>=0;--e)D(n,e);return gX(n)}function r0e(n){var e,t;if(!n.b)return null;for(t=n.b;e=t.a[0];)t=e;return t}function c0e(n,e){var t,i;return LAn(e),t=(i=n.slice(0,e),WX(i,n)),t.length=e,t}function S3(n,e,t,i){var r;i=(Ow(),i||Lin),r=n.slice(e,t),hY(r,n,e,t,-e,i)}function Cs(n,e,t,i,r){return e<0?Yd(n,t,i):u(t,66).Nj().Pj(n,n.yh(),e,i,r)}function u0e(n){return I(n,172)?""+u(n,172).a:n==null?null:Nr(n)}function s0e(n){return I(n,172)?""+u(n,172).a:n==null?null:Nr(n)}function wPn(n,e){if(e.a)throw T(new _r(wKn));ci(n.a,e),e.a=n,!n.j&&(n.j=e)}function UX(n,e){FO.call(this,e.rd(),e.qd()&-16449),_n(n),this.a=n,this.c=e}function gPn(n,e){var t,i;return i=e/n.c.Hd().gc()|0,t=e%n.c.Hd().gc(),D2(n,i,t)}function Tu(){Tu=N,Vf=new oO(Y2,0),Ol=new oO(I4,1),Co=new oO(Z2,2)}function FC(){FC=N,vR=new Lj("All",0),qin=new lyn,Gin=new Eyn,zin=new ayn}function pPn(){pPn=N,Dzn=Fe((FC(),A(M(WA,1),z,297,0,[vR,qin,Gin,zin])))}function vPn(){vPn=N,EWn=Fe((G3(),A(M(jWn,1),z,405,0,[b0,Hb,Kb,kg])))}function mPn(){mPn=N,CUn=Fe((Hd(),A(M(EUn,1),z,406,0,[Ok,Ik,MR,AR])))}function kPn(){kPn=N,MUn=Fe((K2(),A(M(TUn,1),z,323,0,[$k,Dk,Fk,xk])))}function yPn(){yPn=N,PUn=Fe((d6(),A(M(SUn,1),z,394,0,[Lk,YA,ZA,Nk])))}function jPn(){jPn=N,WJn=Fe((c4(),A(M(won,1),z,393,0,[gP,qm,uy,Gm])))}function EPn(){EPn=N,HWn=Fe((aT(),A(M(KWn,1),z,360,0,[QR,TS,MS,Hk])))}function CPn(){CPn=N,FYn=Fe((qT(),A(M(zon,1),z,340,0,[SK,qon,Gon,Hon])))}function TPn(){TPn=N,JWn=Fe((hf(),A(M(QWn,1),z,411,0,[lp,nv,ev,JR])))}function MPn(){MPn=N,_Qn=Fe((wb(),A(M(Z_,1),z,197,0,[fP,Y_,xg,Fg])))}function APn(){APn=N,Ene=Fe((Vu(),A(M(jne,1),z,396,0,[gs,Yhn,Jhn,Zhn])))}function SPn(){SPn=N,one=Fe((us(),A(M(sne,1),z,285,0,[Ey,yh,Kl,jy])))}function PPn(){PPn=N,ine=Fe((Hh(),A(M(cH,1),z,218,0,[rH,yy,Cv,Sp])))}function IPn(){IPn=N,kne=Fe((AT(),A(M(Qhn,1),z,311,0,[oH,Whn,Vhn,Xhn])))}function OPn(){OPn=N,vne=Fe((Qu(),A(M(o9,1),z,374,0,[Ay,id,My,uw])))}function DPn(){DPn=N,mM(),F1n=Ft,Tee=Qt,x1n=new S9(Ft),Mee=new S9(Qt)}function K8(){K8=N,Vcn=new VG(Xh,0),xS=new VG("IMPROVE_STRAIGHTNESS",1)}function o0e(n,e){return h3(),W(n,new Si(e,Q(e.e.c.length+e.g.c.length)))}function f0e(n,e){return h3(),W(n,new Si(e,Q(e.e.c.length+e.g.c.length)))}function WX(n,e){return U8(e)!=10&&A($u(e),e.hm,e.__elementTypeId$,U8(e),n),n}function Jc(n,e){var t;return t=xr(n,e,0),t==-1?!1:(h1(n,t),!0)}function $Pn(n,e){var t;return t=u(O2(n.e,e),387),t?(ZU(t),t.e):null}function P3(n){var e;return Fr(n)&&(e=0-n,!isNaN(e))?e:bl(z3(n))}function xr(n,e,t){for(;t=0?BT(n,t,!0,!0):Yd(n,e,!0)}function YX(n,e){Qv();var t,i;return t=S2(n),i=S2(e),!!t&&!!i&&!V$n(t.k,i.k)}function a0e(n,e){nu(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function d0e(n,e){eu(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function b0e(n,e){Rd(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function w0e(n,e){Bd(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function BPn(n){(this.q?this.q:(Pn(),Pn(),vh)).Ac(n.q?n.q:(Pn(),Pn(),vh))}function g0e(n,e){return I(e,99)&&u(e,18).Bb&Yi?new LO(e,n):new H3(e,n)}function p0e(n,e){return I(e,99)&&u(e,18).Bb&Yi?new LO(e,n):new H3(e,n)}function RPn(n,e){vrn=new Wy,AUn=e,gm=n,u(gm.b,65),BX(gm,vrn,null),DRn(gm)}function B$(n,e,t){var i;return i=n.g[e],k5(n,e,n.oi(e,t)),n.gi(e,t,i),n.ci(),i}function BC(n,e){var t;return t=n.Xc(e),t>=0?(n.$c(t),!0):!1}function R$(n){var e;return n.d!=n.r&&(e=qs(n),n.e=!!e&&e.Cj()==kGn,n.d=e),n.e}function _$(n,e){var t;for(pe(n),pe(e),t=!1;e.Ob();)t=t|n.Fc(e.Pb());return t}function xd(n,e){var t;return t=u(te(n.e,e),387),t?(Oyn(n,t),t.e):null}function _Pn(n){var e,t;return e=n/60|0,t=n%60,t==0?""+e:""+e+":"+(""+t)}function qr(n,e){var t,i;return Ta(n),i=new FX(e,n.a),t=new iEn(i),new $n(n,t)}function ub(n,e){var t=n.a[e],i=(cF(),dR)[typeof t];return i?i(t):tQ(typeof t)}function v0e(n){switch(n.g){case 0:return nt;case 1:return-1;default:return 0}}function m0e(n){return mJ(n,(I3(),pin))<0?-xce(z3(n)):n.l+n.m*J2+n.h*$a}function U8(n){return n.__elementTypeCategory$==null?10:n.__elementTypeCategory$}function K$(n){var e;return e=n.b.c.length==0?null:un(n.b,0),e!=null&&J$(n,0),e}function KPn(n,e){for(;e[0]=0;)++e[0]}function W8(n,e){this.e=e,this.a=FOn(n),this.a<54?this.f=$d(n):this.c=m7(n)}function HPn(n,e,t,i){Je(),cd.call(this,26),this.c=n,this.a=e,this.d=t,this.b=i}function oh(n,e,t){var i,r;for(i=10,r=0;rn.a[i]&&(i=t);return i}function T0e(n,e){var t;return t=zd(n.e.c,e.e.c),t==0?ni(n.e.d,e.e.d):t}function Fw(n,e){return e.e==0||n.e==0?W4:(a4(),Hx(n,e))}function M0e(n,e){if(!n)throw T(new Hn(P8e("Enum constant undefined: %s",e)))}function X5(){X5=N,MWn=new San,AWn=new Man,CWn=new $an,TWn=new Fan,SWn=new xan}function RC(){RC=N,Yin=new qG("BY_SIZE",0),jR=new qG("BY_SIZE_AND_SHAPE",1)}function _C(){_C=N,$R=new GG("EADES",0),tS=new GG("FRUCHTERMAN_REINGOLD",1)}function V8(){V8=N,$S=new XG("READING_DIRECTION",0),Ucn=new XG("ROTATION",1)}function GPn(){GPn=N,hXn=Fe((Pa(),A(M(zcn,1),z,335,0,[f_,Gcn,h_,Em,jm])))}function zPn(){zPn=N,KQn=Fe((b6(),A(M(Usn,1),z,315,0,[zsn,nK,eK,Lm,Nm])))}function UPn(){UPn=N,ZWn=Fe((Vw(),A(M(YWn,1),z,363,0,[SS,IS,OS,PS,AS])))}function WPn(){WPn=N,EXn=Fe((Ss(),A(M(jun,1),z,163,0,[Qk,Sm,xl,Pm,Ub])))}function XPn(){XPn=N,oZn=Fe((P7(),A(M(gfn,1),z,316,0,[dfn,xK,wfn,LK,bfn])))}function VPn(){VPn=N,OZn=Fe((Ho(),A(M($1,1),z,175,0,[Xn,vi,Zf,Ya,D1])))}function QPn(){QPn=N,tZn=Fe((g4(),A(M(eZn,1),z,355,0,[Ng,Ep,Qm,Vm,Jm])))}function JPn(){JPn=N,vWn=Fe((Qi(),A(M(Hrn,1),z,356,0,[Qf,$l,Hc,Cc,Or])))}function YPn(){YPn=N,ene=Fe((sr(),A(M(e9,1),z,103,0,[kh,Ao,Zs,Jh,Yh])))}function ZPn(){ZPn=N,hne=Fe((qw(),A(M(c9,1),z,249,0,[Hl,Cy,Hhn,r9,qhn])))}function nIn(){nIn=N,dne=Fe((J(),A(M(Zi,1),hc,61,0,[Xr,Kn,Vn,ae,Gn])))}function H$(n,e){var t;return t=u(te(n.a,e),134),t||(t=new pI,it(n.a,e,t)),t}function eIn(n){var e;return e=u(k(n,(G(),p0)),305),e?e.a==n:!1}function tIn(n){var e;return e=u(k(n,(G(),p0)),305),e?e.i==n:!1}function iIn(n,e){return _n(e),mW(n),n.d.Ob()?(e.td(n.d.Pb()),!0):!1}function KC(n){return fc(n,nt)>0?nt:fc(n,Bi)<0?Bi:ge(n)}function sb(n){return n<3?(rs(n,J_n),n+1):n=0&&e=-.01&&n.a<=wf&&(n.a=0),n.b>=-.01&&n.b<=wf&&(n.b=0),n}function cIn(n,e){return e==(sD(),sD(),Pzn)?n.toLocaleLowerCase():n.toLowerCase()}function nV(n){return(n.i&2?"interface ":n.i&1?"":"class ")+(Ph(n),n.o)}function Cr(n){var e,t;t=(e=new RI,e),me((!n.q&&(n.q=new V(co,n,11,10)),n.q),t)}function A0e(n,e){var t;return t=e>0?e-1:e,e8n(Kie(IIn(YU(new zp,t),n.n),n.j),n.k)}function S0e(n,e,t,i){var r;n.j=-1,EY(n,iY(n,e,t),(er(),r=u(e,66).Mj(),r.Ok(i)))}function uIn(n){this.g=n,this.f=new X,this.a=y.Math.min(this.g.c.c,this.g.d.c)}function sIn(n){this.b=new X,this.a=new X,this.c=new X,this.d=new X,this.e=n}function oIn(n,e){this.a=new we,this.e=new we,this.b=(i6(),oP),this.c=n,this.b=e}function fIn(n,e,t){kE.call(this),eV(this),this.a=n,this.c=t,this.b=e.d,this.f=e.e}function hIn(n){this.d=n,this.c=n.c.vc().Kc(),this.b=null,this.a=null,this.e=(aj(),fR)}function Ld(n){if(n<0)throw T(new Hn("Illegal Capacity: "+n));this.g=this.ri(n)}function P0e(n,e){if(0>n||n>e)throw T(new bG("fromIndex: 0, toIndex: "+n+tnn+e))}function I0e(n){var e;if(n.a==n.b.a)throw T(new ic);return e=n.a,n.c=e,n.a=n.a.e,e}function HC(n){var e;z0(!!n.c),e=n.c.a,Ts(n.d,n.c),n.b==n.c?n.b=e:--n.a,n.c=null}function qC(n,e){var t;return Ta(n),t=new DTn(n,n.a.rd(),n.a.qd()|4,e),new $n(n,t)}function O0e(n,e){var t,i;return t=u(ab(n.d,e),14),t?(i=e,n.e.pc(i,t)):null}function GC(n,e){var t,i;for(i=n.Kc();i.Ob();)t=u(i.Pb(),70),H(t,(G(),pp),e)}function D0e(n){var e;return e=K(Y(k(n,(nn(),S1)))),e<0&&(e=0,H(n,S1,e)),e}function $0e(n,e,t){var i;i=y.Math.max(0,n.b/2-.5),g6(t,i,1),W(e,new L7n(t,i))}function F0e(n,e,t){var i;return i=n.a.e[u(e.a,10).p]-n.a.e[u(t.a,10).p],Gt(m8(i))}function lIn(n,e,t,i,r,c){var o;o=C$(i),Hi(o,r),Ci(o,c),Tn(n.a,i,new EE(o,e,t.f))}function aIn(n,e){var t;if(t=R7(n.Tg(),e),!t)throw T(new Hn(Pl+e+MB));return t}function ob(n,e){var t;for(t=n;Pt(t);)if(t=Pt(t),t==e)return!0;return!1}function x0e(n,e){var t,i,r;for(i=e.a.cd(),t=u(e.a.dd(),14).gc(),r=0;r0&&(n.a/=e,n.b/=e),n}function is(n){var e;return n.w?n.w:(e=Gle(n),e&&!e.kh()&&(n.w=e),e)}function q0e(n){var e;return n==null?null:(e=u(n,190),Gve(e,e.length))}function D(n,e){if(n.g==null||e>=n.i)throw T(new xO(e,n.i));return n.li(e,n.g[e])}function G0e(n){var e,t;for(e=n.a.d.j,t=n.c.d.j;e!=t;)ko(n.b,e),e=yT(e);ko(n.b,e)}function z0e(n){var e;for(e=0;e=14&&e<=16))),n}function gIn(n,e,t){var i=function(){return n.apply(i,arguments)};return e.apply(i,t),i}function pIn(n,e,t){var i,r;i=e;do r=K(n.p[i.p])+t,n.p[i.p]=r,i=n.a[i.p];while(i!=e)}function O3(n,e){var t,i;i=n.a,t=Tge(n,e,null),i!=e&&!n.e&&(t=j4(n,e,t)),t&&t.Fi()}function tV(n,e){return Zo(),mo(Cl),y.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)}function iV(n,e){return Zo(),mo(Cl),y.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)}function X0e(n,e){return yl(),Wc(n.b.c.length-n.e.c.length,e.b.c.length-e.e.c.length)}function xw(n,e){return Uie(J5(n,e,ge(Ni(dh,ch(ge(Ni(e==null?0:mt(e),bh)),15)))))}function vIn(){vIn=N,$Wn=Fe((Qn(),A(M(zR,1),z,267,0,[ii,pi,Xt,Tc,Ju,mf])))}function mIn(){mIn=N,_Zn=Fe((vb(),A(M(UK,1),z,291,0,[zK,gy,wy,GK,dy,by])))}function kIn(){kIn=N,FZn=Fe((fh(),A(M(Rfn,1),z,248,0,[HK,ly,ay,xP,$P,FP])))}function yIn(){yIn=N,uXn=Fe((q2(),A(M(rv,1),z,227,0,[iv,ym,tv,qb,Cg,Eg])))}function jIn(){jIn=N,pXn=Fe((h4(),A(M(sun,1),z,275,0,[Cm,iun,uun,cun,run,tun])))}function EIn(){EIn=N,gXn=Fe((A7(),A(M(eun,1),z,274,0,[LS,Ycn,nun,Jcn,Zcn,p_])))}function CIn(){CIn=N,BQn=Fe((JT(),A(M(Hsn,1),z,313,0,[Q_,_sn,V_,Rsn,Ksn,sP])))}function TIn(){TIn=N,bXn=Fe((eM(),A(M(Xcn,1),z,276,0,[d_,a_,w_,b_,g_,FS])))}function MIn(){MIn=N,VJn=Fe((k6(),A(M(XJn,1),z,327,0,[pP,aK,bK,dK,wK,lK])))}function AIn(){AIn=N,ane=Fe((Mu(),A(M(qP,1),z,273,0,[Gl,n1,Ty,s9,u9,Pp])))}function SIn(){SIn=N,rne=Fe((ZT(),A(M(xhn,1),z,312,0,[uH,Dhn,Fhn,Ihn,$hn,Ohn])))}function V0e(){return jb(),A(M(lr,1),z,93,0,[So,Zh,Po,Oo,jh,eo,ds,Io,no])}function UC(n,e){var t;t=n.a,n.a=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,0,t,n.a))}function WC(n,e){var t;t=n.b,n.b=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,1,t,n.b))}function D3(n,e){var t;t=n.b,n.b=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,3,t,n.b))}function Bd(n,e){var t;t=n.f,n.f=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,3,t,n.f))}function Rd(n,e){var t;t=n.g,n.g=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,4,t,n.g))}function nu(n,e){var t;t=n.i,n.i=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,5,t,n.i))}function eu(n,e){var t;t=n.j,n.j=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,6,t,n.j))}function $3(n,e){var t;t=n.j,n.j=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,1,t,n.j))}function F3(n,e){var t;t=n.c,n.c=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,4,t,n.c))}function x3(n,e){var t;t=n.k,n.k=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,2,t,n.k))}function G$(n,e){var t;t=n.d,n.d=e,n.Db&4&&!(n.Db&1)&&et(n,new p$(n,2,t,n.d))}function d1(n,e){var t;t=n.s,n.s=e,n.Db&4&&!(n.Db&1)&&et(n,new p$(n,4,t,n.s))}function hb(n,e){var t;t=n.t,n.t=e,n.Db&4&&!(n.Db&1)&&et(n,new p$(n,5,t,n.t))}function L3(n,e){var t;t=n.F,n.F=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,5,t,e))}function Q8(n,e){var t;return t=u(te(($j(),eI),n),55),t?t.xj(e):F(Zn,rn,1,e,5,1)}function Bh(n,e){var t,i;return t=e in n.a,t&&(i=Dh(n,e).he(),i)?i.a:null}function Q0e(n,e){var t,i,r;return t=(i=(ad(),r=new QH,r),e&&zY(i,e),i),aV(t,n),t}function PIn(n,e,t){if(W3(n,t),!n.Bk()&&t!=null&&!n.wj(t))throw T(new xI);return t}function IIn(n,e){return n.n=e,n.n?(n.f=new X,n.e=new X):(n.f=null,n.e=null),n}function Me(n,e,t,i,r,c){var o;return o=LD(n,e),DIn(t,o),o.i=r?8:0,o.f=i,o.e=r,o.g=c,o}function rV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=n,this.a=t}function cV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=n,this.a=t}function uV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=n,this.a=t}function sV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=n,this.a=t}function oV(n,e,t,i,r){this.d=e,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=n,this.a=t}function OIn(n,e){var t,i,r,c;for(i=e,r=0,c=i.length;r=0),Q2e(n.d,n.c)<0&&(n.a=n.a-1&n.d.a.length-1,n.b=n.d.c),n.c=-1}function fV(n){return n.a<54?n.f<0?-1:n.f>0?1:0:(!n.c&&(n.c=h7(n.f)),n.c).e}function mo(n){if(!(n>=0))throw T(new Hn("tolerance ("+n+") must be >= 0"));return n}function N3(){return _K||(_K=new kBn,_w(_K,A(M(mg,1),rn,130,0,[new nq]))),_K}function ur(){ur=N,Bm=new kO(K6,0),Su=new kO("INPUT",1),xc=new kO("OUTPUT",2)}function VC(){VC=N,Hcn=new bO("ARD",0),DS=new bO("MSD",1),o_=new bO("MANUAL",2)}function _d(){_d=N,ry=new TO("BARYCENTER",0),_m=new TO(rHn,1),aP=new TO(cHn,2)}function J8(n,e){var t;if(t=n.gc(),e<0||e>t)throw T(new V0(e,t));return new AU(n,e)}function xIn(n,e){var t;return I(e,42)?n.c.Mc(e):(t=NF(n,e),IT(n,e),t)}function wr(n,e,t){return Ca(n,e),Ic(n,t),d1(n,0),hb(n,1),p1(n,!0),g1(n,!0),n}function rs(n,e){if(n<0)throw T(new Hn(e+" cannot be negative but was: "+n));return n}function LIn(n,e){var t,i;for(t=0,i=n.gc();t0?u(un(t.a,i-1),10):null}function Q5(n,e){var t;t=n.k,n.k=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,2,t,n.k))}function JC(n,e){var t;t=n.f,n.f=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,8,t,n.f))}function YC(n,e){var t;t=n.i,n.i=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,7,t,n.i))}function aV(n,e){var t;t=n.a,n.a=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,8,t,n.a))}function dV(n,e){var t;t=n.b,n.b=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,0,t,n.b))}function bV(n,e){var t;t=n.b,n.b=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,0,t,n.b))}function wV(n,e){var t;t=n.c,n.c=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,1,t,n.c))}function gV(n,e){var t;t=n.c,n.c=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,1,t,n.c))}function U$(n,e){var t;t=n.c,n.c=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,4,t,n.c))}function pV(n,e){var t;t=n.d,n.d=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,1,t,n.d))}function W$(n,e){var t;t=n.D,n.D=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,2,t,n.D))}function X$(n,e){n.r>0&&n.c0&&n.g!=0&&X$(n.i,e/n.r*n.i.d))}function cbe(n,e,t){var i;n.b=e,n.a=t,i=(n.a&512)==512?new T9n:new ZH,n.c=y7e(i,n.b,n.a)}function zIn(n,e){return zh(n.e,e)?(er(),R$(e)?new IE(e,n):new i8(e,n)):new Nkn(e,n)}function ZC(n,e){return zie(Y5(n.a,e,ge(Ni(dh,ch(ge(Ni(e==null?0:mt(e),bh)),15)))))}function ube(n,e,t){return cb(n,new Hvn(e),new mln,new qvn(t),A(M(Bu,1),z,132,0,[]))}function sbe(n){var e,t;return 0>n?new PG:(e=n+1,t=new wSn(e,n),new oU(null,t))}function obe(n,e){Pn();var t;return t=new s2(1),ki(n)?yr(t,n,e):_c(t.f,n,e),new DI(t)}function fbe(n,e){var t,i;return t=n.o+n.p,i=e.o+e.p,te?(e<<=1,e>0?e:L6):e}function V$(n){switch(Rz(n.e!=3),n.e){case 2:return!1;case 0:return!0}return wde(n)}function WIn(n,e){var t;return I(e,8)?(t=u(e,8),n.a==t.a&&n.b==t.b):!1}function Q$(n,e,t){var i,r,c;return c=e>>5,r=e&31,i=ui(J0(n.n[t][c],ge(Ih(r,1))),3),i}function lbe(n,e){var t,i;for(i=e.vc().Kc();i.Ob();)t=u(i.Pb(),42),XT(n,t.cd(),t.dd())}function abe(n,e){var t;t=new Wy,u(e.b,65),u(e.b,65),u(e.b,65),Zc(e.a,new BU(n,t,e))}function vV(n,e){var t;t=n.b,n.b=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,21,t,n.b))}function mV(n,e){var t;t=n.d,n.d=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,11,t,n.d))}function nT(n,e){var t;t=n.j,n.j=e,n.Db&4&&!(n.Db&1)&&et(n,new gi(n,1,13,t,n.j))}function XIn(n,e,t){var i,r,c;for(c=n.a.length-1,r=n.b,i=0;i>>31;i!=0&&(n[t]=i)}function jbe(n,e){Pn();var t,i;for(i=new X,t=0;t0&&(this.g=this.ri(this.i+(this.i/8|0)+1),n.Qc(this.g))}function $t(n,e){ME.call(this,ree,n,e),this.b=this,this.a=Kc(n.Tg(),On(this.e.Tg(),this.c))}function Z5(n,e){var t,i;for(_n(e),i=e.vc().Kc();i.Ob();)t=u(i.Pb(),42),n.zc(t.cd(),t.dd())}function Dbe(n,e,t){var i;for(i=t.Kc();i.Ob();)if(!yC(n,e,i.Pb()))return!1;return!0}function $be(n,e,t,i,r){var c;return t&&(c=yt(e.Tg(),n.c),r=t.gh(e,-1-(c==-1?i:c),null,r)),r}function Fbe(n,e,t,i,r){var c;return t&&(c=yt(e.Tg(),n.c),r=t.ih(e,-1-(c==-1?i:c),null,r)),r}function dOn(n){var e;if(n.b==-2){if(n.e==0)e=-1;else for(e=0;n.a[e]==0;e++);n.b=e}return n.b}function bOn(n){switch(n.g){case 2:return J(),Gn;case 4:return J(),Vn;default:return n}}function wOn(n){switch(n.g){case 1:return J(),ae;case 3:return J(),Kn;default:return n}}function xbe(n){var e,t,i;return n.j==(J(),Kn)&&(e=GLn(n),t=au(e,Vn),i=au(e,Gn),i||i&&t)}function Lbe(n){var e,t;return e=u(n.e&&n.e(),9),t=u(IW(e,e.length),9),new ks(e,t,e.length)}function Nbe(n,e){le(e,iHn,1),TQ(ire(new tj((Vv(),new GD(n,!1,!1,new BH))))),ce(e)}function Y8(n,e){return qn(),ki(n)?DX(n,Ce(e)):G0(n)?TD(n,Y(e)):q0(n)?Kfe(n,sn(e)):n.wd(e)}function TV(n,e){e.q=n,n.d=y.Math.max(n.d,e.r),n.b+=e.d+(n.a.c.length==0?0:n.c),W(n.a,e)}function R3(n,e){var t,i,r,c;return r=n.c,t=n.c+n.b,c=n.d,i=n.d+n.a,e.a>r&&e.ac&&e.b1||n.Ob())return++n.a,n.g=0,e=n.i,n.Ob(),e;throw T(new ic)}function Vbe(n){gyn();var e;return M7n(hK,n)||(e=new Zwn,e.a=n,wU(hK,n,e)),u(br(hK,n),635)}function Ks(n){var e,t,i,r;return r=n,i=0,r<0&&(r+=$a,i=Wh),t=Gt(r/J2),e=Gt(r-t*J2),Bc(e,t,i)}function Z8(n){var e,t,i;for(i=0,t=new o2(n.a);t.a>22),r=n.h+e.h+(i>>22),Bc(t&Nu,i&Nu,r&Wh)}function xOn(n,e){var t,i,r;return t=n.l-e.l,i=n.m-e.m+(t>>22),r=n.h-e.h+(i>>22),Bc(t&Nu,i&Nu,r&Wh)}function i7(n){var e;return n<128?(e=(QEn(),yin)[n],!e&&(e=yin[n]=new wq(n)),e):new wq(n)}function jt(n){var e;return I(n,78)?n:(e=n&&n.__java$exception,e||(e=new CDn(n),Kmn(e)),e)}function r7(n){if(I(n,186))return u(n,118);if(n)return null;throw T(new c2(Iqn))}function LOn(n,e){if(e==null)return!1;for(;n.a!=n.b;)if(tt(e,vT(n)))return!0;return!1}function OV(n){return n.a.Ob()?!0:n.a!=n.d?!1:(n.a=new lX(n.e.f),n.a.Ob())}function Zt(n,e){var t,i;return t=e.Pc(),i=t.length,i==0?!1:(GU(n.c,n.c.length,t),!0)}function hwe(n,e,t){var i,r;for(r=e.vc().Kc();r.Ob();)i=u(r.Pb(),42),n.yc(i.cd(),i.dd(),t);return n}function NOn(n,e){var t,i;for(i=new E(n.b);i.a=0,"Negative initial capacity"),TE(e>=0,"Non-positive load factor"),Cu(this)}function uF(n,e,t){return n>=128?!1:n<64?b5(ui(Ih(1,n),t),0):b5(ui(Ih(1,n-64),e),0)}function mwe(n,e){return!n||!e||n==e?!1:zd(n.b.c,e.b.c+e.b.b)<0&&zd(e.b.c,n.b.c+n.b.b)<0}function VOn(n){var e,t,i;return t=n.n,i=n.o,e=n.d,new ys(t.a-e.b,t.b-e.d,i.a+(e.b+e.c),i.b+(e.d+e.a))}function kwe(n){var e,t,i,r;for(t=n.a,i=0,r=t.length;ii)throw T(new V0(e,i));return n.hi()&&(t=aMn(n,t)),n.Vh(e,t)}function s7(n,e,t){return t==null?(!n.q&&(n.q=new we),O2(n.q,e)):(!n.q&&(n.q=new we),it(n.q,e,t)),n}function H(n,e,t){return t==null?(!n.q&&(n.q=new we),O2(n.q,e)):(!n.q&&(n.q=new we),it(n.q,e,t)),n}function QOn(n){var e,t;return t=new TC,Pr(t,n),H(t,(dl(),hp),n),e=new we,Cye(n,t,e),QEe(n,t,e),t}function Ewe(n){eg();var e,t,i;for(t=F(di,q,8,2,0,1),i=0,e=0;e<2;e++)i+=.5,t[e]=r3e(i,n);return t}function JOn(n,e){var t,i,r,c;for(t=!1,i=n.a[e].length,c=0;c>=1);return e}function ZOn(n){var e,t;return t=x7(n.h),t==32?(e=x7(n.m),e==32?x7(n.l)+32:e+20-10):t-12}function t6(n){var e;return e=n.a[n.b],e==null?null:(St(n.a,n.b,null),n.b=n.b+1&n.a.length-1,e)}function nDn(n){var e,t;return e=n.t-n.k[n.o.p]*n.d+n.j[n.o.p]>n.f,t=n.u+n.e[n.o.p]*n.d>n.f*n.s*n.d,e||t}function bT(n,e,t){var i,r;return i=new I$(e,t),r=new dI,n.b=zNn(n,n.b,i,r),r.b||++n.c,n.b.b=!1,r.d}function eDn(n,e,t){var i,r,c,o;for(o=c6(e,t),c=0,r=o.Kc();r.Ob();)i=u(r.Pb(),11),it(n.c,i,Q(c++))}function wl(n){var e,t;for(t=new E(n.a.b);t.at&&(t=n[e]);return t}function tDn(n,e,t){var i;return i=new X,XY(n,e,i,(J(),Vn),!0,!1),XY(n,t,i,Gn,!1,!1),i}function oF(n,e,t){var i,r,c,o;return c=null,o=e,r=Fd(o,"labels"),i=new jkn(n,t),c=(Hme(i.a,i.b,r),r),c}function Twe(n,e,t,i){var r;return r=xY(n,e,t,i),!r&&(r=Mge(n,t,i),r&&!rg(n,e,r))?null:r}function Mwe(n,e,t,i){var r;return r=LY(n,e,t,i),!r&&(r=TF(n,t,i),r&&!rg(n,e,r))?null:r}function iDn(n,e){var t;for(t=0;t1||e>=0&&n.b<3)}function o7(n){var e,t,i;for(e=new hu,i=_e(n,0);i.b!=i.d.c;)t=u(Re(i),8),s3(e,0,new kr(t));return e}function ja(n){var e,t;for(t=new E(n.a.b);t.ai?1:0}function QV(n,e){return ANn(n,e)?(Tn(n.b,u(k(e,(G(),Gb)),21),e),Ke(n.a,e),!0):!1}function Bwe(n){var e,t;e=u(k(n,(G(),Au)),10),e&&(t=e.c,Jc(t.a,e),t.a.c.length==0&&Jc(Gi(e).b,t))}function fDn(n){return vf?F($zn,lKn,572,0,0,1):u(af(n.a,F($zn,lKn,572,n.a.c.length,0,1)),842)}function Rwe(n,e,t,i){return QE(),new GI(A(M(Ha,1),OM,42,0,[(ex(n,e),new bd(n,e)),(ex(t,i),new bd(t,i))]))}function Rw(n,e,t){var i,r;return r=(i=new RI,i),wr(r,e,t),me((!n.q&&(n.q=new V(co,n,11,10)),n.q),r),r}function aF(n){var e,t,i,r;for(r=lre($ne,n),t=r.length,i=F(tn,q,2,t,6,1),e=0;e=n.b.c.length||(JV(n,2*e+1),t=2*e+2,t=0&&n[i]===e[i];i--);return i<0?0:cO(ui(n[i],fr),ui(e[i],fr))?-1:1}function _we(n,e){var t,i;for(i=_e(n,0);i.b!=i.d.c;)t=u(Re(i),214),t.e.length>0&&(e.td(t),t.i&&Fge(t))}function bF(n,e){var t,i;return i=u(Rn(n.a,4),126),t=F(bH,qB,415,e,0,1),i!=null&&gc(i,0,t,0,i.length),t}function lDn(n,e){var t;return t=new zx((n.f&256)!=0,n.i,n.a,n.d,(n.f&16)!=0,n.j,n.g,e),n.e!=null||(t.c=n),t}function Kwe(n,e){var t,i;for(i=n.Zb().Cc().Kc();i.Ob();)if(t=u(i.Pb(),14),t.Hc(e))return!0;return!1}function wF(n,e,t,i,r){var c,o;for(o=t;o<=r;o++)for(c=e;c<=i;c++)if(zw(n,c,o))return!0;return!1}function aDn(n,e,t){var i,r,c,o;for(_n(t),o=!1,c=n.Zc(e),r=t.Kc();r.Ob();)i=r.Pb(),c.Rb(i),o=!0;return o}function Hwe(n,e){var t;return n===e?!0:I(e,83)?(t=u(e,83),ZJ(Ed(n),t.vc())):!1}function dDn(n,e,t){var i,r;for(r=t.Kc();r.Ob();)if(i=u(r.Pb(),42),n.re(e,i.dd()))return!0;return!1}function bDn(n,e,t){return n.d[e.p][t.p]||(Bpe(n,e,t),n.d[e.p][t.p]=!0,n.d[t.p][e.p]=!0),n.a[e.p][t.p]}function W3(n,e){if(!n.ai()&&e==null)throw T(new Hn("The 'no null' constraint is violated"));return e}function X3(n,e){n.D==null&&n.B!=null&&(n.D=n.B,n.B=null),W$(n,e==null?null:(_n(e),e)),n.C&&n.yk(null)}function qwe(n,e){var t;return!n||n==e||!ai(e,(G(),m0))?!1:(t=u(k(e,(G(),m0)),10),t!=n)}function gF(n){switch(n.i){case 2:return!0;case 1:return!1;case-1:++n.c;default:return n.pl()}}function wDn(n){switch(n.i){case-2:return!0;case-1:return!1;case 1:--n.c;default:return n.ql()}}function gDn(n){cMn.call(this,"The given string does not match the expected format for individual spacings.",n)}function Vu(){Vu=N,gs=new Jj("ELK",0),Yhn=new Jj("JSON",1),Jhn=new Jj("DOT",2),Zhn=new Jj("SVG",3)}function f7(){f7=N,CP=new AO(Xh,0),Don=new AO("RADIAL_COMPACTION",1),$on=new AO("WEDGE_COMPACTION",2)}function lf(){lf=N,Win=new uO("CONCURRENT",0),ls=new uO("IDENTITY_FINISH",1),Rb=new uO("UNORDERED",2)}function pF(){pF=N,jrn=(Aj(),SR),yrn=new In(pnn,jrn),OUn=new kt(vnn),DUn=new kt(mnn),$Un=new kt(knn)}function V3(){V3=N,xcn=new j0n,Lcn=new E0n,zWn=new C0n,GWn=new T0n,qWn=new M0n,Fcn=(_n(qWn),new uln)}function Q3(){Q3=N,sK=new jO("CONSERVATIVE",0),con=new jO("CONSERVATIVE_SOFT",1),Rm=new jO("SLOPPY",2)}function wT(){wT=N,_hn=new vd(15),cne=new tr((Xe(),nd),_hn),t9=Mp,Lhn=HZn,Nhn=Za,Rhn=Kg,Bhn=BP}function vF(n,e,t){var i,r,c;for(i=new Tt,c=_e(t,0);c.b!=c.d.c;)r=u(Re(c),8),Ke(i,new kr(r));aDn(n,e,i)}function Gwe(n){var e,t,i;for(e=0,i=F(di,q,8,n.b,0,1),t=_e(n,0);t.b!=t.d.c;)i[e++]=u(Re(t),8);return i}function ZV(n){var e;return e=(!n.a&&(n.a=new V(e1,n,9,5)),n.a),e.i!=0?ore(u(D(e,0),678)):null}function zwe(n,e){var t;return t=qi(n,e),cO(h$(n,e),0)|Cre(h$(n,t),0)?t:qi(IM,h$(J0(t,63),1))}function Uwe(n,e){var t;t=cn((xF(),uP))!=null&&e.wg()!=null?K(Y(e.wg()))/K(Y(cn(uP))):1,it(n.b,e,t)}function Wwe(n,e){var t,i;return t=u(n.d.Bc(e),14),t?(i=n.e.hc(),i.Gc(t),n.e.d-=t.gc(),t.$b(),i):null}function nQ(n,e){var t,i;if(i=n.c[e],i!=0)for(n.c[e]=0,n.d-=i,t=e+1;t0)return a3(e-1,n.a.c.length),h1(n.a,e-1);throw T(new qmn)}function Xwe(n,e,t){if(e<0)throw T(new mr(_Hn+e));ee)throw T(new Hn(xM+n+aKn+e));if(n<0||e>t)throw T(new bG(xM+n+rnn+e+tnn+t))}function mDn(n){if(!n.a||!(n.a.i&8))throw T(new $r("Enumeration class expected for layout option "+n.f))}function lb(n){var e;++n.j,n.i==0?n.g=null:n.ihA?n-t>hA:t-n>hA}function kF(n,e){return!n||e&&!n.j||I(n,124)&&u(n,124).a.b==0?0:n.Re()}function pT(n,e){return!n||e&&!n.k||I(n,124)&&u(n,124).a.a==0?0:n.Se()}function h7(n){return jl(),n<0?n!=-1?new VQ(-1,-n):gR:n<=10?xin[Gt(n)]:new VQ(1,n)}function tQ(n){throw cF(),T(new L9n("Unexpected typeof result '"+n+"'; please report this bug to the GWT team"))}function CDn(n){H9n(),oE(this),eC(this),this.e=n,NNn(this,n),this.g=n==null?ru:Nr(n),this.a="",this.b=n,this.a=""}function iQ(){this.a=new qgn,this.f=new O6n(this),this.b=new D6n(this),this.i=new $6n(this),this.e=new F6n(this)}function TDn(){iie.call(this,new _X(sb(16))),rs(2,W_n),this.b=2,this.a=new RW(null,null,0,null),$9(this.a,this.a)}function i6(){i6=N,J_=new vO("DUMMY_NODE_OVER",0),qsn=new vO("DUMMY_NODE_UNDER",1),oP=new vO("EQUAL",2)}function yF(){yF=N,_R=sMn(A(M(e9,1),z,103,0,[(sr(),Zs),Ao])),KR=sMn(A(M(e9,1),z,103,0,[Yh,Jh]))}function jF(n){return(J(),uu).Hc(n.j)?K(Y(k(n,(G(),hv)))):Gr(A(M(di,1),q,8,0,[n.i.n,n.n,n.a])).b}function Zwe(n){var e,t,i,r;for(i=n.b.a,t=i.a.ec().Kc();t.Ob();)e=u(t.Pb(),561),r=new pNn(e,n.e,n.f),W(n.g,r)}function Ca(n,e){var t,i,r;i=n.nk(e,null),r=null,e&&(r=(Qp(),t=new ud,t),O3(r,n.r)),i=df(n,r,i),i&&i.Fi()}function nge(n,e){var t,i;for(i=xu(n.d,1)!=0,t=!0;t;)t=!1,t=e.c.Tf(e.e,i),t=t|_7(n,e,i,!1),i=!i;yV(n)}function rQ(n,e){var t,i,r;return i=!1,t=e.q.d,e.dr&&(JFn(e.q,r),i=t!=e.q.d)),i}function MDn(n,e){var t,i,r,c,o,f,h,l;return h=e.i,l=e.j,i=n.f,r=i.i,c=i.j,o=h-r,f=l-c,t=y.Math.sqrt(o*o+f*f),t}function cQ(n,e){var t,i;return i=OT(n),i||(t=(bL(),Yxn(e)),i=new Fmn(t),me(i.Vk(),n)),i}function l7(n,e){var t,i;return t=u(n.c.Bc(e),14),t?(i=n.hc(),i.Gc(t),n.d-=t.gc(),t.$b(),n.mc(i)):n.jc()}function ADn(n,e){var t;for(t=0;t=n.c.b:n.a<=n.c.b))throw T(new ic);return e=n.a,n.a+=n.c.c,++n.b,Q(e)}function ige(n){var e;return e=new uIn(n),O8(n.a,SWn,new Hu(A(M(Rk,1),rn,369,0,[e]))),e.d&&W(e.f,e.d),e.f}function EF(n){var e;return e=new Mz(n.a),Pr(e,n),H(e,(G(),rt),n),e.o.a=n.g,e.o.b=n.f,e.n.a=n.i,e.n.b=n.j,e}function rge(n,e,t,i){var r,c;for(c=n.Kc();c.Ob();)r=u(c.Pb(),70),r.n.a=e.a+(i.a-r.o.a)/2,r.n.b=e.b,e.b+=r.o.b+t}function cge(n,e,t){var i,r;for(r=e.a.a.ec().Kc();r.Ob();)if(i=u(r.Pb(),57),_Tn(n,i,t))return!0;return!1}function uge(n){var e,t;for(t=new E(n.r);t.a=0?e:-e;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return e<0?1/r:r}function hge(n,e){var t,i,r;for(r=1,t=n,i=e>=0?e:-e;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return e<0?1/r:r}function FDn(n){var e,t;if(n!=null)for(t=0;t0&&(t=u(un(n.a,n.a.c.length-1),570),QV(t,e))||W(n.a,new dSn(e))}function wge(n){wo();var e,t;e=n.d.c-n.e.c,t=u(n.g,145),Zc(t.b,new _5n(e)),Zc(t.c,new K5n(e)),$i(t.i,new H5n(e))}function BDn(n){var e;return e=new V1,e.a+="VerticalSegment ",rc(e,n.e),e.a+=" ",De(e,Lz(new YI,new E(n.k))),e.a}function gge(n){var e;return e=u(xd(n.c.c,""),229),e||(e=new M2(Vp(Xp(new Zg,""),"Other")),Aa(n.c.c,"",e)),e}function r6(n){var e;return n.Db&64?yo(n):(e=new Bs(yo(n)),e.a+=" (name: ",dr(e,n.zb),e.a+=")",e.a)}function hQ(n,e,t){var i,r;return r=n.sb,n.sb=e,n.Db&4&&!(n.Db&1)&&(i=new gi(n,1,4,r,e),t?t.Ei(i):t=i),t}function CF(n,e){var t,i,r;for(t=0,r=zr(n,e).Kc();r.Ob();)i=u(r.Pb(),11),t+=k(i,(G(),Au))!=null?1:0;return t}function Kw(n,e,t){var i,r,c;for(i=0,c=_e(n,0);c.b!=c.d.c&&(r=K(Y(Re(c))),!(r>t));)r>=e&&++i;return i}function pge(n,e,t){var i,r;return i=new Lh(n.e,3,13,null,(r=e.c,r||(Sn(),Tf)),v1(n,e),!1),t?t.Ei(i):t=i,t}function vge(n,e,t){var i,r;return i=new Lh(n.e,4,13,(r=e.c,r||(Sn(),Tf)),null,v1(n,e),!1),t?t.Ei(i):t=i,t}function lQ(n,e,t){var i,r;return r=n.r,n.r=e,n.Db&4&&!(n.Db&1)&&(i=new gi(n,1,8,r,n.r),t?t.Ei(i):t=i),t}function w1(n,e){var t,i;return t=u(e,676),i=t.vk(),!i&&t.wk(i=I(e,88)?new Fkn(n,u(e,26)):new eAn(n,u(e,148))),i}function a7(n,e,t){var i;n.qi(n.i+1),i=n.oi(e,t),e!=n.i&&gc(n.g,e,n.g,e+1,n.i-e),St(n.g,e,i),++n.i,n.bi(e,t),n.ci()}function mge(n,e){var t;return e.a&&(t=e.a.a.length,n.a?De(n.a,n.b):n.a=new Yu(n.d),iAn(n.a,e.a,e.d.length,t)),n}function kge(n,e){var t,i,r,c;if(e.vi(n.a),c=u(Rn(n.a,8),1936),c!=null)for(t=c,i=0,r=t.length;it)throw T(new mr(xM+n+rnn+e+", size: "+t));if(n>e)throw T(new Hn(xM+n+aKn+e))}function As(n,e,t){if(e<0)bY(n,t);else{if(!t.Ij())throw T(new Hn(Pl+t.ne()+em));u(t,66).Nj().Vj(n,n.yh(),e)}}function Ege(n,e,t,i,r,c,o,f){var h;for(h=t;c=i||e=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:n>=48&&n<=57?n-48:0}function zDn(n){var e;return n.Db&64?yo(n):(e=new Bs(yo(n)),e.a+=" (source: ",dr(e,n.d),e.a+=")",e.a)}function Tge(n,e,t){var i,r;return r=n.a,n.a=e,n.Db&4&&!(n.Db&1)&&(i=new gi(n,1,5,r,n.a),t?FJ(t,i):t=i),t}function g1(n,e){var t;t=(n.Bb&256)!=0,e?n.Bb|=256:n.Bb&=-257,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,2,t,e))}function dQ(n,e){var t;t=(n.Bb&256)!=0,e?n.Bb|=256:n.Bb&=-257,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,8,t,e))}function kT(n,e){var t;t=(n.Bb&256)!=0,e?n.Bb|=256:n.Bb&=-257,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,8,t,e))}function p1(n,e){var t;t=(n.Bb&512)!=0,e?n.Bb|=512:n.Bb&=-513,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,3,t,e))}function bQ(n,e){var t;t=(n.Bb&512)!=0,e?n.Bb|=512:n.Bb&=-513,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,9,t,e))}function u6(n,e){var t;return n.b==-1&&n.a&&(t=n.a.Gj(),n.b=t?n.c.Xg(n.a.aj(),t):yt(n.c.Tg(),n.a)),n.c.Og(n.b,e)}function Q(n){var e,t;return n>-129&&n<128?(e=n+128,t=(qEn(),jin)[e],!t&&(t=jin[e]=new gq(n)),t):new gq(n)}function J3(n){var e,t;return n>-129&&n<128?(e=n+128,t=(VEn(),Min)[e],!t&&(t=Min[e]=new vq(n)),t):new vq(n)}function wQ(n){var e,t;return e=n.k,e==(Qn(),Xt)?(t=u(k(n,(G(),ec)),61),t==(J(),Kn)||t==ae):!1}function Mge(n,e,t){var i,r,c;return c=(r=b4(n.b,e),r),c&&(i=u(jM(G8(n,c),""),26),i)?xY(n,i,e,t):null}function TF(n,e,t){var i,r,c;return c=(r=b4(n.b,e),r),c&&(i=u(jM(G8(n,c),""),26),i)?LY(n,i,e,t):null}function UDn(n,e){var t,i;for(i=new ie(n);i.e!=i.i.gc();)if(t=u(oe(i),138),B(e)===B(t))return!0;return!1}function s6(n,e,t){var i;if(i=n.gc(),e>i)throw T(new V0(e,i));if(n.hi()&&n.Hc(t))throw T(new Hn(yk));n.Xh(e,t)}function Age(n,e){var t;if(t=xw(n.i,e),t==null)throw T(new Sf("Node did not exist in input."));return MV(e,t),null}function Sge(n,e){var t;if(t=R7(n,e),I(t,322))return u(t,34);throw T(new Hn(Pl+e+"' is not a valid attribute"))}function Pge(n,e,t){var i,r;for(r=I(e,99)&&u(e,18).Bb&Yi?new LO(e,n):new H3(e,n),i=0;ie?1:n==e?n==0?ni(1/n,1/e):0:isNaN(n)?isNaN(e)?0:1:-1}function Bge(n,e){le(e,"Sort end labels",1),Rt(gt(qr(new $n(null,new xn(n.b,16)),new bdn),new wdn),new gdn),ce(e)}function o6(n,e,t){var i,r;return n.ej()?(r=n.fj(),i=Dx(n,e,t),n.$i(n.Zi(7,Q(t),i,e,r)),i):Dx(n,e,t)}function MF(n,e){var t,i,r;n.d==null?(++n.e,--n.f):(r=e.cd(),t=e.Sh(),i=(t&nt)%n.d.length,yde(n,i,hNn(n,i,t,r)))}function Y3(n,e){var t;t=(n.Bb&Eo)!=0,e?n.Bb|=Eo:n.Bb&=-1025,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,10,t,e))}function Z3(n,e){var t;t=(n.Bb&Ib)!=0,e?n.Bb|=Ib:n.Bb&=-4097,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,12,t,e))}function n4(n,e){var t;t=(n.Bb&mu)!=0,e?n.Bb|=mu:n.Bb&=-8193,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,15,t,e))}function e4(n,e){var t;t=(n.Bb&Bb)!=0,e?n.Bb|=Bb:n.Bb&=-2049,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,11,t,e))}function Rge(n,e){var t;return t=ni(n.b.c,e.b.c),t!=0||(t=ni(n.a.a,e.a.a),t!=0)?t:ni(n.a.b,e.a.b)}function _ge(n,e){var t;if(t=te(n.k,e),t==null)throw T(new Sf("Port did not exist in input."));return MV(e,t),null}function Kge(n){var e,t;for(t=wNn(is(n)).Kc();t.Ob();)if(e=Ce(t.Pb()),A6(n,e))return Vae((C7n(),zne),e);return null}function Hge(n,e){var t,i,r,c,o;for(o=Kc(n.e.Tg(),e),c=0,t=u(n.g,119),r=0;r>10)+rk&Ut,e[1]=(n&1023)+56320&Ut,Hs(e,0,e.length)}function jT(n){var e,t;return t=u(k(n,(nn(),as)),103),t==(sr(),kh)?(e=K(Y(k(n,zS))),e>=1?Ao:Jh):t}function zge(n){switch(u(k(n,(nn(),Qh)),218).g){case 1:return new ewn;case 3:return new uwn;default:return new nwn}}function Ta(n){if(n.c)Ta(n.c);else if(n.d)throw T(new $r("Stream already terminated, can't be modified or used"))}function PF(n){var e;return n.Db&64?yo(n):(e=new Bs(yo(n)),e.a+=" (identifier: ",dr(e,n.k),e.a+=")",e.a)}function QDn(n,e,t){var i,r;return i=(ad(),r=new Xy,r),UC(i,e),WC(i,t),n&&me((!n.a&&(n.a=new Yt(io,n,5)),n.a),i),i}function IF(n,e,t,i){var r,c;return _n(i),_n(t),r=n.xc(e),c=r==null?t:l7n(u(r,15),u(t,14)),c==null?n.Bc(e):n.zc(e,c),c}function Cn(n){var e,t,i,r;return t=(e=u(xo((i=n.gm,r=i.f,r==Ie?i:r)),9),new ks(e,u(bo(e,e.length),9),0)),ko(t,n),t}function Uge(n,e,t){var i,r;for(r=n.a.ec().Kc();r.Ob();)if(i=u(r.Pb(),10),t7(t,u(un(e,i.p),14)))return i;return null}function Wge(n,e,t){var i;try{Awe(n,e,t)}catch(r){throw r=jt(r),I(r,597)?(i=r,T(new EX(i))):T(r)}return e}function vl(n,e){var t;return Fr(n)&&Fr(e)&&(t=n-e,ik>1,n.k=t-1>>1}function OF(){_J();var n,e,t;t=qTe+++Date.now(),n=Gt(y.Math.floor(t*uk))&FM,e=Gt(t-n*enn),this.a=n^1502,this.b=e^tN}function Kh(n){var e,t,i;for(e=new X,i=new E(n.j);i.a34028234663852886e22?Ft:e<-34028234663852886e22?Qt:e}function JDn(n){return n-=n>>1&1431655765,n=(n>>2&858993459)+(n&858993459),n=(n>>4)+n&252645135,n+=n>>8,n+=n>>16,n&63}function YDn(n){var e,t,i,r;for(e=new Djn(n.Hd().gc()),r=0,i=$2(n.Hd().Kc());i.Ob();)t=i.Pb(),ole(e,t,Q(r++));return $5e(e.a)}function Zge(n,e){var t,i,r;for(r=new we,i=e.vc().Kc();i.Ob();)t=u(i.Pb(),42),it(r,t.cd(),Gbe(n,u(t.dd(),15)));return r}function yQ(n,e){n.n.c.length==0&&W(n.n,new lC(n.s,n.t,n.i)),W(n.b,e),iJ(u(un(n.n,n.n.c.length-1),211),e),oRn(n,e)}function Hw(n){return(n.c!=n.b.b||n.i!=n.g.b)&&(n.a.c=F(Zn,rn,1,0,5,1),Zt(n.a,n.b),Zt(n.a,n.g),n.c=n.b.b,n.i=n.g.b),n.a}function DF(n,e){var t,i,r;for(r=0,i=u(e.Kb(n),20).Kc();i.Ob();)t=u(i.Pb(),17),on(sn(k(t,(G(),kf))))||++r;return r}function n2e(n,e){var t,i,r;i=$w(e),r=K(Y(bb(i,(nn(),Mo)))),t=y.Math.max(0,r/2-.5),g6(e,t,1),W(n,new G7n(e,t))}function Ss(){Ss=N,Qk=new Q9(Xh,0),Sm=new Q9("FIRST",1),xl=new Q9(uHn,2),Pm=new Q9("LAST",3),Ub=new Q9(sHn,4)}function Hh(){Hh=N,rH=new Wj(K6,0),yy=new Wj("POLYLINE",1),Cv=new Wj("ORTHOGONAL",2),Sp=new Wj("SPLINES",3)}function ET(){ET=N,Jon=new PO("ASPECT_RATIO_DRIVEN",0),IK=new PO("MAX_SCALE_DRIVEN",1),Qon=new PO("AREA_DRIVEN",2)}function w7(){w7=N,AP=new IO("P1_STRUCTURE",0),SP=new IO("P2_PROCESSING_ORDER",1),PP=new IO("P3_EXECUTION",2)}function CT(){CT=N,CK=new MO("OVERLAP_REMOVAL",0),jK=new MO("COMPACTION",1),EK=new MO("GRAPH_SIZE_CALCULATION",2)}function zd(n,e){return Zo(),mo(Cl),y.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)?0:ne?1:pd(isNaN(n),isNaN(e))}function ZDn(n,e){var t,i;for(t=_e(n,0);t.b!=t.d.c;){if(i=x9(Y(Re(t))),i==e)return;if(i>e){a$(t);break}}y8(t,e)}function En(n,e){var t,i,r,c,o;if(t=e.f,Aa(n.c.d,t,e),e.g!=null)for(r=e.g,c=0,o=r.length;ce&&i.ue(n[c-1],n[c])>0;--c)o=n[c],St(n,c,n[c-1]),St(n,c-1,o)}function Ps(n,e,t,i){if(e<0)_Y(n,t,i);else{if(!t.Ij())throw T(new Hn(Pl+t.ne()+em));u(t,66).Nj().Tj(n,n.yh(),e,i)}}function TT(n,e){if(e==n.d)return n.e;if(e==n.e)return n.d;throw T(new Hn("Node "+e+" not part of edge "+n))}function t2e(n,e){switch(e.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 n$n(n,e){switch(e.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 jQ(n,e,t,i){switch(e){case 3:return n.f;case 4:return n.g;case 5:return n.i;case 6:return n.j}return aQ(n,e,t,i)}function i2e(n){return n.k!=(Qn(),ii)?!1:C3(new $n(null,new Cd(new re(ue(ei(n).a.Kc(),new An)))),new Hbn)}function r2e(n){return n.e==null?n:(!n.c&&(n.c=new zx((n.f&256)!=0,n.i,n.a,n.d,(n.f&16)!=0,n.j,n.g,null)),n.c)}function c2e(n,e){return n.h==tk&&n.m==0&&n.l==0?(e&&(Il=Bc(0,0,0)),eyn((I3(),gin))):(e&&(Il=Bc(n.l,n.m,n.h)),Bc(0,0,0))}function Nr(n){var e;return Array.isArray(n)&&n.im===Xg?J1($u(n))+"@"+(e=mt(n)>>>0,e.toString(16)):n.toString()}function f6(n){var e;this.a=(e=u(n.e&&n.e(),9),new ks(e,u(bo(e,e.length),9),0)),this.b=F(Zn,rn,1,this.a.a.length,5,1)}function u2e(n){var e,t,i;for(this.a=new Sh,i=new E(n);i.a0&&(Te(e-1,n.length),n.charCodeAt(e-1)==58)&&!$F(n,a9,d9))}function $F(n,e,t){var i,r;for(i=0,r=n.length;i=r)return e.c+t;return e.c+e.b.gc()}function l2e(n,e){o3();var t,i,r,c;for(i=bPn(n),r=e,S3(i,0,i.length,r),t=0;t0&&(i+=r,++t);return t>1&&(i+=n.d*(t-1)),i}function CQ(n){var e,t,i;for(i=new i1,i.a+="[",e=0,t=n.gc();e0&&this.b>0&&cW(this.c,this.b,this.a)}function AQ(n){xF(),this.c=uf(A(M(sMe,1),rn,831,0,[LQn])),this.b=new we,this.a=n,it(this.b,uP,1),Zc(NQn,new q6n(this))}function e$n(n,e){var t;return n.d?Uu(n.b,e)?u(te(n.b,e),51):(t=e.Kf(),it(n.b,e,t),t):e.Kf()}function SQ(n,e){var t;return B(n)===B(e)?!0:I(e,91)?(t=u(e,91),n.e==t.e&&n.d==t.d&&Jae(n,t.a)):!1}function B2(n){switch(J(),n.g){case 4:return Kn;case 1:return Vn;case 3:return ae;case 2:return Gn;default:return Xr}}function PQ(n,e){switch(e){case 3:return n.f!=0;case 4:return n.g!=0;case 5:return n.i!=0;case 6:return n.j!=0}return SV(n,e)}function p2e(n){switch(n.g){case 0:return new Lgn;case 1:return new Ngn;default:throw T(new Hn(lB+(n.f!=null?n.f:""+n.g)))}}function t$n(n){switch(n.g){case 0:return new xgn;case 1:return new Bgn;default:throw T(new Hn(AN+(n.f!=null?n.f:""+n.g)))}}function i$n(n){switch(n.g){case 0:return new sG;case 1:return new b9n;default:throw T(new Hn(bA+(n.f!=null?n.f:""+n.g)))}}function v2e(n){switch(n.g){case 1:return new Pgn;case 2:return new kjn;default:throw T(new Hn(lB+(n.f!=null?n.f:""+n.g)))}}function m2e(n){var e,t;if(n.b)return n.b;for(t=vf?null:n.d;t;){if(e=vf?null:t.b,e)return e;t=vf?null:t.d}return e3(),Uin}function k2e(n){var e,t,i;return n.e==0?0:(e=n.d<<5,t=n.a[n.d-1],n.e<0&&(i=dOn(n),i==n.d-1&&(--t,t=t|0)),e-=x7(t),e)}function y2e(n){var e,t,i;return n>5,e=n&31,i=F(be,Le,25,t+1,15,1),i[t]=1<3;)r*=10,--c;n=(n+(r>>1))/r|0}return i.i=n,!0}function E2e(n){return yF(),qn(),!!(n$n(u(n.a,81).j,u(n.b,103))||u(n.a,81).d.e!=0&&n$n(u(n.a,81).j,u(n.b,103)))}function C2e(n){DC(),u(n.We((Xe(),_l)),174).Hc((Lu(),UP))&&(u(n.We(rw),174).Fc((Mu(),Pp)),u(n.We(_l),174).Mc(UP))}function c$n(n,e){var t,i;if(e){for(t=0;t=0;--i)for(e=t[i],r=0;r>1,this.k=e-1>>1}function I2e(n,e){le(e,"End label post-processing",1),Rt(gt(qr(new $n(null,new xn(n.b,16)),new udn),new sdn),new odn),ce(e)}function O2e(n,e,t){var i,r;return i=K(n.p[e.i.p])+K(n.d[e.i.p])+e.n.b+e.a.b,r=K(n.p[t.i.p])+K(n.d[t.i.p])+t.n.b+t.a.b,r-i}function D2e(n,e,t){var i,r;for(i=ui(t,fr),r=0;fc(i,0)!=0&&r0&&(Te(0,e.length),e.charCodeAt(0)==43)?e.substr(1):e))}function F2e(n){var e;return n==null?null:new il((e=jc(n,!0),e.length>0&&(Te(0,e.length),e.charCodeAt(0)==43)?e.substr(1):e))}function LQ(n,e){var t;return n.i>0&&(e.lengthn.i&&St(e,n.i,null),e}function Oc(n,e,t){var i,r,c;return n.ej()?(i=n.i,c=n.fj(),a7(n,i,e),r=n.Zi(3,null,e,i,c),t?t.Ei(r):t=r):a7(n,n.i,e),t}function x2e(n,e,t){var i,r;return i=new Lh(n.e,4,10,(r=e.c,I(r,88)?u(r,26):(Sn(),so)),null,v1(n,e),!1),t?t.Ei(i):t=i,t}function L2e(n,e,t){var i,r;return i=new Lh(n.e,3,10,null,(r=e.c,I(r,88)?u(r,26):(Sn(),so)),v1(n,e),!1),t?t.Ei(i):t=i,t}function o$n(n){W0();var e;return e=new kr(u(n.e.We((Xe(),Kg)),8)),n.B.Hc((Lu(),Mv))&&(e.a<=0&&(e.a=20),e.b<=0&&(e.b=20)),e}function f$n(n){wb();var e;return(n.q?n.q:(Pn(),Pn(),vh))._b((nn(),j0))?e=u(k(n,j0),197):e=u(k(Gi(n),$m),197),e}function bb(n,e){var t,i;return i=null,ai(n,(nn(),rP))&&(t=u(k(n,rP),94),t.Xe(e)&&(i=t.We(e))),i==null&&(i=k(Gi(n),e)),i}function h$n(n,e){var t,i,r;return I(e,42)?(t=u(e,42),i=t.cd(),r=ab(n.Rc(),i),Ff(r,t.dd())&&(r!=null||n.Rc()._b(i))):!1}function NF(n,e){var t,i,r;return n.f>0?(n.qj(),i=e==null?0:mt(e),r=(i&nt)%n.d.length,t=hNn(n,r,i,e),t!=-1):!1}function Ko(n,e){var t,i,r;return n.f>0&&(n.qj(),i=e==null?0:mt(e),r=(i&nt)%n.d.length,t=kY(n,r,i,e),t)?t.dd():null}function g7(n,e){var t,i,r,c;for(c=Kc(n.e.Tg(),e),t=u(n.g,119),r=0;r1?cf(Ih(e.a[1],32),ui(e.a[0],fr)):ui(e.a[0],fr),$d(Ni(e.e,t))))}function p7(n,e){var t;return Fr(n)&&Fr(e)&&(t=n%e,ik>5,e&=31,r=n.d+t+(e==0?0:1),i=F(be,Le,25,r,15,1),Nve(i,n.a,t,e),c=new Pw(n.e,r,i),K5(c),c}function BQ(n,e,t){var i,r;i=u(vc(Pv,e),117),r=u(vc(m9,e),117),t?(yr(Pv,n,i),yr(m9,n,r)):(yr(m9,n,i),yr(Pv,n,r))}function p$n(n,e,t){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.ue(e,c.d),t&&i==0)return c;i>=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function v$n(n,e,t){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.ue(e,c.d),t&&i==0)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function K2e(n,e,t,i){var r,c,o;return r=!1,jEe(n.f,t,i)&&(ape(n.f,n.a[e][t],n.a[e][i]),c=n.a[e],o=c[i],c[i]=c[t],c[t]=o,r=!0),r}function RQ(n,e,t,i,r){var c,o,f;for(o=r;e.b!=e.c;)c=u(y2(e),10),f=u(zr(c,i).Xb(0),11),n.d[f.p]=o++,t.c[t.c.length]=f;return o}function _Q(n,e,t){var i,r,c,o,f;return o=n.k,f=e.k,i=t[o.g][f.g],r=Y(bb(n,i)),c=Y(bb(e,i)),y.Math.max((_n(r),r),(_n(c),c))}function H2e(n,e,t){var i,r,c,o;for(i=t/n.c.length,r=0,o=new E(n);o.a2e3&&(wzn=n,KA=y.setTimeout(Vie,10))),_A++==0?(E0e((aG(),din)),!0):!1}function G2e(n,e){var t,i,r;for(i=new re(ue(ei(n).a.Kc(),new An));Se(i);)if(t=u(ve(i),17),r=t.d.i,r.c==e)return!1;return!0}function KQ(n,e){var t,i;if(I(e,245)){i=u(e,245);try{return t=n.vd(i),t==0}catch(r){if(r=jt(r),!I(r,205))throw T(r)}}return!1}function z2e(){return Error.stackTraceLimit>0?(y.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function U2e(n,e){return Zo(),Zo(),mo(Cl),(y.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)?0:ne?1:pd(isNaN(n),isNaN(e)))>0}function HQ(n,e){return Zo(),Zo(),mo(Cl),(y.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)?0:ne?1:pd(isNaN(n),isNaN(e)))<0}function y$n(n,e){return Zo(),Zo(),mo(Cl),(y.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)?0:ne?1:pd(isNaN(n),isNaN(e)))<=0}function RF(n,e){for(var t=0;!e[t]||e[t]=="";)t++;for(var i=e[t++];tJL)return t.fh();if(i=t.Zg(),i||t==n)break}return i}function qQ(n){return dC(),I(n,156)?u(te($y,Azn),288).vg(n):Uu($y,$u(n))?u(te($y,$u(n)),288).vg(n):null}function X2e(n){if(DT(B4,n))return qn(),z4;if(DT(EB,n))return qn(),qa;throw T(new Hn("Expecting true or false"))}function V2e(n,e){if(e.c==n)return e.d;if(e.d==n)return e.c;throw T(new Hn("Input edge is not connected to the input port."))}function A$n(n,e){return n.e>e.e?1:n.ee.d?n.e:n.d=48&&n<48+y.Math.min(10,10)?n-48:n>=97&&n<97?n-97+10:n>=65&&n<65?n-65+10:-1}function P$n(n,e){var t;return B(e)===B(n)?!0:!I(e,21)||(t=u(e,21),t.gc()!=n.gc())?!1:n.Ic(t)}function Q2e(n,e){var t,i,r,c;return i=n.a.length-1,t=e-n.b&i,c=n.c-e&i,r=n.c-n.b&i,cjn(t=c?(Vwe(n,e),-1):(Qwe(n,e),1)}function J2e(n,e){var t,i;for(t=(Te(e,n.length),n.charCodeAt(e)),i=e+1;ie.e?1:n.fe.f?1:mt(n)-mt(e)}function DT(n,e){return _n(n),e==null?!1:Mn(n,e)?!0:n.length==e.length&&Mn(n.toLowerCase(),e.toLowerCase())}function upe(n,e){var t,i,r,c;for(i=0,r=e.gc();i0&&fc(n,128)<0?(e=ge(n)+128,t=(XEn(),Ein)[e],!t&&(t=Ein[e]=new pq(n)),t):new pq(n)}function O$n(n,e){var t,i;return t=e.Hh(n.a),t&&(i=Ce(Ko((!t.b&&(t.b=new Gu((Sn(),nr),tc,t)),t.b),We)),i!=null)?i:e.ne()}function spe(n,e){var t,i;return t=e.Hh(n.a),t&&(i=Ce(Ko((!t.b&&(t.b=new Gu((Sn(),nr),tc,t)),t.b),We)),i!=null)?i:e.ne()}function ope(n,e){c$();var t,i;for(i=new re(ue(Kh(n).a.Kc(),new An));Se(i);)if(t=u(ve(i),17),t.d.i==e||t.c.i==e)return t;return null}function UQ(n,e,t){this.c=n,this.f=new X,this.e=new Li,this.j=new eW,this.n=new eW,this.b=e,this.g=new ys(e.c,e.d,e.b,e.a),this.a=t}function _F(n){var e,t,i,r;for(this.a=new Sh,this.d=new hi,this.e=0,t=n,i=0,r=t.length;i0):!1}function F$n(n){var e;B(hn(n,(Xe(),Bg)))===B((_h(),HP))&&(Pt(n)?(e=u(hn(Pt(n),Bg),334),gr(n,Bg,e)):gr(n,Bg,i9))}function ape(n,e,t){var i,r;yx(n.e,e,t,(J(),Gn)),yx(n.i,e,t,Vn),n.a&&(r=u(k(e,(G(),rt)),11),i=u(k(t,rt),11),l$(n.g,r,i))}function x$n(n,e,t){var i,r,c;i=e.c.p,c=e.p,n.b[i][c]=new YTn(n,e),t&&(n.a[i][c]=new c6n(e),r=u(k(e,(G(),m0)),10),r&&Tn(n.d,r,e))}function L$n(n,e){var t,i,r;if(W(eS,n),e.Fc(n),t=u(te(DR,n),21),t)for(r=t.Kc();r.Ob();)i=u(r.Pb(),33),xr(eS,i,0)!=-1||L$n(i,e)}function dpe(n,e,t){var i;(Fzn?(m2e(n),!0):xzn||Nzn?(e3(),!0):Lzn&&(e3(),!1))&&(i=new hEn(e),i.b=t,g5e(n,i))}function KF(n,e){var t;t=!n.A.Hc((Qu(),id))||n.q==(Mi(),Ac),n.u.Hc((Mu(),n1))?t?xCe(n,e):a_n(n,e):n.u.Hc(Gl)&&(t?nCe(n,e):M_n(n,e))}function r4(n,e){var t,i;if(++n.j,e!=null&&(t=(i=n.a.Cb,I(i,97)?u(i,97).Jg():null),ome(e,t))){R2(n.a,4,t);return}R2(n.a,4,u(e,126))}function N$n(n,e,t){return new ys(y.Math.min(n.a,e.a)-t/2,y.Math.min(n.b,e.b)-t/2,y.Math.abs(n.a-e.a)+t,y.Math.abs(n.b-e.b)+t)}function bpe(n,e){var t,i;return t=Wc(n.a.c.p,e.a.c.p),t!=0?t:(i=Wc(n.a.d.i.p,e.a.d.i.p),i!=0?i:Wc(e.a.d.p,n.a.d.p))}function wpe(n,e,t){var i,r,c,o;return c=e.j,o=t.j,c!=o?c.g-o.g:(i=n.f[e.p],r=n.f[t.p],i==0&&r==0?0:i==0?-1:r==0?1:ni(i,r))}function B$n(n,e,t){var i,r,c;if(!t[e.d])for(t[e.d]=!0,r=new E(Hw(e));r.a=r)return r;for(e=e>0?e:0;ei&&St(e,i,null),e}function _$n(n,e){var t,i;for(i=n.a.length,e.lengthi&&St(e,i,null),e}function Aa(n,e,t){var i,r,c;return r=u(te(n.e,e),387),r?(c=gU(r,t),Oyn(n,r),c):(i=new qU(n,e,t),it(n.e,e,i),iMn(i),null)}function vpe(n){var e;if(n==null)return null;if(e=a9e(jc(n,!0)),e==null)throw T(new VI("Invalid hexBinary value: '"+n+"'"));return e}function m7(n){return jl(),fc(n,0)<0?fc(n,-1)!=0?new OJ(-1,P3(n)):gR:fc(n,10)<=0?xin[ge(n)]:new OJ(1,n)}function qF(){return SM(),A(M(yUn,1),z,159,0,[mUn,vUn,kUn,hUn,fUn,lUn,bUn,dUn,aUn,pUn,gUn,wUn,sUn,uUn,oUn,rUn,iUn,cUn,eUn,nUn,tUn,TR])}function K$n(n){var e;this.d=new X,this.j=new Li,this.g=new Li,e=n.g.b,this.f=u(k(Gi(e),(nn(),as)),103),this.e=K(Y(xT(e,nw)))}function H$n(n){this.b=new X,this.e=new X,this.d=n,this.a=!Wv(gt(new $n(null,new Cd(new sf(n.b))),new Fv(new qbn))).sd((ca(),V4))}function Ho(){Ho=N,Xn=new Z9("PARENTS",0),vi=new Z9("NODES",1),Zf=new Z9("EDGES",2),Ya=new Z9("PORTS",3),D1=new Z9("LABELS",4)}function qw(){qw=N,Hl=new e8("DISTRIBUTED",0),Cy=new e8("JUSTIFIED",1),Hhn=new e8("BEGIN",2),r9=new e8(I4,3),qhn=new e8("END",4)}function mpe(n){var e;switch(e=n.yi(null),e){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function GF(n){switch(n.g){case 1:return sr(),Yh;case 4:return sr(),Zs;case 2:return sr(),Ao;case 3:return sr(),Jh}return sr(),kh}function kpe(n,e,t){var i;switch(i=t.q.getFullYear()-Tl+Tl,i<0&&(i=-i),e){case 1:n.a+=i;break;case 2:oh(n,i%100,2);break;default:oh(n,i,e)}}function _e(n,e){var t,i;if(tb(e,n.b),e>=n.b>>1)for(i=n.c,t=n.b;t>e;--t)i=i.b;else for(i=n.a.a,t=0;t=64&&e<128&&(r=cf(r,Ih(1,e-64)));return r}function xT(n,e){var t,i;return i=null,ai(n,(Xe(),Ap))&&(t=u(k(n,Ap),94),t.Xe(e)&&(i=t.We(e))),i==null&&Gi(n)&&(i=k(Gi(n),e)),i}function z$n(n,e){var t,i,r;r=e.d.i,i=r.k,!(i==(Qn(),ii)||i==mf)&&(t=new re(ue(ei(r).a.Kc(),new An)),Se(t)&&it(n.k,e,u(ve(t),17)))}function zF(n,e){var t,i,r;return i=On(n.Tg(),e),t=e-n.Ah(),t<0?(r=n.Yg(i),r>=0?n.lh(r):Ox(n,i)):t<0?Ox(n,i):u(i,66).Nj().Sj(n,n.yh(),t)}function cn(n){var e;if(I(n.a,4)){if(e=qQ(n.a),e==null)throw T(new $r(HHn+n.b+"'. "+KHn+(Ph(Fy),Fy.k)+Etn));return e}else return n.a}function Epe(n){var e;if(n==null)return null;if(e=qCe(jc(n,!0)),e==null)throw T(new VI("Invalid base64Binary value: '"+n+"'"));return e}function oe(n){var e;try{return e=n.i.Xb(n.e),n.mj(),n.g=n.e++,e}catch(t){throw t=jt(t),I(t,73)?(n.mj(),T(new ic)):T(t)}}function UF(n){var e;try{return e=n.c.ki(n.e),n.mj(),n.g=n.e++,e}catch(t){throw t=jt(t),I(t,73)?(n.mj(),T(new ic)):T(t)}}function a6(){a6=N,Trn=(Xe(),yhn),IR=Zfn,FUn=Tp,Crn=nd,BUn=(WT(),irn),NUn=ern,RUn=crn,LUn=nrn,xUn=(pF(),yrn),PR=OUn,Ern=DUn,nS=$Un}function LT(n){switch(DG(),this.c=new X,this.d=n,n.g){case 0:case 2:this.a=_W(qrn),this.b=Ft;break;case 3:case 1:this.a=qrn,this.b=Qt}}function U$n(n,e,t){var i,r;if(n.c)nu(n.c,n.c.i+e),eu(n.c,n.c.j+t);else for(r=new E(n.b);r.a0&&(W(n.b,new MEn(e.a,t)),i=e.a.length,0i&&(e.a+=Iyn(F(Ls,Rf,25,-i,15,1))))}function W$n(n,e){var t,i,r;for(t=n.o,r=u(u(ct(n.r,e),21),84).Kc();r.Ob();)i=u(r.Pb(),111),i.e.a=M3e(i,t.a),i.e.b=t.b*K(Y(i.b.We(JA)))}function Tpe(n,e){var t,i,r,c;return r=n.k,t=K(Y(k(n,(G(),k0)))),c=e.k,i=K(Y(k(e,k0))),c!=(Qn(),Xt)?-1:r!=Xt?1:t==i?0:t=0?n.hh(e,t,i):(n.eh()&&(i=(r=n.Vg(),r>=0?n.Qg(i):n.eh().ih(n,-1-r,null,i))),n.Sg(e,t,i))}function XQ(n,e){switch(e){case 7:!n.e&&(n.e=new Fn(bi,n,7,4)),de(n.e);return;case 8:!n.d&&(n.d=new Fn(bi,n,8,5)),de(n.d);return}FQ(n,e)}function qo(n,e){var t;t=n.Zc(e);try{return t.Pb()}catch(i){throw i=jt(i),I(i,109)?T(new mr("Can't get element "+e)):T(i)}}function VQ(n,e){this.e=n,e=0&&(t.d=n.t);break;case 3:n.t>=0&&(t.a=n.t)}n.C&&(t.b=n.C.b,t.c=n.C.c)}function K2(){K2=N,$k=new Rj(NM,0),Dk=new Rj(lN,1),Fk=new Rj(aN,2),xk=new Rj(dN,3),$k.a=!1,Dk.a=!0,Fk.a=!1,xk.a=!0}function d6(){d6=N,Lk=new Bj(NM,0),YA=new Bj(lN,1),ZA=new Bj(aN,2),Nk=new Bj(dN,3),Lk.a=!1,YA.a=!0,ZA.a=!1,Nk.a=!0}function Ipe(n){var e;e=n.a;do e=u(ve(new re(ue(Lr(e).a.Kc(),new An))),17).c.i,e.k==(Qn(),pi)&&n.b.Fc(e);while(e.k==(Qn(),pi));n.b=va(n.b)}function Ope(n){var e,t,i;for(i=n.c.a,n.p=(pe(i),new du(i)),t=new E(i);t.at.b)return!0}return!1}function WF(n,e){return ki(n)?!!ozn[e]:n.hm?!!n.hm[e]:G0(n)?!!szn[e]:q0(n)?!!uzn[e]:!1}function gr(n,e,t){return t==null?(!n.o&&(n.o=new Xu((Dc(),Ul),S0,n,0)),IT(n.o,e)):(!n.o&&(n.o=new Xu((Dc(),Ul),S0,n,0)),XT(n.o,e,t)),n}function xpe(n,e,t,i){var r,c;c=e.Xe((Xe(),_g))?u(e.We(_g),21):n.j,r=Cge(c),r!=(SM(),TR)&&(t&&!GQ(r)||nY(d9e(n,r,i),e))}function BT(n,e,t,i){var r,c,o;return c=On(n.Tg(),e),r=e-n.Ah(),r<0?(o=n.Yg(c),o>=0?n._g(o,t,!0):Yd(n,c,t)):u(c,66).Nj().Pj(n,n.yh(),r,t,i)}function Lpe(n,e,t,i){var r,c,o;t.mh(e)&&(er(),R$(e)?(r=u(t.ah(e),153),upe(n,r)):(c=(o=e,o?u(i,49).xh(o):null),c&&Bte(t.ah(e),c)))}function Npe(n){switch(n.g){case 1:return Hd(),Ok;case 3:return Hd(),Ik;case 2:return Hd(),AR;case 4:return Hd(),MR;default:return null}}function QQ(n){switch(typeof n){case EL:return m1(n);case UZ:return Gt(n);case X2:return qn(),n?1231:1237;default:return n==null?0:md(n)}}function Bpe(n,e,t){if(n.e)switch(n.b){case 1:d1e(n.c,e,t);break;case 0:b1e(n.c,e,t)}else xAn(n.c,e,t);n.a[e.p][t.p]=n.c.i,n.a[t.p][e.p]=n.c.e}function Y$n(n){var e,t;if(n==null)return null;for(t=F(mh,q,193,n.length,0,2),e=0;e=0)return r;if(n.Fk()){for(i=0;i=r)throw T(new V0(e,r));if(n.hi()&&(i=n.Xc(t),i>=0&&i!=e))throw T(new Hn(yk));return n.mi(e,t)}function JQ(n,e){if(this.a=u(pe(n),245),this.b=u(pe(e),245),n.vd(e)>0||n==(qI(),cR)||e==(HI(),uR))throw T(new Hn("Invalid range: "+OAn(n,e)))}function Z$n(n){var e,t;for(this.b=new X,this.c=n,this.a=!1,t=new E(n.a);t.a0),(e&-e)==e)return Gt(e*xu(n,31)*4656612873077393e-25);do t=xu(n,31),i=t%e;while(t-i+(e-1)<0);return Gt(i)}function m1(n){lEn();var e,t,i;return t=":"+n,i=XA[t],i!=null?Gt((_n(i),i)):(i=Xin[t],e=i==null?I8e(n):Gt((_n(i),i)),c1e(),XA[t]=e,e)}function eFn(n,e,t){le(t,"Compound graph preprocessor",1),n.a=new Od,s_n(n,e,null),pje(n,e),Z9e(n),H(e,(G(),dun),n.a),n.a=null,Cu(n.b),ce(t)}function Kpe(n,e,t){switch(t.g){case 1:n.a=e.a/2,n.b=0;break;case 2:n.a=e.a,n.b=e.b/2;break;case 3:n.a=e.a/2,n.b=e.b;break;case 4:n.a=0,n.b=e.b/2}}function Hpe(n){var e,t,i;for(i=u(ct(n.a,(Vw(),IS)),15).Kc();i.Ob();)t=u(i.Pb(),101),e=hJ(t),b3(n,t,e[0],(Kd(),w0),0),b3(n,t,e[1],g0,1)}function qpe(n){var e,t,i;for(i=u(ct(n.a,(Vw(),OS)),15).Kc();i.Ob();)t=u(i.Pb(),101),e=hJ(t),b3(n,t,e[0],(Kd(),w0),0),b3(n,t,e[1],g0,1)}function XF(n){switch(n.g){case 0:return null;case 1:return new eOn;case 2:return new oG;default:throw T(new Hn(lB+(n.f!=null?n.f:""+n.g)))}}function k7(n,e,t){var i,r;for(lwe(n,e-n.s,t-n.t),r=new E(n.n);r.a1&&(c=_pe(n,e)),c}function VF(n){var e;return n.f&&n.f.kh()&&(e=u(n.f,49),n.f=u(pl(n,e),82),n.f!=e&&n.Db&4&&!(n.Db&1)&&et(n,new gi(n,9,8,e,n.f))),n.f}function QF(n){var e;return n.i&&n.i.kh()&&(e=u(n.i,49),n.i=u(pl(n,e),82),n.i!=e&&n.Db&4&&!(n.Db&1)&&et(n,new gi(n,9,7,e,n.i))),n.i}function ir(n){var e;return n.b&&n.b.Db&64&&(e=n.b,n.b=u(pl(n,e),18),n.b!=e&&n.Db&4&&!(n.Db&1)&&et(n,new gi(n,9,21,e,n.b))),n.b}function KT(n,e){var t,i,r;n.d==null?(++n.e,++n.f):(i=e.Sh(),u8e(n,n.f+1),r=(i&nt)%n.d.length,t=n.d[r],!t&&(t=n.d[r]=n.uj()),t.Fc(e),++n.f)}function nJ(n,e,t){var i;return e.Kj()?!1:e.Zj()!=-2?(i=e.zj(),i==null?t==null:tt(i,t)):e.Hj()==n.e.Tg()&&t==null}function HT(){var n;rs(16,J_n),n=UIn(16),this.b=F(oR,nk,317,n,0,1),this.c=F(oR,nk,317,n,0,1),this.a=null,this.e=null,this.i=0,this.f=n-1,this.g=0}function qh(n){vU.call(this),this.k=(Qn(),ii),this.j=(rs(6,Pb),new Pc(6)),this.b=(rs(2,Pb),new Pc(2)),this.d=new NI,this.f=new Zq,this.a=n}function zpe(n){var e,t;n.c.length<=1||(e=ZNn(n,(J(),ae)),Kxn(n,u(e.a,19).a,u(e.b,19).a),t=ZNn(n,Gn),Kxn(n,u(t.a,19).a,u(t.b,19).a))}function b6(){b6=N,zsn=new V9("SIMPLE",0),nK=new V9(PN,1),eK=new V9("LINEAR_SEGMENTS",2),Lm=new V9("BRANDES_KOEPF",3),Nm=new V9(EHn,4)}function eJ(n,e,t){p2(u(k(e,(nn(),Lt)),98))||(VX(n,e,k1(e,t)),VX(n,e,k1(e,(J(),ae))),VX(n,e,k1(e,Kn)),Pn(),wi(e.j,new i6n(n)))}function tFn(n,e,t,i){var r,c,o;for(r=u(ct(i?n.a:n.b,e),21),o=r.Kc();o.Ob();)if(c=u(o.Pb(),33),aM(n,t,c))return!0;return!1}function JF(n){var e,t;for(t=new ie(n);t.e!=t.i.gc();)if(e=u(oe(t),87),e.e||(!e.d&&(e.d=new Yt(ar,e,1)),e.d).i!=0)return!0;return!1}function YF(n){var e,t;for(t=new ie(n);t.e!=t.i.gc();)if(e=u(oe(t),87),e.e||(!e.d&&(e.d=new Yt(ar,e,1)),e.d).i!=0)return!0;return!1}function Upe(n){var e,t,i;for(e=0,i=new E(n.c.a);i.a102?-1:n<=57?n-48:n<65?-1:n<=70?n-65+10:n<97?-1:n-97+10}function ex(n,e){if(n==null)throw T(new c2("null key in entry: null="+e));if(e==null)throw T(new c2("null value in entry: "+n+"=null"))}function Wpe(n,e){for(var t,i;n.Ob();)if(!e.Ob()||(t=n.Pb(),i=e.Pb(),!(B(t)===B(i)||t!=null&&tt(t,i))))return!1;return!e.Ob()}function rFn(n,e){var t;return t=A(M(Ei,1),pr,25,15,[kF(n.a[0],e),kF(n.a[1],e),kF(n.a[2],e)]),n.d&&(t[0]=y.Math.max(t[0],t[2]),t[2]=t[0]),t}function cFn(n,e){var t;return t=A(M(Ei,1),pr,25,15,[pT(n.a[0],e),pT(n.a[1],e),pT(n.a[2],e)]),n.d&&(t[0]=y.Math.max(t[0],t[2]),t[2]=t[0]),t}function Pa(){Pa=N,f_=new X9("GREEDY",0),Gcn=new X9(fHn,1),h_=new X9(PN,2),Em=new X9("MODEL_ORDER",3),jm=new X9("GREEDY_MODEL_ORDER",4)}function uFn(n,e){var t,i,r;for(n.b[e.g]=1,i=_e(e.d,0);i.b!=i.d.c;)t=u(Re(i),188),r=t.c,n.b[r.g]==1?Ke(n.a,t):n.b[r.g]==2?n.b[r.g]=1:uFn(n,r)}function Xpe(n,e){var t,i,r;for(r=new Pc(e.gc()),i=e.Kc();i.Ob();)t=u(i.Pb(),286),t.c==t.f?l4(n,t,t.c):U5e(n,t)||(r.c[r.c.length]=t);return r}function Vpe(n,e,t){var i,r,c,o,f;for(f=n.r+e,n.r+=e,n.d+=t,i=t/n.n.c.length,r=0,o=new E(n.n);o.ac&&St(e,c,null),e}function f3e(n,e){var t,i;if(i=n.gc(),e==null){for(t=0;t0&&(h+=r),l[a]=o,o+=f*(h+i)}function bFn(n){var e,t,i;for(i=n.f,n.n=F(Ei,pr,25,i,15,1),n.d=F(Ei,pr,25,i,15,1),e=0;e0?n.c:0),++r;n.b=i,n.d=c}function g3e(n,e){var t,i,r,c,o;for(i=0,r=0,t=0,o=new E(e);o.a0?n.g:0),++t;n.c=r,n.d=i}function mFn(n,e){var t;return t=A(M(Ei,1),pr,25,15,[ZQ(n,(_o(),Zr),e),ZQ(n,Fc,e),ZQ(n,nc,e)]),n.f&&(t[0]=y.Math.max(t[0],t[2]),t[2]=t[0]),t}function p3e(n,e,t){var i;try{wM(n,e+n.j,t+n.k,!1,!0)}catch(r){throw r=jt(r),I(r,73)?(i=r,T(new mr(i.g+RM+e+Ji+t+")."))):T(r)}}function v3e(n,e,t){var i;try{wM(n,e+n.j,t+n.k,!0,!1)}catch(r){throw r=jt(r),I(r,73)?(i=r,T(new mr(i.g+RM+e+Ji+t+")."))):T(r)}}function kFn(n){var e;ai(n,(nn(),y0))&&(e=u(k(n,y0),21),e.Hc((jb(),So))?(e.Mc(So),e.Fc(Po)):e.Hc(Po)&&(e.Mc(Po),e.Fc(So)))}function yFn(n){var e;ai(n,(nn(),y0))&&(e=u(k(n,y0),21),e.Hc((jb(),Oo))?(e.Mc(Oo),e.Fc(eo)):e.Hc(eo)&&(e.Mc(eo),e.Fc(Oo)))}function m3e(n,e,t){le(t,"Self-Loop ordering",1),Rt(Vc(gt(gt(qr(new $n(null,new xn(e.b,16)),new P0n),new I0n),new O0n),new D0n),new O5n(n)),ce(t)}function j7(n,e,t,i){var r,c;for(r=e;r0&&(r.b+=e),r}function zT(n,e){var t,i,r;for(r=new Li,i=n.Kc();i.Ob();)t=u(i.Pb(),37),M6(t,0,r.b),r.b+=t.f.b+e,r.a=y.Math.max(r.a,t.f.a);return r.a>0&&(r.a+=e),r}function EFn(n){var e,t,i;for(i=nt,t=new E(n.a);t.a>16==6?n.Cb.ih(n,5,Vo,e):(i=ir(u(On((t=u(Rn(n,16),26),t||n.zh()),n.Db>>16),18)),n.Cb.ih(n,i.n,i.f,e))}function C3e(n){k3();var e=n.e;if(e&&e.stack){var t=e.stack,i=e+` `;return t.substring(0,i.length)==i&&(t=t.substring(i.length)),t.split(` diff --git a/assets/ganttDiagram-9b5ea136-8ba8104e.js b/assets/ganttDiagram-9b5ea136-f59873c3.js similarity index 99% rename from assets/ganttDiagram-9b5ea136-8ba8104e.js rename to assets/ganttDiagram-9b5ea136-f59873c3.js index 90be091..c3c605d 100644 --- a/assets/ganttDiagram-9b5ea136-8ba8104e.js +++ b/assets/ganttDiagram-9b5ea136-f59873c3.js @@ -1,4 +1,4 @@ -import{J as Be,K as Ze,R as Xe,L as qe,M as Dn,N as Kt,O as Mn,P as ye,Q as ke,T as nt,c as xt,s as Sn,g as _n,B as Un,D as Yn,b as Fn,a as Ln,E as En,m as An,l as qt,h as Pt,i as In,j as Wn,z as On}from"./index-b371ab76.js";import{b as Hn,t as Ue,c as zn,a as Nn,l as Vn}from"./linear-ccca5fef.js";import{i as Pn}from"./init-77b53fdd.js";function Rn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function Bn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Zn(t){return t}var Bt=1,te=2,ue=3,Rt=4,Ye=1e-6;function Xn(t){return"translate("+t+",0)"}function qn(t){return"translate(0,"+t+")"}function Gn(t){return e=>+t(e)}function jn(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Qn(){return!this.__axis}function Ge(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,_=typeof window<"u"&&window.devicePixelRatio>1?0:.5,k=t===Bt||t===Rt?-1:1,C=t===Rt||t===te?"x":"y",F=t===Bt||t===ue?Xn:qn;function w(x){var q=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):Zn),L=Math.max(s,0)+y,O=e.range(),W=+O[0]+_,B=+O[O.length-1]+_,Z=(e.bandwidth?jn:Gn)(e.copy(),_),Q=x.selection?x.selection():x,v=Q.selectAll(".domain").data([null]),A=Q.selectAll(".tick").data(q,e).order(),T=A.exit(),Y=A.enter().append("g").attr("class","tick"),D=A.select("line"),b=A.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(Y),D=D.merge(Y.append("line").attr("stroke","currentColor").attr(C+"2",k*s)),b=b.merge(Y.append("text").attr("fill","currentColor").attr(C,k*L).attr("dy",t===Bt?"0em":t===ue?"0.71em":"0.32em")),x!==Q&&(v=v.transition(x),A=A.transition(x),D=D.transition(x),b=b.transition(x),T=T.transition(x).attr("opacity",Ye).attr("transform",function(o){return isFinite(o=Z(o))?F(o+_):this.getAttribute("transform")}),Y.attr("opacity",Ye).attr("transform",function(o){var d=this.parentNode.__axis;return F((d&&isFinite(d=d(o))?d:Z(o))+_)})),T.remove(),v.attr("d",t===Rt||t===te?a?"M"+k*a+","+W+"H"+_+"V"+B+"H"+k*a:"M"+_+","+W+"V"+B:a?"M"+W+","+k*a+"V"+_+"H"+B+"V"+k*a:"M"+W+","+_+"H"+B),A.attr("opacity",1).attr("transform",function(o){return F(Z(o)+_)}),D.attr(C+"2",k*s),b.attr(C,k*L).text(g),Q.filter(Qn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===te?"start":t===Rt?"end":"middle"),Q.each(function(){this.__axis=Z})}return w.scale=function(x){return arguments.length?(e=x,w):e},w.ticks=function(){return n=Array.from(arguments),w},w.tickArguments=function(x){return arguments.length?(n=x==null?[]:Array.from(x),w):n.slice()},w.tickValues=function(x){return arguments.length?(r=x==null?null:Array.from(x),w):r&&r.slice()},w.tickFormat=function(x){return arguments.length?(i=x,w):i},w.tickSize=function(x){return arguments.length?(s=a=+x,w):s},w.tickSizeInner=function(x){return arguments.length?(s=+x,w):s},w.tickSizeOuter=function(x){return arguments.length?(a=+x,w):a},w.tickPadding=function(x){return arguments.length?(y=+x,w):y},w.offset=function(x){return arguments.length?(_=+x,w):_},w}function Jn(t){return Ge(Bt,t)}function $n(t){return Ge(ue,t)}const Kn=Math.PI/180,tr=180/Math.PI,Gt=18,je=.96422,Qe=1,Je=.82521,$e=4/29,wt=6/29,Ke=3*wt*wt,er=wt*wt*wt;function tn(t){if(t instanceof ot)return new ot(t.l,t.a,t.b,t.opacity);if(t instanceof ut)return en(t);t instanceof Xe||(t=Dn(t));var e=ie(t.r),n=ie(t.g),r=ie(t.b),i=ee((.2225045*e+.7168786*n+.0606169*r)/Qe),s,a;return e===n&&n===r?s=a=i:(s=ee((.4360747*e+.3850649*n+.1430804*r)/je),a=ee((.0139322*e+.0971045*n+.7141733*r)/Je)),new ot(116*i-16,500*(s-i),200*(i-a),t.opacity)}function nr(t,e,n,r){return arguments.length===1?tn(t):new ot(t,e,n,r??1)}function ot(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Be(ot,nr,Ze(qe,{brighter(t){return new ot(this.l+Gt*(t??1),this.a,this.b,this.opacity)},darker(t){return new ot(this.l-Gt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=je*ne(e),t=Qe*ne(t),n=Je*ne(n),new Xe(re(3.1338561*e-1.6168667*t-.4906146*n),re(-.9787684*e+1.9161415*t+.033454*n),re(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ee(t){return t>er?Math.pow(t,1/3):t/Ke+$e}function ne(t){return t>wt?t*t*t:Ke*(t-$e)}function re(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ie(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function rr(t){if(t instanceof ut)return new ut(t.h,t.c,t.l,t.opacity);if(t instanceof ot||(t=tn(t)),t.a===0&&t.b===0)return new ut(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const _=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return _;let k;do _.push(k=new Date(+s)),e(s,y),t(s);while(kK(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(se.setTime(+s),ae.setTime(+a),t(se),t(ae),Math.floor(n(se,ae))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Dt=K(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Dt.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?K(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Dt);Dt.range;const ft=1e3,rt=ft*60,ht=rt*60,dt=ht*24,pe=dt*7,Fe=dt*30,oe=dt*365,gt=K(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ft)},(t,e)=>(e-t)/ft,t=>t.getUTCSeconds());gt.range;const Et=K(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ft)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getMinutes());Et.range;const or=K(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getUTCMinutes());or.range;const At=K(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ft-t.getMinutes()*rt)},(t,e)=>{t.setTime(+t+e*ht)},(t,e)=>(e-t)/ht,t=>t.getHours());At.range;const cr=K(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ht)},(t,e)=>(e-t)/ht,t=>t.getUTCHours());cr.range;const yt=K(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*rt)/dt,t=>t.getDate()-1);yt.range;const Te=K(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/dt,t=>t.getUTCDate()-1);Te.range;const lr=K(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/dt,t=>Math.floor(t/dt));lr.range;function Tt(t){return K(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*rt)/pe)}const Ot=Tt(0),It=Tt(1),nn=Tt(2),rn=Tt(3),kt=Tt(4),sn=Tt(5),an=Tt(6);Ot.range;It.range;nn.range;rn.range;kt.range;sn.range;an.range;function vt(t){return K(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/pe)}const on=vt(0),jt=vt(1),ur=vt(2),fr=vt(3),Mt=vt(4),hr=vt(5),dr=vt(6);on.range;jt.range;ur.range;fr.range;Mt.range;hr.range;dr.range;const Wt=K(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Wt.range;const mr=K(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());mr.range;const mt=K(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());mt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:K(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});mt.range;const pt=K(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());pt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:K(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});pt.range;function gr(t,e,n,r,i,s){const a=[[gt,1,ft],[gt,5,5*ft],[gt,15,15*ft],[gt,30,30*ft],[s,1,rt],[s,5,5*rt],[s,15,15*rt],[s,30,30*rt],[i,1,ht],[i,3,3*ht],[i,6,6*ht],[i,12,12*ht],[r,1,dt],[r,2,2*dt],[n,1,pe],[e,1,Fe],[e,3,3*Fe],[t,1,oe]];function y(k,C,F){const w=CL).right(a,w);if(x===a.length)return t.every(Ue(k/oe,C/oe,F));if(x===0)return Dt.every(Math.max(Ue(k,C,F),1));const[q,g]=a[w/a[x-1][2]53)return null;"w"in l||(l.w=1),"Z"in l?(z=le(Yt(l.y,0,1)),j=z.getUTCDay(),z=j>4||j===0?jt.ceil(z):jt(z),z=Te.offset(z,(l.V-1)*7),l.y=z.getUTCFullYear(),l.m=z.getUTCMonth(),l.d=z.getUTCDate()+(l.w+6)%7):(z=ce(Yt(l.y,0,1)),j=z.getDay(),z=j>4||j===0?It.ceil(z):It(z),z=yt.offset(z,(l.V-1)*7),l.y=z.getFullYear(),l.m=z.getMonth(),l.d=z.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),j="Z"in l?le(Yt(l.y,0,1)).getUTCDay():ce(Yt(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(j+5)%7:l.w+l.U*7-(j+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,le(l)):ce(l)}}function T(p,E,M,l){for(var R=0,z=E.length,j=M.length,J,et;R=j)return-1;if(J=E.charCodeAt(R++),J===37){if(J=E.charAt(R++),et=Q[J in Le?E.charAt(R++):J],!et||(l=et(p,M,l))<0)return-1}else if(J!=M.charCodeAt(l++))return-1}return l}function Y(p,E,M){var l=k.exec(E.slice(M));return l?(p.p=C.get(l[0].toLowerCase()),M+l[0].length):-1}function D(p,E,M){var l=x.exec(E.slice(M));return l?(p.w=q.get(l[0].toLowerCase()),M+l[0].length):-1}function b(p,E,M){var l=F.exec(E.slice(M));return l?(p.w=w.get(l[0].toLowerCase()),M+l[0].length):-1}function o(p,E,M){var l=O.exec(E.slice(M));return l?(p.m=W.get(l[0].toLowerCase()),M+l[0].length):-1}function d(p,E,M){var l=g.exec(E.slice(M));return l?(p.m=L.get(l[0].toLowerCase()),M+l[0].length):-1}function m(p,E,M){return T(p,e,E,M)}function u(p,E,M){return T(p,n,E,M)}function S(p,E,M){return T(p,r,E,M)}function c(p){return a[p.getDay()]}function X(p){return s[p.getDay()]}function f(p){return _[p.getMonth()]}function h(p){return y[p.getMonth()]}function U(p){return i[+(p.getHours()>=12)]}function G(p){return 1+~~(p.getMonth()/3)}function H(p){return a[p.getUTCDay()]}function N(p){return s[p.getUTCDay()]}function I(p){return _[p.getUTCMonth()]}function V(p){return y[p.getUTCMonth()]}function st(p){return i[+(p.getUTCHours()>=12)]}function it(p){return 1+~~(p.getUTCMonth()/3)}return{format:function(p){var E=v(p+="",B);return E.toString=function(){return p},E},parse:function(p){var E=A(p+="",!1);return E.toString=function(){return p},E},utcFormat:function(p){var E=v(p+="",Z);return E.toString=function(){return p},E},utcParse:function(p){var E=A(p+="",!0);return E.toString=function(){return p},E}}}var Le={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,Tr=/^%/,vr=/[\\^$*+?|[\]().{}]/g;function P(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function xr(t,e,n){var r=tt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function wr(t,e,n){var r=tt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Dr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Mr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ee(t,e,n){var r=tt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ae(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Sr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function _r(t,e,n){var r=tt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Ur(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ie(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=tt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function We(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=tt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=tt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ir(t,e,n){var r=Tr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Wr(t,e,n){var r=tt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=tt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Oe(t,e){return P(t.getDate(),e,2)}function Hr(t,e){return P(t.getHours(),e,2)}function zr(t,e){return P(t.getHours()%12||12,e,2)}function Nr(t,e){return P(1+yt.count(mt(t),t),e,3)}function cn(t,e){return P(t.getMilliseconds(),e,3)}function Vr(t,e){return cn(t,e)+"000"}function Pr(t,e){return P(t.getMonth()+1,e,2)}function Rr(t,e){return P(t.getMinutes(),e,2)}function Br(t,e){return P(t.getSeconds(),e,2)}function Zr(t){var e=t.getDay();return e===0?7:e}function Xr(t,e){return P(Ot.count(mt(t)-1,t),e,2)}function ln(t){var e=t.getDay();return e>=4||e===0?kt(t):kt.ceil(t)}function qr(t,e){return t=ln(t),P(kt.count(mt(t),t)+(mt(t).getDay()===4),e,2)}function Gr(t){return t.getDay()}function jr(t,e){return P(It.count(mt(t)-1,t),e,2)}function Qr(t,e){return P(t.getFullYear()%100,e,2)}function Jr(t,e){return t=ln(t),P(t.getFullYear()%100,e,2)}function $r(t,e){return P(t.getFullYear()%1e4,e,4)}function Kr(t,e){var n=t.getDay();return t=n>=4||n===0?kt(t):kt.ceil(t),P(t.getFullYear()%1e4,e,4)}function ti(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+P(e/60|0,"0",2)+P(e%60,"0",2)}function He(t,e){return P(t.getUTCDate(),e,2)}function ei(t,e){return P(t.getUTCHours(),e,2)}function ni(t,e){return P(t.getUTCHours()%12||12,e,2)}function ri(t,e){return P(1+Te.count(pt(t),t),e,3)}function un(t,e){return P(t.getUTCMilliseconds(),e,3)}function ii(t,e){return un(t,e)+"000"}function si(t,e){return P(t.getUTCMonth()+1,e,2)}function ai(t,e){return P(t.getUTCMinutes(),e,2)}function oi(t,e){return P(t.getUTCSeconds(),e,2)}function ci(t){var e=t.getUTCDay();return e===0?7:e}function li(t,e){return P(on.count(pt(t)-1,t),e,2)}function fn(t){var e=t.getUTCDay();return e>=4||e===0?Mt(t):Mt.ceil(t)}function ui(t,e){return t=fn(t),P(Mt.count(pt(t),t)+(pt(t).getUTCDay()===4),e,2)}function fi(t){return t.getUTCDay()}function hi(t,e){return P(jt.count(pt(t)-1,t),e,2)}function di(t,e){return P(t.getUTCFullYear()%100,e,2)}function mi(t,e){return t=fn(t),P(t.getUTCFullYear()%100,e,2)}function gi(t,e){return P(t.getUTCFullYear()%1e4,e,4)}function yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Mt(t):Mt.ceil(t),P(t.getUTCFullYear()%1e4,e,4)}function ki(){return"+0000"}function ze(){return"%"}function Ne(t){return+t}function Ve(t){return Math.floor(+t/1e3)}var bt,Qt;pi({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"]});function pi(t){return bt=pr(t),Qt=bt.format,bt.parse,bt.utcFormat,bt.utcParse,bt}function Ti(t){return new Date(t)}function vi(t){return t instanceof Date?+t:+new Date(+t)}function hn(t,e,n,r,i,s,a,y,_,k){var C=zn(),F=C.invert,w=C.domain,x=k(".%L"),q=k(":%S"),g=k("%I:%M"),L=k("%I %p"),O=k("%a %d"),W=k("%b %d"),B=k("%B"),Z=k("%Y");function Q(v){return(_(v)4&&(x+=7),w.add(x,n));return q.diff(g,"week")+1},y.isoWeekday=function(k){return this.$utils().u(k)?this.day()||7:this.day(this.day()%7?k:k-7)};var _=y.startOf;y.startOf=function(k,C){var F=this.$utils(),w=!!F.u(C)||C;return F.p(k)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):_.bind(this)(k,C)}}})})(dn);var xi=dn.exports;const wi=ke(xi);var mn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(ye,function(){var n={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"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,y={},_=function(g){return(g=+g)+(g>68?1900:2e3)},k=function(g){return function(L){this[g]=+L}},C=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(L){if(!L||L==="Z")return 0;var O=L.match(/([+-]|\d\d)/g),W=60*O[1]+(+O[2]||0);return W===0?0:O[0]==="+"?-W:W}(g)}],F=function(g){var L=y[g];return L&&(L.indexOf?L:L.s.concat(L.f))},w=function(g,L){var O,W=y.meridiem;if(W){for(var B=1;B<=24;B+=1)if(g.indexOf(W(B,0,L))>-1){O=B>12;break}}else O=g===(L?"pm":"PM");return O},x={A:[a,function(g){this.afternoon=w(g,!1)}],a:[a,function(g){this.afternoon=w(g,!0)}],S:[/\d/,function(g){this.milliseconds=100*+g}],SS:[i,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[s,k("seconds")],ss:[s,k("seconds")],m:[s,k("minutes")],mm:[s,k("minutes")],H:[s,k("hours")],h:[s,k("hours")],HH:[s,k("hours")],hh:[s,k("hours")],D:[s,k("day")],DD:[i,k("day")],Do:[a,function(g){var L=y.ordinal,O=g.match(/\d+/);if(this.day=O[0],L)for(var W=1;W<=31;W+=1)L(W).replace(/\[|\]/g,"")===g&&(this.day=W)}],M:[s,k("month")],MM:[i,k("month")],MMM:[a,function(g){var L=F("months"),O=(F("monthsShort")||L.map(function(W){return W.slice(0,3)})).indexOf(g)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[a,function(g){var L=F("months").indexOf(g)+1;if(L<1)throw new Error;this.month=L%12||L}],Y:[/[+-]?\d+/,k("year")],YY:[i,function(g){this.year=_(g)}],YYYY:[/\d{4}/,k("year")],Z:C,ZZ:C};function q(g){var L,O;L=g,O=y&&y.formats;for(var W=(g=L.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Y,D,b){var o=b&&b.toUpperCase();return D||O[b]||n[b]||O[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(d,m,u){return m||u.slice(1)})})).match(r),B=W.length,Z=0;Z-1)return new Date((c==="X"?1e3:1)*S);var f=q(c)(S),h=f.year,U=f.month,G=f.day,H=f.hours,N=f.minutes,I=f.seconds,V=f.milliseconds,st=f.zone,it=new Date,p=G||(h||U?1:it.getDate()),E=h||it.getFullYear(),M=0;h&&!U||(M=U>0?U-1:it.getMonth());var l=H||0,R=N||0,z=I||0,j=V||0;return st?new Date(Date.UTC(E,M,p,l,R,z,j+60*st.offset*1e3)):X?new Date(Date.UTC(E,M,p,l,R,z,j)):new Date(E,M,p,l,R,z,j)}catch{return new Date("")}}(Q,T,v),this.init(),o&&o!==!0&&(this.$L=this.locale(o).$L),b&&Q!=this.format(T)&&(this.$d=new Date("")),y={}}else if(T instanceof Array)for(var d=T.length,m=1;m<=d;m+=1){A[1]=T[m-1];var u=O.apply(this,A);if(u.isValid()){this.$d=u.$d,this.$L=u.$L,this.init();break}m===d&&(this.$d=new Date(""))}else B.call(this,Z)}}})})(mn);var Ci=mn.exports;const Di=ke(Ci);var gn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(ye,function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,_=this.$locale();if(!this.isValid())return s.bind(this)(a);var k=this.$utils(),C=(a||"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(F){switch(F){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return _.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return _.ordinal(y.week(),"W");case"w":case"ww":return k.s(y.week(),F==="w"?1:2,"0");case"W":case"WW":return k.s(y.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return k.s(String(y.$H===0?24:y.$H),F==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return F}});return s.bind(this)(C)}}})})(gn);var Mi=gn.exports;const Si=ke(Mi);var he=function(){var t=function(b,o,d,m){for(d=d||{},m=b.length;m--;d[b[m]]=o);return d},e=[6,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,33,35,37],n=[1,25],r=[1,26],i=[1,27],s=[1,28],a=[1,29],y=[1,30],_=[1,31],k=[1,9],C=[1,10],F=[1,11],w=[1,12],x=[1,13],q=[1,14],g=[1,15],L=[1,16],O=[1,18],W=[1,19],B=[1,20],Z=[1,21],Q=[1,22],v=[1,24],A=[1,32],T={trace:function(){},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,dateFormat:19,inclusiveEndDates:20,topAxis:21,axisFormat:22,tickInterval:23,excludes:24,includes:25,todayMarker:26,title:27,acc_title:28,acc_title_value:29,acc_descr:30,acc_descr_value:31,acc_descr_multiline_value:32,section:33,clickStatement:34,taskTxt:35,taskData:36,click:37,callbackname:38,callbackargs:39,href:40,clickStatementDebug:41,$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",19:"dateFormat",20:"inclusiveEndDates",21:"topAxis",22:"axisFormat",23:"tickInterval",24:"excludes",25:"includes",26:"todayMarker",27:"title",28:"acc_title",29:"acc_title_value",30:"acc_descr",31:"acc_descr_value",32:"acc_descr_multiline_value",33:"section",35:"taskTxt",36:"taskData",37:"click",38:"callbackname",39:"callbackargs",40:"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],[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],[34,2],[34,3],[34,3],[34,4],[34,3],[34,4],[34,2],[41,2],[41,3],[41,3],[41,4],[41,3],[41,4],[41,2]],performAction:function(o,d,m,u,S,c,X){var f=c.length-1;switch(S){case 1:return c[f-1];case 2:this.$=[];break;case 3:c[f-1].push(c[f]),this.$=c[f-1];break;case 4:case 5:this.$=c[f];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setDateFormat(c[f].substr(11)),this.$=c[f].substr(11);break;case 16:u.enableInclusiveEndDates(),this.$=c[f].substr(18);break;case 17:u.TopAxis(),this.$=c[f].substr(8);break;case 18:u.setAxisFormat(c[f].substr(11)),this.$=c[f].substr(11);break;case 19:u.setTickInterval(c[f].substr(13)),this.$=c[f].substr(13);break;case 20:u.setExcludes(c[f].substr(9)),this.$=c[f].substr(9);break;case 21:u.setIncludes(c[f].substr(9)),this.$=c[f].substr(9);break;case 22:u.setTodayMarker(c[f].substr(12)),this.$=c[f].substr(12);break;case 24:u.setDiagramTitle(c[f].substr(6)),this.$=c[f].substr(6);break;case 25:this.$=c[f].trim(),u.setAccTitle(this.$);break;case 26:case 27:this.$=c[f].trim(),u.setAccDescription(this.$);break;case 28:u.addSection(c[f].substr(8)),this.$=c[f].substr(8);break;case 30:u.addTask(c[f-1],c[f]),this.$="task";break;case 31:this.$=c[f-1],u.setClickEvent(c[f-1],c[f],null);break;case 32:this.$=c[f-2],u.setClickEvent(c[f-2],c[f-1],c[f]);break;case 33:this.$=c[f-2],u.setClickEvent(c[f-2],c[f-1],null),u.setLink(c[f-2],c[f]);break;case 34:this.$=c[f-3],u.setClickEvent(c[f-3],c[f-2],c[f-1]),u.setLink(c[f-3],c[f]);break;case 35:this.$=c[f-2],u.setClickEvent(c[f-2],c[f],null),u.setLink(c[f-2],c[f-1]);break;case 36:this.$=c[f-3],u.setClickEvent(c[f-3],c[f-1],c[f]),u.setLink(c[f-3],c[f-2]);break;case 37:this.$=c[f-1],u.setLink(c[f-1],c[f]);break;case 38:case 44:this.$=c[f-1]+" "+c[f];break;case 39:case 40:case 42:this.$=c[f-2]+" "+c[f-1]+" "+c[f];break;case 41:case 43:this.$=c[f-3]+" "+c[f-2]+" "+c[f-1]+" "+c[f];break}},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:r,14:i,15:s,16:a,17:y,18:_,19:k,20:C,21:F,22:w,23:x,24:q,25:g,26:L,27:O,28:W,30:B,32:Z,33:Q,34:23,35:v,37:A},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:33,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:_,19:k,20:C,21:F,22:w,23:x,24:q,25:g,26:L,27:O,28:W,30:B,32:Z,33:Q,34:23,35:v,37:A},t(e,[2,5]),t(e,[2,6]),t(e,[2,15]),t(e,[2,16]),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]),{29:[1,34]},{31:[1,35]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),{36:[1,36]},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]),{38:[1,37],40:[1,38]},t(e,[2,4]),t(e,[2,25]),t(e,[2,26]),t(e,[2,30]),t(e,[2,31],{39:[1,39],40:[1,40]}),t(e,[2,37],{38:[1,41]}),t(e,[2,32],{40:[1,42]}),t(e,[2,33]),t(e,[2,35],{39:[1,43]}),t(e,[2,34]),t(e,[2,36])],defaultActions:{},parseError:function(o,d){if(d.recoverable)this.trace(o);else{var m=new Error(o);throw m.hash=d,m}},parse:function(o){var d=this,m=[0],u=[],S=[null],c=[],X=this.table,f="",h=0,U=0,G=2,H=1,N=c.slice.call(arguments,1),I=Object.create(this.lexer),V={yy:{}};for(var st in this.yy)Object.prototype.hasOwnProperty.call(this.yy,st)&&(V.yy[st]=this.yy[st]);I.setInput(o,V.yy),V.yy.lexer=I,V.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var it=I.yylloc;c.push(it);var p=I.options&&I.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function E(){var ct;return ct=u.pop()||I.lex()||H,typeof ct!="number"&&(ct instanceof Array&&(u=ct,ct=u.pop()),ct=d.symbols_[ct]||ct),ct}for(var M,l,R,z,j={},J,et,Ut,Vt;;){if(l=m[m.length-1],this.defaultActions[l]?R=this.defaultActions[l]:((M===null||typeof M>"u")&&(M=E()),R=X[l]&&X[l][M]),typeof R>"u"||!R.length||!R[0]){var $t="";Vt=[];for(J in X[l])this.terminals_[J]&&J>G&&Vt.push("'"+this.terminals_[J]+"'");I.showPosition?$t="Parse error on line "+(h+1)+`: +import{J as Be,K as Ze,R as Xe,L as qe,M as Dn,N as Kt,O as Mn,P as ye,Q as ke,T as nt,c as xt,s as Sn,g as _n,B as Un,D as Yn,b as Fn,a as Ln,E as En,m as An,l as qt,h as Pt,i as In,j as Wn,z as On}from"./index-e0ff10fa.js";import{b as Hn,t as Ue,c as zn,a as Nn,l as Vn}from"./linear-3615363e.js";import{i as Pn}from"./init-77b53fdd.js";function Rn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function Bn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Zn(t){return t}var Bt=1,te=2,ue=3,Rt=4,Ye=1e-6;function Xn(t){return"translate("+t+",0)"}function qn(t){return"translate(0,"+t+")"}function Gn(t){return e=>+t(e)}function jn(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Qn(){return!this.__axis}function Ge(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,_=typeof window<"u"&&window.devicePixelRatio>1?0:.5,k=t===Bt||t===Rt?-1:1,C=t===Rt||t===te?"x":"y",F=t===Bt||t===ue?Xn:qn;function w(x){var q=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):Zn),L=Math.max(s,0)+y,O=e.range(),W=+O[0]+_,B=+O[O.length-1]+_,Z=(e.bandwidth?jn:Gn)(e.copy(),_),Q=x.selection?x.selection():x,v=Q.selectAll(".domain").data([null]),A=Q.selectAll(".tick").data(q,e).order(),T=A.exit(),Y=A.enter().append("g").attr("class","tick"),D=A.select("line"),b=A.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(Y),D=D.merge(Y.append("line").attr("stroke","currentColor").attr(C+"2",k*s)),b=b.merge(Y.append("text").attr("fill","currentColor").attr(C,k*L).attr("dy",t===Bt?"0em":t===ue?"0.71em":"0.32em")),x!==Q&&(v=v.transition(x),A=A.transition(x),D=D.transition(x),b=b.transition(x),T=T.transition(x).attr("opacity",Ye).attr("transform",function(o){return isFinite(o=Z(o))?F(o+_):this.getAttribute("transform")}),Y.attr("opacity",Ye).attr("transform",function(o){var d=this.parentNode.__axis;return F((d&&isFinite(d=d(o))?d:Z(o))+_)})),T.remove(),v.attr("d",t===Rt||t===te?a?"M"+k*a+","+W+"H"+_+"V"+B+"H"+k*a:"M"+_+","+W+"V"+B:a?"M"+W+","+k*a+"V"+_+"H"+B+"V"+k*a:"M"+W+","+_+"H"+B),A.attr("opacity",1).attr("transform",function(o){return F(Z(o)+_)}),D.attr(C+"2",k*s),b.attr(C,k*L).text(g),Q.filter(Qn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===te?"start":t===Rt?"end":"middle"),Q.each(function(){this.__axis=Z})}return w.scale=function(x){return arguments.length?(e=x,w):e},w.ticks=function(){return n=Array.from(arguments),w},w.tickArguments=function(x){return arguments.length?(n=x==null?[]:Array.from(x),w):n.slice()},w.tickValues=function(x){return arguments.length?(r=x==null?null:Array.from(x),w):r&&r.slice()},w.tickFormat=function(x){return arguments.length?(i=x,w):i},w.tickSize=function(x){return arguments.length?(s=a=+x,w):s},w.tickSizeInner=function(x){return arguments.length?(s=+x,w):s},w.tickSizeOuter=function(x){return arguments.length?(a=+x,w):a},w.tickPadding=function(x){return arguments.length?(y=+x,w):y},w.offset=function(x){return arguments.length?(_=+x,w):_},w}function Jn(t){return Ge(Bt,t)}function $n(t){return Ge(ue,t)}const Kn=Math.PI/180,tr=180/Math.PI,Gt=18,je=.96422,Qe=1,Je=.82521,$e=4/29,wt=6/29,Ke=3*wt*wt,er=wt*wt*wt;function tn(t){if(t instanceof ot)return new ot(t.l,t.a,t.b,t.opacity);if(t instanceof ut)return en(t);t instanceof Xe||(t=Dn(t));var e=ie(t.r),n=ie(t.g),r=ie(t.b),i=ee((.2225045*e+.7168786*n+.0606169*r)/Qe),s,a;return e===n&&n===r?s=a=i:(s=ee((.4360747*e+.3850649*n+.1430804*r)/je),a=ee((.0139322*e+.0971045*n+.7141733*r)/Je)),new ot(116*i-16,500*(s-i),200*(i-a),t.opacity)}function nr(t,e,n,r){return arguments.length===1?tn(t):new ot(t,e,n,r??1)}function ot(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Be(ot,nr,Ze(qe,{brighter(t){return new ot(this.l+Gt*(t??1),this.a,this.b,this.opacity)},darker(t){return new ot(this.l-Gt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=je*ne(e),t=Qe*ne(t),n=Je*ne(n),new Xe(re(3.1338561*e-1.6168667*t-.4906146*n),re(-.9787684*e+1.9161415*t+.033454*n),re(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ee(t){return t>er?Math.pow(t,1/3):t/Ke+$e}function ne(t){return t>wt?t*t*t:Ke*(t-$e)}function re(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ie(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function rr(t){if(t instanceof ut)return new ut(t.h,t.c,t.l,t.opacity);if(t instanceof ot||(t=tn(t)),t.a===0&&t.b===0)return new ut(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const _=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return _;let k;do _.push(k=new Date(+s)),e(s,y),t(s);while(kK(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(se.setTime(+s),ae.setTime(+a),t(se),t(ae),Math.floor(n(se,ae))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Dt=K(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Dt.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?K(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Dt);Dt.range;const ft=1e3,rt=ft*60,ht=rt*60,dt=ht*24,pe=dt*7,Fe=dt*30,oe=dt*365,gt=K(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ft)},(t,e)=>(e-t)/ft,t=>t.getUTCSeconds());gt.range;const Et=K(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ft)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getMinutes());Et.range;const or=K(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getUTCMinutes());or.range;const At=K(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ft-t.getMinutes()*rt)},(t,e)=>{t.setTime(+t+e*ht)},(t,e)=>(e-t)/ht,t=>t.getHours());At.range;const cr=K(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ht)},(t,e)=>(e-t)/ht,t=>t.getUTCHours());cr.range;const yt=K(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*rt)/dt,t=>t.getDate()-1);yt.range;const Te=K(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/dt,t=>t.getUTCDate()-1);Te.range;const lr=K(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/dt,t=>Math.floor(t/dt));lr.range;function Tt(t){return K(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*rt)/pe)}const Ot=Tt(0),It=Tt(1),nn=Tt(2),rn=Tt(3),kt=Tt(4),sn=Tt(5),an=Tt(6);Ot.range;It.range;nn.range;rn.range;kt.range;sn.range;an.range;function vt(t){return K(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/pe)}const on=vt(0),jt=vt(1),ur=vt(2),fr=vt(3),Mt=vt(4),hr=vt(5),dr=vt(6);on.range;jt.range;ur.range;fr.range;Mt.range;hr.range;dr.range;const Wt=K(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Wt.range;const mr=K(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());mr.range;const mt=K(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());mt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:K(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});mt.range;const pt=K(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());pt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:K(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});pt.range;function gr(t,e,n,r,i,s){const a=[[gt,1,ft],[gt,5,5*ft],[gt,15,15*ft],[gt,30,30*ft],[s,1,rt],[s,5,5*rt],[s,15,15*rt],[s,30,30*rt],[i,1,ht],[i,3,3*ht],[i,6,6*ht],[i,12,12*ht],[r,1,dt],[r,2,2*dt],[n,1,pe],[e,1,Fe],[e,3,3*Fe],[t,1,oe]];function y(k,C,F){const w=CL).right(a,w);if(x===a.length)return t.every(Ue(k/oe,C/oe,F));if(x===0)return Dt.every(Math.max(Ue(k,C,F),1));const[q,g]=a[w/a[x-1][2]53)return null;"w"in l||(l.w=1),"Z"in l?(z=le(Yt(l.y,0,1)),j=z.getUTCDay(),z=j>4||j===0?jt.ceil(z):jt(z),z=Te.offset(z,(l.V-1)*7),l.y=z.getUTCFullYear(),l.m=z.getUTCMonth(),l.d=z.getUTCDate()+(l.w+6)%7):(z=ce(Yt(l.y,0,1)),j=z.getDay(),z=j>4||j===0?It.ceil(z):It(z),z=yt.offset(z,(l.V-1)*7),l.y=z.getFullYear(),l.m=z.getMonth(),l.d=z.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),j="Z"in l?le(Yt(l.y,0,1)).getUTCDay():ce(Yt(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(j+5)%7:l.w+l.U*7-(j+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,le(l)):ce(l)}}function T(p,E,M,l){for(var R=0,z=E.length,j=M.length,J,et;R=j)return-1;if(J=E.charCodeAt(R++),J===37){if(J=E.charAt(R++),et=Q[J in Le?E.charAt(R++):J],!et||(l=et(p,M,l))<0)return-1}else if(J!=M.charCodeAt(l++))return-1}return l}function Y(p,E,M){var l=k.exec(E.slice(M));return l?(p.p=C.get(l[0].toLowerCase()),M+l[0].length):-1}function D(p,E,M){var l=x.exec(E.slice(M));return l?(p.w=q.get(l[0].toLowerCase()),M+l[0].length):-1}function b(p,E,M){var l=F.exec(E.slice(M));return l?(p.w=w.get(l[0].toLowerCase()),M+l[0].length):-1}function o(p,E,M){var l=O.exec(E.slice(M));return l?(p.m=W.get(l[0].toLowerCase()),M+l[0].length):-1}function d(p,E,M){var l=g.exec(E.slice(M));return l?(p.m=L.get(l[0].toLowerCase()),M+l[0].length):-1}function m(p,E,M){return T(p,e,E,M)}function u(p,E,M){return T(p,n,E,M)}function S(p,E,M){return T(p,r,E,M)}function c(p){return a[p.getDay()]}function X(p){return s[p.getDay()]}function f(p){return _[p.getMonth()]}function h(p){return y[p.getMonth()]}function U(p){return i[+(p.getHours()>=12)]}function G(p){return 1+~~(p.getMonth()/3)}function H(p){return a[p.getUTCDay()]}function N(p){return s[p.getUTCDay()]}function I(p){return _[p.getUTCMonth()]}function V(p){return y[p.getUTCMonth()]}function st(p){return i[+(p.getUTCHours()>=12)]}function it(p){return 1+~~(p.getUTCMonth()/3)}return{format:function(p){var E=v(p+="",B);return E.toString=function(){return p},E},parse:function(p){var E=A(p+="",!1);return E.toString=function(){return p},E},utcFormat:function(p){var E=v(p+="",Z);return E.toString=function(){return p},E},utcParse:function(p){var E=A(p+="",!0);return E.toString=function(){return p},E}}}var Le={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,Tr=/^%/,vr=/[\\^$*+?|[\]().{}]/g;function P(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function xr(t,e,n){var r=tt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function wr(t,e,n){var r=tt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Dr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Mr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ee(t,e,n){var r=tt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ae(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Sr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function _r(t,e,n){var r=tt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Ur(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ie(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=tt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function We(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=tt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=tt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ir(t,e,n){var r=Tr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Wr(t,e,n){var r=tt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=tt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Oe(t,e){return P(t.getDate(),e,2)}function Hr(t,e){return P(t.getHours(),e,2)}function zr(t,e){return P(t.getHours()%12||12,e,2)}function Nr(t,e){return P(1+yt.count(mt(t),t),e,3)}function cn(t,e){return P(t.getMilliseconds(),e,3)}function Vr(t,e){return cn(t,e)+"000"}function Pr(t,e){return P(t.getMonth()+1,e,2)}function Rr(t,e){return P(t.getMinutes(),e,2)}function Br(t,e){return P(t.getSeconds(),e,2)}function Zr(t){var e=t.getDay();return e===0?7:e}function Xr(t,e){return P(Ot.count(mt(t)-1,t),e,2)}function ln(t){var e=t.getDay();return e>=4||e===0?kt(t):kt.ceil(t)}function qr(t,e){return t=ln(t),P(kt.count(mt(t),t)+(mt(t).getDay()===4),e,2)}function Gr(t){return t.getDay()}function jr(t,e){return P(It.count(mt(t)-1,t),e,2)}function Qr(t,e){return P(t.getFullYear()%100,e,2)}function Jr(t,e){return t=ln(t),P(t.getFullYear()%100,e,2)}function $r(t,e){return P(t.getFullYear()%1e4,e,4)}function Kr(t,e){var n=t.getDay();return t=n>=4||n===0?kt(t):kt.ceil(t),P(t.getFullYear()%1e4,e,4)}function ti(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+P(e/60|0,"0",2)+P(e%60,"0",2)}function He(t,e){return P(t.getUTCDate(),e,2)}function ei(t,e){return P(t.getUTCHours(),e,2)}function ni(t,e){return P(t.getUTCHours()%12||12,e,2)}function ri(t,e){return P(1+Te.count(pt(t),t),e,3)}function un(t,e){return P(t.getUTCMilliseconds(),e,3)}function ii(t,e){return un(t,e)+"000"}function si(t,e){return P(t.getUTCMonth()+1,e,2)}function ai(t,e){return P(t.getUTCMinutes(),e,2)}function oi(t,e){return P(t.getUTCSeconds(),e,2)}function ci(t){var e=t.getUTCDay();return e===0?7:e}function li(t,e){return P(on.count(pt(t)-1,t),e,2)}function fn(t){var e=t.getUTCDay();return e>=4||e===0?Mt(t):Mt.ceil(t)}function ui(t,e){return t=fn(t),P(Mt.count(pt(t),t)+(pt(t).getUTCDay()===4),e,2)}function fi(t){return t.getUTCDay()}function hi(t,e){return P(jt.count(pt(t)-1,t),e,2)}function di(t,e){return P(t.getUTCFullYear()%100,e,2)}function mi(t,e){return t=fn(t),P(t.getUTCFullYear()%100,e,2)}function gi(t,e){return P(t.getUTCFullYear()%1e4,e,4)}function yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Mt(t):Mt.ceil(t),P(t.getUTCFullYear()%1e4,e,4)}function ki(){return"+0000"}function ze(){return"%"}function Ne(t){return+t}function Ve(t){return Math.floor(+t/1e3)}var bt,Qt;pi({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"]});function pi(t){return bt=pr(t),Qt=bt.format,bt.parse,bt.utcFormat,bt.utcParse,bt}function Ti(t){return new Date(t)}function vi(t){return t instanceof Date?+t:+new Date(+t)}function hn(t,e,n,r,i,s,a,y,_,k){var C=zn(),F=C.invert,w=C.domain,x=k(".%L"),q=k(":%S"),g=k("%I:%M"),L=k("%I %p"),O=k("%a %d"),W=k("%b %d"),B=k("%B"),Z=k("%Y");function Q(v){return(_(v)4&&(x+=7),w.add(x,n));return q.diff(g,"week")+1},y.isoWeekday=function(k){return this.$utils().u(k)?this.day()||7:this.day(this.day()%7?k:k-7)};var _=y.startOf;y.startOf=function(k,C){var F=this.$utils(),w=!!F.u(C)||C;return F.p(k)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):_.bind(this)(k,C)}}})})(dn);var xi=dn.exports;const wi=ke(xi);var mn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(ye,function(){var n={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"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,y={},_=function(g){return(g=+g)+(g>68?1900:2e3)},k=function(g){return function(L){this[g]=+L}},C=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(L){if(!L||L==="Z")return 0;var O=L.match(/([+-]|\d\d)/g),W=60*O[1]+(+O[2]||0);return W===0?0:O[0]==="+"?-W:W}(g)}],F=function(g){var L=y[g];return L&&(L.indexOf?L:L.s.concat(L.f))},w=function(g,L){var O,W=y.meridiem;if(W){for(var B=1;B<=24;B+=1)if(g.indexOf(W(B,0,L))>-1){O=B>12;break}}else O=g===(L?"pm":"PM");return O},x={A:[a,function(g){this.afternoon=w(g,!1)}],a:[a,function(g){this.afternoon=w(g,!0)}],S:[/\d/,function(g){this.milliseconds=100*+g}],SS:[i,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[s,k("seconds")],ss:[s,k("seconds")],m:[s,k("minutes")],mm:[s,k("minutes")],H:[s,k("hours")],h:[s,k("hours")],HH:[s,k("hours")],hh:[s,k("hours")],D:[s,k("day")],DD:[i,k("day")],Do:[a,function(g){var L=y.ordinal,O=g.match(/\d+/);if(this.day=O[0],L)for(var W=1;W<=31;W+=1)L(W).replace(/\[|\]/g,"")===g&&(this.day=W)}],M:[s,k("month")],MM:[i,k("month")],MMM:[a,function(g){var L=F("months"),O=(F("monthsShort")||L.map(function(W){return W.slice(0,3)})).indexOf(g)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[a,function(g){var L=F("months").indexOf(g)+1;if(L<1)throw new Error;this.month=L%12||L}],Y:[/[+-]?\d+/,k("year")],YY:[i,function(g){this.year=_(g)}],YYYY:[/\d{4}/,k("year")],Z:C,ZZ:C};function q(g){var L,O;L=g,O=y&&y.formats;for(var W=(g=L.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Y,D,b){var o=b&&b.toUpperCase();return D||O[b]||n[b]||O[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(d,m,u){return m||u.slice(1)})})).match(r),B=W.length,Z=0;Z-1)return new Date((c==="X"?1e3:1)*S);var f=q(c)(S),h=f.year,U=f.month,G=f.day,H=f.hours,N=f.minutes,I=f.seconds,V=f.milliseconds,st=f.zone,it=new Date,p=G||(h||U?1:it.getDate()),E=h||it.getFullYear(),M=0;h&&!U||(M=U>0?U-1:it.getMonth());var l=H||0,R=N||0,z=I||0,j=V||0;return st?new Date(Date.UTC(E,M,p,l,R,z,j+60*st.offset*1e3)):X?new Date(Date.UTC(E,M,p,l,R,z,j)):new Date(E,M,p,l,R,z,j)}catch{return new Date("")}}(Q,T,v),this.init(),o&&o!==!0&&(this.$L=this.locale(o).$L),b&&Q!=this.format(T)&&(this.$d=new Date("")),y={}}else if(T instanceof Array)for(var d=T.length,m=1;m<=d;m+=1){A[1]=T[m-1];var u=O.apply(this,A);if(u.isValid()){this.$d=u.$d,this.$L=u.$L,this.init();break}m===d&&(this.$d=new Date(""))}else B.call(this,Z)}}})})(mn);var Ci=mn.exports;const Di=ke(Ci);var gn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(ye,function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,_=this.$locale();if(!this.isValid())return s.bind(this)(a);var k=this.$utils(),C=(a||"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(F){switch(F){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return _.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return _.ordinal(y.week(),"W");case"w":case"ww":return k.s(y.week(),F==="w"?1:2,"0");case"W":case"WW":return k.s(y.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return k.s(String(y.$H===0?24:y.$H),F==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return F}});return s.bind(this)(C)}}})})(gn);var Mi=gn.exports;const Si=ke(Mi);var he=function(){var t=function(b,o,d,m){for(d=d||{},m=b.length;m--;d[b[m]]=o);return d},e=[6,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,33,35,37],n=[1,25],r=[1,26],i=[1,27],s=[1,28],a=[1,29],y=[1,30],_=[1,31],k=[1,9],C=[1,10],F=[1,11],w=[1,12],x=[1,13],q=[1,14],g=[1,15],L=[1,16],O=[1,18],W=[1,19],B=[1,20],Z=[1,21],Q=[1,22],v=[1,24],A=[1,32],T={trace:function(){},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,dateFormat:19,inclusiveEndDates:20,topAxis:21,axisFormat:22,tickInterval:23,excludes:24,includes:25,todayMarker:26,title:27,acc_title:28,acc_title_value:29,acc_descr:30,acc_descr_value:31,acc_descr_multiline_value:32,section:33,clickStatement:34,taskTxt:35,taskData:36,click:37,callbackname:38,callbackargs:39,href:40,clickStatementDebug:41,$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",19:"dateFormat",20:"inclusiveEndDates",21:"topAxis",22:"axisFormat",23:"tickInterval",24:"excludes",25:"includes",26:"todayMarker",27:"title",28:"acc_title",29:"acc_title_value",30:"acc_descr",31:"acc_descr_value",32:"acc_descr_multiline_value",33:"section",35:"taskTxt",36:"taskData",37:"click",38:"callbackname",39:"callbackargs",40:"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],[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],[34,2],[34,3],[34,3],[34,4],[34,3],[34,4],[34,2],[41,2],[41,3],[41,3],[41,4],[41,3],[41,4],[41,2]],performAction:function(o,d,m,u,S,c,X){var f=c.length-1;switch(S){case 1:return c[f-1];case 2:this.$=[];break;case 3:c[f-1].push(c[f]),this.$=c[f-1];break;case 4:case 5:this.$=c[f];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setDateFormat(c[f].substr(11)),this.$=c[f].substr(11);break;case 16:u.enableInclusiveEndDates(),this.$=c[f].substr(18);break;case 17:u.TopAxis(),this.$=c[f].substr(8);break;case 18:u.setAxisFormat(c[f].substr(11)),this.$=c[f].substr(11);break;case 19:u.setTickInterval(c[f].substr(13)),this.$=c[f].substr(13);break;case 20:u.setExcludes(c[f].substr(9)),this.$=c[f].substr(9);break;case 21:u.setIncludes(c[f].substr(9)),this.$=c[f].substr(9);break;case 22:u.setTodayMarker(c[f].substr(12)),this.$=c[f].substr(12);break;case 24:u.setDiagramTitle(c[f].substr(6)),this.$=c[f].substr(6);break;case 25:this.$=c[f].trim(),u.setAccTitle(this.$);break;case 26:case 27:this.$=c[f].trim(),u.setAccDescription(this.$);break;case 28:u.addSection(c[f].substr(8)),this.$=c[f].substr(8);break;case 30:u.addTask(c[f-1],c[f]),this.$="task";break;case 31:this.$=c[f-1],u.setClickEvent(c[f-1],c[f],null);break;case 32:this.$=c[f-2],u.setClickEvent(c[f-2],c[f-1],c[f]);break;case 33:this.$=c[f-2],u.setClickEvent(c[f-2],c[f-1],null),u.setLink(c[f-2],c[f]);break;case 34:this.$=c[f-3],u.setClickEvent(c[f-3],c[f-2],c[f-1]),u.setLink(c[f-3],c[f]);break;case 35:this.$=c[f-2],u.setClickEvent(c[f-2],c[f],null),u.setLink(c[f-2],c[f-1]);break;case 36:this.$=c[f-3],u.setClickEvent(c[f-3],c[f-1],c[f]),u.setLink(c[f-3],c[f-2]);break;case 37:this.$=c[f-1],u.setLink(c[f-1],c[f]);break;case 38:case 44:this.$=c[f-1]+" "+c[f];break;case 39:case 40:case 42:this.$=c[f-2]+" "+c[f-1]+" "+c[f];break;case 41:case 43:this.$=c[f-3]+" "+c[f-2]+" "+c[f-1]+" "+c[f];break}},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:r,14:i,15:s,16:a,17:y,18:_,19:k,20:C,21:F,22:w,23:x,24:q,25:g,26:L,27:O,28:W,30:B,32:Z,33:Q,34:23,35:v,37:A},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:33,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:_,19:k,20:C,21:F,22:w,23:x,24:q,25:g,26:L,27:O,28:W,30:B,32:Z,33:Q,34:23,35:v,37:A},t(e,[2,5]),t(e,[2,6]),t(e,[2,15]),t(e,[2,16]),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]),{29:[1,34]},{31:[1,35]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),{36:[1,36]},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]),{38:[1,37],40:[1,38]},t(e,[2,4]),t(e,[2,25]),t(e,[2,26]),t(e,[2,30]),t(e,[2,31],{39:[1,39],40:[1,40]}),t(e,[2,37],{38:[1,41]}),t(e,[2,32],{40:[1,42]}),t(e,[2,33]),t(e,[2,35],{39:[1,43]}),t(e,[2,34]),t(e,[2,36])],defaultActions:{},parseError:function(o,d){if(d.recoverable)this.trace(o);else{var m=new Error(o);throw m.hash=d,m}},parse:function(o){var d=this,m=[0],u=[],S=[null],c=[],X=this.table,f="",h=0,U=0,G=2,H=1,N=c.slice.call(arguments,1),I=Object.create(this.lexer),V={yy:{}};for(var st in this.yy)Object.prototype.hasOwnProperty.call(this.yy,st)&&(V.yy[st]=this.yy[st]);I.setInput(o,V.yy),V.yy.lexer=I,V.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var it=I.yylloc;c.push(it);var p=I.options&&I.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function E(){var ct;return ct=u.pop()||I.lex()||H,typeof ct!="number"&&(ct instanceof Array&&(u=ct,ct=u.pop()),ct=d.symbols_[ct]||ct),ct}for(var M,l,R,z,j={},J,et,Ut,Vt;;){if(l=m[m.length-1],this.defaultActions[l]?R=this.defaultActions[l]:((M===null||typeof M>"u")&&(M=E()),R=X[l]&&X[l][M]),typeof R>"u"||!R.length||!R[0]){var $t="";Vt=[];for(J in X[l])this.terminals_[J]&&J>G&&Vt.push("'"+this.terminals_[J]+"'");I.showPosition?$t="Parse error on line "+(h+1)+`: `+I.showPosition()+` Expecting `+Vt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":$t="Parse error on line "+(h+1)+": Unexpected "+(M==H?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError($t,{text:I.match,token:this.terminals_[M]||M,line:I.yylineno,loc:it,expected:Vt})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+l+", token: "+M);switch(R[0]){case 1:m.push(M),S.push(I.yytext),c.push(I.yylloc),m.push(R[1]),M=null,U=I.yyleng,f=I.yytext,h=I.yylineno,it=I.yylloc;break;case 2:if(et=this.productions_[R[1]][1],j.$=S[S.length-et],j._$={first_line:c[c.length-(et||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(et||1)].first_column,last_column:c[c.length-1].last_column},p&&(j._$.range=[c[c.length-(et||1)].range[0],c[c.length-1].range[1]]),z=this.performAction.apply(j,[f,U,h,V.yy,R[1],S,c].concat(N)),typeof z<"u")return z;et&&(m=m.slice(0,-1*et*2),S=S.slice(0,-1*et),c=c.slice(0,-1*et)),m.push(this.productions_[R[1]][0]),S.push(j.$),c.push(j._$),Ut=X[m[m.length-2]][m[m.length-1]],m.push(Ut);break;case 3:return!0}}return!0}},Y=function(){var b={EOF:1,parseError:function(d,m){if(this.yy.parser)this.yy.parser.parseError(d,m);else throw new Error(d)},setInput:function(o,d){return this.yy=d||this.yy||{},this._input=o,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},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var d=o.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var d=o.length,m=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var u=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),m.length-1&&(this.yylineno-=m.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:m?(m.length===u.length?this.yylloc.first_column:0)+u[u.length-m.length].length-m[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),d=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/assets/gitGraphDiagram-99d0ae7c-54d7e10a.js b/assets/gitGraphDiagram-99d0ae7c-9ea9e35b.js similarity index 99% rename from assets/gitGraphDiagram-99d0ae7c-54d7e10a.js rename to assets/gitGraphDiagram-99d0ae7c-9ea9e35b.js index 20ce4a9..921f848 100644 --- a/assets/gitGraphDiagram-99d0ae7c-54d7e10a.js +++ b/assets/gitGraphDiagram-99d0ae7c-9ea9e35b.js @@ -1,4 +1,4 @@ -import{c as A,s as vt,g as Ct,a as At,b as Ot,B as St,D as It,l as G,j as D,E as Gt,h as Pt,z as Ht,H as Nt,I as Bt}from"./index-b371ab76.js";var mt=function(){var r=function(q,h,b,k){for(b=b||{},k=q.length;k--;b[q[k]]=h);return b},a=[1,3],o=[1,6],u=[1,4],n=[1,5],c=[2,5],m=[1,12],l=[5,7,13,19,21,23,24,26,28,31,36,39,46],E=[7,13,19,21,23,24,26,28,31,36,39],_=[7,12,13,19,21,23,24,26,28,31,36,39],i=[7,13,46],g=[1,42],f=[1,41],x=[7,13,29,32,34,37,46],p=[1,55],d=[1,56],y=[1,57],N=[7,13,32,34,41,46],w={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,GG:5,document:6,EOF:7,":":8,DIR:9,options:10,body:11,OPT:12,NL:13,line:14,statement:15,commitStatement:16,mergeStatement:17,cherryPickStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ref:27,BRANCH:28,ORDER:29,NUM:30,CHERRY_PICK:31,COMMIT_ID:32,STR:33,COMMIT_TAG:34,EMPTYSTR:35,MERGE:36,COMMIT_TYPE:37,commitType:38,COMMIT:39,commit_arg:40,COMMIT_MSG:41,NORMAL:42,REVERSE:43,HIGHLIGHT:44,ID:45,";":46,$accept:0,$end:1},terminals_:{2:"error",5:"GG",7:"EOF",8:":",9:"DIR",12:"OPT",13:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",28:"BRANCH",29:"ORDER",30:"NUM",31:"CHERRY_PICK",32:"COMMIT_ID",33:"STR",34:"COMMIT_TAG",35:"EMPTYSTR",36:"MERGE",37:"COMMIT_TYPE",39:"COMMIT",41:"COMMIT_MSG",42:"NORMAL",43:"REVERSE",44:"HIGHLIGHT",45:"ID",46:";"},productions_:[0,[3,2],[3,3],[3,4],[3,5],[6,0],[6,2],[10,2],[10,1],[11,0],[11,2],[14,2],[14,1],[15,1],[15,1],[15,1],[15,2],[15,2],[15,1],[15,1],[15,1],[15,2],[25,2],[25,4],[18,3],[18,5],[18,5],[18,5],[18,5],[17,2],[17,4],[17,4],[17,4],[17,6],[17,6],[17,6],[17,6],[17,6],[17,6],[17,8],[17,8],[17,8],[17,8],[17,8],[17,8],[16,2],[16,3],[16,3],[16,5],[16,5],[16,3],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,3],[16,5],[16,5],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[40,0],[40,1],[38,1],[38,1],[38,1],[27,1],[27,1],[4,1],[4,1],[4,1]],performAction:function(h,b,k,s,T,t,X){var e=t.length-1;switch(T){case 2:return t[e];case 3:return t[e-1];case 4:return s.setDirection(t[e-3]),t[e-1];case 6:s.setOptions(t[e-1]),this.$=t[e];break;case 7:t[e-1]+=t[e],this.$=t[e-1];break;case 9:this.$=[];break;case 10:t[e-1].push(t[e]),this.$=t[e-1];break;case 11:this.$=t[e-1];break;case 16:this.$=t[e].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=t[e].trim(),s.setAccDescription(this.$);break;case 19:s.addSection(t[e].substr(8)),this.$=t[e].substr(8);break;case 21:s.checkout(t[e]);break;case 22:s.branch(t[e]);break;case 23:s.branch(t[e-2],t[e]);break;case 24:s.cherryPick(t[e],"",void 0);break;case 25:s.cherryPick(t[e-2],"",t[e]);break;case 26:case 28:s.cherryPick(t[e-2],"","");break;case 27:s.cherryPick(t[e],"",t[e-2]);break;case 29:s.merge(t[e],"","","");break;case 30:s.merge(t[e-2],t[e],"","");break;case 31:s.merge(t[e-2],"",t[e],"");break;case 32:s.merge(t[e-2],"","",t[e]);break;case 33:s.merge(t[e-4],t[e],"",t[e-2]);break;case 34:s.merge(t[e-4],"",t[e],t[e-2]);break;case 35:s.merge(t[e-4],"",t[e-2],t[e]);break;case 36:s.merge(t[e-4],t[e-2],t[e],"");break;case 37:s.merge(t[e-4],t[e-2],"",t[e]);break;case 38:s.merge(t[e-4],t[e],t[e-2],"");break;case 39:s.merge(t[e-6],t[e-4],t[e-2],t[e]);break;case 40:s.merge(t[e-6],t[e],t[e-4],t[e-2]);break;case 41:s.merge(t[e-6],t[e-4],t[e],t[e-2]);break;case 42:s.merge(t[e-6],t[e-2],t[e-4],t[e]);break;case 43:s.merge(t[e-6],t[e],t[e-2],t[e-4]);break;case 44:s.merge(t[e-6],t[e-2],t[e],t[e-4]);break;case 45:s.commit(t[e]);break;case 46:s.commit("","",s.commitType.NORMAL,t[e]);break;case 47:s.commit("","",t[e],"");break;case 48:s.commit("","",t[e],t[e-2]);break;case 49:s.commit("","",t[e-2],t[e]);break;case 50:s.commit("",t[e],s.commitType.NORMAL,"");break;case 51:s.commit("",t[e-2],s.commitType.NORMAL,t[e]);break;case 52:s.commit("",t[e],s.commitType.NORMAL,t[e-2]);break;case 53:s.commit("",t[e-2],t[e],"");break;case 54:s.commit("",t[e],t[e-2],"");break;case 55:s.commit("",t[e-4],t[e-2],t[e]);break;case 56:s.commit("",t[e-4],t[e],t[e-2]);break;case 57:s.commit("",t[e-2],t[e-4],t[e]);break;case 58:s.commit("",t[e],t[e-4],t[e-2]);break;case 59:s.commit("",t[e],t[e-2],t[e-4]);break;case 60:s.commit("",t[e-2],t[e],t[e-4]);break;case 61:s.commit(t[e],"",s.commitType.NORMAL,"");break;case 62:s.commit(t[e],"",s.commitType.NORMAL,t[e-2]);break;case 63:s.commit(t[e-2],"",s.commitType.NORMAL,t[e]);break;case 64:s.commit(t[e-2],"",t[e],"");break;case 65:s.commit(t[e],"",t[e-2],"");break;case 66:s.commit(t[e],t[e-2],s.commitType.NORMAL,"");break;case 67:s.commit(t[e-2],t[e],s.commitType.NORMAL,"");break;case 68:s.commit(t[e-4],"",t[e-2],t[e]);break;case 69:s.commit(t[e-4],"",t[e],t[e-2]);break;case 70:s.commit(t[e-2],"",t[e-4],t[e]);break;case 71:s.commit(t[e],"",t[e-4],t[e-2]);break;case 72:s.commit(t[e],"",t[e-2],t[e-4]);break;case 73:s.commit(t[e-2],"",t[e],t[e-4]);break;case 74:s.commit(t[e-4],t[e],t[e-2],"");break;case 75:s.commit(t[e-4],t[e-2],t[e],"");break;case 76:s.commit(t[e-2],t[e],t[e-4],"");break;case 77:s.commit(t[e],t[e-2],t[e-4],"");break;case 78:s.commit(t[e],t[e-4],t[e-2],"");break;case 79:s.commit(t[e-2],t[e-4],t[e],"");break;case 80:s.commit(t[e-4],t[e],s.commitType.NORMAL,t[e-2]);break;case 81:s.commit(t[e-4],t[e-2],s.commitType.NORMAL,t[e]);break;case 82:s.commit(t[e-2],t[e],s.commitType.NORMAL,t[e-4]);break;case 83:s.commit(t[e],t[e-2],s.commitType.NORMAL,t[e-4]);break;case 84:s.commit(t[e],t[e-4],s.commitType.NORMAL,t[e-2]);break;case 85:s.commit(t[e-2],t[e-4],s.commitType.NORMAL,t[e]);break;case 86:s.commit(t[e-6],t[e-4],t[e-2],t[e]);break;case 87:s.commit(t[e-6],t[e-4],t[e],t[e-2]);break;case 88:s.commit(t[e-6],t[e-2],t[e-4],t[e]);break;case 89:s.commit(t[e-6],t[e],t[e-4],t[e-2]);break;case 90:s.commit(t[e-6],t[e-2],t[e],t[e-4]);break;case 91:s.commit(t[e-6],t[e],t[e-2],t[e-4]);break;case 92:s.commit(t[e-4],t[e-6],t[e-2],t[e]);break;case 93:s.commit(t[e-4],t[e-6],t[e],t[e-2]);break;case 94:s.commit(t[e-2],t[e-6],t[e-4],t[e]);break;case 95:s.commit(t[e],t[e-6],t[e-4],t[e-2]);break;case 96:s.commit(t[e-2],t[e-6],t[e],t[e-4]);break;case 97:s.commit(t[e],t[e-6],t[e-2],t[e-4]);break;case 98:s.commit(t[e],t[e-4],t[e-2],t[e-6]);break;case 99:s.commit(t[e-2],t[e-4],t[e],t[e-6]);break;case 100:s.commit(t[e],t[e-2],t[e-4],t[e-6]);break;case 101:s.commit(t[e-2],t[e],t[e-4],t[e-6]);break;case 102:s.commit(t[e-4],t[e-2],t[e],t[e-6]);break;case 103:s.commit(t[e-4],t[e],t[e-2],t[e-6]);break;case 104:s.commit(t[e-2],t[e-4],t[e-6],t[e]);break;case 105:s.commit(t[e],t[e-4],t[e-6],t[e-2]);break;case 106:s.commit(t[e-2],t[e],t[e-6],t[e-4]);break;case 107:s.commit(t[e],t[e-2],t[e-6],t[e-4]);break;case 108:s.commit(t[e-4],t[e-2],t[e-6],t[e]);break;case 109:s.commit(t[e-4],t[e],t[e-6],t[e-2]);break;case 110:this.$="";break;case 111:this.$=t[e];break;case 112:this.$=s.commitType.NORMAL;break;case 113:this.$=s.commitType.REVERSE;break;case 114:this.$=s.commitType.HIGHLIGHT;break}},table:[{3:1,4:2,5:a,7:o,13:u,46:n},{1:[3]},{3:7,4:2,5:a,7:o,13:u,46:n},{6:8,7:c,8:[1,9],9:[1,10],10:11,13:m},r(l,[2,117]),r(l,[2,118]),r(l,[2,119]),{1:[2,1]},{7:[1,13]},{6:14,7:c,10:11,13:m},{8:[1,15]},r(E,[2,9],{11:16,12:[1,17]}),r(_,[2,8]),{1:[2,2]},{7:[1,18]},{6:19,7:c,10:11,13:m},{7:[2,6],13:[1,22],14:20,15:21,16:23,17:24,18:25,19:[1,26],21:[1,27],23:[1,28],24:[1,29],25:30,26:[1,31],28:[1,35],31:[1,34],36:[1,33],39:[1,32]},r(_,[2,7]),{1:[2,3]},{7:[1,36]},r(E,[2,10]),{4:37,7:o,13:u,46:n},r(E,[2,12]),r(i,[2,13]),r(i,[2,14]),r(i,[2,15]),{20:[1,38]},{22:[1,39]},r(i,[2,18]),r(i,[2,19]),r(i,[2,20]),{27:40,33:g,45:f},r(i,[2,110],{40:43,32:[1,46],33:[1,48],34:[1,44],37:[1,45],41:[1,47]}),{27:49,33:g,45:f},{32:[1,50],34:[1,51]},{27:52,33:g,45:f},{1:[2,4]},r(E,[2,11]),r(i,[2,16]),r(i,[2,17]),r(i,[2,21]),r(x,[2,115]),r(x,[2,116]),r(i,[2,45]),{33:[1,53]},{38:54,42:p,43:d,44:y},{33:[1,58]},{33:[1,59]},r(i,[2,111]),r(i,[2,29],{32:[1,60],34:[1,62],37:[1,61]}),{33:[1,63]},{33:[1,64],35:[1,65]},r(i,[2,22],{29:[1,66]}),r(i,[2,46],{32:[1,68],37:[1,67],41:[1,69]}),r(i,[2,47],{32:[1,71],34:[1,70],41:[1,72]}),r(N,[2,112]),r(N,[2,113]),r(N,[2,114]),r(i,[2,50],{34:[1,73],37:[1,74],41:[1,75]}),r(i,[2,61],{32:[1,78],34:[1,76],37:[1,77]}),{33:[1,79]},{38:80,42:p,43:d,44:y},{33:[1,81]},r(i,[2,24],{34:[1,82]}),{32:[1,83]},{32:[1,84]},{30:[1,85]},{38:86,42:p,43:d,44:y},{33:[1,87]},{33:[1,88]},{33:[1,89]},{33:[1,90]},{33:[1,91]},{33:[1,92]},{38:93,42:p,43:d,44:y},{33:[1,94]},{33:[1,95]},{38:96,42:p,43:d,44:y},{33:[1,97]},r(i,[2,30],{34:[1,99],37:[1,98]}),r(i,[2,31],{32:[1,101],34:[1,100]}),r(i,[2,32],{32:[1,102],37:[1,103]}),{33:[1,104],35:[1,105]},{33:[1,106]},{33:[1,107]},r(i,[2,23]),r(i,[2,48],{32:[1,108],41:[1,109]}),r(i,[2,52],{37:[1,110],41:[1,111]}),r(i,[2,62],{32:[1,113],37:[1,112]}),r(i,[2,49],{32:[1,114],41:[1,115]}),r(i,[2,54],{34:[1,116],41:[1,117]}),r(i,[2,65],{32:[1,119],34:[1,118]}),r(i,[2,51],{37:[1,120],41:[1,121]}),r(i,[2,53],{34:[1,122],41:[1,123]}),r(i,[2,66],{34:[1,125],37:[1,124]}),r(i,[2,63],{32:[1,127],37:[1,126]}),r(i,[2,64],{32:[1,129],34:[1,128]}),r(i,[2,67],{34:[1,131],37:[1,130]}),{38:132,42:p,43:d,44:y},{33:[1,133]},{33:[1,134]},{33:[1,135]},{33:[1,136]},{38:137,42:p,43:d,44:y},r(i,[2,25]),r(i,[2,26]),r(i,[2,27]),r(i,[2,28]),{33:[1,138]},{33:[1,139]},{38:140,42:p,43:d,44:y},{33:[1,141]},{38:142,42:p,43:d,44:y},{33:[1,143]},{33:[1,144]},{33:[1,145]},{33:[1,146]},{33:[1,147]},{33:[1,148]},{33:[1,149]},{38:150,42:p,43:d,44:y},{33:[1,151]},{33:[1,152]},{33:[1,153]},{38:154,42:p,43:d,44:y},{33:[1,155]},{38:156,42:p,43:d,44:y},{33:[1,157]},{33:[1,158]},{33:[1,159]},{38:160,42:p,43:d,44:y},{33:[1,161]},r(i,[2,36],{34:[1,162]}),r(i,[2,37],{37:[1,163]}),r(i,[2,35],{32:[1,164]}),r(i,[2,38],{34:[1,165]}),r(i,[2,33],{37:[1,166]}),r(i,[2,34],{32:[1,167]}),r(i,[2,59],{41:[1,168]}),r(i,[2,72],{32:[1,169]}),r(i,[2,60],{41:[1,170]}),r(i,[2,83],{37:[1,171]}),r(i,[2,73],{32:[1,172]}),r(i,[2,82],{37:[1,173]}),r(i,[2,58],{41:[1,174]}),r(i,[2,71],{32:[1,175]}),r(i,[2,57],{41:[1,176]}),r(i,[2,77],{34:[1,177]}),r(i,[2,70],{32:[1,178]}),r(i,[2,76],{34:[1,179]}),r(i,[2,56],{41:[1,180]}),r(i,[2,84],{37:[1,181]}),r(i,[2,55],{41:[1,182]}),r(i,[2,78],{34:[1,183]}),r(i,[2,79],{34:[1,184]}),r(i,[2,85],{37:[1,185]}),r(i,[2,69],{32:[1,186]}),r(i,[2,80],{37:[1,187]}),r(i,[2,68],{32:[1,188]}),r(i,[2,74],{34:[1,189]}),r(i,[2,75],{34:[1,190]}),r(i,[2,81],{37:[1,191]}),{33:[1,192]},{38:193,42:p,43:d,44:y},{33:[1,194]},{33:[1,195]},{38:196,42:p,43:d,44:y},{33:[1,197]},{33:[1,198]},{33:[1,199]},{33:[1,200]},{38:201,42:p,43:d,44:y},{33:[1,202]},{38:203,42:p,43:d,44:y},{33:[1,204]},{33:[1,205]},{33:[1,206]},{33:[1,207]},{33:[1,208]},{33:[1,209]},{33:[1,210]},{38:211,42:p,43:d,44:y},{33:[1,212]},{33:[1,213]},{33:[1,214]},{38:215,42:p,43:d,44:y},{33:[1,216]},{38:217,42:p,43:d,44:y},{33:[1,218]},{33:[1,219]},{33:[1,220]},{38:221,42:p,43:d,44:y},r(i,[2,39]),r(i,[2,41]),r(i,[2,40]),r(i,[2,42]),r(i,[2,44]),r(i,[2,43]),r(i,[2,100]),r(i,[2,101]),r(i,[2,98]),r(i,[2,99]),r(i,[2,103]),r(i,[2,102]),r(i,[2,107]),r(i,[2,106]),r(i,[2,105]),r(i,[2,104]),r(i,[2,109]),r(i,[2,108]),r(i,[2,97]),r(i,[2,96]),r(i,[2,95]),r(i,[2,94]),r(i,[2,92]),r(i,[2,93]),r(i,[2,91]),r(i,[2,90]),r(i,[2,89]),r(i,[2,88]),r(i,[2,86]),r(i,[2,87])],defaultActions:{7:[2,1],13:[2,2],18:[2,3],36:[2,4]},parseError:function(h,b){if(b.recoverable)this.trace(h);else{var k=new Error(h);throw k.hash=b,k}},parse:function(h){var b=this,k=[0],s=[],T=[null],t=[],X=this.table,e="",rt=0,ft=0,Tt=2,pt=1,Lt=t.slice.call(arguments,1),M=Object.create(this.lexer),Y={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(Y.yy[ct]=this.yy[ct]);M.setInput(h,Y.yy),Y.yy.lexer=M,Y.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var ot=M.yylloc;t.push(ot);var Rt=M.options&&M.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(){var j;return j=s.pop()||M.lex()||pt,typeof j!="number"&&(j instanceof Array&&(s=j,j=s.pop()),j=b.symbols_[j]||j),j}for(var I,K,V,lt,W={},it,z,bt,st;;){if(K=k[k.length-1],this.defaultActions[K]?V=this.defaultActions[K]:((I===null||typeof I>"u")&&(I=Mt()),V=X[K]&&X[K][I]),typeof V>"u"||!V.length||!V[0]){var ht="";st=[];for(it in X[K])this.terminals_[it]&&it>Tt&&st.push("'"+this.terminals_[it]+"'");M.showPosition?ht="Parse error on line "+(rt+1)+`: +import{c as A,s as vt,g as Ct,a as At,b as Ot,B as St,D as It,l as G,j as D,E as Gt,h as Pt,z as Ht,H as Nt,I as Bt}from"./index-e0ff10fa.js";var mt=function(){var r=function(q,h,b,k){for(b=b||{},k=q.length;k--;b[q[k]]=h);return b},a=[1,3],o=[1,6],u=[1,4],n=[1,5],c=[2,5],m=[1,12],l=[5,7,13,19,21,23,24,26,28,31,36,39,46],E=[7,13,19,21,23,24,26,28,31,36,39],_=[7,12,13,19,21,23,24,26,28,31,36,39],i=[7,13,46],g=[1,42],f=[1,41],x=[7,13,29,32,34,37,46],p=[1,55],d=[1,56],y=[1,57],N=[7,13,32,34,41,46],w={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,GG:5,document:6,EOF:7,":":8,DIR:9,options:10,body:11,OPT:12,NL:13,line:14,statement:15,commitStatement:16,mergeStatement:17,cherryPickStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ref:27,BRANCH:28,ORDER:29,NUM:30,CHERRY_PICK:31,COMMIT_ID:32,STR:33,COMMIT_TAG:34,EMPTYSTR:35,MERGE:36,COMMIT_TYPE:37,commitType:38,COMMIT:39,commit_arg:40,COMMIT_MSG:41,NORMAL:42,REVERSE:43,HIGHLIGHT:44,ID:45,";":46,$accept:0,$end:1},terminals_:{2:"error",5:"GG",7:"EOF",8:":",9:"DIR",12:"OPT",13:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",28:"BRANCH",29:"ORDER",30:"NUM",31:"CHERRY_PICK",32:"COMMIT_ID",33:"STR",34:"COMMIT_TAG",35:"EMPTYSTR",36:"MERGE",37:"COMMIT_TYPE",39:"COMMIT",41:"COMMIT_MSG",42:"NORMAL",43:"REVERSE",44:"HIGHLIGHT",45:"ID",46:";"},productions_:[0,[3,2],[3,3],[3,4],[3,5],[6,0],[6,2],[10,2],[10,1],[11,0],[11,2],[14,2],[14,1],[15,1],[15,1],[15,1],[15,2],[15,2],[15,1],[15,1],[15,1],[15,2],[25,2],[25,4],[18,3],[18,5],[18,5],[18,5],[18,5],[17,2],[17,4],[17,4],[17,4],[17,6],[17,6],[17,6],[17,6],[17,6],[17,6],[17,8],[17,8],[17,8],[17,8],[17,8],[17,8],[16,2],[16,3],[16,3],[16,5],[16,5],[16,3],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,3],[16,5],[16,5],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[40,0],[40,1],[38,1],[38,1],[38,1],[27,1],[27,1],[4,1],[4,1],[4,1]],performAction:function(h,b,k,s,T,t,X){var e=t.length-1;switch(T){case 2:return t[e];case 3:return t[e-1];case 4:return s.setDirection(t[e-3]),t[e-1];case 6:s.setOptions(t[e-1]),this.$=t[e];break;case 7:t[e-1]+=t[e],this.$=t[e-1];break;case 9:this.$=[];break;case 10:t[e-1].push(t[e]),this.$=t[e-1];break;case 11:this.$=t[e-1];break;case 16:this.$=t[e].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=t[e].trim(),s.setAccDescription(this.$);break;case 19:s.addSection(t[e].substr(8)),this.$=t[e].substr(8);break;case 21:s.checkout(t[e]);break;case 22:s.branch(t[e]);break;case 23:s.branch(t[e-2],t[e]);break;case 24:s.cherryPick(t[e],"",void 0);break;case 25:s.cherryPick(t[e-2],"",t[e]);break;case 26:case 28:s.cherryPick(t[e-2],"","");break;case 27:s.cherryPick(t[e],"",t[e-2]);break;case 29:s.merge(t[e],"","","");break;case 30:s.merge(t[e-2],t[e],"","");break;case 31:s.merge(t[e-2],"",t[e],"");break;case 32:s.merge(t[e-2],"","",t[e]);break;case 33:s.merge(t[e-4],t[e],"",t[e-2]);break;case 34:s.merge(t[e-4],"",t[e],t[e-2]);break;case 35:s.merge(t[e-4],"",t[e-2],t[e]);break;case 36:s.merge(t[e-4],t[e-2],t[e],"");break;case 37:s.merge(t[e-4],t[e-2],"",t[e]);break;case 38:s.merge(t[e-4],t[e],t[e-2],"");break;case 39:s.merge(t[e-6],t[e-4],t[e-2],t[e]);break;case 40:s.merge(t[e-6],t[e],t[e-4],t[e-2]);break;case 41:s.merge(t[e-6],t[e-4],t[e],t[e-2]);break;case 42:s.merge(t[e-6],t[e-2],t[e-4],t[e]);break;case 43:s.merge(t[e-6],t[e],t[e-2],t[e-4]);break;case 44:s.merge(t[e-6],t[e-2],t[e],t[e-4]);break;case 45:s.commit(t[e]);break;case 46:s.commit("","",s.commitType.NORMAL,t[e]);break;case 47:s.commit("","",t[e],"");break;case 48:s.commit("","",t[e],t[e-2]);break;case 49:s.commit("","",t[e-2],t[e]);break;case 50:s.commit("",t[e],s.commitType.NORMAL,"");break;case 51:s.commit("",t[e-2],s.commitType.NORMAL,t[e]);break;case 52:s.commit("",t[e],s.commitType.NORMAL,t[e-2]);break;case 53:s.commit("",t[e-2],t[e],"");break;case 54:s.commit("",t[e],t[e-2],"");break;case 55:s.commit("",t[e-4],t[e-2],t[e]);break;case 56:s.commit("",t[e-4],t[e],t[e-2]);break;case 57:s.commit("",t[e-2],t[e-4],t[e]);break;case 58:s.commit("",t[e],t[e-4],t[e-2]);break;case 59:s.commit("",t[e],t[e-2],t[e-4]);break;case 60:s.commit("",t[e-2],t[e],t[e-4]);break;case 61:s.commit(t[e],"",s.commitType.NORMAL,"");break;case 62:s.commit(t[e],"",s.commitType.NORMAL,t[e-2]);break;case 63:s.commit(t[e-2],"",s.commitType.NORMAL,t[e]);break;case 64:s.commit(t[e-2],"",t[e],"");break;case 65:s.commit(t[e],"",t[e-2],"");break;case 66:s.commit(t[e],t[e-2],s.commitType.NORMAL,"");break;case 67:s.commit(t[e-2],t[e],s.commitType.NORMAL,"");break;case 68:s.commit(t[e-4],"",t[e-2],t[e]);break;case 69:s.commit(t[e-4],"",t[e],t[e-2]);break;case 70:s.commit(t[e-2],"",t[e-4],t[e]);break;case 71:s.commit(t[e],"",t[e-4],t[e-2]);break;case 72:s.commit(t[e],"",t[e-2],t[e-4]);break;case 73:s.commit(t[e-2],"",t[e],t[e-4]);break;case 74:s.commit(t[e-4],t[e],t[e-2],"");break;case 75:s.commit(t[e-4],t[e-2],t[e],"");break;case 76:s.commit(t[e-2],t[e],t[e-4],"");break;case 77:s.commit(t[e],t[e-2],t[e-4],"");break;case 78:s.commit(t[e],t[e-4],t[e-2],"");break;case 79:s.commit(t[e-2],t[e-4],t[e],"");break;case 80:s.commit(t[e-4],t[e],s.commitType.NORMAL,t[e-2]);break;case 81:s.commit(t[e-4],t[e-2],s.commitType.NORMAL,t[e]);break;case 82:s.commit(t[e-2],t[e],s.commitType.NORMAL,t[e-4]);break;case 83:s.commit(t[e],t[e-2],s.commitType.NORMAL,t[e-4]);break;case 84:s.commit(t[e],t[e-4],s.commitType.NORMAL,t[e-2]);break;case 85:s.commit(t[e-2],t[e-4],s.commitType.NORMAL,t[e]);break;case 86:s.commit(t[e-6],t[e-4],t[e-2],t[e]);break;case 87:s.commit(t[e-6],t[e-4],t[e],t[e-2]);break;case 88:s.commit(t[e-6],t[e-2],t[e-4],t[e]);break;case 89:s.commit(t[e-6],t[e],t[e-4],t[e-2]);break;case 90:s.commit(t[e-6],t[e-2],t[e],t[e-4]);break;case 91:s.commit(t[e-6],t[e],t[e-2],t[e-4]);break;case 92:s.commit(t[e-4],t[e-6],t[e-2],t[e]);break;case 93:s.commit(t[e-4],t[e-6],t[e],t[e-2]);break;case 94:s.commit(t[e-2],t[e-6],t[e-4],t[e]);break;case 95:s.commit(t[e],t[e-6],t[e-4],t[e-2]);break;case 96:s.commit(t[e-2],t[e-6],t[e],t[e-4]);break;case 97:s.commit(t[e],t[e-6],t[e-2],t[e-4]);break;case 98:s.commit(t[e],t[e-4],t[e-2],t[e-6]);break;case 99:s.commit(t[e-2],t[e-4],t[e],t[e-6]);break;case 100:s.commit(t[e],t[e-2],t[e-4],t[e-6]);break;case 101:s.commit(t[e-2],t[e],t[e-4],t[e-6]);break;case 102:s.commit(t[e-4],t[e-2],t[e],t[e-6]);break;case 103:s.commit(t[e-4],t[e],t[e-2],t[e-6]);break;case 104:s.commit(t[e-2],t[e-4],t[e-6],t[e]);break;case 105:s.commit(t[e],t[e-4],t[e-6],t[e-2]);break;case 106:s.commit(t[e-2],t[e],t[e-6],t[e-4]);break;case 107:s.commit(t[e],t[e-2],t[e-6],t[e-4]);break;case 108:s.commit(t[e-4],t[e-2],t[e-6],t[e]);break;case 109:s.commit(t[e-4],t[e],t[e-6],t[e-2]);break;case 110:this.$="";break;case 111:this.$=t[e];break;case 112:this.$=s.commitType.NORMAL;break;case 113:this.$=s.commitType.REVERSE;break;case 114:this.$=s.commitType.HIGHLIGHT;break}},table:[{3:1,4:2,5:a,7:o,13:u,46:n},{1:[3]},{3:7,4:2,5:a,7:o,13:u,46:n},{6:8,7:c,8:[1,9],9:[1,10],10:11,13:m},r(l,[2,117]),r(l,[2,118]),r(l,[2,119]),{1:[2,1]},{7:[1,13]},{6:14,7:c,10:11,13:m},{8:[1,15]},r(E,[2,9],{11:16,12:[1,17]}),r(_,[2,8]),{1:[2,2]},{7:[1,18]},{6:19,7:c,10:11,13:m},{7:[2,6],13:[1,22],14:20,15:21,16:23,17:24,18:25,19:[1,26],21:[1,27],23:[1,28],24:[1,29],25:30,26:[1,31],28:[1,35],31:[1,34],36:[1,33],39:[1,32]},r(_,[2,7]),{1:[2,3]},{7:[1,36]},r(E,[2,10]),{4:37,7:o,13:u,46:n},r(E,[2,12]),r(i,[2,13]),r(i,[2,14]),r(i,[2,15]),{20:[1,38]},{22:[1,39]},r(i,[2,18]),r(i,[2,19]),r(i,[2,20]),{27:40,33:g,45:f},r(i,[2,110],{40:43,32:[1,46],33:[1,48],34:[1,44],37:[1,45],41:[1,47]}),{27:49,33:g,45:f},{32:[1,50],34:[1,51]},{27:52,33:g,45:f},{1:[2,4]},r(E,[2,11]),r(i,[2,16]),r(i,[2,17]),r(i,[2,21]),r(x,[2,115]),r(x,[2,116]),r(i,[2,45]),{33:[1,53]},{38:54,42:p,43:d,44:y},{33:[1,58]},{33:[1,59]},r(i,[2,111]),r(i,[2,29],{32:[1,60],34:[1,62],37:[1,61]}),{33:[1,63]},{33:[1,64],35:[1,65]},r(i,[2,22],{29:[1,66]}),r(i,[2,46],{32:[1,68],37:[1,67],41:[1,69]}),r(i,[2,47],{32:[1,71],34:[1,70],41:[1,72]}),r(N,[2,112]),r(N,[2,113]),r(N,[2,114]),r(i,[2,50],{34:[1,73],37:[1,74],41:[1,75]}),r(i,[2,61],{32:[1,78],34:[1,76],37:[1,77]}),{33:[1,79]},{38:80,42:p,43:d,44:y},{33:[1,81]},r(i,[2,24],{34:[1,82]}),{32:[1,83]},{32:[1,84]},{30:[1,85]},{38:86,42:p,43:d,44:y},{33:[1,87]},{33:[1,88]},{33:[1,89]},{33:[1,90]},{33:[1,91]},{33:[1,92]},{38:93,42:p,43:d,44:y},{33:[1,94]},{33:[1,95]},{38:96,42:p,43:d,44:y},{33:[1,97]},r(i,[2,30],{34:[1,99],37:[1,98]}),r(i,[2,31],{32:[1,101],34:[1,100]}),r(i,[2,32],{32:[1,102],37:[1,103]}),{33:[1,104],35:[1,105]},{33:[1,106]},{33:[1,107]},r(i,[2,23]),r(i,[2,48],{32:[1,108],41:[1,109]}),r(i,[2,52],{37:[1,110],41:[1,111]}),r(i,[2,62],{32:[1,113],37:[1,112]}),r(i,[2,49],{32:[1,114],41:[1,115]}),r(i,[2,54],{34:[1,116],41:[1,117]}),r(i,[2,65],{32:[1,119],34:[1,118]}),r(i,[2,51],{37:[1,120],41:[1,121]}),r(i,[2,53],{34:[1,122],41:[1,123]}),r(i,[2,66],{34:[1,125],37:[1,124]}),r(i,[2,63],{32:[1,127],37:[1,126]}),r(i,[2,64],{32:[1,129],34:[1,128]}),r(i,[2,67],{34:[1,131],37:[1,130]}),{38:132,42:p,43:d,44:y},{33:[1,133]},{33:[1,134]},{33:[1,135]},{33:[1,136]},{38:137,42:p,43:d,44:y},r(i,[2,25]),r(i,[2,26]),r(i,[2,27]),r(i,[2,28]),{33:[1,138]},{33:[1,139]},{38:140,42:p,43:d,44:y},{33:[1,141]},{38:142,42:p,43:d,44:y},{33:[1,143]},{33:[1,144]},{33:[1,145]},{33:[1,146]},{33:[1,147]},{33:[1,148]},{33:[1,149]},{38:150,42:p,43:d,44:y},{33:[1,151]},{33:[1,152]},{33:[1,153]},{38:154,42:p,43:d,44:y},{33:[1,155]},{38:156,42:p,43:d,44:y},{33:[1,157]},{33:[1,158]},{33:[1,159]},{38:160,42:p,43:d,44:y},{33:[1,161]},r(i,[2,36],{34:[1,162]}),r(i,[2,37],{37:[1,163]}),r(i,[2,35],{32:[1,164]}),r(i,[2,38],{34:[1,165]}),r(i,[2,33],{37:[1,166]}),r(i,[2,34],{32:[1,167]}),r(i,[2,59],{41:[1,168]}),r(i,[2,72],{32:[1,169]}),r(i,[2,60],{41:[1,170]}),r(i,[2,83],{37:[1,171]}),r(i,[2,73],{32:[1,172]}),r(i,[2,82],{37:[1,173]}),r(i,[2,58],{41:[1,174]}),r(i,[2,71],{32:[1,175]}),r(i,[2,57],{41:[1,176]}),r(i,[2,77],{34:[1,177]}),r(i,[2,70],{32:[1,178]}),r(i,[2,76],{34:[1,179]}),r(i,[2,56],{41:[1,180]}),r(i,[2,84],{37:[1,181]}),r(i,[2,55],{41:[1,182]}),r(i,[2,78],{34:[1,183]}),r(i,[2,79],{34:[1,184]}),r(i,[2,85],{37:[1,185]}),r(i,[2,69],{32:[1,186]}),r(i,[2,80],{37:[1,187]}),r(i,[2,68],{32:[1,188]}),r(i,[2,74],{34:[1,189]}),r(i,[2,75],{34:[1,190]}),r(i,[2,81],{37:[1,191]}),{33:[1,192]},{38:193,42:p,43:d,44:y},{33:[1,194]},{33:[1,195]},{38:196,42:p,43:d,44:y},{33:[1,197]},{33:[1,198]},{33:[1,199]},{33:[1,200]},{38:201,42:p,43:d,44:y},{33:[1,202]},{38:203,42:p,43:d,44:y},{33:[1,204]},{33:[1,205]},{33:[1,206]},{33:[1,207]},{33:[1,208]},{33:[1,209]},{33:[1,210]},{38:211,42:p,43:d,44:y},{33:[1,212]},{33:[1,213]},{33:[1,214]},{38:215,42:p,43:d,44:y},{33:[1,216]},{38:217,42:p,43:d,44:y},{33:[1,218]},{33:[1,219]},{33:[1,220]},{38:221,42:p,43:d,44:y},r(i,[2,39]),r(i,[2,41]),r(i,[2,40]),r(i,[2,42]),r(i,[2,44]),r(i,[2,43]),r(i,[2,100]),r(i,[2,101]),r(i,[2,98]),r(i,[2,99]),r(i,[2,103]),r(i,[2,102]),r(i,[2,107]),r(i,[2,106]),r(i,[2,105]),r(i,[2,104]),r(i,[2,109]),r(i,[2,108]),r(i,[2,97]),r(i,[2,96]),r(i,[2,95]),r(i,[2,94]),r(i,[2,92]),r(i,[2,93]),r(i,[2,91]),r(i,[2,90]),r(i,[2,89]),r(i,[2,88]),r(i,[2,86]),r(i,[2,87])],defaultActions:{7:[2,1],13:[2,2],18:[2,3],36:[2,4]},parseError:function(h,b){if(b.recoverable)this.trace(h);else{var k=new Error(h);throw k.hash=b,k}},parse:function(h){var b=this,k=[0],s=[],T=[null],t=[],X=this.table,e="",rt=0,ft=0,Tt=2,pt=1,Lt=t.slice.call(arguments,1),M=Object.create(this.lexer),Y={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(Y.yy[ct]=this.yy[ct]);M.setInput(h,Y.yy),Y.yy.lexer=M,Y.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var ot=M.yylloc;t.push(ot);var Rt=M.options&&M.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(){var j;return j=s.pop()||M.lex()||pt,typeof j!="number"&&(j instanceof Array&&(s=j,j=s.pop()),j=b.symbols_[j]||j),j}for(var I,K,V,lt,W={},it,z,bt,st;;){if(K=k[k.length-1],this.defaultActions[K]?V=this.defaultActions[K]:((I===null||typeof I>"u")&&(I=Mt()),V=X[K]&&X[K][I]),typeof V>"u"||!V.length||!V[0]){var ht="";st=[];for(it in X[K])this.terminals_[it]&&it>Tt&&st.push("'"+this.terminals_[it]+"'");M.showPosition?ht="Parse error on line "+(rt+1)+`: `+M.showPosition()+` Expecting `+st.join(", ")+", got '"+(this.terminals_[I]||I)+"'":ht="Parse error on line "+(rt+1)+": Unexpected "+(I==pt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(ht,{text:M.match,token:this.terminals_[I]||I,line:M.yylineno,loc:ot,expected:st})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+I);switch(V[0]){case 1:k.push(I),T.push(M.yytext),t.push(M.yylloc),k.push(V[1]),I=null,ft=M.yyleng,e=M.yytext,rt=M.yylineno,ot=M.yylloc;break;case 2:if(z=this.productions_[V[1]][1],W.$=T[T.length-z],W._$={first_line:t[t.length-(z||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(z||1)].first_column,last_column:t[t.length-1].last_column},Rt&&(W._$.range=[t[t.length-(z||1)].range[0],t[t.length-1].range[1]]),lt=this.performAction.apply(W,[e,ft,rt,Y.yy,V[1],T,t].concat(Lt)),typeof lt<"u")return lt;z&&(k=k.slice(0,-1*z*2),T=T.slice(0,-1*z),t=t.slice(0,-1*z)),k.push(this.productions_[V[1]][0]),T.push(W.$),t.push(W._$),bt=X[k[k.length-2]][k[k.length-1]],k.push(bt);break;case 3:return!0}}return!0}},B=function(){var q={EOF:1,parseError:function(b,k){if(this.yy.parser)this.yy.parser.parseError(b,k);else throw new Error(b)},setInput:function(h,b){return this.yy=b||this.yy||{},this._input=h,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},input:function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var b=h.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},unput:function(h){var b=h.length,k=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;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),k.length-1&&(this.yylineno-=k.length-1);var T=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:k?(k.length===s.length?this.yylloc.first_column:0)+s[s.length-k.length].length-k[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(h){this.unput(this.match.slice(h))},pastInput:function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var h=this.pastInput(),b=new Array(h.length+1).join("-");return h+this.upcomingInput()+` diff --git a/assets/index-2c4b9a3b-7c73707d.js b/assets/index-2c4b9a3b-bbd91aa2.js similarity index 97% rename from assets/index-2c4b9a3b-7c73707d.js rename to assets/index-2c4b9a3b-bbd91aa2.js index b8057e6..edb1406 100644 --- a/assets/index-2c4b9a3b-7c73707d.js +++ b/assets/index-2c4b9a3b-bbd91aa2.js @@ -1 +1 @@ -import{b as G,i as m,m as O,G as j,l as A}from"./layout-fa84e821.js";import{i as M,u as _,s as H,a as V,b as U,p as D,c as W,d as Y,e as q,f as z,g as L,h as C}from"./edges-f2ad444c-795ea1c8.js";import{l as i,p as N,c as S,h as T}from"./index-b371ab76.js";import{a as K}from"./createText-62fc7601-6b649b67.js";var Q=4;function Z(e){return G(e,Q)}function x(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:I(e),edges:tt(e)};return m(e.graph())||(t.value=Z(e.graph())),t}function I(e){return O(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),s={v:t};return m(n)||(s.value=n),m(r)||(s.parent=r),s})}function tt(e){return O(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return m(t.name)||(r.name=t.name),m(n)||(r.value=n),r})}let f={},g={},J={};const et=()=>{g={},J={},f={}},X=(e,t)=>(i.trace("In isDecendant",t," ",e," = ",g[t].includes(e)),!!g[t].includes(e)),nt=(e,t)=>(i.info("Decendants of ",t," is ",g[t]),i.info("Edge is ",e),e.v===t||e.w===t?!1:g[t]?g[t].includes(e.v)||X(e.v,t)||X(e.w,t)||g[t].includes(e.w):(i.debug("Tilt, ",t,",not in decendants"),!1)),R=(e,t,n,r)=>{i.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const s=t.children(e)||[];e!==r&&s.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(c=>{if(t.children(c).length>0)R(c,t,n,r);else{const d=t.node(c);i.info("cp ",c," to ",r," with parent ",e),n.setNode(c,d),r!==t.parent(c)&&(i.warn("Setting parent",c,t.parent(c)),n.setParent(c,t.parent(c))),e!==r&&c!==e?(i.debug("Setting parent",c,e),n.setParent(c,e)):(i.info("In copy ",e,"root",r,"data",t.node(e),r),i.debug("Not Setting parent for node=",c,"cluster!==rootId",e!==r,"node!==clusterId",c!==e));const l=t.edges(c);i.debug("Copying Edges",l),l.forEach(u=>{i.info("Edge",u);const h=t.edge(u.v,u.w,u.name);i.info("Edge data",h,r);try{nt(u,r)?(i.info("Copying as ",u.v,u.w,h,u.name),n.setEdge(u.v,u.w,h,u.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",r," clusterId:",e)}catch(w){i.error(w)}})}i.debug("Removing node",c),t.removeNode(c)})},p=(e,t)=>{const n=t.children(e);let r=[...n];for(const s of n)J[s]=e,r=[...r,...p(s,t)];return r},b=(e,t)=>{i.trace("Searching",e);const n=t.children(e);if(i.trace("Searching children of id ",e,n),n.length<1)return i.trace("This is a valid node",e),e;for(const r of n){const s=b(r,t);if(s)return i.trace("Found replacement for",e," => ",s),s}},E=e=>!f[e]||!f[e].externalConnections?e:f[e]?f[e].id:e,it=(e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",b(n,e)),g[n]=p(n,e),f[n]={id:b(n,e),clusterData:e.node(n)})}),e.nodes().forEach(function(n){const r=e.children(n),s=e.edges();r.length>0?(i.debug("Cluster identified",n,g),s.forEach(c=>{if(c.v!==n&&c.w!==n){const d=X(c.v,n),l=X(c.w,n);d^l&&(i.warn("Edge: ",c," leaves cluster ",n),i.warn("Decendants of XXX ",n,": ",g[n]),f[n].externalConnections=!0)}})):i.debug("Not a cluster ",n,g)}),e.edges().forEach(function(n){const r=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,c=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f[n.v]," --- ",f[n.w]),f[n.v]&&f[n.w]&&f[n.v]===f[n.w]){i.warn("Fixing and trixing link to self - removing XXX",n.v,n.w,n.name),i.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=E(n.v),c=E(n.w),e.removeEdge(n.v,n.w,n.name);const d=n.w+"---"+n.v;e.setNode(d,{domId:d,id:d,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const l=structuredClone(r),u=structuredClone(r);l.label="",l.arrowTypeEnd="none",u.label="",l.fromCluster=n.v,u.toCluster=n.v,e.setEdge(s,d,l,n.name+"-cyclic-special"),e.setEdge(d,c,u,n.name+"-cyclic-special")}else(f[n.v]||f[n.w])&&(i.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=E(n.v),c=E(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v&&(r.fromCluster=n.v),c!==n.w&&(r.toCluster=n.w),i.warn("Fix Replacing with XXX",s,c,n.name),e.setEdge(s,c,r,n.name))}),i.warn("Adjusted Graph",x(e)),P(e,0),i.trace(f)},P=(e,t)=>{if(i.warn("extractor - ",t,x(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),r=!1;for(const s of n){const c=e.children(s);r=r||c.length>0}if(!r){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const s of n)if(i.debug("Extracting node",s,f,f[s]&&!f[s].externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!f[s])i.debug("Not a cluster",s,t);else if(!f[s].externalConnections&&e.children(s)&&e.children(s).length>0){i.warn("Cluster without external connections, without a parent and with children",s,t);let d=e.graph().rankdir==="TB"?"LR":"TB";f[s]&&f[s].clusterData&&f[s].clusterData.dir&&(d=f[s].clusterData.dir,i.warn("Fixing dir",f[s].clusterData.dir,d));const l=new j({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",x(e)),R(s,e,l,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:f[s].clusterData,labelText:f[s].labelText,graph:l}),i.warn("New graph after copy node: (",s,")",x(l)),i.debug("Old graph after copy",x(e))}else i.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!f[s].externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const s of n){const c=e.node(s);i.warn(" Now next level",s,c),c.clusterNode&&P(c.graph,t+1)}},F=(e,t)=>{if(t.length===0)return[];let n=Object.assign(t);return t.forEach(r=>{const s=e.children(r),c=F(e,s);n=[...n,...c]}),n},st=e=>F(e,e.children()),rt=(e,t)=>{i.info("Creating subgraph rect for ",t.id,t);const n=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),r=n.insert("rect",":first-child"),s=N(S().flowchart.htmlLabels),c=n.insert("g").attr("class","cluster-label"),d=t.labelType==="markdown"?K(c,t.labelText,{style:t.labelStyle,useHtmlLabels:s}):c.node().appendChild(L(t.labelText,t.labelStyle,void 0,!0));let l=d.getBBox();if(N(S().flowchart.htmlLabels)){const a=d.children[0],o=T(d);l=a.getBoundingClientRect(),o.attr("width",l.width),o.attr("height",l.height)}const u=0*t.padding,h=u/2,w=t.width<=l.width+u?l.width+u:t.width;t.width<=l.width+u?t.diff=(l.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,i.trace("Data ",t,JSON.stringify(t)),r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-w/2).attr("y",t.y-t.height/2-h).attr("width",w).attr("height",t.height+u),s?c.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2)+")"):c.attr("transform","translate("+t.x+", "+(t.y-t.height/2)+")");const v=r.node().getBBox();return t.width=v.width,t.height=v.height,t.intersect=function(a){return C(t,a)},n},at=(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,c=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-c).attr("y",t.y-t.height/2-c).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const d=r.node().getBBox();return t.width=d.width,t.height=d.height,t.intersect=function(l){return C(t,l)},n},ct=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=n.insert("g").attr("class","cluster-label"),c=n.append("rect"),d=s.node().appendChild(L(t.labelText,t.labelStyle,void 0,!0));let l=d.getBBox();if(N(S().flowchart.htmlLabels)){const a=d.children[0],o=T(d);l=a.getBoundingClientRect(),o.attr("width",l.width),o.attr("height",l.height)}l=d.getBBox();const u=0*t.padding,h=u/2,w=t.width<=l.width+t.padding?l.width+t.padding:t.width;t.width<=l.width+t.padding?t.diff=(l.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,r.attr("class","outer").attr("x",t.x-w/2-h).attr("y",t.y-t.height/2-h).attr("width",w+u).attr("height",t.height+u),c.attr("class","inner").attr("x",t.x-w/2-h).attr("y",t.y-t.height/2-h+l.height-1).attr("width",w+u).attr("height",t.height+u-l.height-3),s.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2-t.padding/3+(N(S().flowchart.htmlLabels)?5:3))+")");const v=r.node().getBBox();return t.height=v.height,t.intersect=function(a){return C(t,a)},n},ot=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,c=s/2;r.attr("class","divider").attr("x",t.x-t.width/2-c).attr("y",t.y-t.height/2).attr("width",t.width+s).attr("height",t.height+s);const d=r.node().getBBox();return t.width=d.width,t.height=d.height,t.diff=-t.padding/2,t.intersect=function(l){return C(t,l)},n},lt={rect:rt,roundedWithTitle:ct,noteGroup:at,divider:ot};let k={};const ft=(e,t)=>{i.trace("Inserting cluster");const n=t.shape||"rect";k[t.id]=lt[n](e,t)},dt=()=>{k={}},$=async(e,t,n,r,s)=>{i.info("Graph in recursive render: XXX",x(t),s);const c=t.graph().rankdir;i.trace("Dir in recursive render - dir:",c);const d=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.trace("Recursive edges",t.edge(t.edges()[0]));const l=d.insert("g").attr("class","clusters"),u=d.insert("g").attr("class","edgePaths"),h=d.insert("g").attr("class","edgeLabels"),w=d.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(a){const o=t.node(a);if(s!==void 0){const y=JSON.parse(JSON.stringify(s.clusterData));i.info("Setting data for cluster XXX (",a,") ",y,s),t.setNode(s.id,y),t.parent(a)||(i.trace("Setting parent",a,s.id),t.setParent(a,s.id,y))}if(i.info("(Insert) Node XXX"+a+": "+JSON.stringify(t.node(a))),o&&o.clusterNode){i.info("Cluster identified",a,o.width,t.node(a));const y=await $(w,o.graph,n,r,t.node(a)),B=y.elem;_(o,B),o.diff=y.diff||0,i.info("Node bounds (abc123)",a,o,o.width,o.x,o.y),H(B,o),i.warn("Recursive render complete ",B,o)}else t.children(a).length>0?(i.info("Cluster - the non recursive path XXX",a,o.id,o,t),i.info(b(o.id,t)),f[o.id]={id:b(o.id,t),node:o}):(i.info("Node - the non recursive path",a,o.id,o),await V(w,t.node(a),c))})),t.edges().forEach(function(a){const o=t.edge(a.v,a.w,a.name);i.info("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(a)),i.info("Edge "+a.v+" -> "+a.w+": ",a," ",JSON.stringify(t.edge(a))),i.info("Fix",f,"ids:",a.v,a.w,"Translateing: ",f[a.v],f[a.w]),U(h,o)}),t.edges().forEach(function(a){i.info("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(a))}),i.info("#############################################"),i.info("### Layout ###"),i.info("#############################################"),i.info(t),A(t),i.info("Graph after layout:",x(t));let v=0;return st(t).forEach(function(a){const o=t.node(a);i.info("Position "+a+": "+JSON.stringify(t.node(a))),i.info("Position "+a+": ("+o.x,","+o.y,") width: ",o.width," height: ",o.height),o&&o.clusterNode?D(o):t.children(a).length>0?(ft(l,o),f[o.id].node=o):D(o)}),t.edges().forEach(function(a){const o=t.edge(a);i.info("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(o),o);const y=W(u,a,o,f,n,t,r);Y(o,y)}),t.nodes().forEach(function(a){const o=t.node(a);i.info(a,o.type,o.diff),o.type==="group"&&(v=o.diff)}),{elem:d,diff:v}},xt=async(e,t,n,r,s)=>{M(e,n,r,s),q(),z(),dt(),et(),i.warn("Graph at first:",JSON.stringify(x(t))),it(t),i.warn("Graph after:",JSON.stringify(x(t))),await $(e,t,r,s)};export{xt as r}; +import{b as G,i as m,m as O,G as j,l as A}from"./layout-608b290b.js";import{i as M,u as _,s as H,a as V,b as U,p as D,c as W,d as Y,e as q,f as z,g as L,h as C}from"./edges-f2ad444c-7df4797c.js";import{l as i,p as N,c as S,h as T}from"./index-e0ff10fa.js";import{a as K}from"./createText-62fc7601-0312dc07.js";var Q=4;function Z(e){return G(e,Q)}function x(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:I(e),edges:tt(e)};return m(e.graph())||(t.value=Z(e.graph())),t}function I(e){return O(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),s={v:t};return m(n)||(s.value=n),m(r)||(s.parent=r),s})}function tt(e){return O(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return m(t.name)||(r.name=t.name),m(n)||(r.value=n),r})}let f={},g={},J={};const et=()=>{g={},J={},f={}},X=(e,t)=>(i.trace("In isDecendant",t," ",e," = ",g[t].includes(e)),!!g[t].includes(e)),nt=(e,t)=>(i.info("Decendants of ",t," is ",g[t]),i.info("Edge is ",e),e.v===t||e.w===t?!1:g[t]?g[t].includes(e.v)||X(e.v,t)||X(e.w,t)||g[t].includes(e.w):(i.debug("Tilt, ",t,",not in decendants"),!1)),R=(e,t,n,r)=>{i.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const s=t.children(e)||[];e!==r&&s.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(c=>{if(t.children(c).length>0)R(c,t,n,r);else{const d=t.node(c);i.info("cp ",c," to ",r," with parent ",e),n.setNode(c,d),r!==t.parent(c)&&(i.warn("Setting parent",c,t.parent(c)),n.setParent(c,t.parent(c))),e!==r&&c!==e?(i.debug("Setting parent",c,e),n.setParent(c,e)):(i.info("In copy ",e,"root",r,"data",t.node(e),r),i.debug("Not Setting parent for node=",c,"cluster!==rootId",e!==r,"node!==clusterId",c!==e));const l=t.edges(c);i.debug("Copying Edges",l),l.forEach(u=>{i.info("Edge",u);const h=t.edge(u.v,u.w,u.name);i.info("Edge data",h,r);try{nt(u,r)?(i.info("Copying as ",u.v,u.w,h,u.name),n.setEdge(u.v,u.w,h,u.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",r," clusterId:",e)}catch(w){i.error(w)}})}i.debug("Removing node",c),t.removeNode(c)})},p=(e,t)=>{const n=t.children(e);let r=[...n];for(const s of n)J[s]=e,r=[...r,...p(s,t)];return r},b=(e,t)=>{i.trace("Searching",e);const n=t.children(e);if(i.trace("Searching children of id ",e,n),n.length<1)return i.trace("This is a valid node",e),e;for(const r of n){const s=b(r,t);if(s)return i.trace("Found replacement for",e," => ",s),s}},E=e=>!f[e]||!f[e].externalConnections?e:f[e]?f[e].id:e,it=(e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",b(n,e)),g[n]=p(n,e),f[n]={id:b(n,e),clusterData:e.node(n)})}),e.nodes().forEach(function(n){const r=e.children(n),s=e.edges();r.length>0?(i.debug("Cluster identified",n,g),s.forEach(c=>{if(c.v!==n&&c.w!==n){const d=X(c.v,n),l=X(c.w,n);d^l&&(i.warn("Edge: ",c," leaves cluster ",n),i.warn("Decendants of XXX ",n,": ",g[n]),f[n].externalConnections=!0)}})):i.debug("Not a cluster ",n,g)}),e.edges().forEach(function(n){const r=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,c=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f[n.v]," --- ",f[n.w]),f[n.v]&&f[n.w]&&f[n.v]===f[n.w]){i.warn("Fixing and trixing link to self - removing XXX",n.v,n.w,n.name),i.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=E(n.v),c=E(n.w),e.removeEdge(n.v,n.w,n.name);const d=n.w+"---"+n.v;e.setNode(d,{domId:d,id:d,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const l=structuredClone(r),u=structuredClone(r);l.label="",l.arrowTypeEnd="none",u.label="",l.fromCluster=n.v,u.toCluster=n.v,e.setEdge(s,d,l,n.name+"-cyclic-special"),e.setEdge(d,c,u,n.name+"-cyclic-special")}else(f[n.v]||f[n.w])&&(i.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=E(n.v),c=E(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v&&(r.fromCluster=n.v),c!==n.w&&(r.toCluster=n.w),i.warn("Fix Replacing with XXX",s,c,n.name),e.setEdge(s,c,r,n.name))}),i.warn("Adjusted Graph",x(e)),P(e,0),i.trace(f)},P=(e,t)=>{if(i.warn("extractor - ",t,x(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),r=!1;for(const s of n){const c=e.children(s);r=r||c.length>0}if(!r){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const s of n)if(i.debug("Extracting node",s,f,f[s]&&!f[s].externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!f[s])i.debug("Not a cluster",s,t);else if(!f[s].externalConnections&&e.children(s)&&e.children(s).length>0){i.warn("Cluster without external connections, without a parent and with children",s,t);let d=e.graph().rankdir==="TB"?"LR":"TB";f[s]&&f[s].clusterData&&f[s].clusterData.dir&&(d=f[s].clusterData.dir,i.warn("Fixing dir",f[s].clusterData.dir,d));const l=new j({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",x(e)),R(s,e,l,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:f[s].clusterData,labelText:f[s].labelText,graph:l}),i.warn("New graph after copy node: (",s,")",x(l)),i.debug("Old graph after copy",x(e))}else i.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!f[s].externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const s of n){const c=e.node(s);i.warn(" Now next level",s,c),c.clusterNode&&P(c.graph,t+1)}},F=(e,t)=>{if(t.length===0)return[];let n=Object.assign(t);return t.forEach(r=>{const s=e.children(r),c=F(e,s);n=[...n,...c]}),n},st=e=>F(e,e.children()),rt=(e,t)=>{i.info("Creating subgraph rect for ",t.id,t);const n=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),r=n.insert("rect",":first-child"),s=N(S().flowchart.htmlLabels),c=n.insert("g").attr("class","cluster-label"),d=t.labelType==="markdown"?K(c,t.labelText,{style:t.labelStyle,useHtmlLabels:s}):c.node().appendChild(L(t.labelText,t.labelStyle,void 0,!0));let l=d.getBBox();if(N(S().flowchart.htmlLabels)){const a=d.children[0],o=T(d);l=a.getBoundingClientRect(),o.attr("width",l.width),o.attr("height",l.height)}const u=0*t.padding,h=u/2,w=t.width<=l.width+u?l.width+u:t.width;t.width<=l.width+u?t.diff=(l.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,i.trace("Data ",t,JSON.stringify(t)),r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-w/2).attr("y",t.y-t.height/2-h).attr("width",w).attr("height",t.height+u),s?c.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2)+")"):c.attr("transform","translate("+t.x+", "+(t.y-t.height/2)+")");const v=r.node().getBBox();return t.width=v.width,t.height=v.height,t.intersect=function(a){return C(t,a)},n},at=(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,c=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-c).attr("y",t.y-t.height/2-c).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const d=r.node().getBBox();return t.width=d.width,t.height=d.height,t.intersect=function(l){return C(t,l)},n},ct=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=n.insert("g").attr("class","cluster-label"),c=n.append("rect"),d=s.node().appendChild(L(t.labelText,t.labelStyle,void 0,!0));let l=d.getBBox();if(N(S().flowchart.htmlLabels)){const a=d.children[0],o=T(d);l=a.getBoundingClientRect(),o.attr("width",l.width),o.attr("height",l.height)}l=d.getBBox();const u=0*t.padding,h=u/2,w=t.width<=l.width+t.padding?l.width+t.padding:t.width;t.width<=l.width+t.padding?t.diff=(l.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,r.attr("class","outer").attr("x",t.x-w/2-h).attr("y",t.y-t.height/2-h).attr("width",w+u).attr("height",t.height+u),c.attr("class","inner").attr("x",t.x-w/2-h).attr("y",t.y-t.height/2-h+l.height-1).attr("width",w+u).attr("height",t.height+u-l.height-3),s.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2-t.padding/3+(N(S().flowchart.htmlLabels)?5:3))+")");const v=r.node().getBBox();return t.height=v.height,t.intersect=function(a){return C(t,a)},n},ot=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,c=s/2;r.attr("class","divider").attr("x",t.x-t.width/2-c).attr("y",t.y-t.height/2).attr("width",t.width+s).attr("height",t.height+s);const d=r.node().getBBox();return t.width=d.width,t.height=d.height,t.diff=-t.padding/2,t.intersect=function(l){return C(t,l)},n},lt={rect:rt,roundedWithTitle:ct,noteGroup:at,divider:ot};let k={};const ft=(e,t)=>{i.trace("Inserting cluster");const n=t.shape||"rect";k[t.id]=lt[n](e,t)},dt=()=>{k={}},$=async(e,t,n,r,s)=>{i.info("Graph in recursive render: XXX",x(t),s);const c=t.graph().rankdir;i.trace("Dir in recursive render - dir:",c);const d=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.trace("Recursive edges",t.edge(t.edges()[0]));const l=d.insert("g").attr("class","clusters"),u=d.insert("g").attr("class","edgePaths"),h=d.insert("g").attr("class","edgeLabels"),w=d.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(a){const o=t.node(a);if(s!==void 0){const y=JSON.parse(JSON.stringify(s.clusterData));i.info("Setting data for cluster XXX (",a,") ",y,s),t.setNode(s.id,y),t.parent(a)||(i.trace("Setting parent",a,s.id),t.setParent(a,s.id,y))}if(i.info("(Insert) Node XXX"+a+": "+JSON.stringify(t.node(a))),o&&o.clusterNode){i.info("Cluster identified",a,o.width,t.node(a));const y=await $(w,o.graph,n,r,t.node(a)),B=y.elem;_(o,B),o.diff=y.diff||0,i.info("Node bounds (abc123)",a,o,o.width,o.x,o.y),H(B,o),i.warn("Recursive render complete ",B,o)}else t.children(a).length>0?(i.info("Cluster - the non recursive path XXX",a,o.id,o,t),i.info(b(o.id,t)),f[o.id]={id:b(o.id,t),node:o}):(i.info("Node - the non recursive path",a,o.id,o),await V(w,t.node(a),c))})),t.edges().forEach(function(a){const o=t.edge(a.v,a.w,a.name);i.info("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(a)),i.info("Edge "+a.v+" -> "+a.w+": ",a," ",JSON.stringify(t.edge(a))),i.info("Fix",f,"ids:",a.v,a.w,"Translateing: ",f[a.v],f[a.w]),U(h,o)}),t.edges().forEach(function(a){i.info("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(a))}),i.info("#############################################"),i.info("### Layout ###"),i.info("#############################################"),i.info(t),A(t),i.info("Graph after layout:",x(t));let v=0;return st(t).forEach(function(a){const o=t.node(a);i.info("Position "+a+": "+JSON.stringify(t.node(a))),i.info("Position "+a+": ("+o.x,","+o.y,") width: ",o.width," height: ",o.height),o&&o.clusterNode?D(o):t.children(a).length>0?(ft(l,o),f[o.id].node=o):D(o)}),t.edges().forEach(function(a){const o=t.edge(a);i.info("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(o),o);const y=W(u,a,o,f,n,t,r);Y(o,y)}),t.nodes().forEach(function(a){const o=t.node(a);i.info(a,o.type,o.diff),o.type==="group"&&(v=o.diff)}),{elem:d,diff:v}},xt=async(e,t,n,r,s)=>{M(e,n,r,s),q(),z(),dt(),et(),i.warn("Graph at first:",JSON.stringify(x(t))),it(t),i.warn("Graph after:",JSON.stringify(x(t))),await $(e,t,r,s)};export{xt as r}; diff --git a/assets/index-b371ab76.js b/assets/index-e0ff10fa.js similarity index 76% rename from assets/index-b371ab76.js rename to assets/index-e0ff10fa.js index aa92090..ca91d27 100644 --- a/assets/index-b371ab76.js +++ b/assets/index-e0ff10fa.js @@ -37,30 +37,30 @@ `+r[s].replace(" at new "," at ");return t.displayName&&a.includes("")&&(a=a.replace("",t.displayName)),a}while(1<=s&&0<=l);break}}}finally{Xd=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?jl(t):""}function eB(t){switch(t.tag){case 5:return jl(t.type);case 16:return jl("Lazy");case 13:return jl("Suspense");case 19:return jl("SuspenseList");case 0:case 2:case 15:return t=Qd(t.type,!1),t;case 11:return t=Qd(t.type.render,!1),t;case 1:return t=Qd(t.type,!0),t;default:return""}}function xm(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ls:return"Fragment";case ss:return"Portal";case gm:return"Profiler";case H0:return"StrictMode";case ym:return"Suspense";case vm:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case xk:return(t.displayName||"Context")+".Consumer";case vk:return(t._context.displayName||"Context")+".Provider";case W0:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V0:return e=t.displayName||null,e!==null?e:xm(t.type)||"Memo";case dr:e=t._payload,t=t._init;try{return xm(t(e))}catch{}}return null}function tB(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xm(e);case 8:return e===H0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Hr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function wk(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function nB(t){var e=wk(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(s){i=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(s){i=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Wc(t){t._valueTracker||(t._valueTracker=nB(t))}function bk(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=wk(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function wh(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Cm(t,e){var n=e.checked;return ze({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function C1(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=Hr(e.value!=null?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function kk(t,e){e=e.checked,e!=null&&j0(t,"checked",e,!1)}function wm(t,e){kk(t,e);var n=Hr(e.value),i=e.type;if(n!=null)i==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?bm(t,e.type,n):e.hasOwnProperty("defaultValue")&&bm(t,e.type,Hr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function w1(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function bm(t,e,n){(e!=="number"||wh(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Hl=Array.isArray;function bs(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Vc.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function _a(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var na={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},iB=["Webkit","ms","Moz","O"];Object.keys(na).forEach(function(t){iB.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),na[e]=na[t]})});function Ek(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||na.hasOwnProperty(t)&&na[t]?(""+e).trim():e+"px"}function Ak(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=Ek(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var rB=ze({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _m(t,e){if(e){if(rB[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(j(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(j(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(j(61))}if(e.style!=null&&typeof e.style!="object")throw Error(j(62))}}function Tm(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Em=null;function q0(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Am=null,ks=null,Ss=null;function S1(t){if(t=xc(t)){if(typeof Am!="function")throw Error(j(280));var e=t.stateNode;e&&(e=Yf(e),Am(t.stateNode,t.type,e))}}function Mk(t){ks?Ss?Ss.push(t):Ss=[t]:ks=t}function Lk(){if(ks){var t=ks,e=Ss;if(Ss=ks=null,S1(t),e)for(t=0;t>>=0,t===0?32:31-(mB(t)/gB|0)|0}var qc=64,Uc=4194304;function Wl(t){switch(t&-t){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: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function _h(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var l=s&~r;l!==0?i=Wl(l):(o&=s,o!==0&&(i=Wl(o)))}else s=n&~r,s!==0?i=Wl(s):o!==0&&(i=Wl(o));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,o=e&-e,r>=o||r===16&&(o&4194240)!==0))return e;if(i&4&&(i|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0n;n++)e.push(t);return e}function yc(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Un(e),t[e]=n}function CB(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var i=t.eventTimes;for(t=t.expirationTimes;0=ra),D1=String.fromCharCode(32),R1=!1;function Xk(t,e){switch(t){case"keyup":return YB.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qk(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var as=!1;function XB(t,e){switch(t){case"compositionend":return Qk(e);case"keypress":return e.which!==32?null:(R1=!0,D1);case"textInput":return t=e.data,t===D1&&R1?null:t;default:return null}}function QB(t,e){if(as)return t==="compositionend"||!Z0&&Xk(t,e)?(t=Yk(),Hu=X0=Sr=null,as=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=I1(n)}}function tS(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?tS(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function nS(){for(var t=window,e=wh();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=wh(t.document)}return e}function ey(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function sD(t){var e=nS(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&tS(n.ownerDocument.documentElement,n)){if(i!==null&&ey(n)){if(e=i.start,t=i.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var r=n.textContent.length,o=Math.min(i.start,r);i=i.end===void 0?o:Math.min(i.end,r),!t.extend&&o>i&&(r=i,i=o,o=r),r=$1(n,o);var s=$1(n,i);r&&s&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),o>i?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,cs=null,Rm=null,sa=null,Fm=!1;function z1(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fm||cs==null||cs!==wh(i)||(i=cs,"selectionStart"in i&&ey(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),sa&&Oa(sa,i)||(sa=i,i=Ah(Rm,"onSelect"),0fs||(t.current=jm[fs],jm[fs]=null,fs--)}function Ee(t,e){fs++,jm[fs]=t.current,t.current=e}var Wr={},At=Zr(Wr),Zt=Zr(!1),Mo=Wr;function Fs(t,e){var n=t.type.contextTypes;if(!n)return Wr;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},o;for(o in n)r[o]=e[o];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=r),r}function en(t){return t=t.childContextTypes,t!=null}function Lh(){Be(Zt),Be(At)}function K1(t,e,n){if(At.current!==Wr)throw Error(j(168));Ee(At,e),Ee(Zt,n)}function hS(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(j(108,tB(t)||"Unknown",r));return ze({},n,i)}function Oh(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Wr,Mo=At.current,Ee(At,t),Ee(Zt,Zt.current),!0}function Y1(t,e,n){var i=t.stateNode;if(!i)throw Error(j(169));n?(t=hS(t,e,Mo),i.__reactInternalMemoizedMergedChildContext=t,Be(Zt),Be(At),Ee(At,t)):Be(Zt),Ee(Zt,n)}var zi=null,Gf=!1,hp=!1;function fS(t){zi===null?zi=[t]:zi.push(t)}function vD(t){Gf=!0,fS(t)}function eo(){if(!hp&&zi!==null){hp=!0;var t=0,e=we;try{var n=zi;for(we=1;t>=s,r-=s,Vi=1<<32-Un(e)+r|n<M?(N=S,S=null):N=S.sibling;var O=f(g,S,x[M],C);if(O===null){S===null&&(S=N);break}t&&S&&O.alternate===null&&e(g,S),m=o(O,m,M),b===null?w=O:b.sibling=O,b=O,S=N}if(M===x.length)return n(g,S),De&&co(g,M),w;if(S===null){for(;MM?(N=S,S=null):N=S.sibling;var D=f(g,S,O.value,C);if(D===null){S===null&&(S=N);break}t&&S&&D.alternate===null&&e(g,S),m=o(D,m,M),b===null?w=D:b.sibling=D,b=D,S=N}if(O.done)return n(g,S),De&&co(g,M),w;if(S===null){for(;!O.done;M++,O=x.next())O=h(g,O.value,C),O!==null&&(m=o(O,m,M),b===null?w=O:b.sibling=O,b=O);return De&&co(g,M),w}for(S=i(g,S);!O.done;M++,O=x.next())O=d(S,g,M,O.value,C),O!==null&&(t&&O.alternate!==null&&S.delete(O.key===null?M:O.key),m=o(O,m,M),b===null?w=O:b.sibling=O,b=O);return t&&S.forEach(function(V){return e(g,V)}),De&&co(g,M),w}function v(g,m,x,C){if(typeof x=="object"&&x!==null&&x.type===ls&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Hc:e:{for(var w=x.key,b=m;b!==null;){if(b.key===w){if(w=x.type,w===ls){if(b.tag===7){n(g,b.sibling),m=r(b,x.props.children),m.return=g,g=m;break e}}else if(b.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===dr&&tx(w)===b.type){n(g,b.sibling),m=r(b,x.props),m.ref=_l(g,b,x),m.return=g,g=m;break e}n(g,b);break}else e(g,b);b=b.sibling}x.type===ls?(m=ko(x.props.children,g.mode,C,x.key),m.return=g,g=m):(C=Xu(x.type,x.key,x.props,null,g.mode,C),C.ref=_l(g,m,x),C.return=g,g=C)}return s(g);case ss:e:{for(b=x.key;m!==null;){if(m.key===b)if(m.tag===4&&m.stateNode.containerInfo===x.containerInfo&&m.stateNode.implementation===x.implementation){n(g,m.sibling),m=r(m,x.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else e(g,m);m=m.sibling}m=xp(x,g.mode,C),m.return=g,g=m}return s(g);case dr:return b=x._init,v(g,m,b(x._payload),C)}if(Hl(x))return p(g,m,x,C);if(Cl(x))return y(g,m,x,C);Zc(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,m!==null&&m.tag===6?(n(g,m.sibling),m=r(m,x),m.return=g,g=m):(n(g,m),m=vp(x,g.mode,C),m.return=g,g=m),s(g)):n(g,m)}return v}var Ps=CS(!0),wS=CS(!1),Cc={},yi=Zr(Cc),Fa=Zr(Cc),Na=Zr(Cc);function yo(t){if(t===Cc)throw Error(j(174));return t}function cy(t,e){switch(Ee(Na,e),Ee(Fa,t),Ee(yi,Cc),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Sm(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Sm(e,t)}Be(yi),Ee(yi,e)}function Is(){Be(yi),Be(Fa),Be(Na)}function bS(t){yo(Na.current);var e=yo(yi.current),n=Sm(e,t.type);e!==n&&(Ee(Fa,t),Ee(yi,n))}function uy(t){Fa.current===t&&(Be(yi),Be(Fa))}var Ne=Zr(0);function Ph(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var fp=[];function hy(){for(var t=0;tn?n:4,t(!0);var i=dp.transition;dp.transition={};try{t(!1),e()}finally{we=n,dp.transition=i}}function IS(){return Dn().memoizedState}function bD(t,e,n){var i=Nr(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},$S(t))zS(e,n);else if(n=gS(t,e,n,i),n!==null){var r=Nt();Kn(n,t,i,r),jS(n,e,i)}}function kD(t,e,n){var i=Nr(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if($S(t))zS(e,r);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,l=o(s,n);if(r.hasEagerState=!0,r.eagerState=l,Xn(l,s)){var a=e.interleaved;a===null?(r.next=r,ly(e)):(r.next=a.next,a.next=r),e.interleaved=r;return}}catch{}finally{}n=gS(t,e,r,i),n!==null&&(r=Nt(),Kn(n,t,i,r),jS(n,e,i))}}function $S(t){var e=t.alternate;return t===$e||e!==null&&e===$e}function zS(t,e){la=Ih=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function jS(t,e,n){if(n&4194240){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,K0(t,n)}}var $h={readContext:Bn,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useInsertionEffect:yt,useLayoutEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useMutableSource:yt,useSyncExternalStore:yt,useId:yt,unstable_isNewReconciler:!1},SD={readContext:Bn,useCallback:function(t,e){return ai().memoizedState=[t,e===void 0?null:e],t},useContext:Bn,useEffect:ix,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Uu(4194308,4,DS.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Uu(4194308,4,t,e)},useInsertionEffect:function(t,e){return Uu(4,2,t,e)},useMemo:function(t,e){var n=ai();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=ai();return e=n!==void 0?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=bD.bind(null,$e,t),[i.memoizedState,t]},useRef:function(t){var e=ai();return t={current:t},e.memoizedState=t},useState:nx,useDebugValue:gy,useDeferredValue:function(t){return ai().memoizedState=t},useTransition:function(){var t=nx(!1),e=t[0];return t=wD.bind(null,t[1]),ai().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=$e,r=ai();if(De){if(n===void 0)throw Error(j(407));n=n()}else{if(n=e(),st===null)throw Error(j(349));Oo&30||_S(i,e,n)}r.memoizedState=n;var o={value:n,getSnapshot:e};return r.queue=o,ix(ES.bind(null,i,o,t),[t]),i.flags|=2048,$a(9,TS.bind(null,i,o,n,e),void 0,null),n},useId:function(){var t=ai(),e=st.identifierPrefix;if(De){var n=qi,i=Vi;n=(i&~(1<<32-Un(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=Pa++,0<\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=s.createElement(n,{is:i.is}):(t=s.createElement(n),n==="select"&&(s=t,i.multiple?s.multiple=!0:i.size&&(s.size=i.size))):t=s.createElementNS(t,n),t[ui]=e,t[Ra]=i,XS(t,e,!1,!1),e.stateNode=t;e:{switch(s=Tm(n,i),n){case"dialog":Ae("cancel",t),Ae("close",t),r=i;break;case"iframe":case"object":case"embed":Ae("load",t),r=i;break;case"video":case"audio":for(r=0;rzs&&(e.flags|=128,i=!0,Tl(o,!1),e.lanes=4194304)}else{if(!i)if(t=Ph(s),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Tl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!De)return vt(e),null}else 2*Ve()-o.renderingStartTime>zs&&n!==1073741824&&(e.flags|=128,i=!0,Tl(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Ve(),e.sibling=null,n=Ne.current,Ee(Ne,i?n&1|2:n&1),e):(vt(e),null);case 22:case 23:return by(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?an&1073741824&&(vt(e),e.subtreeFlags&6&&(e.flags|=8192)):vt(e),null;case 24:return null;case 25:return null}throw Error(j(156,e.tag))}function BD(t,e){switch(ny(e),e.tag){case 1:return en(e.type)&&Lh(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Is(),Be(Zt),Be(At),hy(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return uy(e),null;case 13:if(Be(Ne),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(j(340));Ns()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Be(Ne),null;case 4:return Is(),null;case 10:return sy(e.type._context),null;case 22:case 23:return by(),null;case 24:return null;default:return null}}var tu=!1,wt=!1,DD=typeof WeakSet=="function"?WeakSet:Set,G=null;function gs(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){He(t,e,i)}else n.current=null}function Zm(t,e,n){try{n()}catch(i){He(t,e,i)}}var fx=!1;function RD(t,e){if(Nm=Th,t=nS(),ey(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,c=0,u=0,h=t,f=null;t:for(;;){for(var d;h!==n||r!==0&&h.nodeType!==3||(l=s+r),h!==o||i!==0&&h.nodeType!==3||(a=s+i),h.nodeType===3&&(s+=h.nodeValue.length),(d=h.firstChild)!==null;)f=h,h=d;for(;;){if(h===t)break t;if(f===n&&++c===r&&(l=s),f===o&&++u===i&&(a=s),(d=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=d}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pm={focusedElem:t,selectionRange:n},Th=!1,G=e;G!==null;)if(e=G,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,G=t;else for(;G!==null;){e=G;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var y=p.memoizedProps,v=p.memoizedState,g=e.stateNode,m=g.getSnapshotBeforeUpdate(e.elementType===e.type?y:Hn(e.type,y),v);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(C){He(e,e.return,C)}if(t=e.sibling,t!==null){t.return=e.return,G=t;break}G=e.return}return p=fx,fx=!1,p}function aa(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var o=r.destroy;r.destroy=void 0,o!==void 0&&Zm(e,n,o)}r=r.next}while(r!==i)}}function Jf(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function eg(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function ZS(t){var e=t.alternate;e!==null&&(t.alternate=null,ZS(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ui],delete e[Ra],delete e[zm],delete e[gD],delete e[yD])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function e_(t){return t.tag===5||t.tag===3||t.tag===4}function dx(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||e_(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function tg(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Mh));else if(i!==4&&(t=t.child,t!==null))for(tg(t,e,n),t=t.sibling;t!==null;)tg(t,e,n),t=t.sibling}function ng(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(ng(t,e,n),t=t.sibling;t!==null;)ng(t,e,n),t=t.sibling}var lt=null,Wn=!1;function hr(t,e,n){for(n=n.child;n!==null;)t_(t,e,n),n=n.sibling}function t_(t,e,n){if(gi&&typeof gi.onCommitFiberUnmount=="function")try{gi.onCommitFiberUnmount(Vf,n)}catch{}switch(n.tag){case 5:wt||gs(n,e);case 6:var i=lt,r=Wn;lt=null,hr(t,e,n),lt=i,Wn=r,lt!==null&&(Wn?(t=lt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):lt.removeChild(n.stateNode));break;case 18:lt!==null&&(Wn?(t=lt,n=n.stateNode,t.nodeType===8?up(t.parentNode,n):t.nodeType===1&&up(t,n),Ma(t)):up(lt,n.stateNode));break;case 4:i=lt,r=Wn,lt=n.stateNode.containerInfo,Wn=!0,hr(t,e,n),lt=i,Wn=r;break;case 0:case 11:case 14:case 15:if(!wt&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var o=r,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Zm(n,e,s),r=r.next}while(r!==i)}hr(t,e,n);break;case 1:if(!wt&&(gs(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(l){He(n,e,l)}hr(t,e,n);break;case 21:hr(t,e,n);break;case 22:n.mode&1?(wt=(i=wt)||n.memoizedState!==null,hr(t,e,n),wt=i):hr(t,e,n);break;default:hr(t,e,n)}}function px(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new DD),e.forEach(function(i){var r=WD.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function jn(t,e){var n=e.deletions;if(n!==null)for(var i=0;ir&&(r=s),i&=~o}if(i=r,i=Ve()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*ND(i/1960))-i,10t?16:t,_r===null)var i=!1;else{if(t=_r,_r=null,Hh=0,ge&6)throw Error(j(331));var r=ge;for(ge|=4,G=t.current;G!==null;){var o=G,s=o.child;if(G.flags&16){var l=o.deletions;if(l!==null){for(var a=0;aVe()-Cy?bo(t,0):xy|=n),tn(t,e)}function c_(t,e){e===0&&(t.mode&1?(e=Uc,Uc<<=1,!(Uc&130023424)&&(Uc=4194304)):e=1);var n=Nt();t=Ji(t,e),t!==null&&(yc(t,e,n),tn(t,n))}function HD(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),c_(t,n)}function WD(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(j(314))}i!==null&&i.delete(e),c_(t,n)}var u_;u_=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Zt.current)Yt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Yt=!1,LD(t,e,n);Yt=!!(t.flags&131072)}else Yt=!1,De&&e.flags&1048576&&dS(e,Dh,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Ku(t,e),t=e.pendingProps;var r=Fs(e,At.current);Ts(e,n),r=dy(null,e,i,t,r,n);var o=py();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,en(i)?(o=!0,Oh(e)):o=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,ay(e),r.updater=Xf,e.stateNode=r,r._reactInternals=e,Um(e,i,t,n),e=Gm(null,e,i,!0,o,n)):(e.tag=0,De&&o&&ty(e),Bt(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(Ku(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=qD(i),t=Hn(i,t),r){case 0:e=Ym(null,e,i,t,n);break e;case 1:e=cx(null,e,i,t,n);break e;case 11:e=lx(null,e,i,t,n);break e;case 14:e=ax(null,e,i,Hn(i.type,t),n);break e}throw Error(j(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Hn(i,r),Ym(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Hn(i,r),cx(t,e,i,r,n);case 3:e:{if(KS(e),t===null)throw Error(j(387));i=e.pendingProps,o=e.memoizedState,r=o.element,yS(t,e),Nh(e,i,null,n);var s=e.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){r=$s(Error(j(423)),e),e=ux(t,e,i,n,r);break e}else if(i!==r){r=$s(Error(j(424)),e),e=ux(t,e,i,n,r);break e}else for(fn=Dr(e.stateNode.containerInfo.firstChild),mn=e,De=!0,Vn=null,n=wS(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ns(),i===r){e=Zi(t,e,n);break e}Bt(t,e,i,n)}e=e.child}return e;case 5:return bS(e),t===null&&Wm(e),i=e.type,r=e.pendingProps,o=t!==null?t.memoizedProps:null,s=r.children,Im(i,r)?s=null:o!==null&&Im(i,o)&&(e.flags|=32),US(t,e),Bt(t,e,s,n),e.child;case 6:return t===null&&Wm(e),null;case 13:return YS(t,e,n);case 4:return cy(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Ps(e,null,i,n):Bt(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Hn(i,r),lx(t,e,i,r,n);case 7:return Bt(t,e,e.pendingProps,n),e.child;case 8:return Bt(t,e,e.pendingProps.children,n),e.child;case 12:return Bt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,o=e.memoizedProps,s=r.value,Ee(Rh,i._currentValue),i._currentValue=s,o!==null)if(Xn(o.value,s)){if(o.children===r.children&&!Zt.current){e=Zi(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===i){if(o.tag===1){a=Ki(-1,n&-n),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?a.next=a:(a.next=u.next,u.next=a),c.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Vm(o.return,n,e),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(j(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Vm(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Bt(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Ts(e,n),r=Bn(r),i=i(r),e.flags|=1,Bt(t,e,i,n),e.child;case 14:return i=e.type,r=Hn(i,e.pendingProps),r=Hn(i.type,r),ax(t,e,i,r,n);case 15:return VS(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Hn(i,r),Ku(t,e),e.tag=1,en(i)?(t=!0,Oh(e)):t=!1,Ts(e,n),xS(e,i,r),Um(e,i,r,n),Gm(null,e,i,!0,t,n);case 19:return GS(t,e,n);case 22:return qS(t,e,n)}throw Error(j(156,e.tag))};function h_(t,e){return Pk(t,e)}function VD(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(t,e,n,i){return new VD(t,e,n,i)}function Sy(t){return t=t.prototype,!(!t||!t.isReactComponent)}function qD(t){if(typeof t=="function")return Sy(t)?1:0;if(t!=null){if(t=t.$$typeof,t===W0)return 11;if(t===V0)return 14}return 2}function Pr(t,e){var n=t.alternate;return n===null?(n=En(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Xu(t,e,n,i,r,o){var s=2;if(i=t,typeof t=="function")Sy(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case ls:return ko(n.children,r,o,e);case H0:s=8,r|=8;break;case gm:return t=En(12,n,e,r|2),t.elementType=gm,t.lanes=o,t;case ym:return t=En(13,n,e,r),t.elementType=ym,t.lanes=o,t;case vm:return t=En(19,n,e,r),t.elementType=vm,t.lanes=o,t;case Ck:return ed(n,r,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case vk:s=10;break e;case xk:s=9;break e;case W0:s=11;break e;case V0:s=14;break e;case dr:s=16,i=null;break e}throw Error(j(130,t==null?t:typeof t,""))}return e=En(s,n,e,r),e.elementType=t,e.type=i,e.lanes=o,e}function ko(t,e,n,i){return t=En(7,t,i,e),t.lanes=n,t}function ed(t,e,n,i){return t=En(22,t,i,e),t.elementType=Ck,t.lanes=n,t.stateNode={isHidden:!1},t}function vp(t,e,n){return t=En(6,t,null,e),t.lanes=n,t}function xp(t,e,n){return e=En(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function UD(t,e,n,i,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zd(0),this.expirationTimes=Zd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zd(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function _y(t,e,n,i,r,o,s,l,a){return t=new UD(t,e,n,l,a),e===1?(e=1,o===!0&&(e|=8)):e=0,o=En(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ay(o),t}function KD(t,e,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m_)}catch(t){console.error(t)}}m_(),dk.exports=xn;var g_=dk.exports;const vo=sr(g_);var bx=g_;pm.createRoot=bx.createRoot,pm.hydrateRoot=bx.hydrateRoot;class JD{constructor({name:e,re:n,match:i,handle:r,terminal:o}){this.name=e,this.re=n,this.match=(s,l)=>!(this.re&&!this.re.test(l)||i&&!i(s,l)),this.handle=(s,l)=>this.re?l.replace(this.re,(a,...c)=>r(s,l,...c)):r(s,l)}}const ZD=[{name:"empty-line",re:/^(?:(?: \s*)?|#[^\s]*)$/,handle(t,e,n){t.ast.push({emptyLine:!0})}},{name:"export",re:/^export(?:\s*(?:([^=]+)(?:=(.*))?)?)?/,handle(t,e,n,i){const r=n===void 0&&i===void 0;t.ast.push({export:r?{global:r}:{variable:n,value:i}})}},{name:"recipe",re:/^\t+(.*)/,match(t,e){const n=t.ast[t.ast.length-1];return n&&n.target},handle(t,e,n){t.ast[t.ast.length-1].recipe.push(n)}},{name:"comment",re:/^# (.*)/,handle(t,e,n){const i=t.ast[t.ast.length-1];i&&i.comment&&Object.keys(i).length==1?i.comment.push(n):(n=[n],t.ast.push({comment:n}))}},{name:"target",re:/^((?:[^:\t\s]|\:)+)\s*:([^=].*)?$/,handle(t,e,n,i){if(i=i===void 0?[]:i.trim().match(/([^\\ ]|\\\ ?)+/g).map(r=>r.trim()).filter(r=>r),n===".PHONY")t.PHONY.push(...i);else{const r=t.ast[t.ast.length-1],o={target:n,deps:i,recipe:[]};r&&r.comment&&(o.comment=t.ast.pop().comment),t.ast.push(o)}}},{name:"variable",re:/^([^=\s]+)\s*[:\?\+]?=\s*(.*)$/,handle(t,e,n,i){const r=t.ast[t.ast.length-1],o={variable:n,value:i};r&&r.comment&&(o.comment=t.ast.pop().comment),t.ast.push(o)}}].map(t=>new JD(t));var eR=function(e,n={}){"strict"in n||(n.strict=!1),"unhandled"in n||(n.unhandled=!1);function i(s){if(n.strict)throw new Error(s);console.error(s)}e=e.replace(/\\\n\s*/g,"");const r=e.split(/\n/),o={PHONY:[],ast:[],unhandled:[]};for(let s of r){const l=ZD.filter(a=>a.match(o,s));if(l.length===0){n.unhandled?o.unhandled.push(`!! UNHANDLED: '${s}'`):i(`!! UNHANDLED: '${s}'`);continue}else if(l.length>1){i(`!! AMBIGUOUS: (${l.map(a=>a.name)}) '${s}'`);continue}else l.map(a=>a.handle(o,s))}return o};const tR=sr(eR);var dn=(t=>(t.Dark="dark",t.Light="light",t))(dn||{}),ja=(t=>(t.THEME="theme",t.HAS_DISMISSED_WELCOME_MESSAGE="has-dismissed-welcome-message",t))(ja||{}),lg=(t=>(t.TRUE="true",t.FALSE="false",t))(lg||{}),y_=(t=>(t.MAKEFILE_URL="makefile_url",t))(y_||{}),v_=(t=>(t.LR="LR",t.TB="TB",t))(v_||{}),x_=(t=>(t.SVG="image/svg+xml",t))(x_||{});const nR=t=>{let e=t;const n=t.match(/^https?:\/\/(?:www\.)?github\.com\/(.+?)\/(.+?)\/blob\/(.+)/);if(Array.isArray(n)&&n.length===4){const i=n[1],r=n[2],o=n[3];e=`https://raw.githubusercontent.com/${i}/${r}/${o}`}return e},iR=async t=>{let e;try{const n=await fetch(t);n.ok?e=await n.text():console.error(`Failed to fetch Makefile from: ${t}`)}catch(n){console.error(`Failed to fetch Makefile from: ${t}`,n)}return e},rR=t=>{const e=y_.MAKEFILE_URL,i=new URLSearchParams(t).get(e);let r=null;if(typeof i=="string")try{r=new URL(i.trim()).toString(),r=nR(r)}catch{r=null}return r},oR=t=>{const e=[];for(let n=0;nObject.prototype.hasOwnProperty.call(t,"target"),Sx=(t,e=v_.LR)=>{const{ast:n}=tR(t);n.filter(o=>kx(o)).forEach(o=>{Array.isArray(o.deps)&&(o.deps=oR(o.deps))});const i=[];n.filter(o=>kx(o)).filter(o=>!o.target.startsWith("#")&&!o.target.startsWith(".")).forEach(o=>{const{target:s,deps:l}=o;i.push(` ${s}`),l==null||l.forEach(a=>{i.push(` ${s} --> ${a}`)})});let r="";return i.length>0&&(r=["%% Mermaid diagram",`graph ${e}`,...i].join(` +`+o.stack}return{value:t,source:e,stack:r,digest:null}}function gp(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Km(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var ED=typeof WeakMap=="function"?WeakMap:Map;function HS(t,e,n){n=Ki(-1,n),n.tag=3,n.payload={element:null};var i=e.value;return n.callback=function(){jh||(jh=!0,ig=i),Km(t,e)},n}function WS(t,e,n){n=Ki(-1,n),n.tag=3;var i=t.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;n.payload=function(){return i(r)},n.callback=function(){Km(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Km(t,e),typeof i!="function"&&(Fr===null?Fr=new Set([this]):Fr.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function rx(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new ED;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(n)||(r.add(n),t=jD.bind(null,t,e,n),e.then(t,t))}function ox(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function sx(t,e,n,i,r){return t.mode&1?(t.flags|=65536,t.lanes=r,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Ki(-1,1),e.tag=2,Rr(n,e,1))),n.lanes|=1),t)}var AD=lr.ReactCurrentOwner,Yt=!1;function Bt(t,e,n,i){e.child=t===null?wS(e,null,n,i):Ps(e,t.child,n,i)}function lx(t,e,n,i,r){n=n.render;var o=e.ref;return Ts(e,r),i=dy(t,e,n,i,o,r),n=py(),t!==null&&!Yt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,Zi(t,e,r)):(De&&n&&ty(e),e.flags|=1,Bt(t,e,i,r),e.child)}function ax(t,e,n,i,r){if(t===null){var o=n.type;return typeof o=="function"&&!Sy(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,VS(t,e,o,i,r)):(t=Xu(n.type,null,i,e,e.mode,r),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&r)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Oa,n(s,i)&&t.ref===e.ref)return Zi(t,e,r)}return e.flags|=1,t=Pr(o,i),t.ref=e.ref,t.return=e,e.child=t}function VS(t,e,n,i,r){if(t!==null){var o=t.memoizedProps;if(Oa(o,i)&&t.ref===e.ref)if(Yt=!1,e.pendingProps=i=o,(t.lanes&r)!==0)t.flags&131072&&(Yt=!0);else return e.lanes=t.lanes,Zi(t,e,r)}return Ym(t,e,n,i,r)}function qS(t,e,n){var i=e.pendingProps,r=i.children,o=t!==null?t.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ee(ys,an),an|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Ee(ys,an),an|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=o!==null?o.baseLanes:n,Ee(ys,an),an|=i}else o!==null?(i=o.baseLanes|n,e.memoizedState=null):i=n,Ee(ys,an),an|=i;return Bt(t,e,r,n),e.child}function US(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Ym(t,e,n,i,r){var o=en(n)?Mo:At.current;return o=Fs(e,o),Ts(e,r),n=dy(t,e,n,i,o,r),i=py(),t!==null&&!Yt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,Zi(t,e,r)):(De&&i&&ty(e),e.flags|=1,Bt(t,e,n,r),e.child)}function cx(t,e,n,i,r){if(en(n)){var o=!0;Oh(e)}else o=!1;if(Ts(e,r),e.stateNode===null)Ku(t,e),xS(e,n,i),Um(e,n,i,r),i=!0;else if(t===null){var s=e.stateNode,l=e.memoizedProps;s.props=l;var a=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Bn(c):(c=en(n)?Mo:At.current,c=Fs(e,c));var u=n.getDerivedStateFromProps,h=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==i||a!==c)&&ex(e,s,i,c),pr=!1;var f=e.memoizedState;s.state=f,Nh(e,i,s,r),a=e.memoizedState,l!==i||f!==a||Zt.current||pr?(typeof u=="function"&&(qm(e,n,u,i),a=e.memoizedState),(l=pr||Z1(e,n,l,i,f,a,c))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=a),s.props=i,s.state=a,s.context=c,i=l):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{s=e.stateNode,yS(t,e),l=e.memoizedProps,c=e.type===e.elementType?l:Hn(e.type,l),s.props=c,h=e.pendingProps,f=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=Bn(a):(a=en(n)?Mo:At.current,a=Fs(e,a));var d=n.getDerivedStateFromProps;(u=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==h||f!==a)&&ex(e,s,i,a),pr=!1,f=e.memoizedState,s.state=f,Nh(e,i,s,r);var p=e.memoizedState;l!==h||f!==p||Zt.current||pr?(typeof d=="function"&&(qm(e,n,d,i),p=e.memoizedState),(c=pr||Z1(e,n,c,i,f,p,a)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(i,p,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(i,p,a)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=p),s.props=i,s.state=p,s.context=a,i=c):(typeof s.componentDidUpdate!="function"||l===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),i=!1)}return Gm(t,e,n,i,o,r)}function Gm(t,e,n,i,r,o){US(t,e);var s=(e.flags&128)!==0;if(!i&&!s)return r&&Y1(e,n,!1),Zi(t,e,o);i=e.stateNode,AD.current=e;var l=s&&typeof n.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,t!==null&&s?(e.child=Ps(e,t.child,null,o),e.child=Ps(e,null,l,o)):Bt(t,e,l,o),e.memoizedState=i.state,r&&Y1(e,n,!0),e.child}function KS(t){var e=t.stateNode;e.pendingContext?K1(t,e.pendingContext,e.pendingContext!==e.context):e.context&&K1(t,e.context,!1),cy(t,e.containerInfo)}function ux(t,e,n,i,r){return Ns(),iy(r),e.flags|=256,Bt(t,e,n,i),e.child}var Xm={dehydrated:null,treeContext:null,retryLane:0};function Qm(t){return{baseLanes:t,cachePool:null,transitions:null}}function YS(t,e,n){var i=e.pendingProps,r=Ne.current,o=!1,s=(e.flags&128)!==0,l;if((l=s)||(l=t!==null&&t.memoizedState===null?!1:(r&2)!==0),l?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(r|=1),Ee(Ne,r&1),t===null)return Wm(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=i.children,t=i.fallback,o?(i=e.mode,o=e.child,s={mode:"hidden",children:s},!(i&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=ed(s,i,0,null),t=ko(t,i,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=Qm(n),e.memoizedState=Xm,t):yy(e,s));if(r=t.memoizedState,r!==null&&(l=r.dehydrated,l!==null))return MD(t,e,s,i,l,r,n);if(o){o=i.fallback,s=e.mode,r=t.child,l=r.sibling;var a={mode:"hidden",children:i.children};return!(s&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=a,e.deletions=null):(i=Pr(r,a),i.subtreeFlags=r.subtreeFlags&14680064),l!==null?o=Pr(l,o):(o=ko(o,s,n,null),o.flags|=2),o.return=e,i.return=e,i.sibling=o,e.child=i,i=o,o=e.child,s=t.child.memoizedState,s=s===null?Qm(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=Xm,i}return o=t.child,t=o.sibling,i=Pr(o,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=n),i.return=e,i.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function yy(t,e){return e=ed({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function eu(t,e,n,i){return i!==null&&iy(i),Ps(e,t.child,null,n),t=yy(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function MD(t,e,n,i,r,o,s){if(n)return e.flags&256?(e.flags&=-257,i=gp(Error(j(422))),eu(t,e,s,i)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=i.fallback,r=e.mode,i=ed({mode:"visible",children:i.children},r,0,null),o=ko(o,r,s,null),o.flags|=2,i.return=e,o.return=e,i.sibling=o,e.child=i,e.mode&1&&Ps(e,t.child,null,s),e.child.memoizedState=Qm(s),e.memoizedState=Xm,o);if(!(e.mode&1))return eu(t,e,s,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var l=i.dgst;return i=l,o=Error(j(419)),i=gp(o,i,void 0),eu(t,e,s,i)}if(l=(s&t.childLanes)!==0,Yt||l){if(i=st,i!==null){switch(s&-s){case 4:r=2;break;case 16:r=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|s)?0:r,r!==0&&r!==o.retryLane&&(o.retryLane=r,Ji(t,r),Kn(i,t,r,-1))}return ky(),i=gp(Error(j(421))),eu(t,e,s,i)}return r.data==="$?"?(e.flags|=128,e.child=t.child,e=HD.bind(null,t),r._reactRetry=e,null):(t=o.treeContext,fn=Dr(r.nextSibling),mn=e,De=!0,Vn=null,t!==null&&(kn[Sn++]=Vi,kn[Sn++]=qi,kn[Sn++]=Lo,Vi=t.id,qi=t.overflow,Lo=e),e=yy(e,i.children),e.flags|=4096,e)}function hx(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),Vm(t.return,e,n)}function yp(t,e,n,i,r){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=n,o.tailMode=r)}function GS(t,e,n){var i=e.pendingProps,r=i.revealOrder,o=i.tail;if(Bt(t,e,i.children,n),i=Ne.current,i&2)i=i&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&hx(t,n,e);else if(t.tag===19)hx(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}i&=1}if(Ee(Ne,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(n=e.child,r=null;n!==null;)t=n.alternate,t!==null&&Ph(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),yp(e,!1,r,n,o);break;case"backwards":for(n=null,r=e.child,e.child=null;r!==null;){if(t=r.alternate,t!==null&&Ph(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}yp(e,!0,n,null,o);break;case"together":yp(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Ku(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Zi(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Bo|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(j(153));if(e.child!==null){for(t=e.child,n=Pr(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Pr(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function LD(t,e,n){switch(e.tag){case 3:KS(e),Ns();break;case 5:bS(e);break;case 1:en(e.type)&&Oh(e);break;case 4:cy(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;Ee(Rh,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(Ee(Ne,Ne.current&1),e.flags|=128,null):n&e.child.childLanes?YS(t,e,n):(Ee(Ne,Ne.current&1),t=Zi(t,e,n),t!==null?t.sibling:null);Ee(Ne,Ne.current&1);break;case 19:if(i=(n&e.childLanes)!==0,t.flags&128){if(i)return GS(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Ee(Ne,Ne.current),i)break;return null;case 22:case 23:return e.lanes=0,qS(t,e,n)}return Zi(t,e,n)}var XS,Jm,QS,JS;XS=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Jm=function(){};QS=function(t,e,n,i){var r=t.memoizedProps;if(r!==i){t=e.stateNode,yo(yi.current);var o=null;switch(n){case"input":r=Cm(t,r),i=Cm(t,i),o=[];break;case"select":r=ze({},r,{value:void 0}),i=ze({},i,{value:void 0}),o=[];break;case"textarea":r=km(t,r),i=km(t,i),o=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(t.onclick=Mh)}_m(n,i);var s;n=null;for(c in r)if(!i.hasOwnProperty(c)&&r.hasOwnProperty(c)&&r[c]!=null)if(c==="style"){var l=r[c];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Sa.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in i){var a=i[c];if(l=r!=null?r[c]:void 0,i.hasOwnProperty(c)&&a!==l&&(a!=null||l!=null))if(c==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Sa.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&Ae("scroll",t),o||l===a||(o=[])):(o=o||[]).push(c,a))}n&&(o=o||[]).push("style",n);var c=o;(e.updateQueue=c)&&(e.flags|=4)}};JS=function(t,e,n,i){n!==i&&(e.flags|=4)};function Tl(t,e){if(!De)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function vt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,i=0;if(e)for(var r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=t,r=r.sibling;else for(r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function OD(t,e,n){var i=e.pendingProps;switch(ny(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(e),null;case 1:return en(e.type)&&Lh(),vt(e),null;case 3:return i=e.stateNode,Is(),Be(Zt),Be(At),hy(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Jc(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Vn!==null&&(sg(Vn),Vn=null))),Jm(t,e),vt(e),null;case 5:uy(e);var r=yo(Na.current);if(n=e.type,t!==null&&e.stateNode!=null)QS(t,e,n,i,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(j(166));return vt(e),null}if(t=yo(yi.current),Jc(e)){i=e.stateNode,n=e.type;var o=e.memoizedProps;switch(i[ui]=e,i[Ra]=o,t=(e.mode&1)!==0,n){case"dialog":Ae("cancel",i),Ae("close",i);break;case"iframe":case"object":case"embed":Ae("load",i);break;case"video":case"audio":for(r=0;r<\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=s.createElement(n,{is:i.is}):(t=s.createElement(n),n==="select"&&(s=t,i.multiple?s.multiple=!0:i.size&&(s.size=i.size))):t=s.createElementNS(t,n),t[ui]=e,t[Ra]=i,XS(t,e,!1,!1),e.stateNode=t;e:{switch(s=Tm(n,i),n){case"dialog":Ae("cancel",t),Ae("close",t),r=i;break;case"iframe":case"object":case"embed":Ae("load",t),r=i;break;case"video":case"audio":for(r=0;rzs&&(e.flags|=128,i=!0,Tl(o,!1),e.lanes=4194304)}else{if(!i)if(t=Ph(s),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Tl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!De)return vt(e),null}else 2*Ve()-o.renderingStartTime>zs&&n!==1073741824&&(e.flags|=128,i=!0,Tl(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Ve(),e.sibling=null,n=Ne.current,Ee(Ne,i?n&1|2:n&1),e):(vt(e),null);case 22:case 23:return by(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?an&1073741824&&(vt(e),e.subtreeFlags&6&&(e.flags|=8192)):vt(e),null;case 24:return null;case 25:return null}throw Error(j(156,e.tag))}function BD(t,e){switch(ny(e),e.tag){case 1:return en(e.type)&&Lh(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Is(),Be(Zt),Be(At),hy(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return uy(e),null;case 13:if(Be(Ne),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(j(340));Ns()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Be(Ne),null;case 4:return Is(),null;case 10:return sy(e.type._context),null;case 22:case 23:return by(),null;case 24:return null;default:return null}}var tu=!1,wt=!1,DD=typeof WeakSet=="function"?WeakSet:Set,G=null;function gs(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){He(t,e,i)}else n.current=null}function Zm(t,e,n){try{n()}catch(i){He(t,e,i)}}var fx=!1;function RD(t,e){if(Nm=Th,t=nS(),ey(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,c=0,u=0,h=t,f=null;t:for(;;){for(var d;h!==n||r!==0&&h.nodeType!==3||(l=s+r),h!==o||i!==0&&h.nodeType!==3||(a=s+i),h.nodeType===3&&(s+=h.nodeValue.length),(d=h.firstChild)!==null;)f=h,h=d;for(;;){if(h===t)break t;if(f===n&&++c===r&&(l=s),f===o&&++u===i&&(a=s),(d=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=d}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pm={focusedElem:t,selectionRange:n},Th=!1,G=e;G!==null;)if(e=G,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,G=t;else for(;G!==null;){e=G;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var y=p.memoizedProps,v=p.memoizedState,g=e.stateNode,m=g.getSnapshotBeforeUpdate(e.elementType===e.type?y:Hn(e.type,y),v);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(C){He(e,e.return,C)}if(t=e.sibling,t!==null){t.return=e.return,G=t;break}G=e.return}return p=fx,fx=!1,p}function aa(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var o=r.destroy;r.destroy=void 0,o!==void 0&&Zm(e,n,o)}r=r.next}while(r!==i)}}function Jf(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function eg(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function ZS(t){var e=t.alternate;e!==null&&(t.alternate=null,ZS(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ui],delete e[Ra],delete e[zm],delete e[gD],delete e[yD])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function e_(t){return t.tag===5||t.tag===3||t.tag===4}function dx(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||e_(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function tg(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Mh));else if(i!==4&&(t=t.child,t!==null))for(tg(t,e,n),t=t.sibling;t!==null;)tg(t,e,n),t=t.sibling}function ng(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(ng(t,e,n),t=t.sibling;t!==null;)ng(t,e,n),t=t.sibling}var lt=null,Wn=!1;function hr(t,e,n){for(n=n.child;n!==null;)t_(t,e,n),n=n.sibling}function t_(t,e,n){if(gi&&typeof gi.onCommitFiberUnmount=="function")try{gi.onCommitFiberUnmount(Vf,n)}catch{}switch(n.tag){case 5:wt||gs(n,e);case 6:var i=lt,r=Wn;lt=null,hr(t,e,n),lt=i,Wn=r,lt!==null&&(Wn?(t=lt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):lt.removeChild(n.stateNode));break;case 18:lt!==null&&(Wn?(t=lt,n=n.stateNode,t.nodeType===8?up(t.parentNode,n):t.nodeType===1&&up(t,n),Ma(t)):up(lt,n.stateNode));break;case 4:i=lt,r=Wn,lt=n.stateNode.containerInfo,Wn=!0,hr(t,e,n),lt=i,Wn=r;break;case 0:case 11:case 14:case 15:if(!wt&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var o=r,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Zm(n,e,s),r=r.next}while(r!==i)}hr(t,e,n);break;case 1:if(!wt&&(gs(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(l){He(n,e,l)}hr(t,e,n);break;case 21:hr(t,e,n);break;case 22:n.mode&1?(wt=(i=wt)||n.memoizedState!==null,hr(t,e,n),wt=i):hr(t,e,n);break;default:hr(t,e,n)}}function px(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new DD),e.forEach(function(i){var r=WD.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function jn(t,e){var n=e.deletions;if(n!==null)for(var i=0;ir&&(r=s),i&=~o}if(i=r,i=Ve()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*ND(i/1960))-i,10t?16:t,_r===null)var i=!1;else{if(t=_r,_r=null,Hh=0,ge&6)throw Error(j(331));var r=ge;for(ge|=4,G=t.current;G!==null;){var o=G,s=o.child;if(G.flags&16){var l=o.deletions;if(l!==null){for(var a=0;aVe()-Cy?bo(t,0):xy|=n),tn(t,e)}function c_(t,e){e===0&&(t.mode&1?(e=Uc,Uc<<=1,!(Uc&130023424)&&(Uc=4194304)):e=1);var n=Nt();t=Ji(t,e),t!==null&&(yc(t,e,n),tn(t,n))}function HD(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),c_(t,n)}function WD(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(j(314))}i!==null&&i.delete(e),c_(t,n)}var u_;u_=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Zt.current)Yt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Yt=!1,LD(t,e,n);Yt=!!(t.flags&131072)}else Yt=!1,De&&e.flags&1048576&&dS(e,Dh,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Ku(t,e),t=e.pendingProps;var r=Fs(e,At.current);Ts(e,n),r=dy(null,e,i,t,r,n);var o=py();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,en(i)?(o=!0,Oh(e)):o=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,ay(e),r.updater=Xf,e.stateNode=r,r._reactInternals=e,Um(e,i,t,n),e=Gm(null,e,i,!0,o,n)):(e.tag=0,De&&o&&ty(e),Bt(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(Ku(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=qD(i),t=Hn(i,t),r){case 0:e=Ym(null,e,i,t,n);break e;case 1:e=cx(null,e,i,t,n);break e;case 11:e=lx(null,e,i,t,n);break e;case 14:e=ax(null,e,i,Hn(i.type,t),n);break e}throw Error(j(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Hn(i,r),Ym(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Hn(i,r),cx(t,e,i,r,n);case 3:e:{if(KS(e),t===null)throw Error(j(387));i=e.pendingProps,o=e.memoizedState,r=o.element,yS(t,e),Nh(e,i,null,n);var s=e.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){r=$s(Error(j(423)),e),e=ux(t,e,i,n,r);break e}else if(i!==r){r=$s(Error(j(424)),e),e=ux(t,e,i,n,r);break e}else for(fn=Dr(e.stateNode.containerInfo.firstChild),mn=e,De=!0,Vn=null,n=wS(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ns(),i===r){e=Zi(t,e,n);break e}Bt(t,e,i,n)}e=e.child}return e;case 5:return bS(e),t===null&&Wm(e),i=e.type,r=e.pendingProps,o=t!==null?t.memoizedProps:null,s=r.children,Im(i,r)?s=null:o!==null&&Im(i,o)&&(e.flags|=32),US(t,e),Bt(t,e,s,n),e.child;case 6:return t===null&&Wm(e),null;case 13:return YS(t,e,n);case 4:return cy(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Ps(e,null,i,n):Bt(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Hn(i,r),lx(t,e,i,r,n);case 7:return Bt(t,e,e.pendingProps,n),e.child;case 8:return Bt(t,e,e.pendingProps.children,n),e.child;case 12:return Bt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,o=e.memoizedProps,s=r.value,Ee(Rh,i._currentValue),i._currentValue=s,o!==null)if(Xn(o.value,s)){if(o.children===r.children&&!Zt.current){e=Zi(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===i){if(o.tag===1){a=Ki(-1,n&-n),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?a.next=a:(a.next=u.next,u.next=a),c.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Vm(o.return,n,e),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(j(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Vm(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Bt(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Ts(e,n),r=Bn(r),i=i(r),e.flags|=1,Bt(t,e,i,n),e.child;case 14:return i=e.type,r=Hn(i,e.pendingProps),r=Hn(i.type,r),ax(t,e,i,r,n);case 15:return VS(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Hn(i,r),Ku(t,e),e.tag=1,en(i)?(t=!0,Oh(e)):t=!1,Ts(e,n),xS(e,i,r),Um(e,i,r,n),Gm(null,e,i,!0,t,n);case 19:return GS(t,e,n);case 22:return qS(t,e,n)}throw Error(j(156,e.tag))};function h_(t,e){return Pk(t,e)}function VD(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(t,e,n,i){return new VD(t,e,n,i)}function Sy(t){return t=t.prototype,!(!t||!t.isReactComponent)}function qD(t){if(typeof t=="function")return Sy(t)?1:0;if(t!=null){if(t=t.$$typeof,t===W0)return 11;if(t===V0)return 14}return 2}function Pr(t,e){var n=t.alternate;return n===null?(n=En(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Xu(t,e,n,i,r,o){var s=2;if(i=t,typeof t=="function")Sy(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case ls:return ko(n.children,r,o,e);case H0:s=8,r|=8;break;case gm:return t=En(12,n,e,r|2),t.elementType=gm,t.lanes=o,t;case ym:return t=En(13,n,e,r),t.elementType=ym,t.lanes=o,t;case vm:return t=En(19,n,e,r),t.elementType=vm,t.lanes=o,t;case Ck:return ed(n,r,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case vk:s=10;break e;case xk:s=9;break e;case W0:s=11;break e;case V0:s=14;break e;case dr:s=16,i=null;break e}throw Error(j(130,t==null?t:typeof t,""))}return e=En(s,n,e,r),e.elementType=t,e.type=i,e.lanes=o,e}function ko(t,e,n,i){return t=En(7,t,i,e),t.lanes=n,t}function ed(t,e,n,i){return t=En(22,t,i,e),t.elementType=Ck,t.lanes=n,t.stateNode={isHidden:!1},t}function vp(t,e,n){return t=En(6,t,null,e),t.lanes=n,t}function xp(t,e,n){return e=En(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function UD(t,e,n,i,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zd(0),this.expirationTimes=Zd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zd(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function _y(t,e,n,i,r,o,s,l,a){return t=new UD(t,e,n,l,a),e===1?(e=1,o===!0&&(e|=8)):e=0,o=En(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ay(o),t}function KD(t,e,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m_)}catch(t){console.error(t)}}m_(),dk.exports=xn;var g_=dk.exports;const vo=sr(g_);var bx=g_;pm.createRoot=bx.createRoot,pm.hydrateRoot=bx.hydrateRoot;class JD{constructor({name:e,re:n,match:i,handle:r,terminal:o}){this.name=e,this.re=n,this.match=(s,l)=>!(this.re&&!this.re.test(l)||i&&!i(s,l)),this.handle=(s,l)=>this.re?l.replace(this.re,(a,...c)=>r(s,l,...c)):r(s,l)}}const ZD=[{name:"empty-line",re:/^(?:(?: \s*)?|#[^\s]*)$/,handle(t,e,n){t.ast.push({emptyLine:!0})}},{name:"export",re:/^export(?:\s*(?:([^=]+)(?:=(.*))?)?)?/,handle(t,e,n,i){const r=n===void 0&&i===void 0;t.ast.push({export:r?{global:r}:{variable:n,value:i}})}},{name:"recipe",re:/^\t+(.*)/,match(t,e){const n=t.ast[t.ast.length-1];return n&&n.target},handle(t,e,n){t.ast[t.ast.length-1].recipe.push(n)}},{name:"comment",re:/^# (.*)/,handle(t,e,n){const i=t.ast[t.ast.length-1];i&&i.comment&&Object.keys(i).length==1?i.comment.push(n):(n=[n],t.ast.push({comment:n}))}},{name:"target",re:/^((?:[^:\t\s]|\:)+)\s*:([^=].*)?$/,handle(t,e,n,i){if(i=i===void 0?[]:i.trim().match(/([^\\ ]|\\\ ?)+/g).map(r=>r.trim()).filter(r=>r),n===".PHONY")t.PHONY.push(...i);else{const r=t.ast[t.ast.length-1],o={target:n,deps:i,recipe:[]};r&&r.comment&&(o.comment=t.ast.pop().comment),t.ast.push(o)}}},{name:"variable",re:/^([^=\s]+)\s*[:\?\+]?=\s*(.*)$/,handle(t,e,n,i){const r=t.ast[t.ast.length-1],o={variable:n,value:i};r&&r.comment&&(o.comment=t.ast.pop().comment),t.ast.push(o)}}].map(t=>new JD(t));var eR=function(e,n={}){"strict"in n||(n.strict=!1),"unhandled"in n||(n.unhandled=!1);function i(s){if(n.strict)throw new Error(s);console.error(s)}e=e.replace(/\\\n\s*/g,"");const r=e.split(/\n/),o={PHONY:[],ast:[],unhandled:[]};for(let s of r){const l=ZD.filter(a=>a.match(o,s));if(l.length===0){n.unhandled?o.unhandled.push(`!! UNHANDLED: '${s}'`):i(`!! UNHANDLED: '${s}'`);continue}else if(l.length>1){i(`!! AMBIGUOUS: (${l.map(a=>a.name)}) '${s}'`);continue}else l.map(a=>a.handle(o,s))}return o};const tR=sr(eR);var dn=(t=>(t.Dark="dark",t.Light="light",t))(dn||{}),ja=(t=>(t.THEME="theme",t.HAS_DISMISSED_WELCOME_MESSAGE="has-dismissed-welcome-message",t))(ja||{}),lg=(t=>(t.TRUE="true",t.FALSE="false",t))(lg||{}),y_=(t=>(t.MAKEFILE_URL="makefile_url",t))(y_||{}),v_=(t=>(t.LR="LR",t.TB="TB",t))(v_||{}),x_=(t=>(t.SVG="image/svg+xml",t))(x_||{});const nR=t=>{let e=t;const n=t.match(/^https?:\/\/(?:www\.)?github\.com\/(.+?)\/(.+?)\/blob\/(.+)/);if(Array.isArray(n)&&n.length===4){const i=n[1],r=n[2],o=n[3];e=`https://raw.githubusercontent.com/${i}/${r}/${o}`}return e},iR=async t=>{let e;try{const n=await fetch(t);n.ok?e=await n.text():console.error(`Failed to fetch Makefile from: ${t}`)}catch(n){console.error(`Failed to fetch Makefile from: ${t}`,n)}return e},rR=t=>{const e=y_.MAKEFILE_URL,i=new URLSearchParams(t).get(e);let r=null;if(typeof i=="string")try{r=new URL(i.trim()).toString(),r=nR(r)}catch{r=null}return r},oR=t=>{const e=[];for(let n=0;nObject.prototype.hasOwnProperty.call(t,"target"),Sx=(t,e=v_.LR)=>{const{ast:n}=tR(t);n.filter(o=>kx(o)).forEach(o=>{Array.isArray(o.deps)&&(o.deps=oR(o.deps))});const i=[];n.filter(o=>kx(o)).filter(o=>!o.target.startsWith("#")&&!o.target.startsWith(".")).forEach(o=>{const{target:s,deps:l}=o;i.push(` ${s}:::target`),l==null||l.forEach(a=>{i.push(` ${s} --> ${a}`)})});let r="";return i.length>0&&(r=["%% Mermaid diagram",`graph ${e}`,...i].join(` `)),r};var C_={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i=[],r=0;r{const s=me(t,"container"),l=typeof e=="string"?`-${e}`:"-fluid";return A.jsx(n,{ref:o,...r,className:fe(i,e?`${s}${l}`:s)})});b_.displayName="Container";const _x=b_,cR=k.createContext(null),Tx=(t,e=null)=>t!=null?String(t):e||null,qh=cR;function Uh(){return Uh=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[r]=t[r]);return n}function Ex(t){return"default"+t.charAt(0).toUpperCase()+t.substr(1)}function uR(t){var e=hR(t,"string");return typeof e=="symbol"?e:String(e)}function hR(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function k_(t,e,n){var i=k.useRef(t!==void 0),r=k.useState(e),o=r[0],s=r[1],l=t!==void 0,a=i.current;return i.current=l,!l&&a&&o!==e&&s(e),[l?t:o,k.useCallback(function(c){for(var u=arguments.length,h=new Array(u>1?u-1:0),f=1;f{t=me(t,"navbar-brand");const o=n||(i.href?"a":"span");return A.jsx(o,{...i,ref:r,className:fe(e,t)})});S_.displayName="NavbarBrand";const dR=S_;function wc(t){return t&&t.ownerDocument||document}function pR(t){var e=wc(t);return e&&e.defaultView||window}function mR(t,e){return pR(t).getComputedStyle(t,e)}var gR=/([A-Z])/g;function yR(t){return t.replace(gR,"-$1").toLowerCase()}var vR=/^ms-/;function ru(t){return yR(t).replace(vR,"-ms-")}var xR=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function CR(t){return!!(t&&xR.test(t))}function Yi(t,e){var n="",i="";if(typeof e=="string")return t.style.getPropertyValue(ru(e))||mR(t).getPropertyValue(ru(e));Object.keys(e).forEach(function(r){var o=e[r];!o&&o!==0?t.style.removeProperty(ru(r)):CR(r)?i+=r+"("+o+") ":n+=ru(r)+": "+o+";"}),i&&(n+="transform: "+i+";"),t.style.cssText+=";"+n}var __={exports:{}},wR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",bR=wR,kR=bR;function T_(){}function E_(){}E_.resetWarningCache=T_;var SR=function(){function t(i,r,o,s,l,a){if(a!==kR){var c=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 c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:E_,resetWarningCache:T_};return n.PropTypes=n,n};__.exports=SR();var _R=__.exports;const Qu=sr(_R),Ax={disabled:!1},A_=Ze.createContext(null);var TR=function(e){return e.scrollTop},ql="unmounted",mr="exited",_n="entering",Hi="entered",js="exiting",ar=function(t){fR(e,t);function e(i,r){var o;o=t.call(this,i,r)||this;var s=r,l=s&&!s.isMounting?i.enter:i.appear,a;return o.appearStatus=null,i.in?l?(a=mr,o.appearStatus=_n):a=Hi:i.unmountOnExit||i.mountOnEnter?a=ql:a=mr,o.state={status:a},o.nextCallback=null,o}e.getDerivedStateFromProps=function(r,o){var s=r.in;return s&&o.status===ql?{status:mr}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var o=null;if(r!==this.props){var s=this.state.status;this.props.in?s!==_n&&s!==Hi&&(o=_n):(s===_n||s===Hi)&&(o=js)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,o,s,l;return o=s=l=r,r!=null&&typeof r!="number"&&(o=r.exit,s=r.enter,l=r.appear!==void 0?r.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(r,o){if(r===void 0&&(r=!1),o!==null)if(this.cancelNextCallback(),o===_n){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:vo.findDOMNode(this);s&&TR(s)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===mr&&this.setState({status:ql})},n.performEnter=function(r){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:r,a=this.props.nodeRef?[l]:[vo.findDOMNode(this),l],c=a[0],u=a[1],h=this.getTimeouts(),f=l?h.appear:h.enter;if(!r&&!s||Ax.disabled){this.safeSetState({status:Hi},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:_n},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Hi},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var r=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:vo.findDOMNode(this);if(!o||Ax.disabled){this.safeSetState({status:mr},function(){r.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:js},function(){r.props.onExiting(l),r.onTransitionEnd(s.exit,function(){r.safeSetState({status:mr},function(){r.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,o){o=this.setNextCallback(o),this.setState(r,o)},n.setNextCallback=function(r){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,r(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(r,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:vo.findDOMNode(this),l=r==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=a[0],u=a[1];this.props.addEndListener(c,u)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===ql)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=Ly(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ze.createElement(A_.Provider,{value:null},typeof s=="function"?s(r,l):Ze.cloneElement(Ze.Children.only(s),l))},e}(Ze.Component);ar.contextType=A_;ar.propTypes={};function Zo(){}ar.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Zo,onEntering:Zo,onEntered:Zo,onExit:Zo,onExiting:Zo,onExited:Zo};ar.UNMOUNTED=ql;ar.EXITED=mr;ar.ENTERING=_n;ar.ENTERED=Hi;ar.EXITING=js;const ER=ar,od=!!(typeof window<"u"&&window.document&&window.document.createElement);var cg=!1,ug=!1;try{var Cp={get passive(){return cg=!0},get once(){return ug=cg=!0}};od&&(window.addEventListener("test",Cp,Cp),window.removeEventListener("test",Cp,!0))}catch{}function M_(t,e,n,i){if(i&&typeof i!="boolean"&&!ug){var r=i.once,o=i.capture,s=n;!ug&&r&&(s=n.__once||function l(a){this.removeEventListener(e,l,o),n.call(this,a)},n.__once=s),t.addEventListener(e,s,cg?i:o)}t.addEventListener(e,n,i)}function AR(t,e,n,i){var r=i&&typeof i!="boolean"?i.capture:i;t.removeEventListener(e,n,r),n.__once&&t.removeEventListener(e,n.__once,r)}function Ui(t,e,n,i){return M_(t,e,n,i),function(){AR(t,e,n,i)}}function MR(t,e,n,i){if(n===void 0&&(n=!1),i===void 0&&(i=!0),t){var r=document.createEvent("HTMLEvents");r.initEvent(e,n,i),t.dispatchEvent(r)}}function LR(t){var e=Yi(t,"transitionDuration")||"",n=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*n}function OR(t,e,n){n===void 0&&(n=5);var i=!1,r=setTimeout(function(){i||MR(t,"transitionend",!0)},e+n),o=Ui(t,"transitionend",function(){i=!0},{once:!0});return function(){clearTimeout(r),o()}}function BR(t,e,n,i){n==null&&(n=LR(t)||0);var r=OR(t,n,i),o=Ui(t,"transitionend",e);return function(){r(),o()}}function Mx(t,e){const n=Yi(t,e)||"",i=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*i}function By(t,e){const n=Mx(t,"transitionDuration"),i=Mx(t,"transitionDelay"),r=BR(t,o=>{o.target===t&&(r(),e(o))},n+i)}function Al(...t){return t.filter(e=>e!=null).reduce((e,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?n:function(...r){e.apply(this,r),n.apply(this,r)}},null)}function L_(t){t.offsetHeight}const Lx=t=>!t||typeof t=="function"?t:e=>{t.current=e};function DR(t,e){const n=Lx(t),i=Lx(e);return r=>{n&&n(r),i&&i(r)}}function to(t,e){return k.useMemo(()=>DR(t,e),[t,e])}function Kh(t){return t&&"setState"in t?vo.findDOMNode(t):t??null}const RR=Ze.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:i,onExiting:r,onExited:o,addEndListener:s,children:l,childRef:a,...c},u)=>{const h=k.useRef(null),f=to(h,a),d=b=>{f(Kh(b))},p=b=>S=>{b&&h.current&&b(h.current,S)},y=k.useCallback(p(t),[t]),v=k.useCallback(p(e),[e]),g=k.useCallback(p(n),[n]),m=k.useCallback(p(i),[i]),x=k.useCallback(p(r),[r]),C=k.useCallback(p(o),[o]),w=k.useCallback(p(s),[s]);return A.jsx(ER,{ref:u,...c,onEnter:y,onEntered:g,onEntering:v,onExit:m,onExited:C,onExiting:x,addEndListener:w,nodeRef:h,children:typeof l=="function"?(b,S)=>l(b,{...S,ref:d}):Ze.cloneElement(l,{ref:d})})}),Dy=RR,FR={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function NR(t,e){const n=`offset${t[0].toUpperCase()}${t.slice(1)}`,i=e[n],r=FR[t];return i+parseInt(Yi(e,r[0]),10)+parseInt(Yi(e,r[1]),10)}const PR={[mr]:"collapse",[js]:"collapsing",[_n]:"collapsing",[Hi]:"collapse show"},IR=Ze.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:i,onExiting:r,className:o,children:s,dimension:l="height",in:a=!1,timeout:c=300,mountOnEnter:u=!1,unmountOnExit:h=!1,appear:f=!1,getDimensionValue:d=NR,...p},y)=>{const v=typeof l=="function"?l():l,g=k.useMemo(()=>Al(b=>{b.style[v]="0"},t),[v,t]),m=k.useMemo(()=>Al(b=>{const S=`scroll${v[0].toUpperCase()}${v.slice(1)}`;b.style[v]=`${b[S]}px`},e),[v,e]),x=k.useMemo(()=>Al(b=>{b.style[v]=null},n),[v,n]),C=k.useMemo(()=>Al(b=>{b.style[v]=`${d(v,b)}px`,L_(b)},i),[i,d,v]),w=k.useMemo(()=>Al(b=>{b.style[v]=null},r),[v,r]);return A.jsx(Dy,{ref:y,addEndListener:By,...p,"aria-expanded":p.role?a:null,onEnter:g,onEntering:m,onEntered:x,onExit:C,onExiting:w,childRef:s.ref,in:a,timeout:c,mountOnEnter:u,unmountOnExit:h,appear:f,children:(b,S)=>Ze.cloneElement(s,{...S,className:fe(o,s.props.className,PR[b],v==="width"&&"collapse-horizontal")})})}),$R=IR,O_=k.createContext(null);O_.displayName="NavbarContext";const al=O_,B_=k.forwardRef(({children:t,bsPrefix:e,...n},i)=>{e=me(e,"navbar-collapse");const r=k.useContext(al);return A.jsx($R,{in:!!(r&&r.expanded),...n,children:A.jsx("div",{ref:i,className:e,children:t})})});B_.displayName="NavbarCollapse";const zR=B_;function jR(t){const e=k.useRef(t);return k.useEffect(()=>{e.current=t},[t]),e}function Pe(t){const e=jR(t);return k.useCallback(function(...n){return e.current&&e.current(...n)},[e])}const D_=k.forwardRef(({bsPrefix:t,className:e,children:n,label:i="Toggle navigation",as:r="button",onClick:o,...s},l)=>{t=me(t,"navbar-toggler");const{onToggle:a,expanded:c}=k.useContext(al)||{},u=Pe(h=>{o&&o(h),a&&a()});return r==="button"&&(s.type="button"),A.jsx(r,{...s,ref:l,onClick:u,"aria-label":i,className:fe(e,t,!c&&"collapsed"),children:n||A.jsx("span",{className:`${t}-icon`})})});D_.displayName="NavbarToggle";const HR=D_,WR=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",VR=typeof document<"u",Ha=VR||WR?k.useLayoutEffect:k.useEffect,hg=new WeakMap,Ox=(t,e)=>{if(!t||!e)return;const n=hg.get(e)||new Map;hg.set(e,n);let i=n.get(t);return i||(i=e.matchMedia(t),i.refCount=0,n.set(i.media,i)),i};function qR(t,e=typeof window>"u"?void 0:window){const n=Ox(t,e),[i,r]=k.useState(()=>n?n.matches:!1);return Ha(()=>{let o=Ox(t,e);if(!o)return r(!1);let s=hg.get(e);const l=()=>{r(o.matches)};return o.refCount++,o.addListener(l),l(),()=>{o.removeListener(l),o.refCount--,o.refCount<=0&&(s==null||s.delete(o.media)),o=void 0}},[t]),i}function UR(t){const e=Object.keys(t);function n(l,a){return l===a?a:l?`${l} and ${a}`:a}function i(l){return e[Math.min(e.indexOf(l)+1,e.length-1)]}function r(l){const a=i(l);let c=t[a];return typeof c=="number"?c=`${c-.2}px`:c=`calc(${c} - 0.2px)`,`(max-width: ${c})`}function o(l){let a=t[l];return typeof a=="number"&&(a=`${a}px`),`(min-width: ${a})`}function s(l,a,c){let u;typeof l=="object"?(u=l,c=a,a=!0):(a=a||!0,u={[l]:a});let h=k.useMemo(()=>Object.entries(u).reduce((f,[d,p])=>((p==="up"||p===!0)&&(f=n(f,o(d))),(p==="down"||p===!0)&&(f=n(f,r(d))),f),""),[JSON.stringify(u)]);return qR(h,c)}return s}const KR=UR({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400});function wp(t){t===void 0&&(t=wc());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function Wa(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}function Ry(){const t=k.useRef(!0),e=k.useRef(()=>t.current);return k.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),e.current}function YR(t){const e=k.useRef(t);return e.current=t,e}function R_(t){const e=YR(t);k.useEffect(()=>()=>e.current(),[])}function F_(t){const e=k.useRef(null);return k.useEffect(()=>{e.current=t}),e.current}const GR="data-rr-ui-";function Fy(t){return`${GR}${t}`}function XR(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const Bx=Fy("modal-open");class QR{constructor({ownerDocument:e,handleContainerOverflow:n=!0,isRTL:i=!1}={}){this.handleContainerOverflow=n,this.isRTL=i,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return XR(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const n={overflow:"hidden"},i=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[i]:r.style[i]},e.scrollBarWidth&&(n[i]=`${parseInt(Yi(r,i)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(Bx,""),Yi(r,n)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const n=this.getElement();n.removeAttribute(Bx),Object.assign(n.style,e.style)}add(e){let n=this.modals.indexOf(e);return n!==-1||(n=this.modals.length,this.modals.push(e),this.setModalAttributes(e),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(e){const n=this.modals.indexOf(e);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const Ny=QR,N_=k.createContext(od?window:void 0);N_.Provider;function sd(){return k.useContext(N_)}const bp=(t,e)=>od?t==null?(e||wc()).body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),t&&("nodeType"in t||t.getBoundingClientRect)?t:null):null;function fg(t,e){const n=sd(),[i,r]=k.useState(()=>bp(t,n==null?void 0:n.document));if(!i){const o=bp(t);o&&r(o)}return k.useEffect(()=>{e&&i&&e(i)},[e,i]),k.useEffect(()=>{const o=bp(t);o!==i&&r(o)},[t,i]),i}function JR({children:t,in:e,onExited:n,mountOnEnter:i,unmountOnExit:r}){const o=k.useRef(null),s=k.useRef(e),l=Pe(n);k.useEffect(()=>{e?s.current=!0:l(o.current)},[e,l]);const a=to(o,t.ref),c=k.cloneElement(t,{ref:a});return e?c:r||!s.current&&i?null:c}function ZR({in:t,onTransition:e}){const n=k.useRef(null),i=k.useRef(!0),r=Pe(e);return Ha(()=>{if(!n.current)return;let o=!1;return r({in:t,element:n.current,initial:i.current,isStale:()=>o}),()=>{o=!0}},[t,r]),Ha(()=>(i.current=!1,()=>{i.current=!0}),[]),n}function eF({children:t,in:e,onExited:n,onEntered:i,transition:r}){const[o,s]=k.useState(!e);e&&o&&s(!1);const l=ZR({in:!!e,onTransition:c=>{const u=()=>{c.isStale()||(c.in?i==null||i(c.element,c.initial):(s(!0),n==null||n(c.element)))};Promise.resolve(r(c)).then(u,h=>{throw c.in||s(!0),h})}}),a=to(l,t.ref);return o&&!e?null:k.cloneElement(t,{ref:a})}function dg(t,e,n){return t?A.jsx(t,Object.assign({},n)):e?A.jsx(eF,Object.assign({},n,{transition:e})):A.jsx(JR,Object.assign({},n))}function P_(t){return t.code==="Escape"||t.keyCode===27}const tF=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function nF(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o=0)&&(n[r]=t[r]);return n}let kp;function iF(t){return kp||(kp=new Ny({ownerDocument:t==null?void 0:t.document})),kp}function rF(t){const e=sd(),n=t||iF(e),i=k.useRef({dialog:null,backdrop:null});return Object.assign(i.current,{add:()=>n.add(i.current),remove:()=>n.remove(i.current),isTopModal:()=>n.isTopModal(i.current),setDialogRef:k.useCallback(r=>{i.current.dialog=r},[]),setBackdropRef:k.useCallback(r=>{i.current.backdrop=r},[])})}const I_=k.forwardRef((t,e)=>{let{show:n=!1,role:i="dialog",className:r,style:o,children:s,backdrop:l=!0,keyboard:a=!0,onBackdropClick:c,onEscapeKeyDown:u,transition:h,runTransition:f,backdropTransition:d,runBackdropTransition:p,autoFocus:y=!0,enforceFocus:v=!0,restoreFocus:g=!0,restoreFocusOptions:m,renderDialog:x,renderBackdrop:C=be=>A.jsx("div",Object.assign({},be)),manager:w,container:b,onShow:S,onHide:M=()=>{},onExit:N,onExited:O,onExiting:D,onEnter:V,onEntering:K,onEntered:z}=t,F=nF(t,tF);const B=sd(),$=fg(b),_=rF(w),L=Ry(),R=F_(n),[H,J]=k.useState(!n),X=k.useRef(null);k.useImperativeHandle(e,()=>_,[_]),od&&!R&&n&&(X.current=wp(B==null?void 0:B.document)),n&&H&&J(!1);const ae=Pe(()=>{if(_.add(),ke.current=Ui(document,"keydown",nt),it.current=Ui(document,"focus",()=>setTimeout(Ce),!0),S&&S(),y){var be,ti;const Oi=wp((be=(ti=_.dialog)==null?void 0:ti.ownerDocument)!=null?be:B==null?void 0:B.document);_.dialog&&Oi&&!Wa(_.dialog,Oi)&&(X.current=Oi,_.dialog.focus())}}),ce=Pe(()=>{if(_.remove(),ke.current==null||ke.current(),it.current==null||it.current(),g){var be;(be=X.current)==null||be.focus==null||be.focus(m),X.current=null}});k.useEffect(()=>{!n||!$||ae()},[n,$,ae]),k.useEffect(()=>{H&&ce()},[H,ce]),R_(()=>{ce()});const Ce=Pe(()=>{if(!v||!L()||!_.isTopModal())return;const be=wp(B==null?void 0:B.document);_.dialog&&be&&!Wa(_.dialog,be)&&_.dialog.focus()}),Fe=Pe(be=>{be.target===be.currentTarget&&(c==null||c(be),l===!0&&M())}),nt=Pe(be=>{a&&P_(be)&&_.isTopModal()&&(u==null||u(be),be.defaultPrevented||M())}),it=k.useRef(),ke=k.useRef(),je=(...be)=>{J(!0),O==null||O(...be)};if(!$)return null;const Ht=Object.assign({role:i,ref:_.setDialogRef,"aria-modal":i==="dialog"?!0:void 0},F,{style:o,className:r,tabIndex:-1});let Ot=x?x(Ht):A.jsx("div",Object.assign({},Ht,{children:k.cloneElement(s,{role:"document"})}));Ot=dg(h,f,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:N,onExiting:D,onExited:je,onEnter:V,onEntering:K,onEntered:z,children:Ot});let on=null;return l&&(on=C({ref:_.setBackdropRef,onClick:Fe}),on=dg(d,p,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:on})),A.jsx(A.Fragment,{children:vo.createPortal(A.jsxs(A.Fragment,{children:[on,Ot]}),$)})});I_.displayName="Modal";const oF=Object.assign(I_,{Manager:Ny}),sF={[_n]:"show",[Hi]:"show"},$_=k.forwardRef(({className:t,children:e,transitionClasses:n={},onEnter:i,...r},o)=>{const s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...r},l=k.useCallback((a,c)=>{L_(a),i==null||i(a,c)},[i]);return A.jsx(Dy,{ref:o,addEndListener:By,...s,onEnter:l,childRef:e.ref,children:(a,c)=>k.cloneElement(e,{...c,className:fe("fade",t,e.props.className,sF[a],n[a])})})});$_.displayName="Fade";const Hs=$_,z_=k.forwardRef(({className:t,bsPrefix:e,as:n="div",...i},r)=>(e=me(e,"offcanvas-body"),A.jsx(n,{ref:r,className:fe(t,e),...i})));z_.displayName="OffcanvasBody";const lF=z_,aF={[_n]:"show",[Hi]:"show"},j_=k.forwardRef(({bsPrefix:t,className:e,children:n,in:i=!1,mountOnEnter:r=!1,unmountOnExit:o=!1,appear:s=!1,...l},a)=>(t=me(t,"offcanvas"),A.jsx(Dy,{ref:a,addEndListener:By,in:i,mountOnEnter:r,unmountOnExit:o,appear:s,...l,childRef:n.ref,children:(c,u)=>k.cloneElement(n,{...u,className:fe(e,n.props.className,(c===_n||c===js)&&`${t}-toggling`,aF[c])})})));j_.displayName="OffcanvasToggling";const cF=j_,uF=k.createContext({onHide(){}}),H_=uF,hF={"aria-label":Qu.string,onClick:Qu.func,variant:Qu.oneOf(["white"])},Py=k.forwardRef(({className:t,variant:e,"aria-label":n="Close",...i},r)=>A.jsx("button",{ref:r,type:"button",className:fe("btn-close",e&&`btn-close-${e}`,t),"aria-label":n,...i}));Py.displayName="CloseButton";Py.propTypes=hF;const Iy=Py,fF=k.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:n=!1,onHide:i,children:r,...o},s)=>{const l=k.useContext(H_),a=Pe(()=>{l==null||l.onHide(),i==null||i()});return A.jsxs("div",{ref:s,...o,children:[r,n&&A.jsx(Iy,{"aria-label":t,variant:e,onClick:a})]})}),dF=fF,W_=k.forwardRef(({bsPrefix:t,className:e,closeLabel:n="Close",closeButton:i=!1,...r},o)=>(t=me(t,"offcanvas-header"),A.jsx(dF,{ref:o,...r,className:fe(e,t),closeLabel:n,closeButton:i})));W_.displayName="OffcanvasHeader";const pF=W_,V_=t=>k.forwardRef((e,n)=>A.jsx("div",{...e,ref:n,className:fe(e.className,t)})),mF=V_("h5"),q_=k.forwardRef(({className:t,bsPrefix:e,as:n=mF,...i},r)=>(e=me(e,"offcanvas-title"),A.jsx(n,{ref:r,className:fe(t,e),...i})));q_.displayName="OffcanvasTitle";const gF=q_;function pg(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function yF(t,e){t.classList?t.classList.add(e):pg(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}var vF=Function.prototype.bind.call(Function.prototype.call,[].slice);function gr(t,e){return vF(t.querySelectorAll(e))}function Dx(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function xF(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Dx(t.className,e):t.setAttribute("class",Dx(t.className&&t.className.baseVal||"",e))}const es={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class U_ extends Ny{adjustAndStore(e,n,i){const r=n.style[e];n.dataset[e]=r,Yi(n,{[e]:`${parseFloat(Yi(n,e))+i}px`})}restore(e,n){const i=n.dataset[e];i!==void 0&&(delete n.dataset[e],Yi(n,{[e]:i}))}setContainerStyle(e){super.setContainerStyle(e);const n=this.getElement();if(yF(n,"modal-open"),!e.scrollBarWidth)return;const i=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";gr(n,es.FIXED_CONTENT).forEach(o=>this.adjustAndStore(i,o,e.scrollBarWidth)),gr(n,es.STICKY_CONTENT).forEach(o=>this.adjustAndStore(r,o,-e.scrollBarWidth)),gr(n,es.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(r,o,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const n=this.getElement();xF(n,"modal-open");const i=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";gr(n,es.FIXED_CONTENT).forEach(o=>this.restore(i,o)),gr(n,es.STICKY_CONTENT).forEach(o=>this.restore(r,o)),gr(n,es.NAVBAR_TOGGLER).forEach(o=>this.restore(r,o))}}let Sp;function CF(t){return Sp||(Sp=new U_(t)),Sp}const wF=U_;function bF(t){return A.jsx(cF,{...t})}function kF(t){return A.jsx(Hs,{...t})}const K_=k.forwardRef(({bsPrefix:t,className:e,children:n,"aria-labelledby":i,placement:r="start",responsive:o,show:s=!1,backdrop:l=!0,keyboard:a=!0,scroll:c=!1,onEscapeKeyDown:u,onShow:h,onHide:f,container:d,autoFocus:p=!0,enforceFocus:y=!0,restoreFocus:v=!0,restoreFocusOptions:g,onEntered:m,onExit:x,onExiting:C,onEnter:w,onEntering:b,onExited:S,backdropClassName:M,manager:N,renderStaticNode:O=!1,...D},V)=>{const K=k.useRef();t=me(t,"offcanvas");const{onToggle:z}=k.useContext(al)||{},[F,B]=k.useState(!1),$=KR(o||"xs","up");k.useEffect(()=>{B(o?s&&!$:s)},[s,o,$]);const _=Pe(()=>{z==null||z(),f==null||f()}),L=k.useMemo(()=>({onHide:_}),[_]);function R(){return N||(c?(K.current||(K.current=new wF({handleContainerOverflow:!1})),K.current):CF())}const H=(ce,...Ce)=>{ce&&(ce.style.visibility="visible"),w==null||w(ce,...Ce)},J=(ce,...Ce)=>{ce&&(ce.style.visibility=""),S==null||S(...Ce)},X=k.useCallback(ce=>A.jsx("div",{...ce,className:fe(`${t}-backdrop`,M)}),[M,t]),ae=ce=>A.jsx("div",{...ce,...D,className:fe(e,o?`${t}-${o}`:t,`${t}-${r}`),"aria-labelledby":i,children:n});return A.jsxs(A.Fragment,{children:[!F&&(o||O)&&ae({}),A.jsx(H_.Provider,{value:L,children:A.jsx(oF,{show:F,ref:V,backdrop:l,container:d,keyboard:a,autoFocus:p,enforceFocus:y&&!c,restoreFocus:v,restoreFocusOptions:g,onEscapeKeyDown:u,onShow:h,onHide:_,onEnter:H,onEntering:b,onEntered:m,onExit:x,onExiting:C,onExited:J,manager:R(),transition:bF,backdropTransition:kF,renderBackdrop:X,renderDialog:ae})})]})});K_.displayName="Offcanvas";const SF=Object.assign(K_,{Body:lF,Header:pF,Title:gF}),Y_=k.forwardRef((t,e)=>{const n=k.useContext(al);return A.jsx(SF,{ref:e,show:!!(n!=null&&n.expanded),...t,renderStaticNode:!0})});Y_.displayName="NavbarOffcanvas";const _F=Y_,G_=k.forwardRef(({className:t,bsPrefix:e,as:n="span",...i},r)=>(e=me(e,"navbar-text"),A.jsx(n,{ref:r,className:fe(t,e),...i})));G_.displayName="NavbarText";const TF=G_,X_=k.forwardRef((t,e)=>{const{bsPrefix:n,expand:i=!0,variant:r="light",bg:o,fixed:s,sticky:l,className:a,as:c="nav",expanded:u,onToggle:h,onSelect:f,collapseOnSelect:d=!1,...p}=Oy(t,{expanded:"onToggle"}),y=me(n,"navbar"),v=k.useCallback((...x)=>{f==null||f(...x),d&&u&&(h==null||h(!1))},[f,d,u,h]);p.role===void 0&&c!=="nav"&&(p.role="navigation");let g=`${y}-expand`;typeof i=="string"&&(g=`${g}-${i}`);const m=k.useMemo(()=>({onToggle:()=>h==null?void 0:h(!u),bsPrefix:y,expanded:!!u,expand:i}),[y,u,i,h]);return A.jsx(al.Provider,{value:m,children:A.jsx(qh.Provider,{value:v,children:A.jsx(c,{ref:e,...p,className:fe(a,y,i&&g,r&&`${y}-${r}`,o&&`bg-${o}`,l&&`sticky-${l}`,s&&`fixed-${s}`)})})})});X_.displayName="Navbar";const Rx=Object.assign(X_,{Brand:dR,Collapse:zR,Offcanvas:_F,Text:TF,Toggle:HR}),Q_=k.forwardRef(({bsPrefix:t,variant:e,animation:n="border",size:i,as:r="div",className:o,...s},l)=>{t=me(t,"spinner");const a=`${t}-${n}`;return A.jsx(r,{ref:l,...s,className:fe(o,a,i&&`${a}-${i}`,e&&`text-${e}`)})});Q_.displayName="Spinner";const EF=Q_,AF={"top-start":"top-0 start-0","top-center":"top-0 start-50 translate-middle-x","top-end":"top-0 end-0","middle-start":"top-50 start-0 translate-middle-y","middle-center":"top-50 start-50 translate-middle","middle-end":"top-50 end-0 translate-middle-y","bottom-start":"bottom-0 start-0","bottom-center":"bottom-0 start-50 translate-middle-x","bottom-end":"bottom-0 end-0"},J_=k.forwardRef(({bsPrefix:t,position:e,containerPosition:n,className:i,as:r="div",...o},s)=>(t=me(t,"toast-container"),A.jsx(r,{ref:s,...o,className:fe(t,e&&AF[e],n&&`position-${n}`,i)})));J_.displayName="ToastContainer";const MF=J_,Z_=V_("h4");Z_.displayName="DivStyledAsH4";const eT=k.forwardRef(({className:t,bsPrefix:e,as:n=Z_,...i},r)=>(e=me(e,"alert-heading"),A.jsx(n,{ref:r,className:fe(t,e),...i})));eT.displayName="AlertHeading";const LF=eT;function mg(){return k.useState(null)}function OF(t,e,n,i=!1){const r=Pe(n);k.useEffect(()=>{const o=typeof t=="function"?t():t;return o.addEventListener(e,r,i),()=>o.removeEventListener(e,r,i)},[t])}const BF=["as","disabled"];function DF(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o=0)&&(n[r]=t[r]);return n}function RF(t){return!t||t.trim()==="#"}function $y({tagName:t,disabled:e,href:n,target:i,rel:r,role:o,onClick:s,tabIndex:l=0,type:a}){t||(n!=null||i!=null||r!=null?t="a":t="button");const c={tagName:t};if(t==="button")return[{type:a||"button",disabled:e},c];const u=f=>{if((e||t==="a"&&RF(n))&&f.preventDefault(),e){f.stopPropagation();return}s==null||s(f)},h=f=>{f.key===" "&&(f.preventDefault(),u(f))};return t==="a"&&(n||(n="#"),e&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:e?void 0:l,href:n,target:t==="a"?i:void 0,"aria-disabled":e||void 0,rel:t==="a"?r:void 0,onClick:u,onKeyDown:h},c]}const tT=k.forwardRef((t,e)=>{let{as:n,disabled:i}=t,r=DF(t,BF);const[o,{tagName:s}]=$y(Object.assign({tagName:n,disabled:i},r));return A.jsx(s,Object.assign({},r,o,{ref:e}))});tT.displayName="Button";const FF=["onKeyDown"];function NF(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o=0)&&(n[r]=t[r]);return n}function PF(t){return!t||t.trim()==="#"}const nT=k.forwardRef((t,e)=>{let{onKeyDown:n}=t,i=NF(t,FF);const[r]=$y(Object.assign({tagName:"a"},i)),o=Pe(s=>{r.onKeyDown(s),n==null||n(s)});return PF(i.href)||i.role==="button"?A.jsx("a",Object.assign({ref:e},i,r,{onKeyDown:o})):A.jsx("a",Object.assign({ref:e},i,{onKeyDown:n}))});nT.displayName="Anchor";const iT=nT,rT=k.forwardRef(({className:t,bsPrefix:e,as:n=iT,...i},r)=>(e=me(e,"alert-link"),A.jsx(n,{ref:r,className:fe(t,e),...i})));rT.displayName="AlertLink";const IF=rT,oT=k.forwardRef((t,e)=>{const{bsPrefix:n,show:i=!0,closeLabel:r="Close alert",closeVariant:o,className:s,children:l,variant:a="primary",onClose:c,dismissible:u,transition:h=Hs,...f}=Oy(t,{show:"onClose"}),d=me(n,"alert"),p=Pe(g=>{c&&c(!1,g)}),y=h===!0?Hs:h,v=A.jsxs("div",{role:"alert",...y?void 0:f,ref:e,className:fe(s,d,a&&`${d}-${a}`,u&&`${d}-dismissible`),children:[u&&A.jsx(Iy,{onClick:p,"aria-label":r,variant:o}),l]});return y?A.jsx(y,{unmountOnExit:!0,...f,ref:void 0,in:i,children:v}):i?v:null});oT.displayName="Alert";const Fx=Object.assign(oT,{Link:IF,Heading:LF}),sT=k.forwardRef(({as:t,bsPrefix:e,variant:n="primary",size:i,active:r=!1,disabled:o=!1,className:s,...l},a)=>{const c=me(e,"btn"),[u,{tagName:h}]=$y({tagName:t,disabled:o,...l}),f=h;return A.jsx(f,{...u,...l,ref:a,disabled:o,className:fe(s,c,r&&"active",n&&`${c}-${n}`,i&&`${c}-${i}`,l.href&&o&&"disabled")})});sT.displayName="Button";const Ro=sT;class ve{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),hi.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){let i=[];return this.decompose(e,n,i,0),hi.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new ha(this),o=new ha(e);for(let s=n,l=n;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new ha(this,e)}iterRange(e,n=this.length){return new lT(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new aT(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?ve.empty:e.length<=32?new We(e):hi.from(We.split(e,[]))}}class We extends ve{constructor(e,n=$F(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let o=0;;o++){let s=this.text[o],l=r+s.length;if((n?i:l)>=e)return new zF(r,l,i,s);r=l+1,i++}}decompose(e,n,i,r){let o=e<=0&&n>=this.length?this:new We(Nx(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let s=i.pop(),l=Ju(o.text,s.text.slice(),0,o.length);if(l.length<=32)i.push(new We(l,s.length+o.length));else{let a=l.length>>1;i.push(new We(l.slice(0,a)),new We(l.slice(a)))}}else i.push(o)}replace(e,n,i){if(!(i instanceof We))return super.replace(e,n,i);let r=Ju(this.text,Ju(i.text,Nx(this.text,0,e)),n),o=this.length+i.length-(n-e);return r.length<=32?new We(r,o):hi.from(We.split(r,[]),o)}sliceString(e,n=this.length,i=` +*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i=[],r=0;r{const s=me(t,"container"),l=typeof e=="string"?`-${e}`:"-fluid";return A.jsx(n,{ref:o,...r,className:fe(i,e?`${s}${l}`:s)})});b_.displayName="Container";const _x=b_,cR=k.createContext(null),Tx=(t,e=null)=>t!=null?String(t):e||null,qh=cR;function Uh(){return Uh=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[r]=t[r]);return n}function Ex(t){return"default"+t.charAt(0).toUpperCase()+t.substr(1)}function uR(t){var e=hR(t,"string");return typeof e=="symbol"?e:String(e)}function hR(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function k_(t,e,n){var i=k.useRef(t!==void 0),r=k.useState(e),o=r[0],s=r[1],l=t!==void 0,a=i.current;return i.current=l,!l&&a&&o!==e&&s(e),[l?t:o,k.useCallback(function(c){for(var u=arguments.length,h=new Array(u>1?u-1:0),f=1;f{t=me(t,"navbar-brand");const o=n||(i.href?"a":"span");return A.jsx(o,{...i,ref:r,className:fe(e,t)})});S_.displayName="NavbarBrand";const dR=S_;function wc(t){return t&&t.ownerDocument||document}function pR(t){var e=wc(t);return e&&e.defaultView||window}function mR(t,e){return pR(t).getComputedStyle(t,e)}var gR=/([A-Z])/g;function yR(t){return t.replace(gR,"-$1").toLowerCase()}var vR=/^ms-/;function ru(t){return yR(t).replace(vR,"-ms-")}var xR=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function CR(t){return!!(t&&xR.test(t))}function Yi(t,e){var n="",i="";if(typeof e=="string")return t.style.getPropertyValue(ru(e))||mR(t).getPropertyValue(ru(e));Object.keys(e).forEach(function(r){var o=e[r];!o&&o!==0?t.style.removeProperty(ru(r)):CR(r)?i+=r+"("+o+") ":n+=ru(r)+": "+o+";"}),i&&(n+="transform: "+i+";"),t.style.cssText+=";"+n}var __={exports:{}},wR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",bR=wR,kR=bR;function T_(){}function E_(){}E_.resetWarningCache=T_;var SR=function(){function t(i,r,o,s,l,a){if(a!==kR){var c=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 c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:E_,resetWarningCache:T_};return n.PropTypes=n,n};__.exports=SR();var _R=__.exports;const Qu=sr(_R),Ax={disabled:!1},A_=Ze.createContext(null);var TR=function(e){return e.scrollTop},ql="unmounted",mr="exited",_n="entering",Hi="entered",js="exiting",ar=function(t){fR(e,t);function e(i,r){var o;o=t.call(this,i,r)||this;var s=r,l=s&&!s.isMounting?i.enter:i.appear,a;return o.appearStatus=null,i.in?l?(a=mr,o.appearStatus=_n):a=Hi:i.unmountOnExit||i.mountOnEnter?a=ql:a=mr,o.state={status:a},o.nextCallback=null,o}e.getDerivedStateFromProps=function(r,o){var s=r.in;return s&&o.status===ql?{status:mr}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var o=null;if(r!==this.props){var s=this.state.status;this.props.in?s!==_n&&s!==Hi&&(o=_n):(s===_n||s===Hi)&&(o=js)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,o,s,l;return o=s=l=r,r!=null&&typeof r!="number"&&(o=r.exit,s=r.enter,l=r.appear!==void 0?r.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(r,o){if(r===void 0&&(r=!1),o!==null)if(this.cancelNextCallback(),o===_n){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:vo.findDOMNode(this);s&&TR(s)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===mr&&this.setState({status:ql})},n.performEnter=function(r){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:r,a=this.props.nodeRef?[l]:[vo.findDOMNode(this),l],c=a[0],u=a[1],h=this.getTimeouts(),f=l?h.appear:h.enter;if(!r&&!s||Ax.disabled){this.safeSetState({status:Hi},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:_n},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Hi},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var r=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:vo.findDOMNode(this);if(!o||Ax.disabled){this.safeSetState({status:mr},function(){r.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:js},function(){r.props.onExiting(l),r.onTransitionEnd(s.exit,function(){r.safeSetState({status:mr},function(){r.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,o){o=this.setNextCallback(o),this.setState(r,o)},n.setNextCallback=function(r){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,r(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(r,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:vo.findDOMNode(this),l=r==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=a[0],u=a[1];this.props.addEndListener(c,u)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===ql)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=Ly(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ze.createElement(A_.Provider,{value:null},typeof s=="function"?s(r,l):Ze.cloneElement(Ze.Children.only(s),l))},e}(Ze.Component);ar.contextType=A_;ar.propTypes={};function Zo(){}ar.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Zo,onEntering:Zo,onEntered:Zo,onExit:Zo,onExiting:Zo,onExited:Zo};ar.UNMOUNTED=ql;ar.EXITED=mr;ar.ENTERING=_n;ar.ENTERED=Hi;ar.EXITING=js;const ER=ar,od=!!(typeof window<"u"&&window.document&&window.document.createElement);var cg=!1,ug=!1;try{var Cp={get passive(){return cg=!0},get once(){return ug=cg=!0}};od&&(window.addEventListener("test",Cp,Cp),window.removeEventListener("test",Cp,!0))}catch{}function M_(t,e,n,i){if(i&&typeof i!="boolean"&&!ug){var r=i.once,o=i.capture,s=n;!ug&&r&&(s=n.__once||function l(a){this.removeEventListener(e,l,o),n.call(this,a)},n.__once=s),t.addEventListener(e,s,cg?i:o)}t.addEventListener(e,n,i)}function AR(t,e,n,i){var r=i&&typeof i!="boolean"?i.capture:i;t.removeEventListener(e,n,r),n.__once&&t.removeEventListener(e,n.__once,r)}function Ui(t,e,n,i){return M_(t,e,n,i),function(){AR(t,e,n,i)}}function MR(t,e,n,i){if(n===void 0&&(n=!1),i===void 0&&(i=!0),t){var r=document.createEvent("HTMLEvents");r.initEvent(e,n,i),t.dispatchEvent(r)}}function LR(t){var e=Yi(t,"transitionDuration")||"",n=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*n}function OR(t,e,n){n===void 0&&(n=5);var i=!1,r=setTimeout(function(){i||MR(t,"transitionend",!0)},e+n),o=Ui(t,"transitionend",function(){i=!0},{once:!0});return function(){clearTimeout(r),o()}}function BR(t,e,n,i){n==null&&(n=LR(t)||0);var r=OR(t,n,i),o=Ui(t,"transitionend",e);return function(){r(),o()}}function Mx(t,e){const n=Yi(t,e)||"",i=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*i}function By(t,e){const n=Mx(t,"transitionDuration"),i=Mx(t,"transitionDelay"),r=BR(t,o=>{o.target===t&&(r(),e(o))},n+i)}function Al(...t){return t.filter(e=>e!=null).reduce((e,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?n:function(...r){e.apply(this,r),n.apply(this,r)}},null)}function L_(t){t.offsetHeight}const Lx=t=>!t||typeof t=="function"?t:e=>{t.current=e};function DR(t,e){const n=Lx(t),i=Lx(e);return r=>{n&&n(r),i&&i(r)}}function to(t,e){return k.useMemo(()=>DR(t,e),[t,e])}function Kh(t){return t&&"setState"in t?vo.findDOMNode(t):t??null}const RR=Ze.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:i,onExiting:r,onExited:o,addEndListener:s,children:l,childRef:a,...c},u)=>{const h=k.useRef(null),f=to(h,a),d=b=>{f(Kh(b))},p=b=>S=>{b&&h.current&&b(h.current,S)},y=k.useCallback(p(t),[t]),v=k.useCallback(p(e),[e]),g=k.useCallback(p(n),[n]),m=k.useCallback(p(i),[i]),x=k.useCallback(p(r),[r]),C=k.useCallback(p(o),[o]),w=k.useCallback(p(s),[s]);return A.jsx(ER,{ref:u,...c,onEnter:y,onEntered:g,onEntering:v,onExit:m,onExited:C,onExiting:x,addEndListener:w,nodeRef:h,children:typeof l=="function"?(b,S)=>l(b,{...S,ref:d}):Ze.cloneElement(l,{ref:d})})}),Dy=RR,FR={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function NR(t,e){const n=`offset${t[0].toUpperCase()}${t.slice(1)}`,i=e[n],r=FR[t];return i+parseInt(Yi(e,r[0]),10)+parseInt(Yi(e,r[1]),10)}const PR={[mr]:"collapse",[js]:"collapsing",[_n]:"collapsing",[Hi]:"collapse show"},IR=Ze.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:i,onExiting:r,className:o,children:s,dimension:l="height",in:a=!1,timeout:c=300,mountOnEnter:u=!1,unmountOnExit:h=!1,appear:f=!1,getDimensionValue:d=NR,...p},y)=>{const v=typeof l=="function"?l():l,g=k.useMemo(()=>Al(b=>{b.style[v]="0"},t),[v,t]),m=k.useMemo(()=>Al(b=>{const S=`scroll${v[0].toUpperCase()}${v.slice(1)}`;b.style[v]=`${b[S]}px`},e),[v,e]),x=k.useMemo(()=>Al(b=>{b.style[v]=null},n),[v,n]),C=k.useMemo(()=>Al(b=>{b.style[v]=`${d(v,b)}px`,L_(b)},i),[i,d,v]),w=k.useMemo(()=>Al(b=>{b.style[v]=null},r),[v,r]);return A.jsx(Dy,{ref:y,addEndListener:By,...p,"aria-expanded":p.role?a:null,onEnter:g,onEntering:m,onEntered:x,onExit:C,onExiting:w,childRef:s.ref,in:a,timeout:c,mountOnEnter:u,unmountOnExit:h,appear:f,children:(b,S)=>Ze.cloneElement(s,{...S,className:fe(o,s.props.className,PR[b],v==="width"&&"collapse-horizontal")})})}),$R=IR,O_=k.createContext(null);O_.displayName="NavbarContext";const al=O_,B_=k.forwardRef(({children:t,bsPrefix:e,...n},i)=>{e=me(e,"navbar-collapse");const r=k.useContext(al);return A.jsx($R,{in:!!(r&&r.expanded),...n,children:A.jsx("div",{ref:i,className:e,children:t})})});B_.displayName="NavbarCollapse";const zR=B_;function jR(t){const e=k.useRef(t);return k.useEffect(()=>{e.current=t},[t]),e}function Pe(t){const e=jR(t);return k.useCallback(function(...n){return e.current&&e.current(...n)},[e])}const D_=k.forwardRef(({bsPrefix:t,className:e,children:n,label:i="Toggle navigation",as:r="button",onClick:o,...s},l)=>{t=me(t,"navbar-toggler");const{onToggle:a,expanded:c}=k.useContext(al)||{},u=Pe(h=>{o&&o(h),a&&a()});return r==="button"&&(s.type="button"),A.jsx(r,{...s,ref:l,onClick:u,"aria-label":i,className:fe(e,t,!c&&"collapsed"),children:n||A.jsx("span",{className:`${t}-icon`})})});D_.displayName="NavbarToggle";const HR=D_,WR=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",VR=typeof document<"u",Ha=VR||WR?k.useLayoutEffect:k.useEffect,hg=new WeakMap,Ox=(t,e)=>{if(!t||!e)return;const n=hg.get(e)||new Map;hg.set(e,n);let i=n.get(t);return i||(i=e.matchMedia(t),i.refCount=0,n.set(i.media,i)),i};function qR(t,e=typeof window>"u"?void 0:window){const n=Ox(t,e),[i,r]=k.useState(()=>n?n.matches:!1);return Ha(()=>{let o=Ox(t,e);if(!o)return r(!1);let s=hg.get(e);const l=()=>{r(o.matches)};return o.refCount++,o.addListener(l),l(),()=>{o.removeListener(l),o.refCount--,o.refCount<=0&&(s==null||s.delete(o.media)),o=void 0}},[t]),i}function UR(t){const e=Object.keys(t);function n(l,a){return l===a?a:l?`${l} and ${a}`:a}function i(l){return e[Math.min(e.indexOf(l)+1,e.length-1)]}function r(l){const a=i(l);let c=t[a];return typeof c=="number"?c=`${c-.2}px`:c=`calc(${c} - 0.2px)`,`(max-width: ${c})`}function o(l){let a=t[l];return typeof a=="number"&&(a=`${a}px`),`(min-width: ${a})`}function s(l,a,c){let u;typeof l=="object"?(u=l,c=a,a=!0):(a=a||!0,u={[l]:a});let h=k.useMemo(()=>Object.entries(u).reduce((f,[d,p])=>((p==="up"||p===!0)&&(f=n(f,o(d))),(p==="down"||p===!0)&&(f=n(f,r(d))),f),""),[JSON.stringify(u)]);return qR(h,c)}return s}const KR=UR({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400});function wp(t){t===void 0&&(t=wc());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function Wa(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}function Ry(){const t=k.useRef(!0),e=k.useRef(()=>t.current);return k.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),e.current}function YR(t){const e=k.useRef(t);return e.current=t,e}function R_(t){const e=YR(t);k.useEffect(()=>()=>e.current(),[])}function F_(t){const e=k.useRef(null);return k.useEffect(()=>{e.current=t}),e.current}const GR="data-rr-ui-";function Fy(t){return`${GR}${t}`}function XR(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const Bx=Fy("modal-open");class QR{constructor({ownerDocument:e,handleContainerOverflow:n=!0,isRTL:i=!1}={}){this.handleContainerOverflow=n,this.isRTL=i,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return XR(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const n={overflow:"hidden"},i=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[i]:r.style[i]},e.scrollBarWidth&&(n[i]=`${parseInt(Yi(r,i)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(Bx,""),Yi(r,n)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const n=this.getElement();n.removeAttribute(Bx),Object.assign(n.style,e.style)}add(e){let n=this.modals.indexOf(e);return n!==-1||(n=this.modals.length,this.modals.push(e),this.setModalAttributes(e),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(e){const n=this.modals.indexOf(e);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const Ny=QR,N_=k.createContext(od?window:void 0);N_.Provider;function sd(){return k.useContext(N_)}const bp=(t,e)=>od?t==null?(e||wc()).body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),t&&("nodeType"in t||t.getBoundingClientRect)?t:null):null;function fg(t,e){const n=sd(),[i,r]=k.useState(()=>bp(t,n==null?void 0:n.document));if(!i){const o=bp(t);o&&r(o)}return k.useEffect(()=>{e&&i&&e(i)},[e,i]),k.useEffect(()=>{const o=bp(t);o!==i&&r(o)},[t,i]),i}function JR({children:t,in:e,onExited:n,mountOnEnter:i,unmountOnExit:r}){const o=k.useRef(null),s=k.useRef(e),l=Pe(n);k.useEffect(()=>{e?s.current=!0:l(o.current)},[e,l]);const a=to(o,t.ref),c=k.cloneElement(t,{ref:a});return e?c:r||!s.current&&i?null:c}function ZR({in:t,onTransition:e}){const n=k.useRef(null),i=k.useRef(!0),r=Pe(e);return Ha(()=>{if(!n.current)return;let o=!1;return r({in:t,element:n.current,initial:i.current,isStale:()=>o}),()=>{o=!0}},[t,r]),Ha(()=>(i.current=!1,()=>{i.current=!0}),[]),n}function eF({children:t,in:e,onExited:n,onEntered:i,transition:r}){const[o,s]=k.useState(!e);e&&o&&s(!1);const l=ZR({in:!!e,onTransition:c=>{const u=()=>{c.isStale()||(c.in?i==null||i(c.element,c.initial):(s(!0),n==null||n(c.element)))};Promise.resolve(r(c)).then(u,h=>{throw c.in||s(!0),h})}}),a=to(l,t.ref);return o&&!e?null:k.cloneElement(t,{ref:a})}function dg(t,e,n){return t?A.jsx(t,Object.assign({},n)):e?A.jsx(eF,Object.assign({},n,{transition:e})):A.jsx(JR,Object.assign({},n))}function P_(t){return t.code==="Escape"||t.keyCode===27}const tF=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function nF(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o=0)&&(n[r]=t[r]);return n}let kp;function iF(t){return kp||(kp=new Ny({ownerDocument:t==null?void 0:t.document})),kp}function rF(t){const e=sd(),n=t||iF(e),i=k.useRef({dialog:null,backdrop:null});return Object.assign(i.current,{add:()=>n.add(i.current),remove:()=>n.remove(i.current),isTopModal:()=>n.isTopModal(i.current),setDialogRef:k.useCallback(r=>{i.current.dialog=r},[]),setBackdropRef:k.useCallback(r=>{i.current.backdrop=r},[])})}const I_=k.forwardRef((t,e)=>{let{show:n=!1,role:i="dialog",className:r,style:o,children:s,backdrop:l=!0,keyboard:a=!0,onBackdropClick:c,onEscapeKeyDown:u,transition:h,runTransition:f,backdropTransition:d,runBackdropTransition:p,autoFocus:y=!0,enforceFocus:v=!0,restoreFocus:g=!0,restoreFocusOptions:m,renderDialog:x,renderBackdrop:C=be=>A.jsx("div",Object.assign({},be)),manager:w,container:b,onShow:S,onHide:M=()=>{},onExit:N,onExited:O,onExiting:D,onEnter:V,onEntering:K,onEntered:z}=t,F=nF(t,tF);const B=sd(),$=fg(b),_=rF(w),L=Ry(),R=F_(n),[H,J]=k.useState(!n),X=k.useRef(null);k.useImperativeHandle(e,()=>_,[_]),od&&!R&&n&&(X.current=wp(B==null?void 0:B.document)),n&&H&&J(!1);const ae=Pe(()=>{if(_.add(),ke.current=Ui(document,"keydown",nt),it.current=Ui(document,"focus",()=>setTimeout(Ce),!0),S&&S(),y){var be,ti;const Oi=wp((be=(ti=_.dialog)==null?void 0:ti.ownerDocument)!=null?be:B==null?void 0:B.document);_.dialog&&Oi&&!Wa(_.dialog,Oi)&&(X.current=Oi,_.dialog.focus())}}),ce=Pe(()=>{if(_.remove(),ke.current==null||ke.current(),it.current==null||it.current(),g){var be;(be=X.current)==null||be.focus==null||be.focus(m),X.current=null}});k.useEffect(()=>{!n||!$||ae()},[n,$,ae]),k.useEffect(()=>{H&&ce()},[H,ce]),R_(()=>{ce()});const Ce=Pe(()=>{if(!v||!L()||!_.isTopModal())return;const be=wp(B==null?void 0:B.document);_.dialog&&be&&!Wa(_.dialog,be)&&_.dialog.focus()}),Fe=Pe(be=>{be.target===be.currentTarget&&(c==null||c(be),l===!0&&M())}),nt=Pe(be=>{a&&P_(be)&&_.isTopModal()&&(u==null||u(be),be.defaultPrevented||M())}),it=k.useRef(),ke=k.useRef(),je=(...be)=>{J(!0),O==null||O(...be)};if(!$)return null;const Ht=Object.assign({role:i,ref:_.setDialogRef,"aria-modal":i==="dialog"?!0:void 0},F,{style:o,className:r,tabIndex:-1});let Ot=x?x(Ht):A.jsx("div",Object.assign({},Ht,{children:k.cloneElement(s,{role:"document"})}));Ot=dg(h,f,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:N,onExiting:D,onExited:je,onEnter:V,onEntering:K,onEntered:z,children:Ot});let on=null;return l&&(on=C({ref:_.setBackdropRef,onClick:Fe}),on=dg(d,p,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:on})),A.jsx(A.Fragment,{children:vo.createPortal(A.jsxs(A.Fragment,{children:[on,Ot]}),$)})});I_.displayName="Modal";const oF=Object.assign(I_,{Manager:Ny}),sF={[_n]:"show",[Hi]:"show"},$_=k.forwardRef(({className:t,children:e,transitionClasses:n={},onEnter:i,...r},o)=>{const s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...r},l=k.useCallback((a,c)=>{L_(a),i==null||i(a,c)},[i]);return A.jsx(Dy,{ref:o,addEndListener:By,...s,onEnter:l,childRef:e.ref,children:(a,c)=>k.cloneElement(e,{...c,className:fe("fade",t,e.props.className,sF[a],n[a])})})});$_.displayName="Fade";const Hs=$_,z_=k.forwardRef(({className:t,bsPrefix:e,as:n="div",...i},r)=>(e=me(e,"offcanvas-body"),A.jsx(n,{ref:r,className:fe(t,e),...i})));z_.displayName="OffcanvasBody";const lF=z_,aF={[_n]:"show",[Hi]:"show"},j_=k.forwardRef(({bsPrefix:t,className:e,children:n,in:i=!1,mountOnEnter:r=!1,unmountOnExit:o=!1,appear:s=!1,...l},a)=>(t=me(t,"offcanvas"),A.jsx(Dy,{ref:a,addEndListener:By,in:i,mountOnEnter:r,unmountOnExit:o,appear:s,...l,childRef:n.ref,children:(c,u)=>k.cloneElement(n,{...u,className:fe(e,n.props.className,(c===_n||c===js)&&`${t}-toggling`,aF[c])})})));j_.displayName="OffcanvasToggling";const cF=j_,uF=k.createContext({onHide(){}}),H_=uF,hF={"aria-label":Qu.string,onClick:Qu.func,variant:Qu.oneOf(["white"])},Py=k.forwardRef(({className:t,variant:e,"aria-label":n="Close",...i},r)=>A.jsx("button",{ref:r,type:"button",className:fe("btn-close",e&&`btn-close-${e}`,t),"aria-label":n,...i}));Py.displayName="CloseButton";Py.propTypes=hF;const Iy=Py,fF=k.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:n=!1,onHide:i,children:r,...o},s)=>{const l=k.useContext(H_),a=Pe(()=>{l==null||l.onHide(),i==null||i()});return A.jsxs("div",{ref:s,...o,children:[r,n&&A.jsx(Iy,{"aria-label":t,variant:e,onClick:a})]})}),dF=fF,W_=k.forwardRef(({bsPrefix:t,className:e,closeLabel:n="Close",closeButton:i=!1,...r},o)=>(t=me(t,"offcanvas-header"),A.jsx(dF,{ref:o,...r,className:fe(e,t),closeLabel:n,closeButton:i})));W_.displayName="OffcanvasHeader";const pF=W_,V_=t=>k.forwardRef((e,n)=>A.jsx("div",{...e,ref:n,className:fe(e.className,t)})),mF=V_("h5"),q_=k.forwardRef(({className:t,bsPrefix:e,as:n=mF,...i},r)=>(e=me(e,"offcanvas-title"),A.jsx(n,{ref:r,className:fe(t,e),...i})));q_.displayName="OffcanvasTitle";const gF=q_;function pg(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function yF(t,e){t.classList?t.classList.add(e):pg(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}var vF=Function.prototype.bind.call(Function.prototype.call,[].slice);function gr(t,e){return vF(t.querySelectorAll(e))}function Dx(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function xF(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Dx(t.className,e):t.setAttribute("class",Dx(t.className&&t.className.baseVal||"",e))}const es={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class U_ extends Ny{adjustAndStore(e,n,i){const r=n.style[e];n.dataset[e]=r,Yi(n,{[e]:`${parseFloat(Yi(n,e))+i}px`})}restore(e,n){const i=n.dataset[e];i!==void 0&&(delete n.dataset[e],Yi(n,{[e]:i}))}setContainerStyle(e){super.setContainerStyle(e);const n=this.getElement();if(yF(n,"modal-open"),!e.scrollBarWidth)return;const i=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";gr(n,es.FIXED_CONTENT).forEach(o=>this.adjustAndStore(i,o,e.scrollBarWidth)),gr(n,es.STICKY_CONTENT).forEach(o=>this.adjustAndStore(r,o,-e.scrollBarWidth)),gr(n,es.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(r,o,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const n=this.getElement();xF(n,"modal-open");const i=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";gr(n,es.FIXED_CONTENT).forEach(o=>this.restore(i,o)),gr(n,es.STICKY_CONTENT).forEach(o=>this.restore(r,o)),gr(n,es.NAVBAR_TOGGLER).forEach(o=>this.restore(r,o))}}let Sp;function CF(t){return Sp||(Sp=new U_(t)),Sp}const wF=U_;function bF(t){return A.jsx(cF,{...t})}function kF(t){return A.jsx(Hs,{...t})}const K_=k.forwardRef(({bsPrefix:t,className:e,children:n,"aria-labelledby":i,placement:r="start",responsive:o,show:s=!1,backdrop:l=!0,keyboard:a=!0,scroll:c=!1,onEscapeKeyDown:u,onShow:h,onHide:f,container:d,autoFocus:p=!0,enforceFocus:y=!0,restoreFocus:v=!0,restoreFocusOptions:g,onEntered:m,onExit:x,onExiting:C,onEnter:w,onEntering:b,onExited:S,backdropClassName:M,manager:N,renderStaticNode:O=!1,...D},V)=>{const K=k.useRef();t=me(t,"offcanvas");const{onToggle:z}=k.useContext(al)||{},[F,B]=k.useState(!1),$=KR(o||"xs","up");k.useEffect(()=>{B(o?s&&!$:s)},[s,o,$]);const _=Pe(()=>{z==null||z(),f==null||f()}),L=k.useMemo(()=>({onHide:_}),[_]);function R(){return N||(c?(K.current||(K.current=new wF({handleContainerOverflow:!1})),K.current):CF())}const H=(ce,...Ce)=>{ce&&(ce.style.visibility="visible"),w==null||w(ce,...Ce)},J=(ce,...Ce)=>{ce&&(ce.style.visibility=""),S==null||S(...Ce)},X=k.useCallback(ce=>A.jsx("div",{...ce,className:fe(`${t}-backdrop`,M)}),[M,t]),ae=ce=>A.jsx("div",{...ce,...D,className:fe(e,o?`${t}-${o}`:t,`${t}-${r}`),"aria-labelledby":i,children:n});return A.jsxs(A.Fragment,{children:[!F&&(o||O)&&ae({}),A.jsx(H_.Provider,{value:L,children:A.jsx(oF,{show:F,ref:V,backdrop:l,container:d,keyboard:a,autoFocus:p,enforceFocus:y&&!c,restoreFocus:v,restoreFocusOptions:g,onEscapeKeyDown:u,onShow:h,onHide:_,onEnter:H,onEntering:b,onEntered:m,onExit:x,onExiting:C,onExited:J,manager:R(),transition:bF,backdropTransition:kF,renderBackdrop:X,renderDialog:ae})})]})});K_.displayName="Offcanvas";const SF=Object.assign(K_,{Body:lF,Header:pF,Title:gF}),Y_=k.forwardRef((t,e)=>{const n=k.useContext(al);return A.jsx(SF,{ref:e,show:!!(n!=null&&n.expanded),...t,renderStaticNode:!0})});Y_.displayName="NavbarOffcanvas";const _F=Y_,G_=k.forwardRef(({className:t,bsPrefix:e,as:n="span",...i},r)=>(e=me(e,"navbar-text"),A.jsx(n,{ref:r,className:fe(t,e),...i})));G_.displayName="NavbarText";const TF=G_,X_=k.forwardRef((t,e)=>{const{bsPrefix:n,expand:i=!0,variant:r="light",bg:o,fixed:s,sticky:l,className:a,as:c="nav",expanded:u,onToggle:h,onSelect:f,collapseOnSelect:d=!1,...p}=Oy(t,{expanded:"onToggle"}),y=me(n,"navbar"),v=k.useCallback((...x)=>{f==null||f(...x),d&&u&&(h==null||h(!1))},[f,d,u,h]);p.role===void 0&&c!=="nav"&&(p.role="navigation");let g=`${y}-expand`;typeof i=="string"&&(g=`${g}-${i}`);const m=k.useMemo(()=>({onToggle:()=>h==null?void 0:h(!u),bsPrefix:y,expanded:!!u,expand:i}),[y,u,i,h]);return A.jsx(al.Provider,{value:m,children:A.jsx(qh.Provider,{value:v,children:A.jsx(c,{ref:e,...p,className:fe(a,y,i&&g,r&&`${y}-${r}`,o&&`bg-${o}`,l&&`sticky-${l}`,s&&`fixed-${s}`)})})})});X_.displayName="Navbar";const Rx=Object.assign(X_,{Brand:dR,Collapse:zR,Offcanvas:_F,Text:TF,Toggle:HR}),Q_=k.forwardRef(({bsPrefix:t,variant:e,animation:n="border",size:i,as:r="div",className:o,...s},l)=>{t=me(t,"spinner");const a=`${t}-${n}`;return A.jsx(r,{ref:l,...s,className:fe(o,a,i&&`${a}-${i}`,e&&`text-${e}`)})});Q_.displayName="Spinner";const EF=Q_,AF={"top-start":"top-0 start-0","top-center":"top-0 start-50 translate-middle-x","top-end":"top-0 end-0","middle-start":"top-50 start-0 translate-middle-y","middle-center":"top-50 start-50 translate-middle","middle-end":"top-50 end-0 translate-middle-y","bottom-start":"bottom-0 start-0","bottom-center":"bottom-0 start-50 translate-middle-x","bottom-end":"bottom-0 end-0"},J_=k.forwardRef(({bsPrefix:t,position:e,containerPosition:n,className:i,as:r="div",...o},s)=>(t=me(t,"toast-container"),A.jsx(r,{ref:s,...o,className:fe(t,e&&AF[e],n&&`position-${n}`,i)})));J_.displayName="ToastContainer";const MF=J_,LF=["as","disabled"];function OF(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o=0)&&(n[r]=t[r]);return n}function BF(t){return!t||t.trim()==="#"}function $y({tagName:t,disabled:e,href:n,target:i,rel:r,role:o,onClick:s,tabIndex:l=0,type:a}){t||(n!=null||i!=null||r!=null?t="a":t="button");const c={tagName:t};if(t==="button")return[{type:a||"button",disabled:e},c];const u=f=>{if((e||t==="a"&&BF(n))&&f.preventDefault(),e){f.stopPropagation();return}s==null||s(f)},h=f=>{f.key===" "&&(f.preventDefault(),u(f))};return t==="a"&&(n||(n="#"),e&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:e?void 0:l,href:n,target:t==="a"?i:void 0,"aria-disabled":e||void 0,rel:t==="a"?r:void 0,onClick:u,onKeyDown:h},c]}const Z_=k.forwardRef((t,e)=>{let{as:n,disabled:i}=t,r=OF(t,LF);const[o,{tagName:s}]=$y(Object.assign({tagName:n,disabled:i},r));return A.jsx(s,Object.assign({},r,o,{ref:e}))});Z_.displayName="Button";const eT=k.forwardRef(({as:t,bsPrefix:e,variant:n="primary",size:i,active:r=!1,disabled:o=!1,className:s,...l},a)=>{const c=me(e,"btn"),[u,{tagName:h}]=$y({tagName:t,disabled:o,...l}),f=h;return A.jsx(f,{...u,...l,ref:a,disabled:o,className:fe(s,c,r&&"active",n&&`${c}-${n}`,i&&`${c}-${i}`,l.href&&o&&"disabled")})});eT.displayName="Button";const Ro=eT;class ve{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),hi.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){let i=[];return this.decompose(e,n,i,0),hi.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new ha(this),o=new ha(e);for(let s=n,l=n;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new ha(this,e)}iterRange(e,n=this.length){return new tT(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new nT(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?ve.empty:e.length<=32?new We(e):hi.from(We.split(e,[]))}}class We extends ve{constructor(e,n=DF(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let o=0;;o++){let s=this.text[o],l=r+s.length;if((n?i:l)>=e)return new RF(r,l,i,s);r=l+1,i++}}decompose(e,n,i,r){let o=e<=0&&n>=this.length?this:new We(Fx(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let s=i.pop(),l=Ju(o.text,s.text.slice(),0,o.length);if(l.length<=32)i.push(new We(l,s.length+o.length));else{let a=l.length>>1;i.push(new We(l.slice(0,a)),new We(l.slice(a)))}}else i.push(o)}replace(e,n,i){if(!(i instanceof We))return super.replace(e,n,i);let r=Ju(this.text,Ju(i.text,Fx(this.text,0,e)),n),o=this.length+i.length-(n-e);return r.length<=32?new We(r,o):hi.from(We.split(r,[]),o)}sliceString(e,n=this.length,i=` `){let r="";for(let o=0,s=0;o<=n&&se&&s&&(r+=i),eo&&(r+=l.slice(Math.max(0,e-o),n-o)),o=a+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let o of e)i.push(o),r+=o.length+1,i.length==32&&(n.push(new We(i,r)),i=[],r=-1);return r>-1&&n.push(new We(i,r)),n}}class hi extends ve{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let o=0;;o++){let s=this.children[o],l=r+s.length,a=i+s.lines-1;if((n?a:l)>=e)return s.lineInner(e,n,i,r);r=l+1,i=a+1}}decompose(e,n,i,r){for(let o=0,s=0;s<=n&&o=s){let c=r&((s<=e?1:0)|(a>=n?2:0));s>=e&&a<=n&&!c?i.push(l):l.decompose(e-s,n-s,i,c)}s=a+1}}replace(e,n,i){if(i.lines=o&&n<=l){let a=s.replace(e-o,n-o,i),c=this.lines-s.lines+a.lines;if(a.lines>5-1&&a.lines>c>>5+1){let u=this.children.slice();return u[r]=a,new hi(u,this.length-(n-e)+i.length)}return super.replace(o,l,a)}o=l+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` -`){let r="";for(let o=0,s=0;oe&&o&&(r+=i),es&&(r+=l.sliceString(e-s,n-s,i)),s=a+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof hi))return 0;let i=0,[r,o,s,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,o+=n){if(r==s||o==l)return i;let a=this.children[r],c=e.children[o];if(a!=c)return i+a.scanIdentical(c,n);i+=a.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new We(d,n)}let r=Math.max(32,i>>5),o=r<<1,s=r>>1,l=[],a=0,c=-1,u=[];function h(d){let p;if(d.lines>o&&d instanceof hi)for(let y of d.children)h(y);else d.lines>s&&(a>s||!a)?(f(),l.push(d)):d instanceof We&&a&&(p=u[u.length-1])instanceof We&&d.lines+p.lines<=32?(a+=d.lines,c+=d.length+1,u[u.length-1]=new We(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>r&&f(),a+=d.lines,c+=d.length+1,u.push(d))}function f(){a!=0&&(l.push(u.length==1?u[0]:hi.from(u,c)),c=-1,a=u.length=0)}for(let d of e)h(d);return f(),l.length==1?l[0]:new hi(l,n)}}ve.empty=new We([""],0);function $F(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Ju(t,e,n=0,i=1e9){for(let r=0,o=0,s=!0;o=n&&(a>i&&(l=l.slice(0,i-r)),r0?1:(e instanceof We?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1,l=r instanceof We?r.text.length:r.children.length;if(s==(n>0?l:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(r instanceof We){let a=r.text[s+(n<0?-1:0)];if(this.offsets[i]+=n,a.length>Math.max(0,e))return this.value=e==0?a:n>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[s+(n<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(n>0?1:(a instanceof We?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class lT{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new ha(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class aT{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(ve.prototype[Symbol.iterator]=function(){return this.iter()},ha.prototype[Symbol.iterator]=lT.prototype[Symbol.iterator]=aT.prototype[Symbol.iterator]=function(){return this});class zF{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}}let As="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;tt)return As[e-1]<=t;return!1}function Px(t){return t>=127462&&t<=127487}const Ix=8205;function _t(t,e,n=!0,i=!0){return(n?cT:HF)(t,e,i)}function cT(t,e,n){if(e==t.length)return e;e&&uT(t.charCodeAt(e))&&hT(t.charCodeAt(e-1))&&e--;let i=ct(t,e);for(e+=Tn(i);e=0&&Px(ct(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function HF(t,e,n){for(;e>0;){let i=cT(t,e-2,n);if(i=56320&&t<57344}function hT(t){return t>=55296&&t<56320}function ct(t,e){let n=t.charCodeAt(e);if(!hT(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return uT(i)?(n-55296<<10)+(i-56320)+65536:n}function zy(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Tn(t){return t<65536?1:2}const gg=/\r\n?|\n/;var Dt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Dt||(Dt={}));class vi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return o+(e-r);o+=l}else{if(i!=Dt.Simple&&c>=e&&(i==Dt.TrackDel&&re||i==Dt.TrackBefore&&re))return null;if(c>e||c==e&&n<0&&!l)return e==r||n<0?o:o+a;o+=a}r=c}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,n=e){for(let i=0,r=0;i=0&&r<=n&&l>=e)return rn?"cover":!0;r=l}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new vi(e)}static create(e){return new vi(e)}}class Je extends vi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return yg(this,(n,i,r,o,s)=>e=e.replace(r,r+(i-n),s),!1),e}mapDesc(e,n=!1){return vg(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,o=0;r=0){n[r]=l,n[r+1]=s;let a=r>>1;for(;i.length0&&Tr(i,n,o.text),o.forward(u),l+=u}let c=e[s++];for(;l>1].toJSON()))}return e}static of(e,n,i){let r=[],o=[],s=0,l=null;function a(u=!1){if(!u&&!r.length)return;sf||h<0||f>n)throw new RangeError(`Invalid change range ${h} to ${f} (in doc of length ${n})`);let p=d?typeof d=="string"?ve.of(d.split(i||gg)):d:ve.empty,y=p.length;if(h==f&&y==0)return;hs&&Ct(r,h-s,-1),Ct(r,f-h,y),Tr(o,r,p),s=f}}return c(e),a(!l),l}static empty(e){return new Je(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;rl&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;i.length=0&&n<=0&&n==t[r+1]?t[r]+=e:e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Tr(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)l=t.sections[s++],a=t.sections[s++];e(r,c,o,u,h),r=c,o=u}}}function vg(t,e,n,i=!1){let r=[],o=i?[]:null,s=new Va(t),l=new Va(e);for(let a=-1;;)if(s.ins==-1&&l.ins==-1){let c=Math.min(s.len,l.len);Ct(r,c,-1),s.forward(c),l.forward(c)}else if(l.ins>=0&&(s.ins<0||a==s.i||s.off==0&&(l.len=0&&a=0){let c=0,u=s.len;for(;u;)if(l.ins==-1){let h=Math.min(u,l.len);c+=h,u-=h,l.forward(h)}else if(l.ins==0&&l.lena||s.ins>=0&&s.len>a)&&(l||i.length>c),o.forward2(a),s.forward(a)}}}}class Va{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?ve.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?ve.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class xo{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new xo(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return I.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return I.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return I.range(e.anchor,e.head)}static create(e,n,i){return new xo(e,n,i)}}class I{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:I.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new I(e.ranges.map(n=>xo.fromJSON(n)),e.main)}static single(e,n=e){return new I([I.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?8:0)|o)}static normalized(e,n=0){let i=e[n];e.sort((r,o)=>r.from-o.from),n=e.indexOf(i);for(let r=1;ro.head?I.range(a,l):I.range(l,a))}}return new I(e,n)}}function dT(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let jy=0;class Q{constructor(e,n,i,r,o){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=jy++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new Q(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:Hy),!!e.static,e.enables)}of(e){return new Zu([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Zu(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Zu(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function Hy(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class Zu{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=jy++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,o=this.id,s=e[o]>>1,l=this.type==2,a=!1,c=!1,u=[];for(let h of this.dependencies)h=="doc"?a=!0:h=="selection"?c=!0:((n=e[h.id])!==null&&n!==void 0?n:1)&1||u.push(e[h.id]);return{create(h){return h.values[s]=i(h),1},update(h,f){if(a&&f.docChanged||c&&(f.docChanged||f.selection)||xg(h,u)){let d=i(h);if(l?!$x(d,h.values[s],r):!r(d,h.values[s]))return h.values[s]=d,1}return 0},reconfigure:(h,f)=>{let d,p=f.config.address[o];if(p!=null){let y=Gh(f,p);if(this.dependencies.every(v=>v instanceof Q?f.facet(v)===h.facet(v):v instanceof pt?f.field(v,!1)==h.field(v,!1):!0)||(l?$x(d=i(h),y,r):r(d=i(h),y)))return h.values[s]=y,0}else d=i(h);return h.values[s]=d,1}}}}function $x(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[a.id]),r=n.map(a=>a.type),o=i.filter(a=>!(a&1)),s=t[e.id]>>1;function l(a){let c=[];for(let u=0;ui===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(zx).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let o=i.values[n],s=this.updateF(o,r);return this.compareF(o,s)?0:(i.values[n]=s,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}init(e){return[this,zx.of({field:this,create:e})]}get extension(){return this}}const fo={lowest:4,low:3,default:2,high:1,highest:0};function Ml(t){return e=>new pT(e,t)}const cl={highest:Ml(fo.highest),high:Ml(fo.high),default:Ml(fo.default),low:Ml(fo.low),lowest:Ml(fo.lowest)};class pT{constructor(e,n){this.inner=e,this.prec=n}}class ld{of(e){return new Cg(this,e)}reconfigure(e){return ld.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Cg{constructor(e,n){this.compartment=e,this.inner=n}}class Yh{constructor(e,n,i,r,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let r=[],o=Object.create(null),s=new Map;for(let f of VF(e,n,s))f instanceof pt?r.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let l=Object.create(null),a=[],c=[];for(let f of r)l[f.id]=c.length<<1,c.push(d=>f.slot(d));let u=i==null?void 0:i.config.facets;for(let f in o){let d=o[f],p=d[0].facet,y=u&&u[f]||[];if(d.every(v=>v.type==0))if(l[p.id]=a.length<<1|1,Hy(y,d))a.push(i.facet(p));else{let v=p.combine(d.map(g=>g.value));a.push(i&&p.compare(v,i.facet(p))?i.facet(p):v)}else{for(let v of d)v.type==0?(l[v.id]=a.length<<1|1,a.push(v.value)):(l[v.id]=c.length<<1,c.push(g=>v.dynamicSlot(g)));l[p.id]=c.length<<1,c.push(v=>WF(v,p,d))}}let h=c.map(f=>f(l));return new Yh(e,s,h,l,a,o)}}function VF(t,e,n){let i=[[],[],[],[],[]],r=new Map;function o(s,l){let a=r.get(s);if(a!=null){if(a<=l)return;let c=i[a].indexOf(s);c>-1&&i[a].splice(c,1),s instanceof Cg&&n.delete(s.compartment)}if(r.set(s,l),Array.isArray(s))for(let c of s)o(c,l);else if(s instanceof Cg){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(s.compartment)||s.inner;n.set(s.compartment,c),o(c,l)}else if(s instanceof pT)o(s.inner,s.prec);else if(s instanceof pt)i[l].push(s),s.provides&&o(s.provides,l);else if(s instanceof Zu)i[l].push(s),s.facet.extensions&&o(s.facet.extensions,fo.default);else{let c=s.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(c,l)}}return o(t,fo.default),i.reduce((s,l)=>s.concat(l))}function fa(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function Gh(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const mT=Q.define(),gT=Q.define({combine:t=>t.some(e=>e),static:!0}),yT=Q.define({combine:t=>t.length?t[0]:void 0,static:!0}),vT=Q.define(),xT=Q.define(),CT=Q.define(),wT=Q.define({combine:t=>t.length?t[0]:!1});class Ti{constructor(e,n){this.type=e,this.value=n}static define(){return new qF}}class qF{of(e){return new Ti(this,e)}}class UF{constructor(e){this.map=e}of(e){return new he(this,e)}}class he{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new he(this.type,n)}is(e){return this.type==e}static define(e={}){return new UF(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let o=r.map(n);o&&i.push(o)}return i}}he.reconfigure=he.define();he.appendConfig=he.define();class tt{constructor(e,n,i,r,o,s){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&dT(i,n.newLength),o.some(l=>l.type==tt.time)||(this.annotations=o.concat(tt.time.of(Date.now())))}static create(e,n,i,r,o,s){return new tt(e,n,i,r,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(tt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}tt.time=Ti.define();tt.userEvent=Ti.define();tt.addToHistory=Ti.define();tt.remote=Ti.define();function KF(t,e){let n=[];for(let i=0,r=0;;){let o,s;if(i=t[i]))o=t[i++],s=t[i++];else if(r=0;r--){let o=i[r](t);o instanceof tt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof tt?t=o[0]:t=kT(e,Ms(o),!1)}return t}function GF(t){let e=t.startState,n=e.facet(CT),i=t;for(let r=n.length-1;r>=0;r--){let o=n[r](t);o&&Object.keys(o).length&&(i=bT(i,wg(e,o,t.changes.newLength),!0))}return i==t?t:tt.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const XF=[];function Ms(t){return t==null?XF:Array.isArray(t)?t:[t]}var Re=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Re||(Re={}));const QF=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let bg;try{bg=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function JF(t){if(bg)return bg.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||QF.test(n)))return!0}return!1}function ZF(t){return e=>{if(!/\S/.test(e))return Re.Space;if(JF(e))return Re.Word;for(let n=0;n-1)return Re.Word;return Re.Other}}class pe{constructor(e,n,i,r,o,s){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let l=0;lr.set(a,l)),n=null),r.set(s.value.compartment,s.value.extension)):s.is(he.reconfigure)?(n=null,i=s.value):s.is(he.appendConfig)&&(n=null,i=Ms(i).concat(s.value));let o;n?o=e.startState.values.slice():(n=Yh.resolve(i,r,this),o=new pe(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,a)=>a.reconfigure(l,this),null).values),new pe(n,e.newDoc,e.newSelection,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:I.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),o=[i.range],s=Ms(i.effects);for(let l=1;ls.spec.fromJSON(l,a)))}}return pe.create({doc:e.doc,selection:I.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=Yh.resolve(e.extensions||[],new Map),i=e.doc instanceof ve?e.doc:ve.of((e.doc||"").split(n.staticFacet(pe.lineSeparator)||gg)),r=e.selection?e.selection instanceof I?e.selection:I.single(e.selection.anchor,e.selection.head):I.single(0);return dT(r,i.length),n.staticFacet(gT)||(r=r.asSingle()),new pe(n,i,r,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(pe.tabSize)}get lineBreak(){return this.facet(pe.lineSeparator)||` -`}get readOnly(){return this.facet(wT)}phrase(e,...n){for(let i of this.facet(pe.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let o=+(r||1);return!o||o>n.length?i:n[o-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let o of this.facet(mT))for(let s of o(this,n,i))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){return ZF(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-i,l=e-i;for(;s>0;){let a=_t(n,s,!1);if(o(n.slice(a,s))!=Re.Word)break;s=a}for(;lt.length?t[0]:4});pe.lineSeparator=yT;pe.readOnly=wT;pe.phrases=Q.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});pe.languageData=mT;pe.changeFilter=vT;pe.transactionFilter=xT;pe.transactionExtender=CT;ld.reconfigure=he.define();function Ei(t,e,n={}){let i={};for(let r of t)for(let o of Object.keys(r)){let s=r[o],l=i[o];if(l===void 0)i[o]=s;else if(!(l===s||s===void 0))if(Object.hasOwnProperty.call(n,o))i[o]=n[o](l,s);else throw new Error("Config merge conflict for field "+o)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Fo{eq(e){return this==e}range(e,n=e){return kg.create(e,n,this)}}Fo.prototype.startSide=Fo.prototype.endSide=0;Fo.prototype.point=!1;Fo.prototype.mapMode=Dt.TrackDel;let kg=class ST{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new ST(e,n,i)}};function Sg(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Wy{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let o=i?this.to:this.from;for(let s=r,l=o.length;;){if(s==l)return s;let a=s+l>>1,c=o[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-n;if(a==s)return c>=0?s:l;c>=0?l=a:s=a+1}}between(e,n,i,r){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(i,1e9,!1,o);od||f==d&&c.startSide>0&&c.endSide<=0)continue;(d-f||c.endSide-c.startSide)<0||(s<0&&(s=f),c.point&&(l=Math.max(l,d-f)),i.push(c),r.push(f-s),o.push(d-s))}return{mapped:i.length?new Wy(r,o,i,l):null,pos:s}}}class xe{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new xe(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(i&&(n=n.slice().sort(Sg)),this.isEmpty)return n.length?xe.of(n):this;let l=new _T(this,null,-1).goto(0),a=0,c=[],u=new Vr;for(;l.value||a=0){let h=n[a++];u.addInner(h.from,h.to,h.value)||c.push(h)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||ol.to||o=o&&e<=o+s.length&&s.between(o,e-o,n-o,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return qa.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return qa.from(e).goto(n)}static compare(e,n,i,r,o=-1){let s=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=o),l=n.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=o),a=jx(s,l,i),c=new Ll(s,a,o),u=new Ll(l,a,o);i.iterGaps((h,f,d)=>Hx(c,h,u,f,d,r)),i.empty&&i.length==0&&Hx(c,0,u,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=1e9-1);let o=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),s=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let l=jx(o,s),a=new Ll(o,l,0).goto(i),c=new Ll(s,l,0).goto(i);for(;;){if(a.to!=c.to||!_g(a.active,c.active)||a.point&&(!c.point||!a.point.eq(c.point)))return!1;if(a.to>r)return!0;a.next(),c.next()}}static spans(e,n,i,r,o=-1){let s=new Ll(e,null,o).goto(n),l=n,a=s.openStart;for(;;){let c=Math.min(s.to,i);if(s.point){let u=s.activeForPoint(s.to),h=s.pointFroml&&(r.span(l,c,s.active,a),a=s.openEnd(c));if(s.to>i)return a+(s.point&&s.to>i?1:0);l=s.to,s.next()}}static of(e,n=!1){let i=new Vr;for(let r of e instanceof kg?[e]:n?e3(e):e)i.add(r.from,r.to,r.value);return i.finish()}}xe.empty=new xe([],[],null,-1);function e3(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(Sg);e=i}return t}xe.empty.nextLayer=xe.empty;class Vr{finishChunk(e){this.chunks.push(new Wy(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new Vr)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(xe.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=xe.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function jx(t,e,n){let i=new Map;for(let o of t)for(let s=0;s=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new _T(s,n,i,o));return r.length==1?r[0]:new qa(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)_p(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)_p(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),_p(this.heap,0)}}}function _p(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Ll{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=qa.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){ou(this.active,e),ou(this.activeTo,e),ou(this.activeRank,e),this.minActive=Wx(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:o}=this.cursor;for(;n-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&ou(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function Hx(t,e,n,i,r,o){t.goto(e),n.goto(i);let s=i+r,l=i,a=i-e;for(;;){let c=t.to+a-n.to||t.endSide-n.endSide,u=c<0?t.to+a:n.to,h=Math.min(u,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&_g(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(l,h,t.point,n.point):h>l&&!_g(t.active,n.active)&&o.compareRange(l,h,t.active,n.active),u>s)break;l=u,c<=0&&t.next(),c>=0&&n.next()}}function _g(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function Wx(t,e){let n=-1,i=1e9;for(let r=0;r=e)return r;if(r==t.length)break;o+=t.charCodeAt(r)==9?n-o%n:1,r=_t(t,r)}return i===!0?-1:t.length}const Eg="ͼ",Vx=typeof Symbol>"u"?"__"+Eg:Symbol.for(Eg),Ag=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),qx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class qr{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,l,a,c){let u=[],h=/^@(\w+)\b/.exec(s[0]),f=h&&h[1]=="keyframes";if(h&&l==null)return a.push(s[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))o(d.split(/,\s*/).map(y=>s.map(v=>y.replace(/&/,v))).reduce((y,v)=>y.concat(v)),p,a);else if(p&&typeof p=="object"){if(!h)throw new RangeError("The value of a property ("+d+") should be a primitive value.");o(r(d),p,u,f)}else p!=null&&u.push(d.replace(/_.*/,"").replace(/[A-Z]/g,y=>"-"+y.toLowerCase())+": "+p+";")}(u.length||f)&&a.push((i&&!h&&!c?s.map(i):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in e)o(r(s),e[s],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=qx[Vx]||1;return qx[Vx]=e+1,Eg+e.toString(36)}static mount(e,n,i){let r=e[Ag],o=i&&i.nonce;r?o&&r.setNonce(o):r=new t3(e,o),r.mount(Array.isArray(n)?n:[n])}}let Ux=new Map;class t3{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let o=Ux.get(i);if(o)return e.adoptedStyleSheets=[o.sheet,...e.adoptedStyleSheets],e[Ag]=o;this.sheet=new r.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],Ux.set(i,this)}else{this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let o=e.head||e;o.insertBefore(this.styleTag,o.firstChild)}this.modules=[],e[Ag]=this}mount(e){let n=this.sheet,i=0,r=0;for(let o=0;o-1&&(this.modules.splice(l,1),r--,l=-1),l==-1){if(this.modules.splice(r++,0,s),n)for(let a=0;a",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},n3=typeof navigator<"u"&&/Mac/.test(navigator.platform),i3=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ut=0;ut<10;ut++)Ur[48+ut]=Ur[96+ut]=String(ut);for(var ut=1;ut<=24;ut++)Ur[ut+111]="F"+ut;for(var ut=65;ut<=90;ut++)Ur[ut]=String.fromCharCode(ut+32),Ua[ut]=String.fromCharCode(ut);for(var Tp in Ur)Ua.hasOwnProperty(Tp)||(Ua[Tp]=Ur[Tp]);function r3(t){var e=n3&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||i3&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ua:Ur)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Xh(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Mg(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function o3(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function eh(t,e){if(!e.anchorNode)return!1;try{return Mg(t,e.anchorNode)}catch{return!1}}function Ws(t){return t.nodeType==3?No(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Qh(t,e,n,i){return n?Kx(t,e,n,i,-1)||Kx(t,e,n,i,1):!1}function Ka(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Kx(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:er(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=Ka(t)+(r<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?er(t):0}else return!1}}function er(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function ad(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function s3(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function l3(t,e,n,i,r,o,s,l){let a=t.ownerDocument,c=a.defaultView||window;for(let u=t,h=!1;u&&!h;)if(u.nodeType==1){let f,d=u==a.body,p=1,y=1;if(d)f=s3(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(h=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let m=u.getBoundingClientRect();p=m.width/u.offsetWidth,y=m.height/u.offsetHeight,f={left:m.left,right:m.left+u.clientWidth*p,top:m.top,bottom:m.top+u.clientHeight*y}}let v=0,g=0;if(r=="nearest")e.top0&&e.bottom>f.bottom+g&&(g=e.bottom-f.bottom+g+s)):e.bottom>f.bottom&&(g=e.bottom-f.bottom+s,n<0&&e.top-g0&&e.right>f.right+v&&(v=e.right-f.right+v+o)):e.right>f.right&&(v=e.right-f.right+o,n<0&&e.leftn.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class c3{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?er(n):0),i,Math.min(e.focusOffset,i?er(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let ts=null;function TT(t){if(t.setActive)return t.setActive();if(ts)return t.focus(ts);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(ts==null?{get preventScroll(){return ts={preventScroll:!0},!0}}:void 0),!ts){ts=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}class bt{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new bt(e.parentNode,Ka(e),n)}static after(e,n){return new bt(e.parentNode,Ka(e)+1,n)}}const Vy=[];class Oe{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let i of this.children){if(i==e)return n;n+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let i=this.dom,r=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=r?r.nextSibling:i.firstChild)){let l=Oe.get(o);(!l||!l.parent&&l.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=r?r.nextSibling:i.firstChild,n&&!n.written&&n.node==i&&o!=s.dom&&(n.written=!0),s.dom.parentNode==i)for(;o&&o!=s.dom;)o=Gx(o);else i.insertBefore(s.dom,o);r=s.dom}for(o=r?r.nextSibling:i.firstChild,o&&n&&n.node==i&&(n.written=!0);o;)o=Gx(o)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,n),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let i;if(e==this.dom)i=this.dom.childNodes[n];else{let r=er(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;r==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?r=-1:r=1),e=o}r<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!Oe.get(i);)i=i.nextSibling;if(!i)return this.length;for(let r=0,o=0;;r++){let s=this.children[r];if(s.dom==i)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,i=0){let r=-1,o=-1,s=-1,l=-1;for(let a=0,c=i,u=i;an)return h.domBoundsAround(e,n,c);if(f>=e&&r==-1&&(r=a,o=c),c>n&&h.dom.parentNode==this.dom){s=a,l=u;break}u=f,c=f+h.breakAfter}return{from:o,to:l<0?i+this.length:l,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=Vy){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function LT(t,e,n,i,r,o,s,l,a){let{children:c}=t,u=c.length?c[e]:null,h=o.length?o[o.length-1]:null,f=h?h.breakAfter:s;if(!(e==i&&u&&!s&&!f&&o.length<2&&u.merge(n,r,o.length?h:null,n==0,l,a))){if(i0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,l,0)?u.breakAfter=o.shift().breakAfter:(n2);var Z={mac:Jx||/Mac/.test(hn.platform),windows:/Win/.test(hn.platform),linux:/Linux|X11/.test(hn.platform),ie:cd,ie_version:BT?Lg.documentMode||6:Bg?+Bg[1]:Og?+Og[1]:0,gecko:Xx,gecko_version:Xx?+(/Firefox\/(\d+)/.exec(hn.userAgent)||[0,0])[1]:0,chrome:!!Ep,chrome_version:Ep?+Ep[1]:0,ios:Jx,android:/Android\b/.test(hn.userAgent),webkit:Qx,safari:DT,webkit_version:Qx?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Lg.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const f3=256;class tr extends Oe{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof tr)||this.length-(n-e)+i.length>f3||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new tr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new bt(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return d3(this.dom,e,n)}}class nr extends Oe{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if(ET(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,o,s){return i&&(!(i instanceof nr&&i.mark.eq(this.mark))||e&&o<=0||ne&&n.push(i=e&&(r=o),i=a,o++}let s=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new nr(this.mark,n,s)}domAtPos(e){return RT(this,e)}coordsAt(e,n){return NT(this,e,n)}}function d3(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,o=e,s=0;e==0&&n<0||e==i&&n>=0?Z.chrome||Z.gecko||(e?(r--,s=1):o=0)?0:l.length-1];return Z.safari&&!s&&a.width==0&&(a=Array.prototype.find.call(l,c=>c.width)||a),s?ad(a,s<0):a||null}class Er extends Oe{static create(e,n,i){return new Er(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=Er.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,n,i,r,o,s){return i&&(!(i instanceof Er)||!this.widget.compare(i.widget)||e>0&&o<=0||n0)?bt.before(this.dom):bt.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let s=this.side?this.side<0:e>0;for(let l=s?r.length-1:0;o=r[l],!(e>0?l==0:l==r.length-1||o.top0?bt.before(this.dom):bt.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return ve.empty}get isHidden(){return!0}}tr.prototype.children=Er.prototype.children=Vs.prototype.children=Vy;function RT(t,e){let n=t.dom,{children:i}=t,r=0;for(let o=0;ro&&e0;o--){let s=i[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=r;o0&&e instanceof nr&&r.length&&(i=r[r.length-1])instanceof nr&&i.mark.eq(e.mark)?FT(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function NT(t,e,n){let i=null,r=-1,o=null,s=-1;function l(c,u){for(let h=0,f=0;h=u&&(d.children.length?l(d,u-f):(!o||o.isHidden&&n>0)&&(p>u||f==p&&d.getSide()>0)?(o=d,s=u-f):(f-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let o of i)if(o!=n&&(r.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function Rg(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function m3(t){let e=Object.create(null);for(let n=0;n0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){qy(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){FT(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=Dg(n,this.attrs||{})),i&&(this.attrs=Dg({class:i},this.attrs||{}))}domAtPos(e){return RT(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(ET(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Rg(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&Oe.get(r)instanceof nr;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=Oe.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!Z.ios||!this.children.some(o=>o instanceof tr))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof tr)||/[^ -~]/.test(i.text))return null;let r=Ws(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=NT(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,o=i.bottom-i.top;if(Math.abs(o-r.lineHeight)<2&&r.textHeight=n){if(o instanceof Xe)return o;if(s>n)break}r=s+o.breakAfter}return null}}class Ir extends Oe{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,o,s){return i&&(!(i instanceof Ir)||!this.widget.compare(i.widget)||e>0&&o<=0||n0}}class cr{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}destroy(e){}}var Pt=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Pt||(Pt={}));class se extends Fo{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new bc(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Kr(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:o,end:s}=PT(e,n);i=(o?n?-3e8:-1:5e8)-1,r=(s?n?2e8:1:-6e8)+1}return new Kr(e,i,r,n,e.widget||null,!0)}static line(e){return new kc(e)}static set(e,n=!1){return xe.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}se.none=xe.empty;class bc extends se{constructor(e){let{start:n,end:i}=PT(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof bc&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&qy(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}bc.prototype.point=!1;class kc extends se{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof kc&&this.spec.class==e.spec.class&&qy(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}kc.prototype.mapMode=Dt.TrackBefore;kc.prototype.point=!0;class Kr extends se{constructor(e,n,i,r,o,s){super(n,i,o,e),this.block=r,this.isReplace=s,this.mapMode=r?n<=0?Dt.TrackBefore:Dt.TrackAfter:Dt.TrackDel}get type(){return this.startSide!=this.endSide?Pt.WidgetRange:this.startSide<=0?Pt.WidgetBefore:Pt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Kr&&g3(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Kr.prototype.point=!0;function PT(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function g3(t,e){return t==e||!!(t&&e&&t.compare(e))}function Fg(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class da{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Ir&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Xe),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(lu(new Vs(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Ir)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(lu(new tr(this.text.slice(this.textOff,this.textOff+r)),n),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof Kr){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=n-e;if(i instanceof Kr)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ir(i.widget||new eC("div"),l,i));else{let a=Er.create(i.widget||new eC("span"),l,l?0:i.startSide),c=this.atCursorPos&&!a.isEditable&&o<=r.length&&(e0),u=!a.isEditable&&(er.length||i.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!c&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),c&&(h.append(lu(new Vs(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(lu(a,r),o),this.atCursorPos=u,this.pendingBuffer=u?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,i,r,o){let s=new da(e,n,i,o);return s.openEnd=xe.spans(r,n,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function lu(t,e){for(let n of e)t=new nr(n,[t],t.length);return t}class eC extends cr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const IT=Q.define(),$T=Q.define(),zT=Q.define(),jT=Q.define(),Ng=Q.define(),HT=Q.define(),WT=Q.define(),VT=Q.define({combine:t=>t.some(e=>e)}),qT=Q.define({combine:t=>t.some(e=>e)});class Jh{constructor(e,n="nearest",i="nearest",r=5,o=5){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=o}map(e){return e.empty?this:new Jh(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const tC=he.define({map:(t,e)=>t.map(e)});function Yn(t,e,n){let i=t.facet(jT);i.length?i[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const ud=Q.define({combine:t=>t.length?t[0]:!0});let y3=0;const Ul=Q.define();class qe{constructor(e,n,i,r,o){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.extension=o(this)}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:o,decorations:s}=n||{};return new qe(y3++,e,i,r,l=>{let a=[Ul.of(l)];return s&&a.push(Ya.of(c=>{let u=c.plugin(l);return u?s(u):se.none})),o&&a.push(o(l)),a})}static fromClass(e,n){return qe.define(i=>new e(i),n)}}class Ap{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(Yn(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){Yn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){Yn(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const UT=Q.define(),Uy=Q.define(),Ya=Q.define(),Ky=Q.define(),KT=Q.define();function nC(t,e,n){let i=t.state.facet(KT);if(!i.length)return i;let r=i.map(s=>s instanceof Function?s(t):s),o=[];return xe.spans(r,e,n,{point(){},span(s,l,a,c){let u=o;for(let h=a.length-1;h>=0;h--,c--){let f=a[h].spec.bidiIsolate,d;if(f!=null)if(c>0&&u.length&&(d=u[u.length-1]).to==s&&d.direction==f)d.to=l,u=d.inner;else{let p={from:s,to:l,direction:f,inner:[]};u.push(p),u=p.inner}}}}),o}const YT=Q.define();function GT(t){let e=0,n=0,i=0,r=0;for(let o of t.state.facet(YT)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(i=Math.max(i,s.top)),s.bottom!=null&&(r=Math.max(r,s.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Kl=Q.define();class Ln{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new Ln(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toAu)break;o+=2}if(!a)return i;new Ln(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),s=a.toA,l=a.toB}}}class Zh{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Je.empty(this.startState.doc.length);for(let o of i)this.changes=this.changes.compose(o.changes);let r=[];this.changes.iterChangedRanges((o,s,l,a)=>r.push(new Ln(o,s,l,a))),this.changedRanges=r}static create(e,n,i){return new Zh(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var Ie=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Ie||(Ie={}));const Ga=Ie.LTR,XT=Ie.RTL;function QT(t){let e=[];for(let n=0;n=n){if(l.level==i)return s;(o<0||(r!=0?r<0?l.fromn:e[o].level>l.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function JT(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;y-=3)if(ri[y+1]==-d){let v=ri[y+2],g=v&2?r:v&4?v&1?o:r:0;g&&(Se[h]=Se[ri[y]]=g),l=y;break}}else{if(ri.length==189)break;ri[l++]=h,ri[l++]=f,ri[l++]=a}else if((p=Se[h])==2||p==1){let y=p==r;a=y?0:1;for(let v=l-3;v>=0;v-=3){let g=ri[v+2];if(g&2)break;if(y)ri[v+2]|=2;else{if(g&4)break;ri[v+2]|=4}}}}}function S3(t,e,n,i){for(let r=0,o=i;r<=n.length;r++){let s=r?n[r-1].to:t,l=ra;)p==v&&(p=n[--y].from,v=y?n[y-1].to:t),Se[--p]=d;a=u}else o=c,a++}}}function Ig(t,e,n,i,r,o,s){let l=i%2?2:1;if(i%2==r%2)for(let a=e,c=0;aa&&s.push(new Ar(a,y.from,d));let v=y.direction==Ga!=!(d%2);$g(t,v?i+1:i,r,y.inner,y.from,y.to,s),a=y.to}p=y.to}else{if(p==n||(u?Se[p]!=l:Se[p]==l))break;p++}f?Ig(t,a,p,i+1,r,f,s):ae;){let u=!0,h=!1;if(!c||a>o[c-1].to){let y=Se[a-1];y!=l&&(u=!1,h=y==16)}let f=!u&&l==1?[]:null,d=u?i:i+1,p=a;e:for(;;)if(c&&p==o[c-1].to){if(h)break e;let y=o[--c];if(!u)for(let v=y.from,g=c;;){if(v==e)break e;if(g&&o[g-1].to==v)v=o[--g].from;else{if(Se[v-1]==l)break e;break}}if(f)f.push(y);else{y.toSe.length;)Se[Se.length]=256;let i=[],r=e==Ga?0:1;return $g(t,r,r,n,0,t.length,i),i}function ZT(t){return[new Ar(0,t,0)]}let eE="";function T3(t,e,n,i,r){var o;let s=i.head-t.from,l=-1;if(s==0){if(!r||!t.length)return null;e[0].level!=n&&(s=e[0].side(!1,n),l=0)}else if(s==t.length){if(r)return null;let f=e[e.length-1];f.level!=n&&(s=f.side(!0,n),l=e.length-1)}l<0&&(l=Ar.find(e,s,(o=i.bidiLevel)!==null&&o!==void 0?o:-1,i.assoc));let a=e[l];s==a.side(r,n)&&(a=e[l+=r?1:-1],s=a.side(!r,n));let c=r==(a.dir==n),u=_t(t.text,s,c);if(eE=t.text.slice(Math.min(s,u),Math.max(s,u)),u!=a.side(r,n))return I.cursor(u+t.from,c?-1:1,a.level);let h=l==(r?e.length-1:0)?null:e[l+(r?1:-1)];return!h&&a.level!=n?I.cursor(r?t.to:t.from,r?-1:1,n):h&&h.level0&&i.length&&(i.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!D3(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let o=r>-1?A3(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;i=new Ln(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(i.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Z.ie||Z.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,l=this.updateDeco(),a=O3(s,l,e.changes);return i=Ln.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Z.chrome||Z.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||r.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?r[s]:null;if(!l)break;let{fromA:a,toA:c,fromB:u,toB:h}=l,f,d,p,y;if(i&&i.range.fromBu){let C=da.build(this.view.state.doc,u,i.range.fromB,this.decorations,this.dynamicDecorationMap),w=da.build(this.view.state.doc,i.range.toB,h,this.decorations,this.dynamicDecorationMap);d=C.breakAtStart,p=C.openStart,y=w.openEnd;let b=this.compositionView(i);w.breakAtStart?b.breakAfter=1:w.content.length&&b.merge(b.length,b.length,w.content[0],!1,w.openStart,0)&&(b.breakAfter=w.content[0].breakAfter,w.content.shift()),C.content.length&&b.merge(0,0,C.content[C.content.length-1],!0,0,C.openEnd)&&C.content.pop(),f=C.content.concat(b).concat(w.content)}else({content:f,breakAtStart:d,openStart:p,openEnd:y}=da.build(this.view.state.doc,u,h,this.decorations,this.dynamicDecorationMap));let{i:v,off:g}=o.findPos(c,1),{i:m,off:x}=o.findPos(a,-1);LT(this,m,x,v,g,f,d,p,y)}i&&this.fixCompositionDOM(i)}compositionView(e){let n=new tr(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new nr(r,[n],n.length);let i=new Xe;return i.append(n,0),i}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(s);let l=Oe.get(o);l&&l!=s&&(l.dom=null),s.setDOM(o)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let o=e.marks.length-1;o>=-1;o--)i=r.childPos(i.off,1),r=r.children[i.i],n(o>=0?e.marks[o].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,o=!r&&eh(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),c=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(Z.gecko&&l.empty&&!this.hasComposition&&E3(a)){let h=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(h,a.node.childNodes[a.offset]||null)),a=c=new bt(h,0),s=!0}let u=this.view.observer.selectionRange;(s||!u.focusNode||!Qh(a.node,a.offset,u.anchorNode,u.anchorOffset)||!Qh(c.node,c.offset,u.focusNode,u.focusOffset))&&(this.view.observer.ignore(()=>{Z.android&&Z.chrome&&this.dom.contains(u.focusNode)&&B3(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=Xh(this.view.root);if(h)if(l.empty){if(Z.gecko){let f=M3(a.node,a.offset);if(f&&f!=3){let d=nE(a.node,a.offset,f==1?1:-1);d&&(a=new bt(d.node,d.offset))}}h.collapse(a.node,a.offset),l.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=l.bidiLevel)}else if(h.extend){h.collapse(a.node,a.offset);try{h.extend(c.node,c.offset)}catch{}}else{let f=document.createRange();l.anchor>l.head&&([a,c]=[c,a]),f.setEnd(c.node,c.offset),f.setStart(a.node,a.offset),h.removeAllRanges(),h.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,c)),this.impreciseAnchor=a.precise?null:new bt(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new bt(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=Xh(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let s=Xe.find(this,n.head);if(!s)return;let l=s.posAtStart;if(n.head==l||n.head==l+s.length)return;let a=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!a||!c||a.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);i.collapse(u.node,u.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=n.from&&i.collapse(r,o)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r=0;r--){let o=Oe.get(n.childNodes[r]);o instanceof Xe&&(i=o.domAtPos(o.length))}return i?new bt(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=Oe.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;s--){let l=this.children[s],a=o-l.breakAfter,c=a-l.length;if(ae||l.covers(1))&&(!i||l instanceof Xe&&!(i instanceof Xe&&n>=0))&&(i=l,r=c),o=c}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof Xe))return null;for(;r.children.length;){let{i:l,off:a}=r.childPos(i,1);for(;;l++){if(l==r.children.length)return null;if((r=r.children[l]).length)break}i=a}if(!(r instanceof tr))return null;let o=_t(r.text,i);if(o==i)return null;let s=No(r.dom,i,o).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==Ie.LTR;for(let c=0,u=0;ur)break;if(c>=i){let d=h.dom.getBoundingClientRect();if(n.push(d.height),s){let p=h.dom.lastChild,y=p?Ws(p):[];if(y.length){let v=y[y.length-1],g=a?v.right-d.left:d.right-v.left;g>l&&(l=g,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+h.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Ie.RTL:Ie.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Xe){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Ws(e.firstChild)[0];n=e.getBoundingClientRect().height,i=o?o.width/27:7,r=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new MT(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let o=r==n.viewports.length?null:n.viewports[r],s=o?o.from-1:this.length;if(s>i){let l=(n.lineBlockAt(s).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(se.replace({widget:new rC(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,s))}if(!o)break;i=o.to+1}return se.set(e)}updateDeco(){let e=this.view.state.facet(Ya).map((n,i)=>(this.dynamicDecorationMap[i]=typeof n=="function")?n(this.view):n);for(let n=e.length;nn.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let o=GT(this.view),s={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom};l3(this.view.scrollDOM,s,n.head0)i=i.childNodes[r-1],r=er(i);else break}if(n>=0)for(let i=t,r=e;;){if(i.nodeType==3)return{node:i,offset:r};if(i.nodeType==1&&r=0)i=i.childNodes[r],r=0;else break}return null}function M3(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e{ie.from&&(n=!0)}),n}function R3(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),o=e-r.from;if(r.length==0)return I.cursor(e);o==0?n=1:o==r.length&&(n=-1);let s=o,l=o;n<0?s=_t(r.text,o,!1):l=_t(r.text,o);let a=i(r.text.slice(s,l));for(;s>0;){let c=_t(r.text,s,!1);if(i(r.text.slice(c,s))!=a)break;s=c}for(;lt?e.left-t:Math.max(0,t-e.right)}function N3(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Mp(t,e){return t.tope.top+1}function oC(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function zg(t,e,n){let i,r,o,s,l=!1,a,c,u,h;for(let p=t.firstChild;p;p=p.nextSibling){let y=Ws(p);for(let v=0;vx||s==x&&o>m){i=p,r=g,o=m,s=x;let C=x?n0?v0)}m==0?n>g.bottom&&(!u||u.bottomg.top)&&(c=p,h=g):u&&Mp(u,g)?u=sC(u,g.bottom):h&&Mp(h,g)&&(h=oC(h,g.top))}}if(u&&u.bottom>=n?(i=a,r=u):h&&h.top<=n&&(i=c,r=h),!i)return{node:t,offset:0};let f=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return lC(i,f,n);if(l&&i.contentEditable!="false")return zg(i,f,n);let d=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:d}}function lC(t,e,n){let i=t.nodeValue.length,r=-1,o=1e9,s=0;for(let l=0;ln?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&h=(u.left+u.right)/2,d=f;if((Z.chrome||Z.gecko)&&No(t,l).getBoundingClientRect().left==u.right&&(d=!f),h<=0)return{node:t,offset:l+(d?1:0)};r=l+(d?1:0),o=h}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function iE(t,e,n,i=-1){var r,o;let s=t.contentDOM.getBoundingClientRect(),l=s.top+t.viewState.paddingTop,a,{docHeight:c}=t.viewState,{x:u,y:h}=e,f=h-l;if(f<0)return 0;if(f>c)return t.state.doc.length;for(let C=t.viewState.heightOracle.textHeight/2,w=!1;a=t.elementAtHeight(f),a.type!=Pt.Text;)for(;f=i>0?a.bottom+C:a.top-C,!(f>=0&&f<=c);){if(w)return n?null:0;w=!0,i=-i}h=l+f;let d=a.from;if(dt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:aC(t,s,a,u,h);let p=t.dom.ownerDocument,y=t.root.elementFromPoint?t.root:p,v=y.elementFromPoint(u,h);v&&!t.contentDOM.contains(v)&&(v=null),v||(u=Math.max(s.left+1,Math.min(s.right-1,u)),v=y.elementFromPoint(u,h),v&&!t.contentDOM.contains(v)&&(v=null));let g,m=-1;if(v&&((r=t.docView.nearest(v))===null||r===void 0?void 0:r.isEditable)!=!1){if(p.caretPositionFromPoint){let C=p.caretPositionFromPoint(u,h);C&&({offsetNode:g,offset:m}=C)}else if(p.caretRangeFromPoint){let C=p.caretRangeFromPoint(u,h);C&&({startContainer:g,startOffset:m}=C,(!t.contentDOM.contains(g)||Z.safari&&P3(g,m,u)||Z.chrome&&I3(g,m,u))&&(g=void 0))}}if(!g||!t.docView.dom.contains(g)){let C=Xe.find(t.docView,d);if(!C)return f>a.top+a.height/2?a.to:a.from;({node:g,offset:m}=zg(C.dom,u,h))}let x=t.docView.nearest(g);if(!x)return null;if(x.isWidget&&((o=x.dom)===null||o===void 0?void 0:o.nodeType)==1){let C=x.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let l=t.viewState.heightOracle.textHeight,a=Math.floor((r-n.top-(t.defaultLineHeight-l)*.5)/l);o+=a*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+Tg(s,o,t.state.tabSize)}function P3(t,e,n){let i;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return No(t,i-1,i).getBoundingClientRect().left>n}function I3(t,e,n){if(e!=0)return!1;for(let r=t;;){let o=r.parentNode;if(!o||o.nodeType!=1||o.firstChild!=r)return!1;if(o.classList.contains("cm-line"))break;r=o}let i=t.nodeType==1?t.getBoundingClientRect():No(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function jg(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let i of n.type)if(i.to>e||i.to==e&&(i.to==n.to||i.type==Pt.Text))return i}return n}function $3(t,e,n,i){let r=jg(t,e.head),o=!i||r.type!=Pt.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),l=t.textDirectionAt(r.from),a=t.posAtCoords({x:n==(l==Ie.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(a!=null)return I.cursor(a,n?-1:1)}return I.cursor(n?r.to:r.from,n?-1:1)}function cC(t,e,n,i){let r=t.state.doc.lineAt(e.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from);for(let l=e,a=null;;){let c=T3(r,o,s,l,n),u=eE;if(!c){if(r.number==(n?t.state.doc.lines:1))return l;u=` -`,r=t.state.doc.line(r.number+(n?1:-1)),o=t.bidiSpans(r),c=I.cursor(n?r.from:r.to)}if(a){if(!a(u))return l}else{if(!i)return c;a=i(u)}l=c}}function z3(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return o=>{let s=i(o);return r==Re.Space&&(r=s),r==s}}function j3(t,e,n,i){let r=e.head,o=n?1:-1;if(r==(n?t.state.doc.length:0))return I.cursor(r,e.assoc);let s=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(r,e.assoc||-1),u=t.documentTop;if(c)s==null&&(s=c.left-a.left),l=o<0?c.top:c.bottom;else{let d=t.viewState.lineBlockAt(r);s==null&&(s=Math.min(a.right-a.left,t.defaultCharacterWidth*(r-d.from))),l=(o<0?d.top:d.bottom)+u}let h=a.left+s,f=i??t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=l+(f+d)*o,y=iE(t,{x:h,y:p},!1,o);if(pa.bottom||(o<0?yr)){let v=t.docView.coordsForChar(y),g=!v||p{if(e>o&&er(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:I.cursor(i,inull),Z.gecko&&rN(e.contentDOM.ownerDocument)}handleEvent(e){!X3(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=W3(e),i=this.handlers,r=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,l=i[o];l&&s!=!l.handlers.length&&(r.removeEventListener(o,this.handleEvent),l=null),l||r.addEventListener(o,this.handleEvent,{passive:s})}for(let o in i)o!="scroll"&&!n[o]&&r.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()i.keyCode==e.keyCode))&&!e.ctrlKey||V3.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,Ls(this.view.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Z.safari&&!Z.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function uC(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){Yn(n.state,r)}}}function W3(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec;if(r&&r.domEventHandlers)for(let o in r.domEventHandlers){let s=r.domEventHandlers[o];s&&n(o).handlers.push(uC(i.value,s))}if(r&&r.domEventObservers)for(let o in r.domEventObservers){let s=r.domEventObservers[o];s&&n(o).observers.push(uC(i.value,s))}}for(let i in ki)n(i).handlers.push(ki[i]);for(let i in Qn)n(i).observers.push(Qn[i]);return e}const rE=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],V3="dthko",oE=[16,17,18,20,91,92,224,225],au=6;function cu(t){return Math.max(0,t)*.7+8}function q3(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class U3{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=a3(e.contentDOM),this.atoms=e.state.facet(Ky).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(pe.allowMultipleSelections)&&K3(e,n),this.dragging=G3(e,n)&&cE(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&q3(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,r=0,o=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=GT(this.view);e.clientX-s.left<=o.left+au?i=-cu(o.left-e.clientX):e.clientX+s.right>=o.right-au&&(i=cu(e.clientX-o.right)),e.clientY-s.top<=o.top+au?r=-cu(o.top-e.clientY):e.clientY+s.bottom>=o.bottom-au&&(r=cu(e.clientY-o.bottom)),this.setScrollSpeed(i,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;ithis.select(this.lastEvent),20)}}function K3(t,e){let n=t.state.facet(IT);return n.length?n[0](e):Z.mac?e.metaKey:e.ctrlKey}function Y3(t,e){let n=t.state.facet($T);return n.length?n[0](e):Z.mac?!e.altKey:!e.ctrlKey}function G3(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=Xh(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let o=0;o=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function X3(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=Oe.get(n))&&i.ignoreEvent(e))return!1;return!0}const ki=Object.create(null),Qn=Object.create(null),sE=Z.ie&&Z.ie_version<15||Z.ios&&Z.webkit_version<604;function Q3(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),lE(t,n.value)},50)}function lE(t,e){let{state:n}=t,i,r=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(Hg!=null&&n.selection.ranges.every(a=>a.empty)&&Hg==o.toString()){let a=-1;i=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==a)return{range:c};a=u.from;let h=n.toText((s?o.line(r++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:h},range:I.cursor(c.from+h.length)}})}else s?i=n.changeByRange(a=>{let c=o.line(r++);return{changes:{from:a.from,to:a.to,insert:c.text},range:I.cursor(a.from+c.length)}}):i=n.replaceSelection(o);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Qn.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};ki.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1);Qn.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Qn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};ki.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(zT))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=eN(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new U3(t,e,n,i)),i&&t.observer.ignore(()=>TT(t.contentDOM));let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function hC(t,e,n,i){if(i==1)return I.cursor(e,n);if(i==2)return R3(t.state,e,n);{let r=Xe.find(t.docView,e),o=t.state.doc.lineAt(r?r.posAtEnd:e),s=r?r.posAtStart:o.from,l=r?r.posAtEnd:o.to;return lt>=e.top&&t<=e.bottom,fC=(t,e,n)=>aE(e,n)&&t>=n.left&&t<=n.right;function J3(t,e,n,i){let r=Xe.find(t.docView,e);if(!r)return 1;let o=e-r.posAtStart;if(o==0)return 1;if(o==r.length)return-1;let s=r.coordsAt(o,-1);if(s&&fC(n,i,s))return-1;let l=r.coordsAt(o,1);return l&&fC(n,i,l)?1:s&&aE(i,s)?-1:1}function dC(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:J3(t,n,e.clientX,e.clientY)}}const Z3=Z.ie&&Z.ie_version<=11;let pC=null,mC=0,gC=0;function cE(t){if(!Z3)return t.detail;let e=pC,n=gC;return pC=t,gC=Date.now(),mC=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(mC+1)%3:1}function eN(t,e){let n=dC(t,e),i=cE(e),r=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),r=r.map(o.changes))},get(o,s,l){let a=dC(t,o),c,u=hC(t,a.pos,a.bias,i);if(n.pos!=a.pos&&!s){let h=hC(t,n.pos,n.bias,i),f=Math.min(h.from,u.from),d=Math.max(h.to,u.to);u=f1&&(c=tN(r,a.pos))?c:l?r.addRange(u):I.create([u])}}}function tN(t,e){for(let n=0;n=e)return I.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}ki.dragstart=(t,e)=>{let{selection:{main:n}}=t.state,{mouseSelection:i}=t.inputState;return i&&(i.dragging=n),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1};function yC(t,e,n,i){if(!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{mouseSelection:o}=t.inputState,s=i&&o&&o.dragging&&Y3(t,e)?{from:o.dragging.from,to:o.dragging.to}:null,l={from:r,insert:n},a=t.state.changes(s?[s,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(r,-1),head:a.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}ki.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,o=()=>{++r==n.length&&yC(t,e,i.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[s]=l.result),o()},l.readAsText(n[s])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return yC(t,e,i,!0),!0}return!1};ki.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=sE?null:e.clipboardData;return n?(lE(t,n.getData("text/plain")||n.getData("text/uri-text")),!0):(Q3(t),!1)};function nN(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function iN(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>r&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),r=s.number}i=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:i}}let Hg=null;ki.copy=ki.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=iN(t.state);if(!n&&!r)return!1;Hg=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=sE?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(nN(t,n),!1)};const uE=Ti.define();function hE(t,e){let n=[];for(let i of t.facet(WT)){let r=i(t,e);r&&n.push(r)}return n?t.update({effects:n,annotations:uE.of(!0)}):null}function fE(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=hE(t.state,e);n?t.dispatch(n):t.update([])}},10)}Qn.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),fE(t)};Qn.blur=t=>{t.observer.clearSelectionRange(),fE(t)};Qn.compositionstart=Qn.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};Qn.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Z.chrome&&Z.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};Qn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};ki.beforeinput=(t,e)=>{var n;let i;if(Z.chrome&&Z.android&&(i=rE.find(r=>r.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return!1};const vC=new Set;function rN(t){vC.has(t)||(vC.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const xC=["pre-wrap","normal","pre-line","break-spaces"];class oN{constructor(e){this.lineWrapping=e,this.doc=ve.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return xC.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,a=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=o,a){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>nh&&(e.heightChanged=!0),this.height=n)}replace(e,n,i){return It.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let o=this,s=i.doc;for(let l=r.length-1;l>=0;l--){let{fromA:a,toA:c,fromB:u,toB:h}=r[l],f=o.lineAt(a,Le.ByPosNoHeight,i.setDoc(n),0,0),d=f.to>=c?f:o.lineAt(c,Le.ByPosNoHeight,i,0,0);for(h+=d.to-c,c=d.to;l>0&&f.from<=r[l-1].toA;)a=r[l-1].fromA,u=r[l-1].fromB,l--,ao*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),i+=1+l.break,r-=l.size}else if(o>r*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,o-=l.size}else break;else if(r=o&&s(this.blockAt(0,i,r,o))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class cn extends dE{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new fi(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof cn||r instanceof at&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof at?r=new cn(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):It.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(e,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class at extends It{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,o=r-i+1,s,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*o);s=a/o,this.length>o+1&&(l=(this.height-a)/(this.length-o-1))}else s=this.height/o;return{firstLine:i,lastLine:r,perLine:s,perChar:l}}blockAt(e,n,i,r){let{firstLine:o,lastLine:s,perLine:l,perChar:a}=this.heightMetrics(n,r);if(n.lineWrapping){let c=r+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),u=n.doc.lineAt(c),h=l+u.length*a,f=Math.max(i,e-h/2);return new fi(u.from,u.length,f,h,0)}else{let c=Math.max(0,Math.min(s-o,Math.floor((e-i)/l))),{from:u,length:h}=n.doc.line(o+c);return new fi(u,h,i+l*c,l,0)}}lineAt(e,n,i,r,o){if(n==Le.ByHeight)return this.blockAt(e,i,r,o);if(n==Le.ByPosNoHeight){let{from:d,to:p}=i.doc.lineAt(e);return new fi(d,p-d,0,0,0)}let{firstLine:s,perLine:l,perChar:a}=this.heightMetrics(i,o),c=i.doc.lineAt(e),u=l+c.length*a,h=c.number-s,f=r+l*h+a*(c.from-o-h);return new fi(c.from,c.length,Math.max(r,Math.min(f,r+this.height-u)),u,0)}forEachLine(e,n,i,r,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:l,perLine:a,perChar:c}=this.heightMetrics(i,o);for(let u=e,h=r;u<=n;){let f=i.doc.lineAt(u);if(u==e){let p=f.number-l;h+=a*p+c*(e-o-p)}let d=a+c*f.length;s(new fi(f.from,f.length,h,d,0)),h+=d,u=f.to+1}}replace(e,n,i){let r=this.length-n;if(r>0){let o=i[i.length-1];o instanceof at?i[i.length-1]=new at(o.length+r):i.push(null,new at(r-1))}if(e>0){let o=i[0];o instanceof at?i[0]=new at(e+o.length):i.unshift(new at(e-1),null)}return It.of(i)}decomposeLeft(e,n){n.push(new at(e-1),null)}decomposeRight(e,n){n.push(null,new at(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let o=n+this.length;if(r&&r.from<=n+this.length&&r.more){let s=[],l=Math.max(n,r.from),a=-1;for(r.from>n&&s.push(new at(r.from-n-1).updateHeight(e,n));l<=o&&r.more;){let u=e.doc.lineAt(l).length;s.length&&s.push(null);let h=r.heights[r.index++];a==-1?a=h:Math.abs(h-a)>=nh&&(a=-2);let f=new cn(u,h);f.outdated=!1,s.push(f),l+=u+1}l<=o&&s.push(null,new at(o-l).updateHeight(e,l));let c=It.of(s);return(a<0||Math.abs(c.height-this.height)>=nh||Math.abs(a-this.heightMetrics(e,n).perLine)>=nh)&&(e.heightChanged=!0),c}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class lN extends It{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let o=i+this.left.height;return el))return c;let u=n==Le.ByPosNoHeight?Le.ByPosNoHeight:Le.ByPos;return a?c.join(this.right.lineAt(l,u,i,s,l)):this.left.lineAt(l,u,i,r,o).join(c)}forEachLine(e,n,i,r,o,s){let l=r+this.left.height,a=o+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,n,i,l,a,s);else{let c=this.lineAt(a,Le.ByPos,i,r,o);e=e&&c.from<=n&&s(c),n>c.to&&this.right.forEachLine(c.to+1,n,i,l,a,s)}}replace(e,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let l of i)o.push(l);if(e>0&&CC(o,s-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?It.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:o,right:s}=this,l=n+o.length+this.break,a=null;return r&&r.from<=n+o.length&&r.more?a=o=o.updateHeight(e,n,i,r):o.updateHeight(e,n,i),r&&r.from<=l+s.length&&r.more?a=s=s.updateHeight(e,l,i,r):s.updateHeight(e,l,i),a?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function CC(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof at&&(i=t[e+1])instanceof at&&t.splice(e-1,3,new at(n.length+1+i.length))}const aN=5;class Yy{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof cn?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new cn(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=aN)&&this.addLineDeco(r,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new cn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new at(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof cn)return e;let n=new cn(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof cn)&&!this.isCovered?this.nodes.push(new cn(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&h.overflow!="visible"){let f=u.getBoundingClientRect();o=Math.max(o,f.left),s=Math.min(s,f.right),l=Math.max(l,f.top),a=c==t.parentNode?f.bottom:Math.min(a,f.bottom)}c=h.position=="absolute"||h.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:l-(n.top+e),bottom:Math.max(l,a)-(n.top+e)}}function fN(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Op{constructor(e,n,i){this.from=e,this.to=n,this.size=i}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new oN(n),this.stateDeco=e.facet(Ya).filter(i=>typeof i!="function"),this.heightMap=It.empty().applyChanges(this.stateDeco,ve.empty,this.heightOracle.setDoc(e.doc),[new Ln(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=se.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:o,to:s})=>r>=o&&r<=s)){let{from:o,to:s}=this.lineBlockAt(r);e.push(new uu(o,s))}}this.viewports=e.sort((i,r)=>i.from-r.from),this.scaler=this.heightMap.height<=7e6?bC:new gN(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Yl(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Ya).filter(u=>typeof u!="function");let r=e.changedRanges,o=Ln.extendWithRanges(r,cN(i,this.stateDeco,e?e.changes:Je.empty(this.state.doc.length))),s=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,n));let c=!e.changes.empty||e.flags&2||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),c&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(qT)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Ie.RTL:Ie.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),l=n.getBoundingClientRect(),a=s||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let c=0,u=0;if(l.width&&l.height){let C=l.width/n.offsetWidth,w=l.height/n.offsetHeight;(C>.995&&C<1.005||!isFinite(C)||Math.abs(l.width-n.offsetWidth)<1)&&(C=1),(w>.995&&w<1.005||!isFinite(w)||Math.abs(l.height-n.offsetHeight)<1)&&(w=1),(this.scaleX!=C||this.scaleY!=w)&&(this.scaleX=C,this.scaleY=w,c|=8,s=a=!0)}let h=(parseInt(i.paddingTop)||0)*this.scaleY,f=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=AT(e.scrollDOM);let p=(this.printing?fN:hN)(n,this.paddingTop),y=p.top-this.pixelViewport.top,v=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let m=l.width;if((this.contentDOMWidth!=m||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),a){let C=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(C)&&(s=!0),s||r.lineWrapping&&Math.abs(m-this.contentDOMWidth)>r.charWidth){let{lineHeight:w,charWidth:b,textHeight:S}=e.docView.measureTextSize();s=w>0&&r.refresh(o,w,b,S,m/b,C),s&&(e.docView.minWidth=0,c|=8)}y>0&&v>0?u=Math.max(y,v):y<0&&v<0&&(u=Math.min(y,v)),r.heightChanged=!1;for(let w of this.viewports){let b=w.from==this.viewport.from?C:e.docView.measureVisibleLineHeights(w);this.heightMap=(s?It.empty().applyChanges(this.stateDeco,ve.empty,this.heightOracle,[new Ln(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new sN(w.from,b))}r.heightChanged&&(c|=2)}let x=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return x&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(c&2||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:l}=this,a=new uu(r.lineAt(s-i*1e3,Le.ByHeight,o,0,0).from,r.lineAt(l+(1-i)*1e3,Le.ByHeight,o,0,0).to);if(n){let{head:c}=n.range;if(ca.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(c,Le.ByPos,o,0,0),f;n.y=="center"?f=(h.top+h.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c=l+Math.max(10,Math.min(i,250)))&&r>s-2*1e3&&o>1,s=r<<1;if(this.defaultTextDirection!=Ie.LTR&&!i)return[];let l=[],a=(c,u,h,f)=>{if(u-cc&&vv.from>=h.from&&v.to<=h.to&&Math.abs(v.from-c)v.fromg));if(!y){if(uv.from<=u&&v.to>=u)){let v=n.moveToLineBoundary(I.cursor(u),!1,!0).head;v>c&&(u=v)}y=new Op(c,u,this.gapSize(h,c,u,f))}l.push(y)};for(let c of this.viewportLines){if(c.lengthc.from&&a(c.from,f,c,u),dn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];xe.spans(e,this.viewport.from,this.viewport.to,{span(r,o){n.push({from:r,to:o})},point(){}},20);let i=n.length!=this.visibleRanges.length||this.visibleRanges.some((r,o)=>r.from!=n[o].from||r.to!=n[o].to);return this.visibleRanges=n,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Yl(this.heightMap.lineAt(e,Le.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Yl(this.heightMap.lineAt(this.scaler.fromDOM(e),Le.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Yl(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class uu{constructor(e,n){this.from=e,this.to=n}}function pN(t,e,n){let i=[],r=t,o=0;return xe.spans(n,t,e,{span(){},point(s,l){s>r&&(i.push({from:r,to:s}),o+=s-r),r=l}},20),r=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:o,to:s}=e[r],l=s-o;if(i<=l)return o+i;i-=l}}function fu(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function mN(t,e){for(let n of t)if(e(n))return n}const bC={toDOM(t){return t},fromDOM(t){return t},scale:1};class gN{constructor(e,n,i){let r=0,o=0,s=0;this.viewports=i.map(({from:l,to:a})=>{let c=n.lineAt(l,Le.ByPos,e,0,0).top,u=n.lineAt(a,Le.ByPos,e,0,0).bottom;return r+=u-c,{from:l,to:a,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let l of this.viewports)l.domTop=s+(l.top-o)*this.scale,s=l.domBottom=l.domTop+(l.bottom-l.top),o=l.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let o=nYl(r,e)):t._content)}const du=Q.define({combine:t=>t.join(" ")}),Wg=Q.define({combine:t=>t.indexOf(!0)>-1}),Vg=qr.newName(),pE=qr.newName(),mE=qr.newName(),gE={"&light":"."+pE,"&dark":"."+mE};function qg(t,e,n){return new qr(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const yN=qg("."+Vg,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},gE),Gl="￿";class vN{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(pe.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Gl}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let o=this.text.length;this.readNode(r);let s=r.nextSibling;if(s==n)break;let l=Oe.get(r),a=Oe.get(s);(l&&a?l.breakAfter:(l?l.breakAfter:kC(r))||kC(s)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>o)&&this.lineBreak(),r=s}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,l;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(l=r.exec(n))&&(o=l.index,s=l[0].length),this.append(n.slice(i,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=s-1);i=o+s}}readNode(e){if(e.cmIgnore)return;let n=Oe.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(xN(e,i.node,i.offset)?n:0))}}function xN(t,e,n){for(;;){if(!e||n-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let l=o||s?[]:kN(e),a=new vN(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=SN(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=o&&o.node==l.focusNode&&o.offset==l.focusOffset||!Mg(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),c=s&&s.node==l.anchorNode&&s.offset==l.anchorOffset||!Mg(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=I.single(c,a)}}}function yE(t,e){let n,{newSel:i}=e,r=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:l}=e.bounds,a=r.from,c=null;(o===8||Z.android&&e.text.length=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:(Z.mac||Z.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=I.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ve.of([" "])}):Z.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==` - `&&t.lineWrapping&&(i&&(i=I.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ve.of([" "])}),n){if(Z.ios&&t.inputState.flushIOSKey()||Z.android&&(n.from==r.from&&n.to==r.to&&n.insert.length==1&&n.insert.lines==2&&Ls(t.contentDOM,"Enter",13)||(n.from==r.from-1&&n.to==r.to&&n.insert.length==0||o==8&&n.insert.lengthr.head)&&Ls(t.contentDOM,"Backspace",8)||n.from==r.from&&n.to==r.to+1&&n.insert.length==0&&Ls(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let l,a=()=>l||(l=wN(t,n,i));return t.state.facet(HT).some(c=>c(t,n.from,n.to,s,a))||t.dispatch(a()),!0}else if(i&&!i.main.eq(r)){let s=!1,l="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),l=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:s,userEvent:l}),!0}else return!1}function wN(t,e,n){let i,r=t.state,o=r.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=o.frome.to?r.sliceDoc(e.to,o.to):"";i=r.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let l=r.changes(e),a=n&&n.main.to<=l.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let c=t.state.sliceDoc(e.from,e.to),u,h=n&&tE(t,n.main.head);if(h){let p=e.insert.length-(e.to-e.from);u={from:h.from,to:h.to-p}}else u=t.state.doc.lineAt(o.head);let f=o.to-e.to,d=o.to-o.from;i=r.changeByRange(p=>{if(p.from==o.from&&p.to==o.to)return{changes:l,range:a||p.map(l)};let y=p.to-f,v=y-c.length;if(p.to-p.from!=d||t.state.sliceDoc(v,y)!=c||p.to>=u.from&&p.from<=u.to)return{range:p};let g=r.changes({from:v,to:y,insert:e.insert}),m=p.to-o.to;return{changes:g,range:a?I.range(Math.max(0,a.anchor+m),Math.max(0,a.head+m)):p.map(g)}})}else i={changes:l,selection:a&&r.selection.replaceRange(a)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:s,scrollIntoView:!0})}function bN(t,e,n,i){let r=Math.min(t.length,e.length),o=0;for(;o0&&l>0&&t.charCodeAt(s-1)==e.charCodeAt(l-1);)s--,l--;if(i=="end"){let a=Math.max(0,o-Math.min(s,l));n-=s+a-o}if(s=s?o-n:0;o-=a,l=o+(l-s),s=o}else if(l=l?o-n:0;o-=a,s=o+(s-l),l=o}return{from:o,toA:s,toB:l}}function kN(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new SC(n,i)),(r!=n||o!=i)&&e.push(new SC(r,o))),e}function SN(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?I.single(n+e,i+e):null}const _N={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Bp=Z.ie&&Z.ie_version<=11;class TN{constructor(e){this.view=e,this.active=!1,this.selectionRange=new c3,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(Z.ie&&Z.ie_version<=11||Z.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Bp&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(ud)?i.root.activeElement!=this.dom:!eh(i.dom,r))return;let o=r.anchorNode&&i.docView.nearest(r.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Z.ie&&Z.ie_version<=11||Z.android&&Z.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Qh(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Z.safari&&e.root.nodeType==11&&o3(this.dom.ownerDocument)==this.dom&&EN(this.view)||Xh(e.root);if(!n||this.selectionRange.eq(n))return!1;let i=eh(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&Ls(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(r=!0),n==-1?{from:n,to:i}=s:(n=Math.min(s.from,n),i=Math.max(s.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&eh(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new CN(this.view,e,n,i);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=yE(this.view,n);return this.view.state==i&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=_C(n,e.previousSibling||e.target.previousSibling,-1),r=_C(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function _C(t,e,n){for(;e;){let i=Oe.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function EN(t){let e=null;function n(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let i=e.startContainer,r=e.startOffset,o=e.endContainer,s=e.endOffset,l=t.docView.domAtPos(t.state.selection.main.anchor);return Qh(l.node,l.offset,o,s)&&([i,r,o,s]=[o,s,i,r]),{anchorNode:i,anchorOffset:r,focusNode:o,focusOffset:s}}class Y{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(r=>n(r,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||u3(e.parent)||document,this.viewState=new wC(e.state||pe.create(e)),this.plugins=this.state.facet(Ul).map(i=>new Ap(i));for(let i of this.plugins)i.update(this);this.observer=new TN(this),this.inputState=new H3(this),this.inputState.ensureHandlers(this.plugins),this.docView=new iC(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let n=e.length==1&&e[0]instanceof tt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,l=0,a=null;e.some(f=>f.annotation(uE))?(this.inputState.notifiedFocused=s,l=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,a=hE(o,s),a||(l=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(pe.phrases)!=this.state.facet(pe.phrases))return this.setState(o);r=Zh.create(this,o,e),r.flags|=l;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;h=new Jh(d.empty?d:I.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(tC)&&(h=d.value)}this.viewState.update(r,h),this.bidiCache=ef.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Kl)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(du)!=r.state.facet(du)&&(this.viewState.mustMeasureContent=!0),(n||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!r.empty)for(let f of this.state.facet(Ng))f(r);(a||u)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),u&&!yE(this,u)&&c.force&&Ls(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new wC(e),this.plugins=e.facet(Ul).map(i=>new Ap(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new iC(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Ul),i=e.state.facet(Ul);if(n!=i){let r=[];for(let o of i){let s=n.indexOf(o);if(s<0)r.push(new Ap(o));else{let l=this.plugins[s];l.mustUpdate=e,r.push(l)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(s<0)if(AT(i))o=-1,s=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(r);o=d.from,s=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];a&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(d=>{try{return d.read(this)}catch(p){return Yn(this.state,p),TC}}),h=Zh.create(this,this.state,[]),f=!1;h.flags|=a,n?n.flags|=a:n=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h));for(let d=0;d1||p<-1){r=r+p,i.scrollTop=r/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(Ng))l(n)}get themeClasses(){return Vg+" "+(this.state.facet(Wg)?mE:pE)+" "+this.state.facet(du)}updateAttrs(){let e=EC(this,UT,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(ud)?"true":"false",class:"cm-content",style:`${Z.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),EC(this,Uy,n);let i=this.observer.ignore(()=>{let r=Rg(this.contentDOM,this.contentAttrs,n),o=Rg(this.dom,this.editorAttrs,e);return r||o});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(Y.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Kl);let e=this.state.facet(Y.cspNonce);qr.mount(this.root,this.styleModules.concat(yN).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return Lp(this,e,cC(this,e,n,i))}moveByGroup(e,n){return Lp(this,e,cC(this,e,n,i=>z3(this,e.head,i)))}moveToLineBoundary(e,n,i=!0){return $3(this,e,n,i)}moveVertically(e,n,i){return Lp(this,e,j3(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),iE(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),o=this.bidiSpans(r),s=o[Ar.find(o,e-r.from,-1,n)];return ad(i,s.dir==Ie.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(VT)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>AN)return ZT(e.length);let n=this.textDirectionAt(e.from),i;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||JT(o.isolates,i=nC(this,e.from,e.to))))return o.order;i||(i=nC(this,e.from,e.to));let r=_3(e.text,n,i);return this.bidiCache.push(new ef(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Z.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{TT(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return tC.of(new Jh(typeof e=="number"?I.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}static domEventHandlers(e){return qe.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return qe.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=qr.newName(),r=[du.of(i),Kl.of(qg(`.${i}`,e))];return n&&n.dark&&r.push(Wg.of(!0)),r}static baseTheme(e){return cl.lowest(Kl.of(qg("."+Vg,e,gE)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&Oe.get(i)||Oe.get(e);return((n=r==null?void 0:r.rootView)===null||n===void 0?void 0:n.view)||null}}Y.styleModule=Kl;Y.inputHandler=HT;Y.focusChangeEffect=WT;Y.perLineTextDirection=VT;Y.exceptionSink=jT;Y.updateListener=Ng;Y.editable=ud;Y.mouseSelectionStyle=zT;Y.dragMovesSelection=$T;Y.clickAddsSelectionRange=IT;Y.decorations=Ya;Y.atomicRanges=Ky;Y.bidiIsolatedRanges=KT;Y.scrollMargins=YT;Y.darkTheme=Wg;Y.cspNonce=Q.define({combine:t=>t.length?t[0]:""});Y.contentAttributes=Uy;Y.editorAttributes=UT;Y.lineWrapping=Y.contentAttributes.of({class:"cm-lineWrapping"});Y.announce=he.define();const AN=4096,TC={};class ef{constructor(e,n,i,r,o,s){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:Ie.LTR;for(let o=Math.max(0,e.length-10);o=0;r--){let o=i[r],s=typeof o=="function"?o(t):o;s&&Dg(s,n)}return n}const MN=Z.mac?"mac":Z.windows?"win":Z.linux?"linux":"key";function LN(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,o,s,l;for(let a=0;ai.concat(r),[]))),n}function BN(t,e,n){return xE(vE(t.state),e,t,n)}let kr=null;const DN=4e3;function RN(t,e=MN){let n=Object.create(null),i=Object.create(null),r=(s,l)=>{let a=i[s];if(a==null)i[s]=l;else if(a!=l)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,l,a,c,u)=>{var h,f;let d=n[s]||(n[s]=Object.create(null)),p=l.split(/ (?!$)/).map(g=>LN(g,e));for(let g=1;g{let C=kr={view:x,prefix:m,scope:s};return setTimeout(()=>{kr==C&&(kr=null)},DN),!0}]})}let y=p.join(" ");r(y,!1);let v=d[y]||(d[y]={preventDefault:!1,stopPropagation:!1,run:((f=(h=d._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});a&&v.run.push(a),c&&(v.preventDefault=!0),u&&(v.stopPropagation=!0)};for(let s of t){let l=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let c of l){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let h in u)u[h].run.push(s.any)}let a=s[e]||s.key;if(a)for(let c of l)o(c,a,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(c,"Shift-"+a,s.shift,s.preventDefault,s.stopPropagation)}return n}function xE(t,e,n,i){let r=r3(e),o=ct(r,0),s=Tn(o)==r.length&&r!=" ",l="",a=!1,c=!1,u=!1;kr&&kr.view==n&&kr.scope==i&&(l=kr.prefix+" ",oE.indexOf(e.keyCode)<0&&(c=!0,kr=null));let h=new Set,f=v=>{if(v){for(let g of v.run)if(!h.has(g)&&(h.add(g),g(n,e)))return v.stopPropagation&&(u=!0),!0;v.preventDefault&&(v.stopPropagation&&(u=!0),c=!0)}return!1},d=t[i],p,y;return d&&(f(d[l+pu(r,e,!s)])?a=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Z.windows&&e.ctrlKey&&e.altKey)&&(p=Ur[e.keyCode])&&p!=r?(f(d[l+pu(p,e,!0)])||e.shiftKey&&(y=Ua[e.keyCode])!=r&&y!=p&&f(d[l+pu(y,e,!1)]))&&(a=!0):s&&e.shiftKey&&f(d[l+pu(r,e,!0)])&&(a=!0),!a&&f(d._any)&&(a=!0)),c&&(a=!0),a&&u&&e.stopPropagation(),a}class Sc{constructor(e,n,i,r,o){this.className=e,this.left=n,this.top=i,this.width=r,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let o=CE(e);return[new Sc(n,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}else return FN(e,n,i)}}function CE(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Ie.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function MC(t,e,n){let i=I.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(i,!0,!0).from),type:Pt.Text}}function FN(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),o=t.textDirection==Ie.LTR,s=t.contentDOM,l=s.getBoundingClientRect(),a=CE(t),c=s.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),h=l.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=l.right-(u?parseInt(u.paddingRight):0),d=jg(t,i),p=jg(t,r),y=d.type==Pt.Text?d:null,v=p.type==Pt.Text?p:null;if(y&&(t.lineWrapping||d.widgetLineBreaks)&&(y=MC(t,i,y)),v&&(t.lineWrapping||p.widgetLineBreaks)&&(v=MC(t,r,v)),y&&v&&y.from==v.from)return m(x(n.from,n.to,y));{let w=y?x(n.from,null,y):C(d,!1),b=v?x(null,n.to,v):C(p,!0),S=[];return(y||d).to<(v||p).from-(y&&v?1:0)||d.widgetLineBreaks>1&&w.bottom+t.defaultLineHeight/2V&&z.from=B)break;R>F&&D(Math.max(L,F),w==null&&L<=V,Math.min(R,B),b==null&&R>=K,_.dir)}if(F=$.to+1,F>=B)break}return O.length==0&&D(V,w==null,K,b==null,t.textDirection),{top:M,bottom:N,horizontal:O}}function C(w,b){let S=l.top+(b?w.top:w.bottom);return{top:S,bottom:S,horizontal:[]}}}function NN(t,e){return t.constructor==e.constructor&&t.eq(e)}class PN{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(ih)!=e.state.facet(ih)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let n=0,i=e.facet(ih);for(;n!NN(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ih=Q.define();function wE(t){return[qe.define(e=>new PN(e,t)),ih.of(t)]}const bE=!Z.ios,Xa=Q.define({combine(t){return Ei(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function IN(t={}){return[Xa.of(t),$N,zN,jN,qT.of(!0)]}function kE(t){return t.startState.facet(Xa)!=t.state.facet(Xa)}const $N=wE({above:!0,markers(t){let{state:e}=t,n=e.facet(Xa),i=[];for(let r of e.selection.ranges){let o=r==e.selection.main;if(r.empty?!o||bE:n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=r.empty?r:I.cursor(r.head,r.head>r.anchor?-1:1);for(let a of Sc.forRange(t,s,l))i.push(a)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=kE(t);return n&&LC(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){LC(e.state,t)},class:"cm-cursorLayer"});function LC(t,e){e.style.animationDuration=t.facet(Xa).cursorBlinkRate+"ms"}const zN=wE({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Sc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||kE(t)},class:"cm-selectionLayer"}),SE={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};bE&&(SE[".cm-line"].caretColor="transparent !important");const jN=cl.highest(Y.theme(SE)),_E=he.define({map(t,e){return t==null?null:e.mapPos(t)}}),Xl=pt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(_E)?i.value:n,t)}}),HN=qe.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Xl);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Xl)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Xl),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Xl)!=t&&this.view.dispatch({effects:_E.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function WN(){return[Xl,HN]}function OC(t,e,n,i,r){e.lastIndex=0;for(let o=t.iterRange(n,i),s=n,l;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;l=e.exec(o.value);)r(s+l.index,l)}function VN(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:o}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=o:i.push({from:r,to:o});return i}class qN{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:o,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(l,a,c,u)=>r(u,c,c+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,c,u)=>{let h=i(l,a,c);h&&u(c,c+l[0].length,h)};else if(i)this.addMatch=(l,a,c,u)=>u(c,c+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new Vr,i=n.add.bind(n);for(let{from:r,to:o}of VN(e,this.maxLength))OC(e.state.doc,this.regexp,r,o,(s,l)=>this.addMatch(l,e,s,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((o,s,l,a)=>{a>e.view.viewport.from&&l1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let o of e.visibleRanges){let s=Math.max(o.from,i),l=Math.min(o.to,r);if(l>s){let a=e.state.doc.lineAt(s),c=a.toa.from;s--)if(this.boundary.test(a.text[s-1-a.from])){u=s;break}for(;lf.push(g.range(y,v));if(a==c)for(this.regexp.lastIndex=u-a.from;(d=this.regexp.exec(a.text))&&d.indexthis.addMatch(v,e,y,p));n=n.update({filterFrom:u,filterTo:h,filter:(y,v)=>yh,add:f})}}return n}}const Ug=/x/.unicode!=null?"gu":"g",UN=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Ug),KN={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Dp=null;function YN(){var t;if(Dp==null&&typeof document<"u"&&document.body){let e=document.body.style;Dp=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Dp||!1}const rh=Q.define({combine(t){let e=Ei(t,{render:null,specialChars:UN,addSpecialChars:null});return(e.replaceTabs=!YN())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Ug)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Ug)),e}});function GN(t={}){return[rh.of(t),XN()]}let BC=null;function XN(){return BC||(BC=qe.fromClass(class{constructor(t){this.view=t,this.decorations=se.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(rh)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new qN({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,o=ct(e[0],0);if(o==9){let s=r.lineAt(i),l=n.state.tabSize,a=ul(s.text,l,i-s.from);return se.replace({widget:new eP((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=se.replace({widget:new ZN(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(rh);t.startState.facet(rh)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const QN="•";function JN(t){return t>=32?QN:t==10?"␤":String.fromCharCode(9216+t)}class ZN extends cr{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=JN(this.code),i=e.state.phrase("Control character")+" "+(KN[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let o=document.createElement("span");return o.textContent=n,o.title=i,o.setAttribute("aria-label",i),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class eP extends cr{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function tP(){return iP}const nP=se.line({class:"cm-activeLine"}),iP=qe.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(nP.range(r.from)),e=r.from)}return se.set(n)}},{decorations:t=>t.decorations});class rP extends cr{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let n=e.firstChild?Ws(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),r=ad(n[0],i.direction!="rtl"),o=parseInt(i.lineHeight);return r.bottom-r.top>o*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+o}:r}ignoreEvent(){return!1}}function oP(t){return qe.fromClass(class{constructor(e){this.view=e,this.placeholder=t?se.set([se.widget({widget:new rP(t),side:1}).range(0)]):se.none}get decorations(){return this.view.state.doc.length?se.none:this.placeholder}},{decorations:e=>e.decorations})}const Kg=2e3;function sP(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),o=[];if(e.off>Kg||n.off>Kg||e.col<0||n.col<0){let s=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let a=i;a<=r;a++){let c=t.doc.line(a);c.length<=l&&o.push(I.range(c.from+s,c.to+l))}}else{let s=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let a=i;a<=r;a++){let c=t.doc.line(a),u=Tg(c.text,s,t.tabSize,!0);if(u<0)o.push(I.cursor(c.to));else{let h=Tg(c.text,l,t.tabSize);o.push(I.range(c.from+u,c.from+h))}}}return o}function lP(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function DC(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,o=r>Kg?-1:r==i.length?lP(t,e.clientX):ul(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:o,off:r}}function aP(t,e){let n=DC(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let o=r.changes.mapPos(r.startState.doc.line(n.line).from),s=r.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},i=i.map(r.changes)}},get(r,o,s){let l=DC(t,r);if(!l)return i;let a=sP(t.state,n,l);return a.length?s?I.create(a.concat(i.ranges)):I.create(a):i}}:null}function cP(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return Y.mouseSelectionStyle.of((n,i)=>e(i)?aP(n,i):null)}const uP={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},hP={style:"cursor: crosshair"};function fP(t={}){let[e,n]=uP[t.key||"Alt"],i=qe.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,Y.contentAttributes.of(r=>{var o;return!((o=r.plugin(i))===null||o===void 0)&&o.isDown?hP:null})]}const Ol="-10000px";class TE{constructor(e,n,i){this.facet=n,this.createTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(r=>r),this.tooltipViews=this.tooltips.map(i)}update(e,n){var i;let r=e.state.facet(this.facet),o=r.filter(a=>a);if(r===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let s=[],l=n?[]:null;for(let a=0;an[c]=a),n.length=l.length),this.input=r,this.tooltips=o,this.tooltipViews=s,!0}}function dP(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Rp=Q.define({combine:t=>{var e,n,i;return{position:Z.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||dP}}}),RC=new WeakMap,EE=qe.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Rp);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new TE(t,Gy,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(Rp);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=Ol,e.dom.style.left="0px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);this.parent&&this.container.remove(),(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(Z.gecko)i=r.offsetParent!=this.container.ownerDocument.body;else if(this.view.scaleX!=1||this.view.scaleY!=1)i=!0;else if(r.style.top==Ol&&r.style.left=="0px"){let o=r.getBoundingClientRect();i=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(i||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,n=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((r,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Rp).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:n,space:i,scaleX:r,scaleY:o}=t,s=[];for(let l=0;l=Math.min(n.bottom,i.bottom)||h.rightMath.min(n.right,i.right)+.1){u.style.top=Ol;continue}let d=a.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,y=f.right-f.left,v=(e=RC.get(c))!==null&&e!==void 0?e:f.bottom-f.top,g=c.offset||mP,m=this.view.textDirection==Ie.LTR,x=f.width>i.right-i.left?m?i.left:i.right-f.width:m?Math.min(h.left-(d?14:0)+g.x,i.right-y):Math.max(i.left,h.left-y+(d?14:0)-g.x),C=this.above[l];!a.strictSide&&(C?h.top-(f.bottom-f.top)-g.yi.bottom)&&C==i.bottom-h.bottom>h.top-i.top&&(C=this.above[l]=!C);let w=(C?h.top-i.top:i.bottom-h.bottom)-p;if(wx&&M.topb&&(b=C?M.top-v-2-p:M.bottom+p+2);if(this.position=="absolute"?(u.style.top=(b-t.parent.top)/o+"px",u.style.left=(x-t.parent.left)/r+"px"):(u.style.top=b/o+"px",u.style.left=x/r+"px"),d){let M=h.left+(m?g.x:-g.x)-(x+14-7);d.style.left=M/r+"px"}c.overlap!==!0&&s.push({left:x,top:b,right:S,bottom:b+v}),u.classList.toggle("cm-tooltip-above",C),u.classList.toggle("cm-tooltip-below",!C),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Ol}},{eventObservers:{scroll(){this.maybeMeasure()}}}),pP=Y.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),mP={x:0,y:0},Gy=Q.define({enables:[EE,pP]}),tf=Q.define();class Xy{static create(e){return new Xy(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new TE(e,tf,n=>this.createHostedView(n))}createHostedView(e){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const gP=Gy.compute([tf],t=>{let e=t.facet(tf).filter(n=>n);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.filter(n=>n.end!=null).map(n=>n.end)),create:Xy.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class yP{constructor(e,n,i,r,o){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;el.bottom||n.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(r)).find(u=>u.from<=r&&u.to>=r),c=a&&a.dir==Ie.RTL?-1:1;o=n.x{this.pending==l&&(this.pending=null,a&&e.dispatch({effects:this.setHover.of(a)}))},a=>Yn(e.state,a,"hover tooltip"))}else s&&e.dispatch({effects:this.setHover.of(s)})}mousemove(e){var n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!FC(this.lastMove.target)||this.pending){let{pos:r}=i||this.pending,o=(n=i==null?void 0:i.end)!==null&&n!==void 0?n:r;(r==o?this.view.posAtCoords(this.lastMove)!=r:!vP(this.view,r,o,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!FC(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function FC(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function vP(t,e,n,i,r,o){let s=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>i||s.rightr||Math.min(s.bottom,l)=e&&a<=n}function xP(t,e={}){let n=he.define(),i=pt.define({create(){return null},update(r,o){if(r&&(e.hideOnChange&&(o.docChanged||o.selection)||e.hideOn&&e.hideOn(o,r)))return null;if(r&&o.docChanged){let s=o.changes.mapPos(r.pos,-1,Dt.TrackDel);if(s==null)return null;let l=Object.assign(Object.create(null),r);l.pos=s,r.end!=null&&(l.end=o.changes.mapPos(r.end)),r=l}for(let s of o.effects)s.is(n)&&(r=s.value),s.is(CP)&&(r=null);return r},provide:r=>tf.from(r)});return[i,qe.define(r=>new yP(r,t,i,n,e.hoverTime||300)),gP]}function AE(t,e){let n=t.plugin(EE);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const CP=he.define(),NC=Q.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Qa(t,e){let n=t.plugin(ME),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const ME=qe.fromClass(class{constructor(t){this.input=t.state.facet(Ja),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(NC);this.top=new mu(t,!0,e.topContainer),this.bottom=new mu(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(NC);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new mu(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new mu(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Ja);if(n!=this.input){let i=n.filter(a=>a),r=[],o=[],s=[],l=[];for(let a of i){let c=this.specs.indexOf(a),u;c<0?(u=a(t.view),l.push(u)):(u=this.panels[c],u.update&&u.update(t)),r.push(u),(u.top?o:s).push(u)}this.specs=i,this.panels=r,this.top.sync(o),this.bottom.sync(s);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Y.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class mu{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=PC(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=PC(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function PC(t){let e=t.nextSibling;return t.remove(),e}const Ja=Q.define({enables:ME});class ir extends Fo{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ir.prototype.elementClass="";ir.prototype.toDOM=void 0;ir.prototype.mapMode=Dt.TrackBefore;ir.prototype.startSide=ir.prototype.endSide=-1;ir.prototype.point=!0;const oh=Q.define(),wP={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>xe.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},pa=Q.define();function bP(t){return[LE(),pa.of(Object.assign(Object.assign({},wP),t))]}const Yg=Q.define({combine:t=>t.some(e=>e)});function LE(t){let e=[kP];return t&&t.fixed===!1&&e.push(Yg.of(!0)),e}const kP=qe.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(pa).map(e=>new $C(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(Yg),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Yg)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=xe.iter(this.view.state.facet(oh),this.view.viewport.from),i=[],r=this.gutters.map(o=>new SP(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(o.type)){let s=!0;for(let l of o.type)if(l.type==Pt.Text&&s){Gg(n,i,l.from);for(let a of r)a.line(this.view,l,i);s=!1}else if(l.widget)for(let a of r)a.widget(this.view,l)}else if(o.type==Pt.Text){Gg(n,i,o.from);for(let s of r)s.line(this.view,o,i)}else if(o.widget)for(let s of r)s.widget(this.view,o);for(let o of r)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(pa),n=t.state.facet(pa),i=t.docChanged||t.heightChanged||t.viewportChanged||!xe.eq(t.startState.facet(oh),t.state.facet(oh),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let o of n){let s=e.indexOf(o);s<0?r.push(new $C(this.view,o)):(this.gutters[s].update(t),r.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),r.indexOf(o)<0&&o.destroy();for(let o of r)this.dom.appendChild(o.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Y.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==Ie.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function IC(t){return Array.isArray(t)?t:[t]}function Gg(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class SP{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=xe.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==r.elements.length){let l=new OE(e,s,o,i);r.elements.push(l),r.dom.appendChild(l.dom)}else r.elements[this.i].update(e,s,o,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];Gg(this.cursor,r,n.from),i.length&&(r=r.concat(i));let o=this.gutter.config.lineMarker(e,n,r);o&&r.unshift(o);let s=this.gutter;r.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n);i&&this.addElement(e,n,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class $C{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let o=r.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let a=o.getBoundingClientRect();s=(a.top+a.bottom)/2}else s=r.clientY;let l=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[i](e,l,r)&&r.preventDefault()});this.markers=IC(n.markers(e)),n.initialSpacer&&(this.spacer=new OE(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=IC(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!xe.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class OE{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),_P(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let o=0,s=0;;){let l=s,a=oo(l,a,c)||s(l,a,c):s}return i}})}});class Fp extends ir{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Np(t,e){return t.state.facet(vs).formatNumber(e,t.state)}const EP=pa.compute([vs],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(TP)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new Fp(Np(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(vs)!=e.state.facet(vs),initialSpacer(e){return new Fp(Np(e,zC(e.state.doc.lines)))},updateSpacer(e,n){let i=Np(n.view,zC(n.view.state.doc.lines));return i==e.number?e:new Fp(i)},domEventHandlers:t.facet(vs).domEventHandlers}));function AP(t={}){return[vs.of(t),LE(),EP]}function zC(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(MP.range(r)))}return xe.of(e)});function OP(){return LP}const BP=1024;let DP=0;class Pp{constructor(e,n){this.from=e,this.to=n}}class ye{constructor(e={}){this.id=DP++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Rn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}ye.closedBy=new ye({deserialize:t=>t.split(" ")});ye.openedBy=new ye({deserialize:t=>t.split(" ")});ye.group=new ye({deserialize:t=>t.split(" ")});ye.contextHash=new ye({perNode:!0});ye.lookAhead=new ye({perNode:!0});ye.mounted=new ye({perNode:!0});class nf{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[ye.mounted.id]}}const RP=Object.create(null);class Rn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):RP,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Rn(e.name||"",n,e.id,i);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(r)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(ye.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(ye.group),o=-1;o<(r?r.length:0);o++){let s=n[o<0?i.name:r[o]];if(s)return s}}}}Rn.none=new Rn("",Object.create(null),0,8);const gu=new WeakMap,jC=new WeakMap;var ht;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(ht||(ht={}));class Tt{constructor(e,n,i,r,o){if(this.type=e,this.children=n,this.positions=i,this.length=r,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,l]of o)this.props[typeof s=="number"?s:s.id]=l}}toString(){let e=nf.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let i of this.children){let r=i.toString();r&&(n&&(n+=","),n+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Qg(this.topNode,e)}cursorAt(e,n=0,i=0){let r=gu.get(this)||this.topNode,o=new Qg(r);return o.moveTo(e,n),gu.set(this,o._tree),o}get topNode(){return new On(this,0,0,null)}resolve(e,n=0){let i=Za(gu.get(this)||this.topNode,e,n,!1);return gu.set(this,i),i}resolveInner(e,n=0){let i=Za(jC.get(this)||this.topNode,e,n,!0);return jC.set(this,i),i}resolveStack(e,n=0){return PP(this,e,n)}iterate(e){let{enter:n,leave:i,from:r=0,to:o=this.length}=e,s=e.mode||0,l=(s&ht.IncludeAnonymous)>0;for(let a=this.cursor(s|ht.IncludeAnonymous);;){let c=!1;if(a.from<=o&&a.to>=r&&(!l&&a.type.isAnonymous||n(a)!==!1)){if(a.firstChild())continue;c=!0}for(;c&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Zy(Rn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new Tt(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new Tt(Rn.none,n,i,r)))}static build(e){return IP(e)}}Tt.empty=new Tt(Rn.none,[],[],0);class Qy{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Qy(this.buffer,this.index)}}class Vo{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Rn.none}toString(){let e=[];for(let n=0;n0));a=s[a+3]);return l}slice(e,n,i){let r=this.buffer,o=new Uint16Array(n-e),s=0;for(let l=e,a=0;l=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function Za(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?l.length:-1;e!=c;e+=n){let u=l[e],h=a[e]+s.from;if(BE(r,i,h,h+u.length)){if(u instanceof Vo){if(o&ht.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,n,i-h,r);if(f>-1)return new Mr(new FP(s,u,e,h),null,f)}else if(o&ht.IncludeAnonymous||!u.type.isAnonymous||Jy(u)){let f;if(!(o&ht.IgnoreMounts)&&(f=nf.get(u))&&!f.overlay)return new On(f.tree,h,e,s);let d=new On(u,h,e,s);return o&ht.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(n<0?u.children.length-1:0,n,i,r)}}}if(o&ht.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let r;if(!(i&ht.IgnoreOverlays)&&(r=nf.get(this._tree))&&r.overlay){let o=e-this.from;for(let{from:s,to:l}of r.overlay)if((n>0?s<=o:s=o:l>o))return new On(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function HC(t,e,n,i){let r=t.cursor(),o=[];if(!r.firstChild())return o;if(n!=null){for(;!r.type.is(n);)if(!r.nextSibling())return o}for(;;){if(i!=null&&r.type.is(i))return o;if(r.type.is(e)&&o.push(r.node),!r.nextSibling())return i==null?o:[]}}function Xg(t,e,n=e.length-1){for(let i=t.parent;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class FP{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class Mr extends DE{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return o<0?null:new Mr(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&ht.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Mr(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Mr(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Mr(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,o=i.buffer[this.index+3];if(o>r){let s=i.buffer[this.index+1];e.push(i.slice(r,o,s)),n.push(0)}return new Tt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function RE(t){if(!t.length)return null;if(t.length==1)return t[0];let e=0,n=t[0];for(let o=1;on.from||s.to=e){let l=new On(s.tree,s.overlay[0].from+o.from,0,null);(r||(r=[i])).push(Za(l,e,n,!1))}}return r?RE(r):i}class Qg{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof On)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof On?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&ht.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ht.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ht.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let o=n+e,s=e<0?-1:i._tree.children.length;o!=s;o+=e){let l=i._tree.children[o];if(this.mode&ht.IncludeAnonymous||l instanceof Vo||!l.type.isAnonymous||Jy(l))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let s=e;s;s=s._parent)if(s.index==r){if(r==this.index)return s;n=s,i=o+1;break e}r=this.stack[--o]}for(let r=i;r=0;o--){if(o<0)return Xg(this.node,e,r);let s=i[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[r]&&e[r]!=s.name)return!1;r--}}return!0}}function Jy(t){return t.children.some(e=>e instanceof Vo||!e.type.isAnonymous||Jy(e))}function IP(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=BP,reused:o=[],minRepeatType:s=i.types.length}=t,l=Array.isArray(n)?new Qy(n,n.length):n,a=i.types,c=0,u=0;function h(C,w,b,S,M){let{id:N,start:O,end:D,size:V}=l,K=u;for(;V<0;)if(l.next(),V==-1){let _=o[N];b.push(_),S.push(O-C);return}else if(V==-3){c=N;return}else if(V==-4){u=N;return}else throw new RangeError(`Unrecognized record size: ${V}`);let z=a[N],F,B,$=O-C;if(D-O<=r&&(B=y(l.pos-w,M))){let _=new Uint16Array(B.size-B.skip),L=l.pos-B.size,R=_.length;for(;l.pos>L;)R=v(B.start,_,R);F=new Vo(_,D-B.start,i),$=B.start-C}else{let _=l.pos-V;l.next();let L=[],R=[],H=N>=s?N:-1,J=0,X=D;for(;l.pos>_;)H>=0&&l.id==H&&l.size>=0?(l.end<=X-r&&(d(L,R,O,J,l.end,X,H,K),J=L.length,X=l.end),l.next()):h(O,_,L,R,H);if(H>=0&&J>0&&J-1&&J>0){let ae=f(z);F=Zy(z,L,R,0,L.length,0,D-O,ae,ae)}else F=p(z,L,R,D-O,K-D)}b.push(F),S.push($)}function f(C){return(w,b,S)=>{let M=0,N=w.length-1,O,D;if(N>=0&&(O=w[N])instanceof Tt){if(!N&&O.type==C&&O.length==S)return O;(D=O.prop(ye.lookAhead))&&(M=b[N]+O.length+D)}return p(C,w,b,S,M)}}function d(C,w,b,S,M,N,O,D){let V=[],K=[];for(;C.length>S;)V.push(C.pop()),K.push(w.pop()+b-M);C.push(p(i.types[O],V,K,N-M,D-N)),w.push(M-b)}function p(C,w,b,S,M=0,N){if(c){let O=[ye.contextHash,c];N=N?[O].concat(N):[O]}if(M>25){let O=[ye.lookAhead,M];N=N?[O].concat(N):[O]}return new Tt(C,w,b,S,N)}function y(C,w){let b=l.fork(),S=0,M=0,N=0,O=b.end-r,D={size:0,start:0,skip:0};e:for(let V=b.pos-C;b.pos>V;){let K=b.size;if(b.id==w&&K>=0){D.size=S,D.start=M,D.skip=N,N+=4,S+=4,b.next();continue}let z=b.pos-K;if(K<0||z=s?4:0,B=b.start;for(b.next();b.pos>z;){if(b.size<0)if(b.size==-3)F+=4;else break e;else b.id>=s&&(F+=4);b.next()}M=B,S+=K,N+=F}return(w<0||S==C)&&(D.size=S,D.start=M,D.skip=N),D.size>4?D:void 0}function v(C,w,b){let{id:S,start:M,end:N,size:O}=l;if(l.next(),O>=0&&S4){let V=l.pos-(O-4);for(;l.pos>V;)b=v(C,w,b)}w[--b]=D,w[--b]=N-C,w[--b]=M-C,w[--b]=S}else O==-3?c=S:O==-4&&(u=S);return b}let g=[],m=[];for(;l.pos>0;)h(t.start||0,t.bufferStart||0,g,m,-1);let x=(e=t.length)!==null&&e!==void 0?e:g.length?m[0]+g[0].length:0;return new Tt(a[t.topID],g.reverse(),m.reverse(),x)}const WC=new WeakMap;function sh(t,e){if(!t.isAnonymous||e instanceof Vo||e.type!=t)return 1;let n=WC.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof Tt)){n=1;break}n+=sh(t,i)}WC.set(e,n)}return n}function Zy(t,e,n,i,r,o,s,l,a){let c=0;for(let p=i;p=u)break;b+=S}if(x==C+1){if(b>u){let S=p[C];d(S.children,S.positions,0,S.children.length,y[C]+m);continue}h.push(p[C])}else{let S=y[x-1]+p[x-1].length-w;h.push(Zy(t,p,y,C,x,w,S,null,a))}f.push(w+m-o)}}return d(e,n,i,r,0),(l||a)(h,f,s)}class So{constructor(e,n,i,r,o=!1,s=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new So(0,e.length,e,0,!1,i)];for(let o of n)o.to>e.length&&r.push(o);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],o=1,s=e.length?e[0]:null;for(let l=0,a=0,c=0;;l++){let u=l=i)for(;s&&s.from=f.from||h<=f.to||c){let d=Math.max(f.from,a)-c,p=Math.min(f.to,h)-c;f=d>=p?null:new So(d,p,f.tree,f.offset+c,l>0,!!u)}if(f&&r.push(f),s.to>h)break;s=onew Pp(r.from,r.to)):[new Pp(0,0)]:[new Pp(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let o=r.advance();if(o)return o}}}class zP{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new ye({perNode:!0});let jP=0;class ci{constructor(e,n,i){this.set=e,this.base=n,this.modified=i,this.id=jP++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new ci([],null,[]);if(n.set.push(n),e)for(let i of e.set)n.set.push(i);return n}static defineModifier(){let e=new rf;return n=>n.modified.indexOf(e)>-1?n:rf.get(n.base||n,n.modified.concat(e).sort((i,r)=>i.id-r.id))}}let HP=0;class rf{constructor(){this.instances=[],this.id=HP++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(l=>l.base==e&&WP(n,l.modified));if(i)return i;let r=[],o=new ci(r,e,n);for(let l of n)l.instances.push(o);let s=VP(n);for(let l of e.set)if(!l.modified.length)for(let a of s)r.push(rf.get(l,a));return o}}function WP(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function VP(t){let e=[[]];for(let n=0;ni.length-n.length)}function qP(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let o=[],s=2,l=r;for(let h=0;;){if(l=="..."&&h>0&&h+3==r.length){s=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+r);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==r.length)break;let d=r[h++];if(h==r.length&&d=="!"){s=0;break}if(d!="/")throw new RangeError("Invalid path: "+r);l=r.slice(h)}let a=o.length-1,c=o[a];if(!c)throw new RangeError("Invalid path: "+r);let u=new of(i,s,a>0?o.slice(0,a):null);e[c]=u.sort(e[c])}}return FE.add(e)}const FE=new ye;class of{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let s=r;for(let l of o)for(let a of l.set){let c=n[a.id];if(c){s=s?s+" "+c:c;break}}return s},scope:i}}function UP(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function KP(t,e,n,i=0,r=t.length){let o=new YP(i,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}class YP{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,o){let{type:s,from:l,to:a}=e;if(l>=i||a<=n)return;s.isTop&&(o=this.highlighters.filter(d=>!d.scope||d.scope(s)));let c=r,u=GP(e)||of.empty,h=UP(o,u.tags);if(h&&(c&&(c+=" "),c+=h,u.mode==1&&(r+=(r?" ":"")+h)),this.startSpan(Math.max(n,l),c),u.opaque)return;let f=e.tree&&e.tree.prop(ye.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+l,1),p=this.highlighters.filter(v=>!v.scope||v.scope(f.tree.type)),y=e.firstChild();for(let v=0,g=l;;v++){let m=v=x||!e.nextSibling())););if(!m||x>i)break;g=m.to+l,g>n&&(this.highlightRange(d.cursor(),Math.max(n,m.from+l),Math.min(i,g),"",p),this.startSpan(Math.min(i,g),c))}y&&e.parent()}else if(e.firstChild()){f&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,o),this.startSpan(Math.min(i,e.to),c)}while(e.nextSibling());e.parent()}}}function GP(t){let e=t.type.prop(FE);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const q=ci.define,yu=q(),yr=q(),VC=q(yr),qC=q(yr),vr=q(),vu=q(vr),Ip=q(vr),li=q(),ao=q(li),oi=q(),si=q(),Jg=q(),Bl=q(Jg),xu=q(),P={comment:yu,lineComment:q(yu),blockComment:q(yu),docComment:q(yu),name:yr,variableName:q(yr),typeName:VC,tagName:q(VC),propertyName:qC,attributeName:q(qC),className:q(yr),labelName:q(yr),namespace:q(yr),macroName:q(yr),literal:vr,string:vu,docString:q(vu),character:q(vu),attributeValue:q(vu),number:Ip,integer:q(Ip),float:q(Ip),bool:q(vr),regexp:q(vr),escape:q(vr),color:q(vr),url:q(vr),keyword:oi,self:q(oi),null:q(oi),atom:q(oi),unit:q(oi),modifier:q(oi),operatorKeyword:q(oi),controlKeyword:q(oi),definitionKeyword:q(oi),moduleKeyword:q(oi),operator:si,derefOperator:q(si),arithmeticOperator:q(si),logicOperator:q(si),bitwiseOperator:q(si),compareOperator:q(si),updateOperator:q(si),definitionOperator:q(si),typeOperator:q(si),controlOperator:q(si),punctuation:Jg,separator:q(Jg),bracket:Bl,angleBracket:q(Bl),squareBracket:q(Bl),paren:q(Bl),brace:q(Bl),content:li,heading:ao,heading1:q(ao),heading2:q(ao),heading3:q(ao),heading4:q(ao),heading5:q(ao),heading6:q(ao),contentSeparator:q(li),list:q(li),quote:q(li),emphasis:q(li),strong:q(li),link:q(li),monospace:q(li),strikethrough:q(li),inserted:q(),deleted:q(),changed:q(),invalid:q(),meta:xu,documentMeta:q(xu),annotation:q(xu),processingInstruction:q(xu),definition:ci.defineModifier(),constant:ci.defineModifier(),function:ci.defineModifier(),standard:ci.defineModifier(),local:ci.defineModifier(),special:ci.defineModifier()};NE([{tag:P.link,class:"tok-link"},{tag:P.heading,class:"tok-heading"},{tag:P.emphasis,class:"tok-emphasis"},{tag:P.strong,class:"tok-strong"},{tag:P.keyword,class:"tok-keyword"},{tag:P.atom,class:"tok-atom"},{tag:P.bool,class:"tok-bool"},{tag:P.url,class:"tok-url"},{tag:P.labelName,class:"tok-labelName"},{tag:P.inserted,class:"tok-inserted"},{tag:P.deleted,class:"tok-deleted"},{tag:P.literal,class:"tok-literal"},{tag:P.string,class:"tok-string"},{tag:P.number,class:"tok-number"},{tag:[P.regexp,P.escape,P.special(P.string)],class:"tok-string2"},{tag:P.variableName,class:"tok-variableName"},{tag:P.local(P.variableName),class:"tok-variableName tok-local"},{tag:P.definition(P.variableName),class:"tok-variableName tok-definition"},{tag:P.special(P.variableName),class:"tok-variableName2"},{tag:P.definition(P.propertyName),class:"tok-propertyName tok-definition"},{tag:P.typeName,class:"tok-typeName"},{tag:P.namespace,class:"tok-namespace"},{tag:P.className,class:"tok-className"},{tag:P.macroName,class:"tok-macroName"},{tag:P.propertyName,class:"tok-propertyName"},{tag:P.operator,class:"tok-operator"},{tag:P.comment,class:"tok-comment"},{tag:P.meta,class:"tok-meta"},{tag:P.invalid,class:"tok-invalid"},{tag:P.punctuation,class:"tok-punctuation"}]);var $p;const Ql=new ye,XP=new ye;class di{constructor(e,n,i=[],r=""){this.data=e,this.name=r,pe.prototype.hasOwnProperty("tree")||Object.defineProperty(pe.prototype,"tree",{get(){return Mt(this)}}),this.parser=n,this.extension=[Yr.of(this),pe.languageData.of((o,s,l)=>{let a=UC(o,s,l),c=a.type.prop(Ql);if(!c)return[];let u=o.facet(c),h=a.type.prop(XP);if(h){let f=a.resolve(s-a.from,l);for(let d of h)if(d.test(f,o)){let p=o.facet(d.facet);return d.type=="replace"?p:p.concat(u)}}return u})].concat(i)}isActiveAt(e,n,i=-1){return UC(e,n,i).type.prop(Ql)==this.data}findRegions(e){let n=e.facet(Yr);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(o,s)=>{if(o.prop(Ql)==this.data){i.push({from:s,to:s+o.length});return}let l=o.prop(ye.mounted);if(l){if(l.tree.prop(Ql)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+s,to:a.to+s});else i.push({from:s,to:s+o.length});return}else if(l.overlay){let a=i.length;if(r(l.tree,l.overlay[0].from+s),i.length>a)return}}for(let a=0;a=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Dl=null;class sf{constructor(e,n,i=[],r,o,s,l,a){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new sf(e,n,[],Tt.empty,0,i,[],null)}startParse(){return this.parser.startParse(new QP(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Tt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(So.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Dl;Dl=this;try{return e()}finally{Dl=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=KC(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:o,viewport:s,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((c,u,h,f)=>a.push({fromA:c,toA:u,fromB:h,toB:f})),i=So.applyChanges(i,a),r=Tt.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){l=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),h=e.mapPos(c.to,-1);ue.from&&(this.fragments=KC(this.fragments,r,o),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends $P{createParse(n,i,r){let o=r[0].from,s=r[r.length-1].to;return{parsedPos:o,advance(){let a=Dl;if(a){for(let c of r)a.tempSkipped.push(c);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=s,new Tt(Rn.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Dl}}function KC(t,e,n){return So.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class qs{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new qs(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=sf.create(e.facet(Yr).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new qs(i)}}di.state=pt.define({create:qs.init,update(t,e){for(let n of e.effects)if(n.is(di.setState))return n.value;return e.startState.facet(Yr)!=e.state.facet(Yr)?qs.init(e.state):t.apply(e)}});let PE=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(PE=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const zp=typeof navigator<"u"&&(!(($p=navigator.scheduling)===null||$p===void 0)&&$p.isInputPending)?()=>navigator.scheduling.isInputPending():null,JP=qe.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(di.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(di.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=PE(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,a=o.context.work(()=>zp&&zp()||Date.now()>s,r+(l?0:1e5));this.chunkBudget-=Date.now()-n,(a||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:di.setState.of(new qs(o.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Yn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Yr=Q.define({combine(t){return t.length?t[0]:null},enables:t=>[di.state,JP,Y.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]}),ZP=Q.define(),fd=Q.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function lf(t){let e=t.facet(fd);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function ec(t,e){let n="",i=t.tabSize,r=t.facet(fd)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let o=0;o=e?t5(t,n,e):null}class dd{constructor(e,n={}){this.state=e,this.options=n,this.unit=lf(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return r!=null&&r>=i.from&&r<=i.to?o&&r==e?{text:"",from:e}:(n<0?r-1&&(o+=s-this.countColumn(i,i.search(/\S|$/))),o}countColumn(e,n=e.length){return ul(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(r);if(s>-1)return s}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const e5=new ye;function t5(t,e,n){let i=e.resolveStack(n),r=i.node.enterUnfinishedNodesBefore(n);if(r!=i.node){let o=[];for(let s=r;s!=i.node;s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)i={node:o[s],next:i}}return IE(i,t,n)}function IE(t,e,n){for(let i=t;i;i=i.next){let r=i5(i.node);if(r)return r(tv.create(e,n,i))}return 0}function n5(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function i5(t){let e=t.type.prop(e5);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(ye.closedBy))){let r=t.lastChild,o=r&&i.indexOf(r.name)>-1;return s=>l5(s,!0,1,void 0,o&&!n5(s)?r.from:void 0)}return t.parent==null?r5:null}function r5(){return 0}class tv extends dd{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new tv(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(o5(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return IE(this.context.next,this.base,this.pos)}}function o5(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function s5(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=r==null||r<=o.from?o.to:Math.min(o.to,r);for(let l=n.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped)return a.from{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+a5)return t;let o=n.sliceString(r.from,i);if(!e.some(c=>c.test(o)))return t;let{state:s}=t,l=-1,a=[];for(let{head:c}of s.selection.ranges){let u=s.doc.lineAt(c);if(u.from==l)continue;l=u.from;let h=ev(s,u.from);if(h==null)continue;let f=/^\s*/.exec(u.text)[0],d=ec(s,h);f!=d&&a.push({from:u.from,to:u.from+f.length,insert:d})}return a.length?[t,{changes:a,sequential:!0}]:t})}const u5=Q.define(),h5=new ye;function f5(t,e,n){let i=Mt(t);if(i.lengthn)continue;if(o&&l.from=e&&c.to>n&&(o=c)}}return o}function d5(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function af(t,e,n){for(let i of t.facet(u5)){let r=i(t,e,n);if(r)return r}return f5(t,e,n)}function $E(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const pd=he.define({map:$E}),_c=he.define({map:$E});function zE(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Po=pt.define({create(){return se.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(pd)&&!p5(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(nv),r=i?se.replace({widget:new w5(i(e.state,n.value))}):YC;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(_c)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:i}=e.selection.main;t.between(i,i,(r,o)=>{ri&&(n=!0)}),n&&(t=t.update({filterFrom:i,filterTo:i,filter:(r,o)=>o<=i||r>=i}))}return t},provide:t=>Y.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!r||r.from>o)&&(r={from:o,to:s})}),r}function p5(t,e,n){let i=!1;return t.between(e,e,(r,o)=>{r==e&&o==n&&(i=!0)}),i}function jE(t,e){return t.field(Po,!1)?e:e.concat(he.appendConfig.of(WE()))}const m5=t=>{for(let e of zE(t)){let n=af(t.state,e.from,e.to);if(n)return t.dispatch({effects:jE(t.state,[pd.of(n),HE(t,n)])}),!0}return!1},g5=t=>{if(!t.state.field(Po,!1))return!1;let e=[];for(let n of zE(t)){let i=cf(t.state,n.from,n.to);i&&e.push(_c.of(i),HE(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function HE(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return Y.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const y5=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(Po,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(_c.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},x5=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:m5},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:g5},{key:"Ctrl-Alt-[",run:y5},{key:"Ctrl-Alt-]",run:v5}],C5={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},nv=Q.define({combine(t){return Ei(t,C5)}});function WE(t){let e=[Po,S5];return t&&e.push(nv.of(t)),e}function VE(t,e){let{state:n}=t,i=n.facet(nv),r=s=>{let l=t.lineBlockAt(t.posAtDOM(s.target)),a=cf(t.state,l.from,l.to);a&&t.dispatch({effects:_c.of(a)}),s.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let o=document.createElement("span");return o.textContent=i.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=r,o}const YC=se.replace({widget:new class extends cr{toDOM(t){return VE(t,null)}}});class w5 extends cr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return VE(e,this.value)}}const b5={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class jp extends ir{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function k5(t={}){let e=Object.assign(Object.assign({},b5),t),n=new jp(e,!0),i=new jp(e,!1),r=qe.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Yr)!=s.state.facet(Yr)||s.startState.field(Po,!1)!=s.state.field(Po,!1)||Mt(s.startState)!=Mt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let l=new Vr;for(let a of s.viewportLineBlocks){let c=cf(s.state,a.from,a.to)?i:af(s.state,a.from,a.to)?n:null;c&&l.add(a.from,a.from,c)}return l.finish()}}),{domEventHandlers:o}=e;return[r,bP({class:"cm-foldGutter",markers(s){var l;return((l=s.plugin(r))===null||l===void 0?void 0:l.markers)||xe.empty},initialSpacer(){return new jp(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,l,a)=>{if(o.click&&o.click(s,l,a))return!0;let c=cf(s.state,l.from,l.to);if(c)return s.dispatch({effects:_c.of(c)}),!0;let u=af(s.state,l.from,l.to);return u?(s.dispatch({effects:pd.of(u)}),!0):!1}})}),WE()]}const S5=Y.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Tc{constructor(e,n){this.specs=e;let i;function r(l){let a=qr.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const o=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,s=n.scope;this.scope=s instanceof di?l=>l.prop(Ql)==s.data:s?l=>l==s:void 0,this.style=NE(e.map(l=>({tag:l.tag,class:l.class||r(Object.assign({},l,{tag:null}))})),{all:o}).style,this.module=i?new qr(i):null,this.themeType=n.themeType}static define(e,n){return new Tc(e,n||{})}}const Zg=Q.define(),qE=Q.define({combine(t){return t.length?[t[0]]:null}});function Hp(t){let e=t.facet(Zg);return e.length?e:t.facet(qE)}function UE(t,e){let n=[T5],i;return t instanceof Tc&&(t.module&&n.push(Y.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(qE.of(t)):i?n.push(Zg.computeN([Y.darkTheme],r=>r.facet(Y.darkTheme)==(i=="dark")?[t]:[])):n.push(Zg.of(t)),n}class _5{constructor(e){this.markCache=Object.create(null),this.tree=Mt(e.state),this.decorations=this.buildDeco(e,Hp(e.state))}update(e){let n=Mt(e.state),i=Hp(e.state),r=i!=Hp(e.startState);n.length{i.add(s,l,this.markCache[a]||(this.markCache[a]=se.mark({class:a})))},r,o);return i.finish()}}const T5=cl.high(qe.fromClass(_5,{decorations:t=>t.decorations})),E5=Tc.define([{tag:P.meta,color:"#404740"},{tag:P.link,textDecoration:"underline"},{tag:P.heading,textDecoration:"underline",fontWeight:"bold"},{tag:P.emphasis,fontStyle:"italic"},{tag:P.strong,fontWeight:"bold"},{tag:P.strikethrough,textDecoration:"line-through"},{tag:P.keyword,color:"#708"},{tag:[P.atom,P.bool,P.url,P.contentSeparator,P.labelName],color:"#219"},{tag:[P.literal,P.inserted],color:"#164"},{tag:[P.string,P.deleted],color:"#a11"},{tag:[P.regexp,P.escape,P.special(P.string)],color:"#e40"},{tag:P.definition(P.variableName),color:"#00f"},{tag:P.local(P.variableName),color:"#30a"},{tag:[P.typeName,P.namespace],color:"#085"},{tag:P.className,color:"#167"},{tag:[P.special(P.variableName),P.macroName],color:"#256"},{tag:P.definition(P.propertyName),color:"#00c"},{tag:P.comment,color:"#940"},{tag:P.invalid,color:"#f00"}]),A5=Y.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),KE=1e4,YE="()[]{}",GE=Q.define({combine(t){return Ei(t,{afterCursor:!0,brackets:YE,maxScanDistance:KE,renderMatch:O5})}}),M5=se.mark({class:"cm-matchingBracket"}),L5=se.mark({class:"cm-nonmatchingBracket"});function O5(t){let e=[],n=t.matched?M5:L5;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const B5=pt.define({create(){return se.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(GE);for(let r of e.state.selection.ranges){if(!r.empty)continue;let o=pi(e.state,r.head,-1,i)||r.head>0&&pi(e.state,r.head-1,1,i)||i.afterCursor&&(pi(e.state,r.head,1,i)||r.headY.decorations.from(t)}),D5=[B5,A5];function R5(t={}){return[GE.of(t),D5]}const F5=new ye;function e0(t,e,n){let i=t.prop(e<0?ye.openedBy:ye.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function t0(t){let e=t.type.prop(F5);return e?e(t.node):t}function pi(t,e,n,i={}){let r=i.maxScanDistance||KE,o=i.brackets||YE,s=Mt(t),l=s.resolveInner(e,n);for(let a=l;a;a=a.parent){let c=e0(a.type,n,o);if(c&&a.from0?e>=u.from&&eu.from&&e<=u.to))return N5(t,e,n,a,u,c,o)}}return P5(t,e,n,s,l.type,r,o)}function N5(t,e,n,i,r,o,s){let l=i.parent,a={from:r.from,to:r.to},c=0,u=l==null?void 0:l.cursor();if(u&&(n<0?u.childBefore(i.from):u.childAfter(i.to)))do if(n<0?u.to<=i.from:u.from>=i.to){if(c==0&&o.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let f=0;!u.next().done&&f<=o;){let d=u.value;n<0&&(f+=d.length);let p=e+f*n;for(let y=n>0?0:d.length-1,v=n>0?d.length:-1;y!=v;y+=n){let g=s.indexOf(d[y]);if(!(g<0||i.resolveInner(p+y,1).type!=r))if(g%2==0==n>0)h++;else{if(h==1)return{start:c,end:{from:p+y,to:p+y+1},matched:g>>1==a>>1};h--}}n>0&&(f+=d.length)}return u.done?{start:c,matched:!1}:null}const I5=Object.create(null),GC=[Rn.none],XC=[],$5=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])$5[t]=z5(I5,e);function Wp(t,e){XC.indexOf(t)>-1||(XC.push(t),console.warn(e))}function z5(t,e){let n=[];for(let o of e.split(" ")){let s=[];for(let l of o.split(".")){let a=t[l]||P[l];a?typeof a=="function"?s.length?s=s.map(a):Wp(l,`Modifier ${l} used at start of tag`):s.length?Wp(l,`Tag ${l} used as modifier`):s=Array.isArray(a)?a:[a]:Wp(l,`Unknown highlighting tag ${l}`)}for(let l of s)n.push(l)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=Rn.define({id:GC.length,name:i,props:[qP({[i]:n})]});return GC.push(r),r.id}const j5=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=rv(t.state,n.from);return i.line?H5(t):i.block?V5(t):!1};function iv(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const H5=iv(K5,0),W5=iv(XE,0),V5=iv((t,e)=>XE(t,e,U5(e)),0);function rv(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Rl=50;function q5(t,{open:e,close:n},i,r){let o=t.sliceDoc(i-Rl,i),s=t.sliceDoc(r,r+Rl),l=/\s*$/.exec(o)[0].length,a=/^\s*/.exec(s)[0].length,c=o.length-l;if(o.slice(c-e.length,c)==e&&s.slice(a,a+n.length)==n)return{open:{pos:i-l,margin:l&&1},close:{pos:r+a,margin:a&&1}};let u,h;r-i<=2*Rl?u=h=t.sliceDoc(i,r):(u=t.sliceDoc(i,i+Rl),h=t.sliceDoc(r-Rl,r));let f=/^\s*/.exec(u)[0].length,d=/\s*$/.exec(h)[0].length,p=h.length-d-n.length;return u.slice(f,f+e.length)==e&&h.slice(p,p+n.length)==n?{open:{pos:i+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:r-d-n.length,margin:/\s/.test(h.charAt(p-1))?1:0}}:null}function U5(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to),o=e.length-1;o>=0&&e[o].to>i.from?e[o].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function XE(t,e,n=e.selection.ranges){let i=n.map(o=>rv(e,o.from).block);if(!i.every(o=>o))return null;let r=n.map((o,s)=>q5(e,i[s],o.from,o.to));if(t!=2&&!r.every(o=>o))return{changes:e.changes(n.map((o,s)=>r[s]?[]:[{from:o.from,insert:i[s].open+" "},{from:o.to,insert:" "+i[s].close}]))};if(t!=1&&r.some(o=>o)){let o=[];for(let s=0,l;sr&&(o==s||s>h.from)){r=h.from;let f=/^\s*/.exec(h.text)[0].length,d=f==h.length,p=h.text.slice(f,f+c.length)==c?f:-1;fo.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:l,token:a,indent:c,empty:u,single:h}of i)(h||!u)&&o.push({from:l.from+c,insert:a+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&i.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:l,token:a}of i)if(l>=0){let c=s.from+l,u=c+a.length;s.text[u-s.from]==" "&&u++,o.push({from:c,to:u})}return{changes:o}}return null}const n0=Ti.define(),Y5=Ti.define(),G5=Q.define(),QE=Q.define({combine(t){return Ei(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}});function X5(t){let e=0;return t.iterChangedRanges((n,i)=>e=i),e}const JE=pt.define({create(){return mi.empty},update(t,e){let n=e.state.facet(QE),i=e.annotation(n0);if(i){let a=e.docChanged?I.single(X5(e.changes)):void 0,c=Gt.fromTransaction(e,a),u=i.side,h=u==0?t.undone:t.done;return c?h=uf(h,h.length,n.minDepth,c):h=tA(h,e.startState.selection),new mi(u==0?i.rest:h,u==0?h:i.rest)}let r=e.annotation(Y5);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(tt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Gt.fromTransaction(e),s=e.annotation(tt.time),l=e.annotation(tt.userEvent);return o?t=t.addChanges(o,s,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,l,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new mi(t.done.map(Gt.fromJSON),t.undone.map(Gt.fromJSON))}});function Q5(t={}){return[JE,QE.of(t),Y.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?ZE:e.inputType=="historyRedo"?i0:null;return i?(e.preventDefault(),i(n)):!1}})]}function md(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(JE,!1);if(!r)return!1;let o=r.pop(t,n,e);return o?(i(o),!0):!1}}const ZE=md(0,!1),i0=md(1,!1),J5=md(0,!0),Z5=md(1,!0);class Gt{constructor(e,n,i,r,o){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new Gt(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new Gt(e.changes&&Je.fromJSON(e.changes),[],e.mapped&&vi.fromJSON(e.mapped),e.startSelection&&I.fromJSON(e.startSelection),e.selectionsAfter.map(I.fromJSON))}static fromTransaction(e,n){let i=An;for(let r of e.startState.facet(G5)){let o=r(e);o.length&&(i=i.concat(o))}return!i.length&&e.changes.empty?null:new Gt(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,An)}static selection(e){return new Gt(void 0,An,void 0,void 0,e)}}function uf(t,e,n,i){let r=e+1>n+20?e-n-1:0,o=t.slice(r,e);return o.push(i),o}function eI(t,e){let n=[],i=!1;return t.iterChangedRanges((r,o)=>n.push(r,o)),e.iterChangedRanges((r,o,s,l)=>{for(let a=0;a=c&&s<=u&&(i=!0)}}),i}function tI(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function eA(t,e){return t.length?e.length?t.concat(e):t:e}const An=[],nI=200;function tA(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-nI));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),uf(t,t.length-1,1e9,n.setSelAfter(i)))}else return[Gt.selection([e])]}function iI(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Vp(t,e){if(!t.length)return t;let n=t.length,i=An;for(;n;){let r=rI(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let o=t.slice(0,n);return o[n-1]=r,o}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[Gt.selection(i)]:An}function rI(t,e,n){let i=eA(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):An,n);if(!t.changes)return Gt.selection(i);let r=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new Gt(r,he.mapEffects(t.effects,e),s,t.startSelection.map(o),i)}const oI=/^(input\.type|delete)($|\.)/;class mi{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new mi(this.done,this.undone):this}addChanges(e,n,i,r,o){let s=this.done,l=s[s.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||oI.test(i))&&(!l.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):gd(n,e))}function Lt(t){return t.textDirectionAt(t.state.selection.main.head)==Ie.LTR}const iA=t=>nA(t,!Lt(t)),rA=t=>nA(t,Lt(t));function oA(t,e){return Zn(t,n=>n.empty?t.moveByGroup(n,e):gd(n,e))}const lI=t=>oA(t,!Lt(t)),aI=t=>oA(t,Lt(t));function cI(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function yd(t,e,n){let i=Mt(t).resolveInner(e.head),r=n?ye.closedBy:ye.openedBy;for(let a=e.head;;){let c=n?i.childAfter(a):i.childBefore(a);if(!c)break;cI(t,c,r)?i=c:a=n?c.to:c.from}let o=i.type.prop(r),s,l;return o&&(s=n?pi(t,i.from,1):pi(t,i.to,-1))&&s.matched?l=n?s.end.to:s.end.from:l=n?i.to:i.from,I.cursor(l,n?-1:1)}const uI=t=>Zn(t,e=>yd(t.state,e,!Lt(t))),hI=t=>Zn(t,e=>yd(t.state,e,Lt(t)));function sA(t,e){return Zn(t,n=>{if(!n.empty)return gd(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const lA=t=>sA(t,!1),aA=t=>sA(t,!0);function cA(t){let e=t.scrollDOM.clientHeights.empty?t.moveVertically(s,e,n.height):gd(s,e));if(r.eq(i.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(i.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,c=l.bottom-n.marginBottom;s&&s.top>a&&s.bottomuA(t,!1),r0=t=>uA(t,!0);function no(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let o=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;o&&e.head!=i.from+o&&(r=I.cursor(i.from+o))}return r}const fI=t=>Zn(t,e=>no(t,e,!0)),dI=t=>Zn(t,e=>no(t,e,!1)),pI=t=>Zn(t,e=>no(t,e,!Lt(t))),mI=t=>Zn(t,e=>no(t,e,Lt(t))),gI=t=>Zn(t,e=>I.cursor(t.lineBlockAt(e.head).from,1)),yI=t=>Zn(t,e=>I.cursor(t.lineBlockAt(e.head).to,-1));function vI(t,e,n){let i=!1,r=hl(t.selection,o=>{let s=pi(t,o.head,-1)||pi(t,o.head,1)||o.head>0&&pi(t,o.head-1,1)||o.headvI(t,e,!1);function $n(t,e){let n=hl(t.state.selection,i=>{let r=e(i);return I.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Ai(t.state,n)),!0)}function hA(t,e){return $n(t,n=>t.moveByChar(n,e))}const fA=t=>hA(t,!Lt(t)),dA=t=>hA(t,Lt(t));function pA(t,e){return $n(t,n=>t.moveByGroup(n,e))}const CI=t=>pA(t,!Lt(t)),wI=t=>pA(t,Lt(t)),bI=t=>$n(t,e=>yd(t.state,e,!Lt(t))),kI=t=>$n(t,e=>yd(t.state,e,Lt(t)));function mA(t,e){return $n(t,n=>t.moveVertically(n,e))}const gA=t=>mA(t,!1),yA=t=>mA(t,!0);function vA(t,e){return $n(t,n=>t.moveVertically(n,e,cA(t).height))}const JC=t=>vA(t,!1),ZC=t=>vA(t,!0),SI=t=>$n(t,e=>no(t,e,!0)),_I=t=>$n(t,e=>no(t,e,!1)),TI=t=>$n(t,e=>no(t,e,!Lt(t))),EI=t=>$n(t,e=>no(t,e,Lt(t))),AI=t=>$n(t,e=>I.cursor(t.lineBlockAt(e.head).from)),MI=t=>$n(t,e=>I.cursor(t.lineBlockAt(e.head).to)),ew=({state:t,dispatch:e})=>(e(Ai(t,{anchor:0})),!0),tw=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.doc.length})),!0),nw=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.selection.main.anchor,head:0})),!0),iw=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),LI=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),OI=({state:t,dispatch:e})=>{let n=vd(t).map(({from:i,to:r})=>I.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:I.create(n),userEvent:"select"})),!0},BI=({state:t,dispatch:e})=>{let n=hl(t.selection,i=>{var r;let o=Mt(t).resolveStack(i.from,1);for(let s=o;s;s=s.next){let{node:l}=s;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&(!((r=l.parent)===null||r===void 0)&&r.parent))return I.range(l.to,l.from)}return i});return e(Ai(t,n)),!0},DI=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=I.create([n.main]):n.main.empty||(i=I.create([I.cursor(n.main.head)])),i?(e(Ai(t,i)),!0):!1};function Ec(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(o=>{let{from:s,to:l}=o;if(s==l){let a=e(o);as&&(n="delete.forward",a=Cu(t,a,!0)),s=Math.min(s,a),l=Math.max(l,a)}else s=Cu(t,s,!1),l=Cu(t,l,!0);return s==l?{range:o}:{changes:{from:s,to:l},range:I.cursor(s,sr(t)))i.between(e,e,(r,o)=>{re&&(e=n?o:r)});return e}const xA=(t,e)=>Ec(t,n=>{let i=n.from,{state:r}=t,o=r.doc.lineAt(i),s,l;if(!e&&i>o.from&&ixA(t,!1),CA=t=>xA(t,!0),wA=(t,e)=>Ec(t,n=>{let i=n.head,{state:r}=t,o=r.doc.lineAt(i),s=r.charCategorizer(i);for(let l=null;;){if(i==(e?o.to:o.from)){i==n.head&&o.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let a=_t(o.text,i-o.from,e)+o.from,c=o.text.slice(Math.min(i,a)-o.from,Math.max(i,a)-o.from),u=s(c);if(l!=null&&u!=l)break;(c!=" "||i!=n.head)&&(l=u),i=a}return i}),bA=t=>wA(t,!1),RI=t=>wA(t,!0),FI=t=>Ec(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headEc(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),PI=t=>Ec(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:ve.of(["",""])},range:I.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},$I=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,o=t.doc.lineAt(r),s=r==o.from?r-1:_t(o.text,r-o.from,!1)+o.from,l=r==o.to?r+1:_t(o.text,r-o.from,!0)+o.from;return{changes:{from:s,to:l,insert:t.doc.slice(r,l).append(t.doc.slice(s,r))},range:I.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function vd(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),o=t.doc.lineAt(i.to);if(!i.empty&&i.to==o.from&&(o=t.doc.lineAt(i.to-1)),n>=r.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(i)}else e.push({from:r.from,to:o.to,ranges:[i]});n=o.number+1}return e}function kA(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let o of vd(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),l=s.length+1;if(n){i.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let a of o.ranges)r.push(I.range(Math.min(t.doc.length,a.anchor+l),Math.min(t.doc.length,a.head+l)))}else{i.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let a of o.ranges)r.push(I.range(a.anchor-l,a.head-l))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:I.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const zI=({state:t,dispatch:e})=>kA(t,e,!1),jI=({state:t,dispatch:e})=>kA(t,e,!0);function SA(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of vd(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const HI=({state:t,dispatch:e})=>SA(t,e,!1),WI=({state:t,dispatch:e})=>SA(t,e,!0),VI=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(vd(e).map(({from:r,to:o})=>(r>0?r--:ot.moveVertically(r,!0)).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function qI(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Mt(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),o;return i&&r&&i.to<=e&&r.from>=e&&(o=i.type.prop(ye.closedBy))&&o.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const UI=_A(!1),KI=_A(!0);function _A(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:o,to:s}=r,l=e.doc.lineAt(o),a=!t&&o==s&&qI(e,o);t&&(o=s=(s<=l.to?l:e.doc.lineAt(s)).to);let c=new dd(e,{simulateBreak:o,simulateDoubleBreak:!!a}),u=ev(c,o);for(u==null&&(u=ul(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));sl.from&&o{let r=[];for(let s=i.from;s<=i.to;){let l=t.doc.lineAt(s);l.number>n&&(i.empty||i.to>l.from)&&(e(l,r,i),n=l.number),s=l.to+1}let o=t.changes(r);return{changes:r,range:I.range(o.mapPos(i.anchor,1),o.mapPos(i.head,1))}})}const YI=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new dd(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),r=ov(t,(o,s,l)=>{let a=ev(i,o.from);if(a==null)return;/\S/.test(o.text)||(a=0);let c=/^\s*/.exec(o.text)[0],u=ec(t,a);(c!=u||l.fromt.readOnly?!1:(e(t.update(ov(t,(n,i)=>{i.push({from:n.from,insert:t.facet(fd)})}),{userEvent:"input.indent"})),!0),EA=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(ov(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let o=ul(r,t.tabSize),s=0,l=ec(t,Math.max(0,o-lf(t)));for(;s({mac:t.key,run:t.run,shift:t.shift}))),QI=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:uI,shift:bI},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:hI,shift:kI},{key:"Alt-ArrowUp",run:zI},{key:"Shift-Alt-ArrowUp",run:HI},{key:"Alt-ArrowDown",run:jI},{key:"Shift-Alt-ArrowDown",run:WI},{key:"Escape",run:DI},{key:"Mod-Enter",run:KI},{key:"Alt-l",mac:"Ctrl-l",run:OI},{key:"Mod-i",run:BI,preventDefault:!0},{key:"Mod-[",run:EA},{key:"Mod-]",run:TA},{key:"Mod-Alt-\\",run:YI},{key:"Shift-Mod-k",run:VI},{key:"Shift-Mod-\\",run:xI},{key:"Mod-/",run:j5},{key:"Alt-A",run:W5}].concat(XI),JI={key:"Tab",run:TA,shift:EA};function Te(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;et.normalize("NFKD"):t=>t;class Us{constructor(e,n,i=0,r=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=o?l=>o(rw(l)):rw,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ct(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=zy(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Tn(e);let r=this.normalize(n);for(let o=0,s=i;;o++){let l=r.charCodeAt(o),a=this.match(l,s);if(o==r.length-1){if(a)return this.value=a,this;break}s==i&&othis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=hf(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let l=new Os(n,e.sliceString(n,i));return qp.set(e,l),l}if(r.from==n&&r.to==i)return r;let{text:o,from:s}=r;return s>n&&(o=e.sliceString(n,s)+o,s=n),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=hf(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Os.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(LA.prototype[Symbol.iterator]=OA.prototype[Symbol.iterator]=function(){return this});function ZI(t){try{return new RegExp(t,sv),!0}catch{return!1}}function hf(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function s0(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=Te("input",{class:"cm-textfield",name:"line",value:e}),i=Te("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:ff.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),r())},onsubmit:o=>{o.preventDefault(),r()}},Te("label",t.state.phrase("Go to line"),": ",n)," ",Te("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function r(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,l=s.doc.lineAt(s.selection.main.head),[,a,c,u,h]=o,f=u?+u.slice(1):0,d=c?+c:l.number;if(c&&h){let v=d/100;a&&(v=v*(a=="-"?-1:1)+l.number/s.doc.lines),d=Math.round(s.doc.lines*v)}else c&&a&&(d=d*(a=="-"?-1:1)+l.number);let p=s.doc.line(Math.max(1,Math.min(s.doc.lines,d))),y=I.cursor(p.from+Math.max(0,Math.min(f,p.length)));t.dispatch({effects:[ff.of(!1),Y.scrollIntoView(y.from,{y:"center"})],selection:y}),t.focus()}return{dom:i}}const ff=he.define(),ow=pt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(ff)&&(t=n.value);return t},provide:t=>Ja.from(t,e=>e?s0:null)}),e4=t=>{let e=Qa(t,s0);if(!e){let n=[ff.of(!0)];t.state.field(ow,!1)==null&&n.push(he.appendConfig.of([ow,t4])),t.dispatch({effects:n}),e=Qa(t,s0)}return e&&e.dom.querySelector("input").select(),!0},t4=Y.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),n4={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},BA=Q.define({combine(t){return Ei(t,n4,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function i4(t){let e=[a4,l4];return t&&e.push(BA.of(t)),e}const r4=se.mark({class:"cm-selectionMatch"}),o4=se.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function sw(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=Re.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=Re.Word)}function s4(t,e,n,i){return t(e.sliceDoc(n,n+1))==Re.Word&&t(e.sliceDoc(i-1,i))==Re.Word}const l4=qe.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(BA),{state:n}=t,i=n.selection;if(i.ranges.length>1)return se.none;let r=i.main,o,s=null;if(r.empty){if(!e.highlightWordAroundCursor)return se.none;let a=n.wordAt(r.head);if(!a)return se.none;s=n.charCategorizer(r.head),o=n.sliceDoc(a.from,a.to)}else{let a=r.to-r.from;if(a200)return se.none;if(e.wholeWords){if(o=n.sliceDoc(r.from,r.to),s=n.charCategorizer(r.head),!(sw(s,n,r.from,r.to)&&s4(s,n,r.from,r.to)))return se.none}else if(o=n.sliceDoc(r.from,r.to).trim(),!o)return se.none}let l=[];for(let a of t.visibleRanges){let c=new Us(n.doc,o,a.from,a.to);for(;!c.next().done;){let{from:u,to:h}=c.value;if((!s||sw(s,n,u,h))&&(r.empty&&u<=r.from&&h>=r.to?l.push(o4.range(u,h)):(u>=r.to||h<=r.from)&&l.push(r4.range(u,h)),l.length>e.maxMatches))return se.none}}return se.set(l)}},{decorations:t=>t.decorations}),a4=Y.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),c4=({state:t,dispatch:e})=>{let{selection:n}=t,i=I.create(n.ranges.map(r=>t.wordAt(r.head)||I.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function u4(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),o=r&&r.from==n.from&&r.to==n.to;for(let s=!1,l=new Us(t.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(s)return null;l=new Us(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),s=!0}else{if(s&&i.some(a=>a.from==l.value.from))continue;if(o){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const h4=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return c4({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=i))return!1;let r=u4(t,i);return r?(e(t.update({selection:t.selection.addRange(I.range(r.from,r.to),!1),effects:Y.scrollIntoView(r.to)})),!0):!1},fl=Q.define({combine(t){return Ei(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new k4(e),scrollToMatch:e=>Y.scrollIntoView(e)})}});class DA{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||ZI(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` -`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new m4(this):new d4(this)}getCursor(e,n=0,i){let r=e.doc?e:pe.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?os(this,r,n,i):rs(this,r,n,i)}}class RA{constructor(e){this.spec=e}}function rs(t,e,n,i){return new Us(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?f4(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function f4(t,e){return(n,i,r,o)=>((o>n||o+r.length=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let o=rs(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function os(t,e,n,i){return new LA(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?p4(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function df(t,e){return t.slice(_t(t,e,!1),e)}function pf(t,e){return t.slice(e,_t(t,e))}function p4(t){return(e,n,i)=>!i[0].length||(t(df(i.input,i.index))!=Re.Word||t(pf(i.input,i.index))!=Re.Word)&&(t(pf(i.input,i.index+i[0].length))!=Re.Word||t(df(i.input,i.index+i[0].length))!=Re.Word)}class m4 extends RA{nextMatch(e,n,i){let r=os(this.spec,e,i,e.doc.length).next();return r.done&&(r=os(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let o=Math.max(n,i-r*1e4),s=os(this.spec,e,o,i),l=null;for(;!s.next().done;)l=s.value;if(l&&(o==n||l.from>o+10))return l;if(o==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let o=os(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const tc=he.define(),lv=he.define(),$r=pt.define({create(t){return new Up(l0(t).create(),null)},update(t,e){for(let n of e.effects)n.is(tc)?t=new Up(n.value.create(),t.panel):n.is(lv)&&(t=new Up(t.query,n.value?av:null));return t},provide:t=>Ja.from(t,e=>e.panel)});class Up{constructor(e,n){this.query=e,this.panel=n}}const g4=se.mark({class:"cm-searchMatch"}),y4=se.mark({class:"cm-searchMatch cm-searchMatch-selected"}),v4=qe.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field($r))}update(t){let e=t.state.field($r);(e!=t.startState.field($r)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return se.none;let{view:n}=this,i=new Vr;for(let r=0,o=n.visibleRanges,s=o.length;ro[r+1].from-2*250;)a=o[++r].to;t.highlight(n.state,l,a,(c,u)=>{let h=n.state.selection.ranges.some(f=>f.from==c&&f.to==u);i.add(c,u,h?y4:g4)})}return i.finish()}},{decorations:t=>t.decorations});function Ac(t){return e=>{let n=e.state.field($r,!1);return n&&n.query.spec.valid?t(e,n):PA(e)}}const mf=Ac((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=I.single(i.from,i.to),o=t.state.facet(fl);return t.dispatch({selection:r,effects:[cv(t,i),o.scrollToMatch(r.main,t)],userEvent:"select.search"}),NA(t),!0}),gf=Ac((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let o=I.single(r.from,r.to),s=t.state.facet(fl);return t.dispatch({selection:o,effects:[cv(t,r),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),NA(t),!0}),x4=Ac((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:I.create(n.map(i=>I.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),C4=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,o=[],s=0;for(let l=new Us(t.doc,t.sliceDoc(i,r));!l.next().done;){if(o.length>1e3)return!1;l.value.from==i&&(s=o.length),o.push(I.range(l.value.from,l.value.to))}return e(t.update({selection:I.create(o,s),userEvent:"select.search.matches"})),!0},lw=Ac((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,i,i);if(!o)return!1;let s=[],l,a,c=[];if(o.from==i&&o.to==r&&(a=n.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:a}),o=e.nextMatch(n,o.from,o.to),c.push(Y.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),o){let u=s.length==0||s[0].from>=o.to?0:o.to-o.from-a.length;l=I.single(o.from-u,o.to-u),c.push(cv(t,o)),c.push(n.facet(fl).scrollToMatch(l.main,t))}return t.dispatch({changes:s,selection:l,effects:c,userEvent:"input.replace"}),!0}),w4=Ac((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:o,to:s}=r;return{from:o,to:s,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Y.announce.of(i),userEvent:"input.replace.all"}),!0});function av(t){return t.state.facet(fl).createPanel(t)}function l0(t,e){var n,i,r,o,s;let l=t.selection.main,a=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!a)return e;let c=t.facet(fl);return new DA({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:c.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:c.wholeWord})}function FA(t){let e=Qa(t,av);return e&&e.dom.querySelector("[main-field]")}function NA(t){let e=FA(t);e&&e==t.root.activeElement&&e.select()}const PA=t=>{let e=t.state.field($r,!1);if(e&&e.panel){let n=FA(t);if(n&&n!=t.root.activeElement){let i=l0(t.state,e.query.spec);i.valid&&t.dispatch({effects:tc.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[lv.of(!0),e?tc.of(l0(t.state,e.query.spec)):he.appendConfig.of(_4)]});return!0},IA=t=>{let e=t.state.field($r,!1);if(!e||!e.panel)return!1;let n=Qa(t,av);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:lv.of(!1)}),!0},b4=[{key:"Mod-f",run:PA,scope:"editor search-panel"},{key:"F3",run:mf,shift:gf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:mf,shift:gf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:IA,scope:"editor search-panel"},{key:"Mod-Shift-l",run:C4},{key:"Alt-g",run:e4},{key:"Mod-d",run:h4,preventDefault:!0}];class k4{constructor(e){this.view=e;let n=this.query=e.state.field($r).query.spec;this.commit=this.commit.bind(this),this.searchField=Te("input",{value:n.search,placeholder:sn(e,"Find"),"aria-label":sn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Te("input",{value:n.replace,placeholder:sn(e,"Replace"),"aria-label":sn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Te("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Te("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Te("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,o,s){return Te("button",{class:"cm-button",name:r,onclick:o,type:"button"},s)}this.dom=Te("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>mf(e),[sn(e,"next")]),i("prev",()=>gf(e),[sn(e,"previous")]),i("select",()=>x4(e),[sn(e,"all")]),Te("label",null,[this.caseField,sn(e,"match case")]),Te("label",null,[this.reField,sn(e,"regexp")]),Te("label",null,[this.wordField,sn(e,"by word")]),...e.state.readOnly?[]:[Te("br"),this.replaceField,i("replace",()=>lw(e),[sn(e,"replace")]),i("replaceAll",()=>w4(e),[sn(e,"replace all")])],Te("button",{name:"close",onclick:()=>IA(e),"aria-label":sn(e,"close"),type:"button"},["×"])])}commit(){let e=new DA({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:tc.of(e)}))}keydown(e){BN(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?gf:mf)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),lw(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(tc)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(fl).top}}function sn(t,e){return t.state.phrase(e)}const wu=30,bu=/[\s\.,:;?!]/;function cv(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,o=Math.max(i.from,e-wu),s=Math.min(r,n+wu),l=t.state.sliceDoc(o,s);if(o!=i.from){for(let a=0;al.length-wu;a--)if(!bu.test(l[a-1])&&bu.test(l[a])){l=l.slice(0,a);break}}return Y.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${i.number}.`)}const S4=Y.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),_4=[$r,cl.low(v4),S4];class $A{constructor(e,n,i){this.state=e,this.pos=n,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let n=Mt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),o=r.search(zA(e,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function aw(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function T4(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let o=1;otypeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:T4(e);return r=>{let o=r.matchBefore(i);return o||r.explicit?{from:o?o.from:r.pos,options:e,validFor:n}:null}}class cw{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function zr(t){return t.selection.main.from}function zA(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",o=i[i.length-1]!="$";return!r&&!o?t:new RegExp(`${r?"^":""}(?:${i})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const A4=Ti.define();function M4(t,e,n,i){let{main:r}=t.selection,o=n-r.from,s=i-r.from;return Object.assign(Object.assign({},t.changeByRange(l=>l!=r&&n!=i&&t.sliceDoc(l.from+o,l.from+s)!=t.sliceDoc(n,i)?{range:l}:{changes:{from:l.from+o,to:i==r.from?l.to:l.from+s,insert:e},range:I.cursor(l.from+o+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const uw=new WeakMap;function L4(t){if(!Array.isArray(t))return t;let e=uw.get(t);return e||uw.set(t,e=E4(t)),e}const uv=he.define(),nc=he.define();class O4{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(b=zy(w))!=b.toLowerCase()?1:b!=b.toUpperCase()?2:0;(!m||S==1&&v||C==0&&S!=0)&&(n[h]==w||i[h]==w&&(f=!0)?s[h++]=m:s.length&&(g=!1)),C=S,m+=Tn(w)}return h==a&&s[0]==0&&g?this.result(-100+(f?-200:0),s,e):d==a&&p==0?this.ret(-200-e.length+(y==e.length?0:-100),[0,y]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-200+-700-e.length,[p,y]):h==a?this.result(-100+(f?-200:0)+-700+(g?0:-1100),s,e):n.length==2?!1:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],o=0;for(let s of n){let l=s+(this.astral?Tn(ct(i,s)):1);o&&r[o-1]==s?r[o-1]=l:(r[o++]=s,r[o++]=l)}return this.ret(e-i.length,r)}}const kt=Q.define({combine(t){return Ei(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:B4,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>hw(e(i),n(i)),optionClass:(e,n)=>i=>hw(e(i),n(i)),addToOptions:(e,n)=>e.concat(n)})}});function hw(t,e){return t?e?t+" "+e:t:e}function B4(t,e,n,i,r,o){let s=t.textDirection==Ie.RTL,l=s,a=!1,c="top",u,h,f=e.left-r.left,d=r.right-e.right,p=i.right-i.left,y=i.bottom-i.top;if(l&&f=y||m>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let v=(e.bottom-e.top)/o.offsetHeight,g=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/v}px; max-width: ${h/g}px`,class:"cm-completionInfo-"+(a?s?"left-narrow":"right-narrow":l?"left":"right")}}function D4(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r){let o=document.createElement("span");o.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let a=0;al&&o.appendChild(document.createTextNode(s.slice(l,c)));let h=o.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(s.slice(c,u))),h.className="cm-completionMatchedText",l=u}return ln.position-i.position).map(n=>n.render)}function Kp(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class R4{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:o,selected:s}=r.open,l=e.state.facet(kt);this.optionContent=D4(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=Kp(o.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:c}=e.state.field(n).open;for(let u=a.target,h;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(h=/-(\d+)$/.exec(u.id))&&+h[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(kt).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:nc.of(null)})}),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:o,selected:s,disabled:l}=i.open;(!r.open||r.open.options!=o)&&(this.range=Kp(o.length,s,e.state.facet(kt).maxRenderedOptions),this.showOptions(o,i.id)),this.updateSel(),l!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=Kp(n.options.length,n.selected,this.view.state.facet(kt).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:r}=i;if(!r)return;let o=typeof r=="string"?document.createTextNode(r):r(i);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,i)}).catch(s=>Yn(this.view.state,s,"completion info")):this.addInfoPane(o,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:o}=e;i.appendChild(r),this.infoDestroy=o||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&N4(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return r.top>Math.min(o.bottom,n.bottom)-10||r.bottomi.from||i.from==0))if(o=f,typeof c!="string"&&c.header)r.appendChild(c.header(c));else{let d=r.appendChild(document.createElement("completion-section"));d.textContent=f}}const u=r.appendChild(document.createElement("li"));u.id=n+"-"+s,u.setAttribute("role","option");let h=this.optionClass(l);h&&(u.className=h);for(let f of this.optionContent){let d=f(l,this.view.state,a);d&&u.appendChild(d)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew R4(n,t,e)}function N4(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function fw(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function P4(t,e){let n=[],i=null,r=a=>{n.push(a);let{section:c}=a.completion;if(c){i||(i=[]);let u=typeof c=="string"?c:c.name;i.some(h=>h.name==u)||i.push(typeof c=="string"?{name:u}:c)}};for(let a of t)if(a.hasResult()){let c=a.result.getMatch;if(a.result.filter===!1)for(let u of a.result.options)r(new cw(u,a.source,c?c(u):[],1e9-n.length));else{let u=new O4(e.sliceDoc(a.from,a.to));for(let h of a.result.options)if(u.match(h.label)){let f=h.displayLabel?c?c(h,u.matched):[]:u.matched;r(new cw(h,a.source,f,u.score+(h.boost||0)))}}}if(i){let a=Object.create(null),c=0,u=(h,f)=>{var d,p;return((d=h.rank)!==null&&d!==void 0?d:1e9)-((p=f.rank)!==null&&p!==void 0?p:1e9)||(h.nameu.score-c.score||l(c.completion,u.completion))){let c=a.completion;!s||s.label!=c.label||s.detail!=c.detail||s.type!=null&&c.type!=null&&s.type!=c.type||s.apply!=c.apply||s.boost!=c.boost?o.push(a):fw(a.completion)>fw(s)&&(o[o.length-1]=a),s=a.completion}return o}class xs{constructor(e,n,i,r,o,s){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new xs(this.options,dw(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,o){let s=P4(e,n);if(!s.length)return r&&e.some(a=>a.state==1)?new xs(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let l=n.facet(kt).selectOnOpen?0:-1;if(r&&r.selected!=l&&r.selected!=-1){let a=r.options[r.selected].completion;for(let c=0;cc.hasResult()?Math.min(a,c.from):a,1e8),create:H4,above:o.aboveCursor},r?r.timestamp:Date.now(),l,!1)}map(e){return new xs(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class yf{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new yf(z4,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(kt),o=(i.override||n.languageDataAt("autocomplete",zr(n)).map(L4)).map(l=>(this.active.find(c=>c.source==l)||new Ut(l,this.active.some(c=>c.state!=0)?1:0)).update(e,i));o.length==this.active.length&&o.every((l,a)=>l==this.active[a])&&(o=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!I4(o,this.active)?s=xs.build(o,n,this.id,s,i):s&&s.disabled&&!o.some(l=>l.state==1)&&(s=null),!s&&o.every(l=>l.state!=1)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new Ut(l.source,0):l));for(let l of e.effects)l.is(HA)&&(s=s&&s.setSelected(l.value,this.id));return o==this.active&&s==this.open?this:new yf(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:$4}}function I4(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const z4=[];function a0(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Ut{constructor(e,n,i=-1){this.source=e,this.state=n,this.explicitPos=i}hasResult(){return!1}update(e,n){let i=a0(e),r=this;i?r=r.handleUserEvent(e,i,n):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new Ut(r.source,0));for(let o of e.effects)if(o.is(uv))r=new Ut(r.source,1,o.value?zr(e.state):-1);else if(o.is(nc))r=new Ut(r.source,0);else if(o.is(jA))for(let s of o.value)s.source==r.source&&(r=s);return r}handleUserEvent(e,n,i){return n=="delete"||!i.activateOnTyping?this.map(e.changes):new Ut(this.source,1)}handleChange(e){return e.changes.touchesRange(zr(e.startState))?new Ut(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Ut(this.source,this.state,e.mapPos(this.explicitPos))}}class Bs extends Ut{constructor(e,n,i,r,o){super(e,2,n),this.result=i,this.from=r,this.to=o}hasResult(){return!0}handleUserEvent(e,n,i){var r;let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),l=zr(e.state);if((this.explicitPos<0?l<=o:ls||n=="delete"&&zr(e.startState)==this.from)return new Ut(this.source,n=="input"&&i.activateOnTyping?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),c;return j4(this.result.validFor,e.state,o,s)?new Bs(this.source,a,this.result,o,s):this.result.update&&(c=this.result.update(this.result,o,s,new $A(e.state,l,a>=0)))?new Bs(this.source,a,c,c.from,(r=c.to)!==null&&r!==void 0?r:zr(e.state)):new Ut(this.source,1,a)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Ut(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new Bs(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function j4(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):zA(t,!0).test(r)}const jA=he.define({map(t,e){return t.map(n=>n.map(e))}}),HA=he.define(),un=pt.define({create(){return yf.start()},update(t,e){return t.update(e)},provide:t=>[Gy.from(t,e=>e.tooltip),Y.contentAttributes.from(t,e=>e.attrs)]});function WA(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(un).active.find(r=>r.source==e.source);return i instanceof Bs?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},M4(t.state,n,i.from,i.to)),{annotations:A4.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}const H4=F4(un,WA);function ku(t,e="option"){return n=>{let i=n.state.field(un,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(t?1:-1):t?0:s-1;return l<0?l=e=="page"?0:s-1:l>=s&&(l=e=="page"?s-1:0),n.dispatch({effects:HA.of(l)}),!0}}const W4=t=>{let e=t.state.field(un,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(un,!1)?(t.dispatch({effects:uv.of(!0)}),!0):!1,q4=t=>{let e=t.state.field(un,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:nc.of(null)}),!0)};class U4{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const K4=50,Y4=1e3,G4=qe.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(un).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(un);if(!t.selectionSet&&!t.docChanged&&t.startState.field(un)==e)return;let n=t.transactions.some(i=>(i.selection||i.docChanged)&&!a0(i));for(let i=0;iK4&&Date.now()-r.time>Y4){for(let o of r.context.abortListeners)try{o()}catch(s){Yn(this.view.state,s)}r.context.abortListeners=null,this.running.splice(i--,1)}else r.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(r=>r.active.source==i.source))?setTimeout(()=>this.startUpdate(),50):-1,this.composing!=0)for(let i of t.transactions)a0(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(un);for(let n of e.active)n.state==1&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=zr(e),i=new $A(e,n,t.explicitPos==n),r=new U4(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(o=>{r.context.aborted||(r.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:nc.of(null)}),Yn(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(kt).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(kt);for(let i=0;is.source==r.active.source);if(o&&o.state==1)if(r.done==null){let s=new Ut(r.active.source,0);for(let l of r.updates)s=s.update(l,n);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:jA.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(un,!1);if(e&&e.tooltip&&this.view.state.facet(kt).closeOnBlur){let n=e.open&&AE(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:nc.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:uv.of(!1)}),20),this.composing=0}}}),X4=Y.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),ic={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Co=he.define({map(t,e){let n=e.mapPos(t,-1,Dt.TrackAfter);return n??void 0}}),hv=new class extends Fo{};hv.startSide=1;hv.endSide=-1;const VA=pt.define({create(){return xe.empty},update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;n!=e.changes.mapPos(i,-1)&&(t=xe.empty)}t=t.map(e.changes);for(let n of e.effects)n.is(Co)&&(t=t.update({add:[hv.range(n.value,n.value+1)]}));return t}});function Q4(){return[Z4,VA]}const Yp="()[]{}<>";function qA(t){for(let e=0;e{if((J4?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&Tn(ct(i,0))==1||e!=r.from||n!=r.to)return!1;let o=n$(t.state,i);return o?(t.dispatch(o),!0):!1}),e$=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=UA(t,t.selection.main.head).brackets||ic.brackets,r=null,o=t.changeByRange(s=>{if(s.empty){let l=i$(t.doc,s.head);for(let a of i)if(a==l&&xd(t.doc,s.head)==qA(ct(a,0)))return{changes:{from:s.head-a.length,to:s.head+a.length},range:I.cursor(s.head-a.length)}}return{range:r=s}});return r||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},t$=[{key:"Backspace",run:e$}];function n$(t,e){let n=UA(t,t.selection.main.head),i=n.brackets||ic.brackets;for(let r of i){let o=qA(ct(r,0));if(e==r)return o==r?s$(t,r,i.indexOf(r+r+r)>-1,n):r$(t,r,o,n.before||ic.before);if(e==o&&KA(t,t.selection.main.from))return o$(t,r,o)}return null}function KA(t,e){let n=!1;return t.field(VA).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function xd(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Tn(ct(n,0)))}function i$(t,e){let n=t.sliceString(e-2,e);return Tn(ct(n,0))==n.length?n:n.slice(1)}function r$(t,e,n,i){let r=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:Co.of(s.to+e.length),range:I.range(s.anchor+e.length,s.head+e.length)};let l=xd(t.doc,s.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+n,from:s.head},effects:Co.of(s.head+e.length),range:I.cursor(s.head+e.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function o$(t,e,n){let i=null,r=t.changeByRange(o=>o.empty&&xd(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:I.cursor(o.head+n.length)}:i={range:o});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function s$(t,e,n,i){let r=i.stringPrefixes||ic.stringPrefixes,o=null,s=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:Co.of(l.to+e.length),range:I.range(l.anchor+e.length,l.head+e.length)};let a=l.head,c=xd(t.doc,a),u;if(c==e){if(pw(t,a))return{changes:{insert:e+e,from:a},effects:Co.of(a+e.length),range:I.cursor(a+e.length)};if(KA(t,a)){let f=n&&t.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+f.length,insert:f},range:I.cursor(a+f.length)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(u=mw(t,a-2*e.length,r))>-1&&pw(t,u))return{changes:{insert:e+e+e+e,from:a},effects:Co.of(a+e.length),range:I.cursor(a+e.length)};if(t.charCategorizer(a)(c)!=Re.Word&&mw(t,a,r)>-1&&!l$(t,a,e,r))return{changes:{insert:e+e,from:a},effects:Co.of(a+e.length),range:I.cursor(a+e.length)}}return{range:o=l}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function pw(t,e){let n=Mt(t).resolveInner(e+1);return n.parent&&n.from==e}function l$(t,e,n,i){let r=Mt(t).resolveInner(e,-1),o=i.reduce((s,l)=>Math.max(s,l.length),0);for(let s=0;s<5;s++){let l=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+o)),a=l.indexOf(n);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let u=r.firstChild;for(;u&&u.from==r.from&&u.to-u.from>n.length+a;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=r.to==e&&r.parent;if(!c)break;r=c}return!1}function mw(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=Re.Word)return e;for(let r of n){let o=e-r.length;if(t.sliceDoc(o,e)==r&&i(t.sliceDoc(o-1,o))!=Re.Word)return o}return-1}function a$(t={}){return[un,kt.of(t),G4,c$,X4]}const YA=[{key:"Ctrl-Space",run:V4},{key:"Escape",run:q4},{key:"ArrowDown",run:ku(!0)},{key:"ArrowUp",run:ku(!1)},{key:"PageDown",run:ku(!0,"page")},{key:"PageUp",run:ku(!1,"page")},{key:"Enter",run:W4}],c$=cl.highest(hd.computeN([kt],t=>t.facet(kt).defaultKeymap?[YA]:[]));class u${constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class po{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=e,o=i.facet(QA).markerFilter;o&&(r=o(r));let s=se.set(r.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?se.widget({widget:new x$(l),diagnostic:l}).range(l.from):se.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new po(s,n,Ks(s))}}function Ks(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return i=new u$(r,o,s.diagnostic),!1}),i}function h$(t,e){let n=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(i=>i.is(GA))||t.changes.touchesRange(n.from,n.to))}function f$(t,e){return t.field(pn,!1)?e:e.concat(he.appendConfig.of(b$))}const GA=he.define(),fv=he.define(),XA=he.define(),pn=pt.define({create(){return new po(se.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),i=null;if(t.selected){let r=e.changes.mapPos(t.selected.from,1);i=Ks(n,t.selected.diagnostic,r)||Ks(n,null,r)}t=new po(n,t.panel,i)}for(let n of e.effects)n.is(GA)?t=po.init(n.value,t.panel,e.state):n.is(fv)?t=new po(t.diagnostics,n.value?Cd.open:null,t.selected):n.is(XA)&&(t=new po(t.diagnostics,t.panel,n.value));return t},provide:t=>[Ja.from(t,e=>e.panel),Y.decorations.from(t,e=>e.diagnostics)]}),d$=se.mark({class:"cm-lintRange cm-lintRange-active"});function p$(t,e,n){let{diagnostics:i}=t.state.field(pn),r=[],o=2e8,s=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(a,c,{spec:u})=>{e>=a&&e<=c&&(a==c||(e>a||n>0)&&(eZA(t,n,!1)))}const g$=t=>{let e=t.state.field(pn,!1);(!e||!e.panel)&&t.dispatch({effects:f$(t.state,[fv.of(!0)])});let n=Qa(t,Cd.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},gw=t=>{let e=t.state.field(pn,!1);return!e||!e.panel?!1:(t.dispatch({effects:fv.of(!1)}),!0)},y$=t=>{let e=t.state.field(pn,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},v$=[{key:"Mod-Shift-m",run:g$,preventDefault:!0},{key:"F8",run:y$}],QA=Q.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},Ei(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function JA(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;io.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function ZA(t,e,n){var i;let r=n?JA(e.actions):[];return Te("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Te("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(i=e.actions)===null||i===void 0?void 0:i.map((o,s)=>{let l=!1,a=f=>{if(f.preventDefault(),l)return;l=!0;let d=Ks(t.state.field(pn).diagnostics,e);d&&o.apply(t,d.from,d.to)},{name:c}=o,u=r[s]?c.indexOf(r[s]):-1,h=u<0?c:[c.slice(0,u),Te("u",c.slice(u,u+1)),c.slice(u+1)];return Te("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${c}${u<0?"":` (access key "${r[s]})"`}.`},h)}),e.source&&Te("div",{class:"cm-diagnosticSource"},e.source))}class x$ extends cr{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Te("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class yw{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=ZA(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Cd{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)gw(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=JA(o.actions);for(let l=0;l{for(let o=0;ogw(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(pn).selected;if(!e)return-1;for(let n=0;n{let c=-1,u;for(let h=i;hi&&(this.items.splice(i,c-i),r=!0)),n&&u.diagnostic==n.diagnostic?u.dom.hasAttribute("aria-selected")||(u.dom.setAttribute("aria-selected","true"),o=u):u.dom.hasAttribute("aria-selected")&&u.dom.removeAttribute("aria-selected"),i++});i({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{let a=l.height/this.list.offsetHeight;s.topl.bottom&&(this.list.scrollTop+=(s.bottom-l.bottom)/a)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(pn),i=Ks(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:XA.of(i)})}static open(e){return new Cd(e)}}function C$(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Su(t){return C$(``,'width="6" height="3"')}const w$=Y.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Su("#d11")},".cm-lintRange-warning":{backgroundImage:Su("orange")},".cm-lintRange-info":{backgroundImage:Su("#999")},".cm-lintRange-hint":{backgroundImage:Su("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),b$=[pn,Y.decorations.compute([pn],t=>{let{selected:e,panel:n}=t.field(pn);return!e||!n||e.from==e.to?se.none:se.set([d$.range(e.from,e.to)])}),xP(p$,{hideOn:h$}),w$];var vw=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,i=[];e.closeBracketsKeymap!==!1&&(i=i.concat(t$)),e.defaultKeymap!==!1&&(i=i.concat(QI)),e.searchKeymap!==!1&&(i=i.concat(b4)),e.historyKeymap!==!1&&(i=i.concat(sI)),e.foldKeymap!==!1&&(i=i.concat(x5)),e.completionKeymap!==!1&&(i=i.concat(YA)),e.lintKeymap!==!1&&(i=i.concat(v$));var r=[];return e.lineNumbers!==!1&&r.push(AP()),e.highlightActiveLineGutter!==!1&&r.push(OP()),e.highlightSpecialChars!==!1&&r.push(GN()),e.history!==!1&&r.push(Q5()),e.foldGutter!==!1&&r.push(k5()),e.drawSelection!==!1&&r.push(IN()),e.dropCursor!==!1&&r.push(WN()),e.allowMultipleSelections!==!1&&r.push(pe.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&r.push(c5()),e.syntaxHighlighting!==!1&&r.push(UE(E5,{fallback:!0})),e.bracketMatching!==!1&&r.push(R5()),e.closeBrackets!==!1&&r.push(Q4()),e.autocompletion!==!1&&r.push(a$()),e.rectangularSelection!==!1&&r.push(cP()),n!==!1&&r.push(fP()),e.highlightActiveLine!==!1&&r.push(tP()),e.highlightSelectionMatches!==!1&&r.push(i4()),e.tabSize&&typeof e.tabSize=="number"&&r.push(fd.of(" ".repeat(e.tabSize))),r.concat([hd.of(i.flat())]).filter(Boolean)};const k$="#e5c07b",xw="#e06c75",S$="#56b6c2",_$="#ffffff",lh="#abb2bf",c0="#7d8799",T$="#61afef",E$="#98c379",Cw="#d19a66",A$="#c678dd",M$="#21252b",ww="#2c313a",bw="#282c34",Gp="#353a42",L$="#3E4451",kw="#528bff",O$=Y.theme({"&":{color:lh,backgroundColor:bw},".cm-content":{caretColor:kw},".cm-cursor, .cm-dropCursor":{borderLeftColor:kw},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:L$},".cm-panels":{backgroundColor:M$,color:lh},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:bw,color:c0,border:"none"},".cm-activeLineGutter":{backgroundColor:ww},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Gp},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Gp,borderBottomColor:Gp},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:ww,color:lh}}},{dark:!0}),B$=Tc.define([{tag:P.keyword,color:A$},{tag:[P.name,P.deleted,P.character,P.propertyName,P.macroName],color:xw},{tag:[P.function(P.variableName),P.labelName],color:T$},{tag:[P.color,P.constant(P.name),P.standard(P.name)],color:Cw},{tag:[P.definition(P.name),P.separator],color:lh},{tag:[P.typeName,P.className,P.number,P.changed,P.annotation,P.modifier,P.self,P.namespace],color:k$},{tag:[P.operator,P.operatorKeyword,P.url,P.escape,P.regexp,P.link,P.special(P.string)],color:S$},{tag:[P.meta,P.comment],color:c0},{tag:P.strong,fontWeight:"bold"},{tag:P.emphasis,fontStyle:"italic"},{tag:P.strikethrough,textDecoration:"line-through"},{tag:P.link,color:c0,textDecoration:"underline"},{tag:P.heading,fontWeight:"bold",color:xw},{tag:[P.atom,P.bool,P.special(P.variableName)],color:Cw},{tag:[P.processingInstruction,P.string,P.inserted],color:E$},{tag:P.invalid,color:_$}]),D$=[O$,UE(B$)];var R$=Y.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),F$=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:i=!0,readOnly:r=!1,theme:o="light",placeholder:s="",basicSetup:l=!0}=e,a=[];switch(n&&a.unshift(hd.of([JI])),l&&(typeof l=="boolean"?a.unshift(vw()):a.unshift(vw(l))),s&&a.unshift(oP(s)),o){case"light":a.push(R$);break;case"dark":a.push(D$);break;case"none":break;default:a.push(o);break}return i===!1&&a.push(Y.editable.of(!1)),r&&a.push(pe.readOnly.of(!0)),[...a]},N$=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),Sw=Ti.define(),P$=[];function I$(t){var{value:e,selection:n,onChange:i,onStatistics:r,onCreateEditor:o,onUpdate:s,extensions:l=P$,autoFocus:a,theme:c="light",height:u=null,minHeight:h=null,maxHeight:f=null,width:d=null,minWidth:p=null,maxWidth:y=null,placeholder:v="",editable:g=!0,readOnly:m=!1,indentWithTab:x=!0,basicSetup:C=!0,root:w,initialState:b}=t,[S,M]=k.useState(),[N,O]=k.useState(),[D,V]=k.useState(),K=Y.theme({"&":{height:u,minHeight:h,maxHeight:f,width:d,minWidth:p,maxWidth:y},"& .cm-scroller":{height:"100% !important"}}),z=Y.updateListener.of($=>{if($.docChanged&&typeof i=="function"&&!$.transactions.some(R=>R.annotation(Sw))){var _=$.state.doc,L=_.toString();i(L,$)}r&&r(N$($))}),F=F$({theme:c,editable:g,readOnly:m,placeholder:v,indentWithTab:x,basicSetup:C}),B=[z,K,...F];return s&&typeof s=="function"&&B.push(Y.updateListener.of(s)),B=B.concat(l),k.useEffect(()=>{if(S&&!D){var $={doc:e,selection:n,extensions:B},_=b?pe.fromJSON(b.json,$,b.fields):pe.create($);if(V(_),!N){var L=new Y({state:_,parent:S,root:w});O(L),o&&o(L,_)}}return()=>{N&&(V(void 0),O(void 0))}},[S,D]),k.useEffect(()=>M(t.container),[t.container]),k.useEffect(()=>()=>{N&&(N.destroy(),O(void 0))},[N]),k.useEffect(()=>{a&&N&&N.focus()},[a,N]),k.useEffect(()=>{N&&N.dispatch({effects:he.reconfigure.of(B)})},[c,l,u,h,f,d,p,y,v,g,m,x,C,i,s]),k.useEffect(()=>{if(e!==void 0){var $=N?N.state.doc.toString():"";N&&e!==$&&N.dispatch({changes:{from:0,to:$.length,insert:e||""},annotations:[Sw.of(!0)]})}},[e,N]),{state:D,setState:V,view:N,setView:O,container:S,setContainer:M}}var $$=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],e2=k.forwardRef((t,e)=>{var{className:n,value:i="",selection:r,extensions:o=[],onChange:s,onStatistics:l,onCreateEditor:a,onUpdate:c,autoFocus:u,theme:h="light",height:f,minHeight:d,maxHeight:p,width:y,minWidth:v,maxWidth:g,basicSetup:m,placeholder:x,indentWithTab:C,editable:w,readOnly:b,root:S,initialState:M}=t,N=Ly(t,$$),O=k.useRef(null),{state:D,view:V,container:K}=I$({container:O.current,root:S,value:i,autoFocus:u,theme:h,height:f,minHeight:d,maxHeight:p,width:y,minWidth:v,maxWidth:g,basicSetup:m,placeholder:x,indentWithTab:C,editable:w,readOnly:b,selection:r,onChange:s,onStatistics:l,onCreateEditor:a,onUpdate:c,extensions:o,initialState:M});if(k.useImperativeHandle(e,()=>({editor:O.current,state:D,view:V}),[O,K,D,V]),typeof i!="string")throw new Error("value must be typeof string but got "+typeof i);var z=typeof h=="string"?"cm-theme-"+h:"cm-theme";return A.jsx("div",Uh({ref:O,className:""+z+(n?" "+n:"")},N))});e2.displayName="CodeMirror";const u0=2**31-1;function t2(t,e,n){const i=n-Date.now();t.current=i<=u0?setTimeout(e,i):setTimeout(()=>t2(t,e,n),u0)}function n2(){const t=Ry(),e=k.useRef();return R_(()=>clearTimeout(e.current)),k.useMemo(()=>{const n=()=>clearTimeout(e.current);function i(r,o=0){t()&&(n(),o<=u0?e.current=setTimeout(r,o):t2(e,r,Date.now()+o))}return{set:i,clear:n}},[])}var z$=function(){},j$=z$;const H$=sr(j$);var _w=Object.prototype.hasOwnProperty;function Tw(t,e,n){for(n of t.keys())if(ma(n,e))return n}function ma(t,e){var n,i,r;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((i=t.length)===e.length)for(;i--&&ma(t[i],e[i]););return i===-1}if(n===Set){if(t.size!==e.size)return!1;for(i of t)if(r=i,r&&typeof r=="object"&&(r=Tw(e,r),!r)||!e.has(r))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(i of t)if(r=i[0],r&&typeof r=="object"&&(r=Tw(e,r),!r)||!ma(i[1],e.get(r)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((i=t.byteLength)===e.byteLength)for(;i--&&t.getInt8(i)===e.getInt8(i););return i===-1}if(ArrayBuffer.isView(t)){if((i=t.byteLength)===e.byteLength)for(;i--&&t[i]===e[i];);return i===-1}if(!n||typeof t=="object"){i=0;for(n in t)if(_w.call(t,n)&&++i&&!_w.call(e,n)||!(n in e)||!ma(t[n],e[n]))return!1;return Object.keys(e).length===i}}return t!==t&&e!==e}function W$(t){const e=Ry();return[t[0],k.useCallback(n=>{if(e())return t[1](n)},[e,t[1]])]}var nn="top",Fn="bottom",Nn="right",rn="left",dv="auto",Mc=[nn,Fn,Nn,rn],Ys="start",rc="end",V$="clippingParents",i2="viewport",Fl="popper",q$="reference",Ew=Mc.reduce(function(t,e){return t.concat([e+"-"+Ys,e+"-"+rc])},[]),r2=[].concat(Mc,[dv]).reduce(function(t,e){return t.concat([e,e+"-"+Ys,e+"-"+rc])},[]),U$="beforeRead",K$="read",Y$="afterRead",G$="beforeMain",X$="main",Q$="afterMain",J$="beforeWrite",Z$="write",e6="afterWrite",t6=[U$,K$,Y$,G$,X$,Q$,J$,Z$,e6];function xi(t){return t.split("-")[0]}function yn(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Io(t){var e=yn(t).Element;return t instanceof e||t instanceof Element}function Ci(t){var e=yn(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function pv(t){if(typeof ShadowRoot>"u")return!1;var e=yn(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}var _o=Math.max,vf=Math.min,Gs=Math.round;function h0(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function o2(){return!/^((?!chrome|android).)*safari/i.test(h0())}function Xs(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&Ci(t)&&(r=t.offsetWidth>0&&Gs(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Gs(i.height)/t.offsetHeight||1);var s=Io(t)?yn(t):window,l=s.visualViewport,a=!o2()&&n,c=(i.left+(a&&l?l.offsetLeft:0))/r,u=(i.top+(a&&l?l.offsetTop:0))/o,h=i.width/r,f=i.height/o;return{width:h,height:f,top:u,right:c+h,bottom:u+f,left:c,x:c,y:u}}function mv(t){var e=Xs(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function s2(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&pv(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Gr(t){return t?(t.nodeName||"").toLowerCase():null}function rr(t){return yn(t).getComputedStyle(t)}function n6(t){return["table","td","th"].indexOf(Gr(t))>=0}function io(t){return((Io(t)?t.ownerDocument:t.document)||window.document).documentElement}function wd(t){return Gr(t)==="html"?t:t.assignedSlot||t.parentNode||(pv(t)?t.host:null)||io(t)}function Aw(t){return!Ci(t)||rr(t).position==="fixed"?null:t.offsetParent}function i6(t){var e=/firefox/i.test(h0()),n=/Trident/i.test(h0());if(n&&Ci(t)){var i=rr(t);if(i.position==="fixed")return null}var r=wd(t);for(pv(r)&&(r=r.host);Ci(r)&&["html","body"].indexOf(Gr(r))<0;){var o=rr(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function Lc(t){for(var e=yn(t),n=Aw(t);n&&n6(n)&&rr(n).position==="static";)n=Aw(n);return n&&(Gr(n)==="html"||Gr(n)==="body"&&rr(n).position==="static")?e:n||i6(t)||e}function gv(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ga(t,e,n){return _o(t,vf(e,n))}function r6(t,e,n){var i=ga(t,e,n);return i>n?n:i}function l2(){return{top:0,right:0,bottom:0,left:0}}function a2(t){return Object.assign({},l2(),t)}function c2(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var o6=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,a2(typeof e!="number"?e:c2(e,Mc))};function s6(t){var e,n=t.state,i=t.name,r=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=xi(n.placement),a=gv(l),c=[rn,Nn].indexOf(l)>=0,u=c?"height":"width";if(!(!o||!s)){var h=o6(r.padding,n),f=mv(o),d=a==="y"?nn:rn,p=a==="y"?Fn:Nn,y=n.rects.reference[u]+n.rects.reference[a]-s[a]-n.rects.popper[u],v=s[a]-n.rects.reference[a],g=Lc(o),m=g?a==="y"?g.clientHeight||0:g.clientWidth||0:0,x=y/2-v/2,C=h[d],w=m-f[u]-h[p],b=m/2-f[u]/2+x,S=ga(C,b,w),M=a;n.modifiersData[i]=(e={},e[M]=S,e.centerOffset=S-b,e)}}function l6(t){var e=t.state,n=t.options,i=n.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||s2(e.elements.popper,r)&&(e.elements.arrow=r))}const a6={name:"arrow",enabled:!0,phase:"main",fn:s6,effect:l6,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qs(t){return t.split("-")[1]}var c6={top:"auto",right:"auto",bottom:"auto",left:"auto"};function u6(t,e){var n=t.x,i=t.y,r=e.devicePixelRatio||1;return{x:Gs(n*r)/r||0,y:Gs(i*r)/r||0}}function Mw(t){var e,n=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,l=t.position,a=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,h=t.isFixed,f=s.x,d=f===void 0?0:f,p=s.y,y=p===void 0?0:p,v=typeof u=="function"?u({x:d,y}):{x:d,y};d=v.x,y=v.y;var g=s.hasOwnProperty("x"),m=s.hasOwnProperty("y"),x=rn,C=nn,w=window;if(c){var b=Lc(n),S="clientHeight",M="clientWidth";if(b===yn(n)&&(b=io(n),rr(b).position!=="static"&&l==="absolute"&&(S="scrollHeight",M="scrollWidth")),b=b,r===nn||(r===rn||r===Nn)&&o===rc){C=Fn;var N=h&&b===w&&w.visualViewport?w.visualViewport.height:b[S];y-=N-i.height,y*=a?1:-1}if(r===rn||(r===nn||r===Fn)&&o===rc){x=Nn;var O=h&&b===w&&w.visualViewport?w.visualViewport.width:b[M];d-=O-i.width,d*=a?1:-1}}var D=Object.assign({position:l},c&&c6),V=u===!0?u6({x:d,y},yn(n)):{x:d,y};if(d=V.x,y=V.y,a){var K;return Object.assign({},D,(K={},K[C]=m?"0":"",K[x]=g?"0":"",K.transform=(w.devicePixelRatio||1)<=1?"translate("+d+"px, "+y+"px)":"translate3d("+d+"px, "+y+"px, 0)",K))}return Object.assign({},D,(e={},e[C]=m?y+"px":"",e[x]=g?d+"px":"",e.transform="",e))}function h6(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=i===void 0?!0:i,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,a=l===void 0?!0:l,c={placement:xi(e.placement),variation:Qs(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Mw(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Mw(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const f6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:h6,data:{}};var _u={passive:!0};function d6(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=r===void 0?!0:r,s=i.resize,l=s===void 0?!0:s,a=yn(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,_u)}),l&&a.addEventListener("resize",n.update,_u),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,_u)}),l&&a.removeEventListener("resize",n.update,_u)}}const p6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:d6,data:{}};var m6={left:"right",right:"left",bottom:"top",top:"bottom"};function ah(t){return t.replace(/left|right|bottom|top/g,function(e){return m6[e]})}var g6={start:"end",end:"start"};function Lw(t){return t.replace(/start|end/g,function(e){return g6[e]})}function yv(t){var e=yn(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function vv(t){return Xs(io(t)).left+yv(t).scrollLeft}function y6(t,e){var n=yn(t),i=io(t),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,l=0,a=0;if(r){o=r.width,s=r.height;var c=o2();(c||!c&&e==="fixed")&&(l=r.offsetLeft,a=r.offsetTop)}return{width:o,height:s,x:l+vv(t),y:a}}function v6(t){var e,n=io(t),i=yv(t),r=(e=t.ownerDocument)==null?void 0:e.body,o=_o(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=_o(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-i.scrollLeft+vv(t),a=-i.scrollTop;return rr(r||n).direction==="rtl"&&(l+=_o(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:l,y:a}}function xv(t){var e=rr(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function u2(t){return["html","body","#document"].indexOf(Gr(t))>=0?t.ownerDocument.body:Ci(t)&&xv(t)?t:u2(wd(t))}function ya(t,e){var n;e===void 0&&(e=[]);var i=u2(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),o=yn(i),s=r?[o].concat(o.visualViewport||[],xv(i)?i:[]):i,l=e.concat(s);return r?l:l.concat(ya(wd(s)))}function f0(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function x6(t,e){var n=Xs(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Ow(t,e,n){return e===i2?f0(y6(t,n)):Io(e)?x6(e,n):f0(v6(io(t)))}function C6(t){var e=ya(wd(t)),n=["absolute","fixed"].indexOf(rr(t).position)>=0,i=n&&Ci(t)?Lc(t):t;return Io(i)?e.filter(function(r){return Io(r)&&s2(r,i)&&Gr(r)!=="body"}):[]}function w6(t,e,n,i){var r=e==="clippingParents"?C6(t):[].concat(e),o=[].concat(r,[n]),s=o[0],l=o.reduce(function(a,c){var u=Ow(t,c,i);return a.top=_o(u.top,a.top),a.right=vf(u.right,a.right),a.bottom=vf(u.bottom,a.bottom),a.left=_o(u.left,a.left),a},Ow(t,s,i));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function h2(t){var e=t.reference,n=t.element,i=t.placement,r=i?xi(i):null,o=i?Qs(i):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,a;switch(r){case nn:a={x:s,y:e.y-n.height};break;case Fn:a={x:s,y:e.y+e.height};break;case Nn:a={x:e.x+e.width,y:l};break;case rn:a={x:e.x-n.width,y:l};break;default:a={x:e.x,y:e.y}}var c=r?gv(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Ys:a[c]=a[c]-(e[u]/2-n[u]/2);break;case rc:a[c]=a[c]+(e[u]/2-n[u]/2);break}}return a}function oc(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=i===void 0?t.placement:i,o=n.strategy,s=o===void 0?t.strategy:o,l=n.boundary,a=l===void 0?V$:l,c=n.rootBoundary,u=c===void 0?i2:c,h=n.elementContext,f=h===void 0?Fl:h,d=n.altBoundary,p=d===void 0?!1:d,y=n.padding,v=y===void 0?0:y,g=a2(typeof v!="number"?v:c2(v,Mc)),m=f===Fl?q$:Fl,x=t.rects.popper,C=t.elements[p?m:f],w=w6(Io(C)?C:C.contextElement||io(t.elements.popper),a,u,s),b=Xs(t.elements.reference),S=h2({reference:b,element:x,strategy:"absolute",placement:r}),M=f0(Object.assign({},x,S)),N=f===Fl?M:b,O={top:w.top-N.top+g.top,bottom:N.bottom-w.bottom+g.bottom,left:w.left-N.left+g.left,right:N.right-w.right+g.right},D=t.modifiersData.offset;if(f===Fl&&D){var V=D[r];Object.keys(O).forEach(function(K){var z=[Nn,Fn].indexOf(K)>=0?1:-1,F=[nn,Fn].indexOf(K)>=0?"y":"x";O[K]+=V[F]*z})}return O}function b6(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,c=a===void 0?r2:a,u=Qs(i),h=u?l?Ew:Ew.filter(function(p){return Qs(p)===u}):Mc,f=h.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=h);var d=f.reduce(function(p,y){return p[y]=oc(t,{placement:y,boundary:r,rootBoundary:o,padding:s})[xi(y)],p},{});return Object.keys(d).sort(function(p,y){return d[p]-d[y]})}function k6(t){if(xi(t)===dv)return[];var e=ah(t);return[Lw(t),e,Lw(e)]}function S6(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,o=r===void 0?!0:r,s=n.altAxis,l=s===void 0?!0:s,a=n.fallbackPlacements,c=n.padding,u=n.boundary,h=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,p=d===void 0?!0:d,y=n.allowedAutoPlacements,v=e.options.placement,g=xi(v),m=g===v,x=a||(m||!p?[ah(v)]:k6(v)),C=[v].concat(x).reduce(function(ae,ce){return ae.concat(xi(ce)===dv?b6(e,{placement:ce,boundary:u,rootBoundary:h,padding:c,flipVariations:p,allowedAutoPlacements:y}):ce)},[]),w=e.rects.reference,b=e.rects.popper,S=new Map,M=!0,N=C[0],O=0;O=0,F=z?"width":"height",B=oc(e,{placement:D,boundary:u,rootBoundary:h,altBoundary:f,padding:c}),$=z?K?Nn:rn:K?Fn:nn;w[F]>b[F]&&($=ah($));var _=ah($),L=[];if(o&&L.push(B[V]<=0),l&&L.push(B[$]<=0,B[_]<=0),L.every(function(ae){return ae})){N=D,M=!1;break}S.set(D,L)}if(M)for(var R=p?3:1,H=function(ce){var Ce=C.find(function(Fe){var nt=S.get(Fe);if(nt)return nt.slice(0,ce).every(function(it){return it})});if(Ce)return N=Ce,"break"},J=R;J>0;J--){var X=H(J);if(X==="break")break}e.placement!==N&&(e.modifiersData[i]._skip=!0,e.placement=N,e.reset=!0)}}const _6={name:"flip",enabled:!0,phase:"main",fn:S6,requiresIfExists:["offset"],data:{_skip:!1}};function Bw(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Dw(t){return[nn,Nn,Fn,rn].some(function(e){return t[e]>=0})}function T6(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=oc(e,{elementContext:"reference"}),l=oc(e,{altBoundary:!0}),a=Bw(s,i),c=Bw(l,r,o),u=Dw(a),h=Dw(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}const E6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:T6};function A6(t,e,n){var i=xi(t),r=[rn,nn].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*r,[rn,Nn].indexOf(i)>=0?{x:l,y:s}:{x:s,y:l}}function M6(t){var e=t.state,n=t.options,i=t.name,r=n.offset,o=r===void 0?[0,0]:r,s=r2.reduce(function(u,h){return u[h]=A6(h,e.rects,o),u},{}),l=s[e.placement],a=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=s}const L6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:M6};function O6(t){var e=t.state,n=t.name;e.modifiersData[n]=h2({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const B6={name:"popperOffsets",enabled:!0,phase:"read",fn:O6,data:{}};function D6(t){return t==="x"?"y":"x"}function R6(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,o=r===void 0?!0:r,s=n.altAxis,l=s===void 0?!1:s,a=n.boundary,c=n.rootBoundary,u=n.altBoundary,h=n.padding,f=n.tether,d=f===void 0?!0:f,p=n.tetherOffset,y=p===void 0?0:p,v=oc(e,{boundary:a,rootBoundary:c,padding:h,altBoundary:u}),g=xi(e.placement),m=Qs(e.placement),x=!m,C=gv(g),w=D6(C),b=e.modifiersData.popperOffsets,S=e.rects.reference,M=e.rects.popper,N=typeof y=="function"?y(Object.assign({},e.rects,{placement:e.placement})):y,O=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,V={x:0,y:0};if(b){if(o){var K,z=C==="y"?nn:rn,F=C==="y"?Fn:Nn,B=C==="y"?"height":"width",$=b[C],_=$+v[z],L=$-v[F],R=d?-M[B]/2:0,H=m===Ys?S[B]:M[B],J=m===Ys?-M[B]:-S[B],X=e.elements.arrow,ae=d&&X?mv(X):{width:0,height:0},ce=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:l2(),Ce=ce[z],Fe=ce[F],nt=ga(0,S[B],ae[B]),it=x?S[B]/2-R-nt-Ce-O.mainAxis:H-nt-Ce-O.mainAxis,ke=x?-S[B]/2+R+nt+Fe+O.mainAxis:J+nt+Fe+O.mainAxis,je=e.elements.arrow&&Lc(e.elements.arrow),Ht=je?C==="y"?je.clientTop||0:je.clientLeft||0:0,Ot=(K=D==null?void 0:D[C])!=null?K:0,on=$+it-Ot-Ht,be=$+ke-Ot,ti=ga(d?vf(_,on):_,$,d?_o(L,be):L);b[C]=ti,V[C]=ti-$}if(l){var Oi,Pc=C==="x"?nn:rn,Hd=C==="x"?Fn:Nn,zn=b[w],ni=w==="y"?"height":"width",Bi=zn+v[Pc],Di=zn-v[Hd],Yo=[nn,rn].indexOf(g)!==-1,gl=(Oi=D==null?void 0:D[w])!=null?Oi:0,yl=Yo?Bi:zn-S[ni]-M[ni]-gl+O.altAxis,Go=Yo?zn+S[ni]+M[ni]-gl-O.altAxis:Di,vl=d&&Yo?r6(yl,zn,Go):ga(d?yl:Bi,zn,d?Go:Di);b[w]=vl,V[w]=vl-zn}e.modifiersData[i]=V}}const F6={name:"preventOverflow",enabled:!0,phase:"main",fn:R6,requiresIfExists:["offset"]};function N6(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function P6(t){return t===yn(t)||!Ci(t)?yv(t):N6(t)}function I6(t){var e=t.getBoundingClientRect(),n=Gs(e.width)/t.offsetWidth||1,i=Gs(e.height)/t.offsetHeight||1;return n!==1||i!==1}function $6(t,e,n){n===void 0&&(n=!1);var i=Ci(e),r=Ci(e)&&I6(e),o=io(e),s=Xs(t,r,n),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(i||!i&&!n)&&((Gr(e)!=="body"||xv(o))&&(l=P6(e)),Ci(e)?(a=Xs(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):o&&(a.x=vv(o))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function z6(t){var e=new Map,n=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function r(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var a=e.get(l);a&&r(a)}}),i.push(o)}return t.forEach(function(o){n.has(o.name)||r(o)}),i}function j6(t){var e=z6(t);return t6.reduce(function(n,i){return n.concat(e.filter(function(r){return r.phase===i}))},[])}function H6(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function W6(t){var e=t.reduce(function(n,i){var r=n[i.name];return n[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var Rw={placement:"bottom",modifiers:[],strategy:"absolute"};function Fw(){for(var t=arguments.length,e=new Array(t),n=0;n=0)&&(n[r]=t[r]);return n}const Y6={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},G6={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:t})=>()=>{const{reference:e,popper:n}=t.elements;if("removeAttribute"in e){const i=(e.getAttribute("aria-describedby")||"").split(",").filter(r=>r.trim()!==n.id);i.length?e.setAttribute("aria-describedby",i.join(",")):e.removeAttribute("aria-describedby")}},fn:({state:t})=>{var e;const{popper:n,reference:i}=t.elements,r=(e=n.getAttribute("role"))==null?void 0:e.toLowerCase();if(n.id&&r==="tooltip"&&"setAttribute"in i){const o=i.getAttribute("aria-describedby");if(o&&o.split(",").indexOf(n.id)!==-1)return;i.setAttribute("aria-describedby",o?`${o},${n.id}`:n.id)}}},X6=[];function f2(t,e,n={}){let{enabled:i=!0,placement:r="bottom",strategy:o="absolute",modifiers:s=X6}=n,l=K6(n,U6);const a=k.useRef(s),c=k.useRef(),u=k.useCallback(()=>{var v;(v=c.current)==null||v.update()},[]),h=k.useCallback(()=>{var v;(v=c.current)==null||v.forceUpdate()},[]),[f,d]=W$(k.useState({placement:r,update:u,forceUpdate:h,attributes:{},styles:{popper:{},arrow:{}}})),p=k.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:v})=>{const g={},m={};Object.keys(v.elements).forEach(x=>{g[x]=v.styles[x],m[x]=v.attributes[x]}),d({state:v,styles:g,attributes:m,update:u,forceUpdate:h,placement:v.placement})}}),[u,h,d]),y=k.useMemo(()=>(ma(a.current,s)||(a.current=s),a.current),[s]);return k.useEffect(()=>{!c.current||!i||c.current.setOptions({placement:r,strategy:o,modifiers:[...y,p,Y6]})},[o,r,p,i,y]),k.useEffect(()=>{if(!(!i||t==null||e==null))return c.current=q6(t,e,Object.assign({},l,{placement:r,strategy:o,modifiers:[...y,G6,p]})),()=>{c.current!=null&&(c.current.destroy(),c.current=void 0,d(v=>Object.assign({},v,{attributes:{},styles:{popper:{}}})))}},[i,t,e]),f}const Nw=()=>{};function Q6(t){return t.button===0}function J6(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}const ch=t=>t&&("current"in t?t.current:t),Pw={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function d2(t,e=Nw,{disabled:n,clickTrigger:i="click"}={}){const r=k.useRef(!1),o=k.useRef(!1),s=k.useCallback(c=>{const u=ch(t);H$(!!u,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),r.current=!u||J6(c)||!Q6(c)||!!Wa(u,c.target)||o.current,o.current=!1},[t]),l=Pe(c=>{const u=ch(t);u&&Wa(u,c.target)&&(o.current=!0)}),a=Pe(c=>{r.current||e(c)});k.useEffect(()=>{var c,u;if(n||t==null)return;const h=wc(ch(t)),f=h.defaultView||window;let d=(c=f.event)!=null?c:(u=f.parent)==null?void 0:u.event,p=null;Pw[i]&&(p=Ui(h,Pw[i],l,!0));const y=Ui(h,i,s,!0),v=Ui(h,i,m=>{if(m===d){d=void 0;return}a(m)});let g=[];return"ontouchstart"in h.documentElement&&(g=[].slice.call(h.body.children).map(m=>Ui(m,"mousemove",Nw))),()=>{p==null||p(),y(),v(),g.forEach(m=>m())}},[t,n,i,s,l,a])}const Z6=()=>{};function e8(t,e,{disabled:n,clickTrigger:i}={}){const r=e||Z6;d2(t,r,{disabled:n,clickTrigger:i});const o=Pe(s=>{P_(s)&&r(s)});k.useEffect(()=>{if(n||t==null)return;const s=wc(ch(t));let l=(s.defaultView||window).event;const a=Ui(s,"keyup",c=>{if(c===l){l=void 0;return}o(c)});return()=>{a()}},[t,n,o])}function t8(t){const e={};return Array.isArray(t)?(t==null||t.forEach(n=>{e[n.name]=n}),e):t||e}function n8(t={}){return Array.isArray(t)?t:Object.keys(t).map(e=>(t[e].name=e,t[e]))}function p2({enabled:t,enableEvents:e,placement:n,flip:i,offset:r,fixed:o,containerPadding:s,arrowElement:l,popperConfig:a={}}){var c,u,h,f,d;const p=t8(a.modifiers);return Object.assign({},a,{placement:n,enabled:t,strategy:o?"fixed":a.strategy,modifiers:n8(Object.assign({},p,{eventListeners:{enabled:e,options:(c=p.eventListeners)==null?void 0:c.options},preventOverflow:Object.assign({},p.preventOverflow,{options:s?Object.assign({padding:s},(u=p.preventOverflow)==null?void 0:u.options):(h=p.preventOverflow)==null?void 0:h.options}),offset:{options:Object.assign({offset:r},(f=p.offset)==null?void 0:f.options)},arrow:Object.assign({},p.arrow,{enabled:!!l,options:Object.assign({},(d=p.arrow)==null?void 0:d.options,{element:l})}),flip:Object.assign({enabled:!!i},p.flip)}))})}const m2=k.forwardRef((t,e)=>{const{flip:n,offset:i,placement:r,containerPadding:o,popperConfig:s={},transition:l,runTransition:a}=t,[c,u]=mg(),[h,f]=mg(),d=to(u,e),p=fg(t.container),y=fg(t.target),[v,g]=k.useState(!t.show),m=f2(y,c,p2({placement:r,enableEvents:!!t.show,containerPadding:o||5,flip:n,offset:i,arrowElement:h,popperConfig:s}));t.show&&v&&g(!1);const x=(...D)=>{g(!0),t.onExited&&t.onExited(...D)},C=t.show||!v;if(e8(c,t.onHide,{disabled:!t.rootClose||t.rootCloseDisabled,clickTrigger:t.rootCloseEvent}),!C)return null;const{onExit:w,onExiting:b,onEnter:S,onEntering:M,onEntered:N}=t;let O=t.children(Object.assign({},m.attributes.popper,{style:m.styles.popper,ref:d}),{popper:m,placement:r,show:!!t.show,arrowProps:Object.assign({},m.attributes.arrow,{style:m.styles.arrow,ref:f})});return O=dg(l,a,{in:!!t.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:O,onExit:w,onExiting:b,onExited:x,onEnter:S,onEntering:M,onEntered:N}),p?vo.createPortal(O,p):null});m2.displayName="Overlay";const i8=m2,g2=k.forwardRef(({className:t,bsPrefix:e,as:n="div",...i},r)=>(e=me(e,"popover-header"),A.jsx(n,{ref:r,className:fe(t,e),...i})));g2.displayName="PopoverHeader";const r8=g2,y2=k.forwardRef(({className:t,bsPrefix:e,as:n="div",...i},r)=>(e=me(e,"popover-body"),A.jsx(n,{ref:r,className:fe(t,e),...i})));y2.displayName="PopoverBody";const v2=y2;function x2(t,e){let n=t;return t==="left"?n=e?"end":"start":t==="right"&&(n=e?"start":"end"),n}function C2(t="absolute"){return{position:t,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const o8=k.forwardRef(({bsPrefix:t,placement:e="right",className:n,style:i,children:r,body:o,arrowProps:s,hasDoneInitialMeasure:l,popper:a,show:c,...u},h)=>{const f=me(t,"popover"),d=My(),[p]=(e==null?void 0:e.split("-"))||[],y=x2(p,d);let v=i;return c&&!l&&(v={...i,...C2(a==null?void 0:a.strategy)}),A.jsxs("div",{ref:h,role:"tooltip",style:v,"x-placement":p,className:fe(n,f,p&&`bs-popover-${y}`),...u,children:[A.jsx("div",{className:"popover-arrow",...s}),o?A.jsx(v2,{children:r}):r]})}),s8=Object.assign(o8,{Header:r8,Body:v2,POPPER_OFFSET:[0,8]}),w2=k.forwardRef(({bsPrefix:t,placement:e="right",className:n,style:i,children:r,arrowProps:o,hasDoneInitialMeasure:s,popper:l,show:a,...c},u)=>{t=me(t,"tooltip");const h=My(),[f]=(e==null?void 0:e.split("-"))||[],d=x2(f,h);let p=i;return a&&!s&&(p={...i,...C2(l==null?void 0:l.strategy)}),A.jsxs("div",{ref:u,style:p,role:"tooltip","x-placement":f,className:fe(n,t,`bs-tooltip-${d}`),...c,children:[A.jsx("div",{className:"tooltip-arrow",...o}),A.jsx("div",{className:`${t}-inner`,children:r})]})});w2.displayName="Tooltip";const Cv=Object.assign(w2,{TOOLTIP_OFFSET:[0,6]});function l8(t){const e=k.useRef(null),n=me(void 0,"popover"),i=me(void 0,"tooltip"),r=k.useMemo(()=>({name:"offset",options:{offset:()=>{if(t)return t;if(e.current){if(pg(e.current,n))return s8.POPPER_OFFSET;if(pg(e.current,i))return Cv.TOOLTIP_OFFSET}return[0,0]}}}),[t,n,i]);return[e,[r]]}function a8(t,e){const{ref:n}=t,{ref:i}=e;t.ref=n.__wrapped||(n.__wrapped=r=>n(Kh(r))),e.ref=i.__wrapped||(i.__wrapped=r=>i(Kh(r)))}const b2=k.forwardRef(({children:t,transition:e=Hs,popperConfig:n={},rootClose:i=!1,placement:r="top",show:o=!1,...s},l)=>{const a=k.useRef({}),[c,u]=k.useState(null),[h,f]=l8(s.offset),d=to(l,h),p=e===!0?Hs:e||void 0,y=Pe(v=>{u(v),n==null||n.onFirstUpdate==null||n.onFirstUpdate(v)});return Ha(()=>{c&&s.target&&(a.current.scheduleUpdate==null||a.current.scheduleUpdate())},[c,s.target]),k.useEffect(()=>{o||u(null)},[o]),A.jsx(i8,{...s,ref:d,popperConfig:{...n,modifiers:f.concat(n.modifiers||[]),onFirstUpdate:y},transition:p,rootClose:i,placement:r,show:o,children:(v,{arrowProps:g,popper:m,show:x})=>{var C,w;a8(v,g);const b=m==null?void 0:m.placement,S=Object.assign(a.current,{state:m==null?void 0:m.state,scheduleUpdate:m==null?void 0:m.update,placement:b,outOfBoundaries:(m==null||(C=m.state)==null||(w=C.modifiersData.hide)==null?void 0:w.isReferenceHidden)||!1,strategy:n.strategy}),M=!!c;return typeof t=="function"?t({...v,placement:b,show:x,...!e&&x&&{className:"show"},popper:S,arrowProps:g,hasDoneInitialMeasure:M}):k.cloneElement(t,{...v,placement:b,arrowProps:g,popper:S,hasDoneInitialMeasure:M,className:fe(t.props.className,!e&&x&&"show"),style:{...t.props.style,...v.style}})}})});b2.displayName="Overlay";const c8=b2;function u8(t){return t&&typeof t=="object"?t:{show:t,hide:t}}function Iw(t,e,n){const[i]=e,r=i.currentTarget,o=i.relatedTarget||i.nativeEvent[n];(!o||o!==r)&&!Wa(r,o)&&t(...e)}Qu.oneOf(["click","hover","focus"]);const h8=({trigger:t=["hover","focus"],overlay:e,children:n,popperConfig:i={},show:r,defaultShow:o=!1,onToggle:s,delay:l,placement:a,flip:c=a&&a.indexOf("auto")!==-1,...u})=>{const h=k.useRef(null),f=to(h,n.ref),d=n2(),p=k.useRef(""),[y,v]=k_(r,o,s),g=u8(l),{onFocus:m,onBlur:x,onClick:C}=typeof n!="function"?k.Children.only(n).props:{},w=F=>{f(Kh(F))},b=k.useCallback(()=>{if(d.clear(),p.current="show",!g.show){v(!0);return}d.set(()=>{p.current==="show"&&v(!0)},g.show)},[g.show,v,d]),S=k.useCallback(()=>{if(d.clear(),p.current="hide",!g.hide){v(!1);return}d.set(()=>{p.current==="hide"&&v(!1)},g.hide)},[g.hide,v,d]),M=k.useCallback((...F)=>{b(),m==null||m(...F)},[b,m]),N=k.useCallback((...F)=>{S(),x==null||x(...F)},[S,x]),O=k.useCallback((...F)=>{v(!y),C==null||C(...F)},[C,v,y]),D=k.useCallback((...F)=>{Iw(b,F,"fromElement")},[b]),V=k.useCallback((...F)=>{Iw(S,F,"toElement")},[S]),K=t==null?[]:[].concat(t),z={ref:w};return K.indexOf("click")!==-1&&(z.onClick=O),K.indexOf("focus")!==-1&&(z.onFocus=M,z.onBlur=N),K.indexOf("hover")!==-1&&(z.onMouseOver=D,z.onMouseOut=V),A.jsxs(A.Fragment,{children:[typeof n=="function"?n(z):k.cloneElement(n,z),A.jsx(c8,{...u,show:y,onHide:S,flip:c,placement:a,popperConfig:i,target:h.current,children:e})]})},k2=h8,f8=({initialValue:t="",theme:e=dn.Light,onSubmit:n,onChangeStaleness:i})=>{const[r,o]=k.useState(t),s=m=>o(m),[l,a]=k.useState(t),[c,u]=k.useState(!1);k.useEffect(()=>{c&&r===l?(u(!1),i(!1)):!c&&r!==l&&(u(!0),i(!0))},[r,l,c,i]);const h=()=>{a(r),n(r)},f=()=>{o(l)},[d,p]=k.useState(!1),y=()=>{o(""),p(!1)},v=()=>p(!0),g=()=>p(!1);return A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"d-flex justify-content-between",children:[A.jsx("h2",{children:"Makefile"}),A.jsx(k2,{delay:{show:1e3,hide:500},overlay:A.jsx(Cv,{children:"Undo the latest changes to the Makefile"}),children:A.jsxs(Ro,{size:"sm",onClick:f,disabled:!c,className:c?"text-decoration-none text-muted":"text-decoration-none text-secondary",variant:"link",children:[A.jsx("i",{className:"bi bi-arrow-counterclockwise me-2"}),A.jsx("span",{children:"Revert"})]})})]}),A.jsx("div",{className:"mb-3",children:A.jsx(e2,{autoFocus:!0,indentWithTab:!1,theme:e,value:r,onChange:s,height:"200px",placeholder:"Paste or drop your Makefile here...",onDrop:y,onDragEnter:v,onDragLeave:g,style:{outlineWidth:0,outlineStyle:"solid"}})}),A.jsx("div",{className:"d-flex justify-content-between",children:A.jsxs(Ro,{onClick:h,disabled:!c,className:c?"shadow-sm":"shadow-none",children:[A.jsx("i",{className:"bi bi-check-circle me-2"}),A.jsx("span",{children:"Update diagram"})]})})]})};function d8(t){for(var e=[],n=1;ne&&o&&(r+=i),es&&(r+=l.sliceString(e-s,n-s,i)),s=a+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof hi))return 0;let i=0,[r,o,s,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,o+=n){if(r==s||o==l)return i;let a=this.children[r],c=e.children[o];if(a!=c)return i+a.scanIdentical(c,n);i+=a.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new We(d,n)}let r=Math.max(32,i>>5),o=r<<1,s=r>>1,l=[],a=0,c=-1,u=[];function h(d){let p;if(d.lines>o&&d instanceof hi)for(let y of d.children)h(y);else d.lines>s&&(a>s||!a)?(f(),l.push(d)):d instanceof We&&a&&(p=u[u.length-1])instanceof We&&d.lines+p.lines<=32?(a+=d.lines,c+=d.length+1,u[u.length-1]=new We(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>r&&f(),a+=d.lines,c+=d.length+1,u.push(d))}function f(){a!=0&&(l.push(u.length==1?u[0]:hi.from(u,c)),c=-1,a=u.length=0)}for(let d of e)h(d);return f(),l.length==1?l[0]:new hi(l,n)}}ve.empty=new We([""],0);function DF(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Ju(t,e,n=0,i=1e9){for(let r=0,o=0,s=!0;o=n&&(a>i&&(l=l.slice(0,i-r)),r0?1:(e instanceof We?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1,l=r instanceof We?r.text.length:r.children.length;if(s==(n>0?l:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(r instanceof We){let a=r.text[s+(n<0?-1:0)];if(this.offsets[i]+=n,a.length>Math.max(0,e))return this.value=e==0?a:n>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[s+(n<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(n>0?1:(a instanceof We?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class tT{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new ha(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class nT{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(ve.prototype[Symbol.iterator]=function(){return this.iter()},ha.prototype[Symbol.iterator]=tT.prototype[Symbol.iterator]=nT.prototype[Symbol.iterator]=function(){return this});class RF{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}}let As="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;tt)return As[e-1]<=t;return!1}function Nx(t){return t>=127462&&t<=127487}const Px=8205;function _t(t,e,n=!0,i=!0){return(n?iT:NF)(t,e,i)}function iT(t,e,n){if(e==t.length)return e;e&&rT(t.charCodeAt(e))&&oT(t.charCodeAt(e-1))&&e--;let i=ct(t,e);for(e+=Tn(i);e=0&&Nx(ct(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function NF(t,e,n){for(;e>0;){let i=iT(t,e-2,n);if(i=56320&&t<57344}function oT(t){return t>=55296&&t<56320}function ct(t,e){let n=t.charCodeAt(e);if(!oT(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return rT(i)?(n-55296<<10)+(i-56320)+65536:n}function zy(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Tn(t){return t<65536?1:2}const mg=/\r\n?|\n/;var Dt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Dt||(Dt={}));class vi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return o+(e-r);o+=l}else{if(i!=Dt.Simple&&c>=e&&(i==Dt.TrackDel&&re||i==Dt.TrackBefore&&re))return null;if(c>e||c==e&&n<0&&!l)return e==r||n<0?o:o+a;o+=a}r=c}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,n=e){for(let i=0,r=0;i=0&&r<=n&&l>=e)return rn?"cover":!0;r=l}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new vi(e)}static create(e){return new vi(e)}}class Je extends vi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return gg(this,(n,i,r,o,s)=>e=e.replace(r,r+(i-n),s),!1),e}mapDesc(e,n=!1){return yg(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,o=0;r=0){n[r]=l,n[r+1]=s;let a=r>>1;for(;i.length0&&Tr(i,n,o.text),o.forward(u),l+=u}let c=e[s++];for(;l>1].toJSON()))}return e}static of(e,n,i){let r=[],o=[],s=0,l=null;function a(u=!1){if(!u&&!r.length)return;sf||h<0||f>n)throw new RangeError(`Invalid change range ${h} to ${f} (in doc of length ${n})`);let p=d?typeof d=="string"?ve.of(d.split(i||mg)):d:ve.empty,y=p.length;if(h==f&&y==0)return;hs&&Ct(r,h-s,-1),Ct(r,f-h,y),Tr(o,r,p),s=f}}return c(e),a(!l),l}static empty(e){return new Je(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;rl&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;i.length=0&&n<=0&&n==t[r+1]?t[r]+=e:e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Tr(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)l=t.sections[s++],a=t.sections[s++];e(r,c,o,u,h),r=c,o=u}}}function yg(t,e,n,i=!1){let r=[],o=i?[]:null,s=new Va(t),l=new Va(e);for(let a=-1;;)if(s.ins==-1&&l.ins==-1){let c=Math.min(s.len,l.len);Ct(r,c,-1),s.forward(c),l.forward(c)}else if(l.ins>=0&&(s.ins<0||a==s.i||s.off==0&&(l.len=0&&a=0){let c=0,u=s.len;for(;u;)if(l.ins==-1){let h=Math.min(u,l.len);c+=h,u-=h,l.forward(h)}else if(l.ins==0&&l.lena||s.ins>=0&&s.len>a)&&(l||i.length>c),o.forward2(a),s.forward(a)}}}}class Va{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?ve.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?ve.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class xo{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new xo(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return I.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return I.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return I.range(e.anchor,e.head)}static create(e,n,i){return new xo(e,n,i)}}class I{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:I.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new I(e.ranges.map(n=>xo.fromJSON(n)),e.main)}static single(e,n=e){return new I([I.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?8:0)|o)}static normalized(e,n=0){let i=e[n];e.sort((r,o)=>r.from-o.from),n=e.indexOf(i);for(let r=1;ro.head?I.range(a,l):I.range(l,a))}}return new I(e,n)}}function lT(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let jy=0;class Q{constructor(e,n,i,r,o){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=jy++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new Q(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:Hy),!!e.static,e.enables)}of(e){return new Zu([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Zu(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Zu(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function Hy(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class Zu{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=jy++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,o=this.id,s=e[o]>>1,l=this.type==2,a=!1,c=!1,u=[];for(let h of this.dependencies)h=="doc"?a=!0:h=="selection"?c=!0:((n=e[h.id])!==null&&n!==void 0?n:1)&1||u.push(e[h.id]);return{create(h){return h.values[s]=i(h),1},update(h,f){if(a&&f.docChanged||c&&(f.docChanged||f.selection)||vg(h,u)){let d=i(h);if(l?!Ix(d,h.values[s],r):!r(d,h.values[s]))return h.values[s]=d,1}return 0},reconfigure:(h,f)=>{let d,p=f.config.address[o];if(p!=null){let y=Gh(f,p);if(this.dependencies.every(v=>v instanceof Q?f.facet(v)===h.facet(v):v instanceof pt?f.field(v,!1)==h.field(v,!1):!0)||(l?Ix(d=i(h),y,r):r(d=i(h),y)))return h.values[s]=y,0}else d=i(h);return h.values[s]=d,1}}}}function Ix(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[a.id]),r=n.map(a=>a.type),o=i.filter(a=>!(a&1)),s=t[e.id]>>1;function l(a){let c=[];for(let u=0;ui===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet($x).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let o=i.values[n],s=this.updateF(o,r);return this.compareF(o,s)?0:(i.values[n]=s,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}init(e){return[this,$x.of({field:this,create:e})]}get extension(){return this}}const fo={lowest:4,low:3,default:2,high:1,highest:0};function Ml(t){return e=>new aT(e,t)}const cl={highest:Ml(fo.highest),high:Ml(fo.high),default:Ml(fo.default),low:Ml(fo.low),lowest:Ml(fo.lowest)};class aT{constructor(e,n){this.inner=e,this.prec=n}}class ld{of(e){return new xg(this,e)}reconfigure(e){return ld.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class xg{constructor(e,n){this.compartment=e,this.inner=n}}class Yh{constructor(e,n,i,r,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let r=[],o=Object.create(null),s=new Map;for(let f of IF(e,n,s))f instanceof pt?r.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let l=Object.create(null),a=[],c=[];for(let f of r)l[f.id]=c.length<<1,c.push(d=>f.slot(d));let u=i==null?void 0:i.config.facets;for(let f in o){let d=o[f],p=d[0].facet,y=u&&u[f]||[];if(d.every(v=>v.type==0))if(l[p.id]=a.length<<1|1,Hy(y,d))a.push(i.facet(p));else{let v=p.combine(d.map(g=>g.value));a.push(i&&p.compare(v,i.facet(p))?i.facet(p):v)}else{for(let v of d)v.type==0?(l[v.id]=a.length<<1|1,a.push(v.value)):(l[v.id]=c.length<<1,c.push(g=>v.dynamicSlot(g)));l[p.id]=c.length<<1,c.push(v=>PF(v,p,d))}}let h=c.map(f=>f(l));return new Yh(e,s,h,l,a,o)}}function IF(t,e,n){let i=[[],[],[],[],[]],r=new Map;function o(s,l){let a=r.get(s);if(a!=null){if(a<=l)return;let c=i[a].indexOf(s);c>-1&&i[a].splice(c,1),s instanceof xg&&n.delete(s.compartment)}if(r.set(s,l),Array.isArray(s))for(let c of s)o(c,l);else if(s instanceof xg){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(s.compartment)||s.inner;n.set(s.compartment,c),o(c,l)}else if(s instanceof aT)o(s.inner,s.prec);else if(s instanceof pt)i[l].push(s),s.provides&&o(s.provides,l);else if(s instanceof Zu)i[l].push(s),s.facet.extensions&&o(s.facet.extensions,fo.default);else{let c=s.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(c,l)}}return o(t,fo.default),i.reduce((s,l)=>s.concat(l))}function fa(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function Gh(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const cT=Q.define(),uT=Q.define({combine:t=>t.some(e=>e),static:!0}),hT=Q.define({combine:t=>t.length?t[0]:void 0,static:!0}),fT=Q.define(),dT=Q.define(),pT=Q.define(),mT=Q.define({combine:t=>t.length?t[0]:!1});class Ti{constructor(e,n){this.type=e,this.value=n}static define(){return new $F}}class $F{of(e){return new Ti(this,e)}}class zF{constructor(e){this.map=e}of(e){return new he(this,e)}}class he{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new he(this.type,n)}is(e){return this.type==e}static define(e={}){return new zF(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let o=r.map(n);o&&i.push(o)}return i}}he.reconfigure=he.define();he.appendConfig=he.define();class tt{constructor(e,n,i,r,o,s){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&lT(i,n.newLength),o.some(l=>l.type==tt.time)||(this.annotations=o.concat(tt.time.of(Date.now())))}static create(e,n,i,r,o,s){return new tt(e,n,i,r,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(tt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}tt.time=Ti.define();tt.userEvent=Ti.define();tt.addToHistory=Ti.define();tt.remote=Ti.define();function jF(t,e){let n=[];for(let i=0,r=0;;){let o,s;if(i=t[i]))o=t[i++],s=t[i++];else if(r=0;r--){let o=i[r](t);o instanceof tt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof tt?t=o[0]:t=yT(e,Ms(o),!1)}return t}function WF(t){let e=t.startState,n=e.facet(pT),i=t;for(let r=n.length-1;r>=0;r--){let o=n[r](t);o&&Object.keys(o).length&&(i=gT(i,Cg(e,o,t.changes.newLength),!0))}return i==t?t:tt.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const VF=[];function Ms(t){return t==null?VF:Array.isArray(t)?t:[t]}var Re=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Re||(Re={}));const qF=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let wg;try{wg=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function UF(t){if(wg)return wg.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||qF.test(n)))return!0}return!1}function KF(t){return e=>{if(!/\S/.test(e))return Re.Space;if(UF(e))return Re.Word;for(let n=0;n-1)return Re.Word;return Re.Other}}class pe{constructor(e,n,i,r,o,s){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let l=0;lr.set(a,l)),n=null),r.set(s.value.compartment,s.value.extension)):s.is(he.reconfigure)?(n=null,i=s.value):s.is(he.appendConfig)&&(n=null,i=Ms(i).concat(s.value));let o;n?o=e.startState.values.slice():(n=Yh.resolve(i,r,this),o=new pe(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,a)=>a.reconfigure(l,this),null).values),new pe(n,e.newDoc,e.newSelection,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:I.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),o=[i.range],s=Ms(i.effects);for(let l=1;ls.spec.fromJSON(l,a)))}}return pe.create({doc:e.doc,selection:I.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=Yh.resolve(e.extensions||[],new Map),i=e.doc instanceof ve?e.doc:ve.of((e.doc||"").split(n.staticFacet(pe.lineSeparator)||mg)),r=e.selection?e.selection instanceof I?e.selection:I.single(e.selection.anchor,e.selection.head):I.single(0);return lT(r,i.length),n.staticFacet(uT)||(r=r.asSingle()),new pe(n,i,r,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(pe.tabSize)}get lineBreak(){return this.facet(pe.lineSeparator)||` +`}get readOnly(){return this.facet(mT)}phrase(e,...n){for(let i of this.facet(pe.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let o=+(r||1);return!o||o>n.length?i:n[o-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let o of this.facet(cT))for(let s of o(this,n,i))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){return KF(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-i,l=e-i;for(;s>0;){let a=_t(n,s,!1);if(o(n.slice(a,s))!=Re.Word)break;s=a}for(;lt.length?t[0]:4});pe.lineSeparator=hT;pe.readOnly=mT;pe.phrases=Q.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});pe.languageData=cT;pe.changeFilter=fT;pe.transactionFilter=dT;pe.transactionExtender=pT;ld.reconfigure=he.define();function Ei(t,e,n={}){let i={};for(let r of t)for(let o of Object.keys(r)){let s=r[o],l=i[o];if(l===void 0)i[o]=s;else if(!(l===s||s===void 0))if(Object.hasOwnProperty.call(n,o))i[o]=n[o](l,s);else throw new Error("Config merge conflict for field "+o)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Fo{eq(e){return this==e}range(e,n=e){return bg.create(e,n,this)}}Fo.prototype.startSide=Fo.prototype.endSide=0;Fo.prototype.point=!1;Fo.prototype.mapMode=Dt.TrackDel;let bg=class vT{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new vT(e,n,i)}};function kg(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Wy{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let o=i?this.to:this.from;for(let s=r,l=o.length;;){if(s==l)return s;let a=s+l>>1,c=o[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-n;if(a==s)return c>=0?s:l;c>=0?l=a:s=a+1}}between(e,n,i,r){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(i,1e9,!1,o);od||f==d&&c.startSide>0&&c.endSide<=0)continue;(d-f||c.endSide-c.startSide)<0||(s<0&&(s=f),c.point&&(l=Math.max(l,d-f)),i.push(c),r.push(f-s),o.push(d-s))}return{mapped:i.length?new Wy(r,o,i,l):null,pos:s}}}class xe{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new xe(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(i&&(n=n.slice().sort(kg)),this.isEmpty)return n.length?xe.of(n):this;let l=new xT(this,null,-1).goto(0),a=0,c=[],u=new Vr;for(;l.value||a=0){let h=n[a++];u.addInner(h.from,h.to,h.value)||c.push(h)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||ol.to||o=o&&e<=o+s.length&&s.between(o,e-o,n-o,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return qa.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return qa.from(e).goto(n)}static compare(e,n,i,r,o=-1){let s=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=o),l=n.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=o),a=zx(s,l,i),c=new Ll(s,a,o),u=new Ll(l,a,o);i.iterGaps((h,f,d)=>jx(c,h,u,f,d,r)),i.empty&&i.length==0&&jx(c,0,u,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=1e9-1);let o=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),s=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let l=zx(o,s),a=new Ll(o,l,0).goto(i),c=new Ll(s,l,0).goto(i);for(;;){if(a.to!=c.to||!Sg(a.active,c.active)||a.point&&(!c.point||!a.point.eq(c.point)))return!1;if(a.to>r)return!0;a.next(),c.next()}}static spans(e,n,i,r,o=-1){let s=new Ll(e,null,o).goto(n),l=n,a=s.openStart;for(;;){let c=Math.min(s.to,i);if(s.point){let u=s.activeForPoint(s.to),h=s.pointFroml&&(r.span(l,c,s.active,a),a=s.openEnd(c));if(s.to>i)return a+(s.point&&s.to>i?1:0);l=s.to,s.next()}}static of(e,n=!1){let i=new Vr;for(let r of e instanceof bg?[e]:n?YF(e):e)i.add(r.from,r.to,r.value);return i.finish()}}xe.empty=new xe([],[],null,-1);function YF(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(kg);e=i}return t}xe.empty.nextLayer=xe.empty;class Vr{finishChunk(e){this.chunks.push(new Wy(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new Vr)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(xe.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=xe.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function zx(t,e,n){let i=new Map;for(let o of t)for(let s=0;s=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new xT(s,n,i,o));return r.length==1?r[0]:new qa(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)_p(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)_p(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),_p(this.heap,0)}}}function _p(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Ll{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=qa.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){ou(this.active,e),ou(this.activeTo,e),ou(this.activeRank,e),this.minActive=Hx(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:o}=this.cursor;for(;n-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&ou(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function jx(t,e,n,i,r,o){t.goto(e),n.goto(i);let s=i+r,l=i,a=i-e;for(;;){let c=t.to+a-n.to||t.endSide-n.endSide,u=c<0?t.to+a:n.to,h=Math.min(u,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&Sg(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(l,h,t.point,n.point):h>l&&!Sg(t.active,n.active)&&o.compareRange(l,h,t.active,n.active),u>s)break;l=u,c<=0&&t.next(),c>=0&&n.next()}}function Sg(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function Hx(t,e){let n=-1,i=1e9;for(let r=0;r=e)return r;if(r==t.length)break;o+=t.charCodeAt(r)==9?n-o%n:1,r=_t(t,r)}return i===!0?-1:t.length}const Tg="ͼ",Wx=typeof Symbol>"u"?"__"+Tg:Symbol.for(Tg),Eg=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Vx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class qr{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,l,a,c){let u=[],h=/^@(\w+)\b/.exec(s[0]),f=h&&h[1]=="keyframes";if(h&&l==null)return a.push(s[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))o(d.split(/,\s*/).map(y=>s.map(v=>y.replace(/&/,v))).reduce((y,v)=>y.concat(v)),p,a);else if(p&&typeof p=="object"){if(!h)throw new RangeError("The value of a property ("+d+") should be a primitive value.");o(r(d),p,u,f)}else p!=null&&u.push(d.replace(/_.*/,"").replace(/[A-Z]/g,y=>"-"+y.toLowerCase())+": "+p+";")}(u.length||f)&&a.push((i&&!h&&!c?s.map(i):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in e)o(r(s),e[s],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=Vx[Wx]||1;return Vx[Wx]=e+1,Tg+e.toString(36)}static mount(e,n,i){let r=e[Eg],o=i&&i.nonce;r?o&&r.setNonce(o):r=new GF(e,o),r.mount(Array.isArray(n)?n:[n])}}let qx=new Map;class GF{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let o=qx.get(i);if(o)return e.adoptedStyleSheets=[o.sheet,...e.adoptedStyleSheets],e[Eg]=o;this.sheet=new r.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],qx.set(i,this)}else{this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let o=e.head||e;o.insertBefore(this.styleTag,o.firstChild)}this.modules=[],e[Eg]=this}mount(e){let n=this.sheet,i=0,r=0;for(let o=0;o-1&&(this.modules.splice(l,1),r--,l=-1),l==-1){if(this.modules.splice(r++,0,s),n)for(let a=0;a",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},XF=typeof navigator<"u"&&/Mac/.test(navigator.platform),QF=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ut=0;ut<10;ut++)Ur[48+ut]=Ur[96+ut]=String(ut);for(var ut=1;ut<=24;ut++)Ur[ut+111]="F"+ut;for(var ut=65;ut<=90;ut++)Ur[ut]=String.fromCharCode(ut+32),Ua[ut]=String.fromCharCode(ut);for(var Tp in Ur)Ua.hasOwnProperty(Tp)||(Ua[Tp]=Ur[Tp]);function JF(t){var e=XF&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||QF&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ua:Ur)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Xh(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Ag(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function ZF(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function eh(t,e){if(!e.anchorNode)return!1;try{return Ag(t,e.anchorNode)}catch{return!1}}function Ws(t){return t.nodeType==3?No(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Qh(t,e,n,i){return n?Ux(t,e,n,i,-1)||Ux(t,e,n,i,1):!1}function Ka(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Ux(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:er(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=Ka(t)+(r<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?er(t):0}else return!1}}function er(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function ad(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function e3(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function t3(t,e,n,i,r,o,s,l){let a=t.ownerDocument,c=a.defaultView||window;for(let u=t,h=!1;u&&!h;)if(u.nodeType==1){let f,d=u==a.body,p=1,y=1;if(d)f=e3(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(h=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let m=u.getBoundingClientRect();p=m.width/u.offsetWidth,y=m.height/u.offsetHeight,f={left:m.left,right:m.left+u.clientWidth*p,top:m.top,bottom:m.top+u.clientHeight*y}}let v=0,g=0;if(r=="nearest")e.top0&&e.bottom>f.bottom+g&&(g=e.bottom-f.bottom+g+s)):e.bottom>f.bottom&&(g=e.bottom-f.bottom+s,n<0&&e.top-g0&&e.right>f.right+v&&(v=e.right-f.right+v+o)):e.right>f.right&&(v=e.right-f.right+o,n<0&&e.leftn.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class i3{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?er(n):0),i,Math.min(e.focusOffset,i?er(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let ts=null;function CT(t){if(t.setActive)return t.setActive();if(ts)return t.focus(ts);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(ts==null?{get preventScroll(){return ts={preventScroll:!0},!0}}:void 0),!ts){ts=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}class bt{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new bt(e.parentNode,Ka(e),n)}static after(e,n){return new bt(e.parentNode,Ka(e)+1,n)}}const Vy=[];class Oe{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let i of this.children){if(i==e)return n;n+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let i=this.dom,r=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=r?r.nextSibling:i.firstChild)){let l=Oe.get(o);(!l||!l.parent&&l.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=r?r.nextSibling:i.firstChild,n&&!n.written&&n.node==i&&o!=s.dom&&(n.written=!0),s.dom.parentNode==i)for(;o&&o!=s.dom;)o=Yx(o);else i.insertBefore(s.dom,o);r=s.dom}for(o=r?r.nextSibling:i.firstChild,o&&n&&n.node==i&&(n.written=!0);o;)o=Yx(o)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,n),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let i;if(e==this.dom)i=this.dom.childNodes[n];else{let r=er(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;r==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?r=-1:r=1),e=o}r<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!Oe.get(i);)i=i.nextSibling;if(!i)return this.length;for(let r=0,o=0;;r++){let s=this.children[r];if(s.dom==i)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,i=0){let r=-1,o=-1,s=-1,l=-1;for(let a=0,c=i,u=i;an)return h.domBoundsAround(e,n,c);if(f>=e&&r==-1&&(r=a,o=c),c>n&&h.dom.parentNode==this.dom){s=a,l=u;break}u=f,c=f+h.breakAfter}return{from:o,to:l<0?i+this.length:l,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=Vy){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function ST(t,e,n,i,r,o,s,l,a){let{children:c}=t,u=c.length?c[e]:null,h=o.length?o[o.length-1]:null,f=h?h.breakAfter:s;if(!(e==i&&u&&!s&&!f&&o.length<2&&u.merge(n,r,o.length?h:null,n==0,l,a))){if(i0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,l,0)?u.breakAfter=o.shift().breakAfter:(n2);var Z={mac:Qx||/Mac/.test(hn.platform),windows:/Win/.test(hn.platform),linux:/Linux|X11/.test(hn.platform),ie:cd,ie_version:TT?Mg.documentMode||6:Og?+Og[1]:Lg?+Lg[1]:0,gecko:Gx,gecko_version:Gx?+(/Firefox\/(\d+)/.exec(hn.userAgent)||[0,0])[1]:0,chrome:!!Ep,chrome_version:Ep?+Ep[1]:0,ios:Qx,android:/Android\b/.test(hn.userAgent),webkit:Xx,safari:ET,webkit_version:Xx?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Mg.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const s3=256;class tr extends Oe{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof tr)||this.length-(n-e)+i.length>s3||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new tr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new bt(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return l3(this.dom,e,n)}}class nr extends Oe{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if(wT(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,o,s){return i&&(!(i instanceof nr&&i.mark.eq(this.mark))||e&&o<=0||ne&&n.push(i=e&&(r=o),i=a,o++}let s=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new nr(this.mark,n,s)}domAtPos(e){return AT(this,e)}coordsAt(e,n){return LT(this,e,n)}}function l3(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,o=e,s=0;e==0&&n<0||e==i&&n>=0?Z.chrome||Z.gecko||(e?(r--,s=1):o=0)?0:l.length-1];return Z.safari&&!s&&a.width==0&&(a=Array.prototype.find.call(l,c=>c.width)||a),s?ad(a,s<0):a||null}class Er extends Oe{static create(e,n,i){return new Er(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=Er.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,n,i,r,o,s){return i&&(!(i instanceof Er)||!this.widget.compare(i.widget)||e>0&&o<=0||n0)?bt.before(this.dom):bt.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let s=this.side?this.side<0:e>0;for(let l=s?r.length-1:0;o=r[l],!(e>0?l==0:l==r.length-1||o.top0?bt.before(this.dom):bt.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return ve.empty}get isHidden(){return!0}}tr.prototype.children=Er.prototype.children=Vs.prototype.children=Vy;function AT(t,e){let n=t.dom,{children:i}=t,r=0;for(let o=0;ro&&e0;o--){let s=i[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=r;o0&&e instanceof nr&&r.length&&(i=r[r.length-1])instanceof nr&&i.mark.eq(e.mark)?MT(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function LT(t,e,n){let i=null,r=-1,o=null,s=-1;function l(c,u){for(let h=0,f=0;h=u&&(d.children.length?l(d,u-f):(!o||o.isHidden&&n>0)&&(p>u||f==p&&d.getSide()>0)?(o=d,s=u-f):(f-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let o of i)if(o!=n&&(r.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function Dg(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function c3(t){let e=Object.create(null);for(let n=0;n0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){qy(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){MT(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=Bg(n,this.attrs||{})),i&&(this.attrs=Bg({class:i},this.attrs||{}))}domAtPos(e){return AT(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(wT(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Dg(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&Oe.get(r)instanceof nr;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=Oe.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!Z.ios||!this.children.some(o=>o instanceof tr))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof tr)||/[^ -~]/.test(i.text))return null;let r=Ws(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=LT(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,o=i.bottom-i.top;if(Math.abs(o-r.lineHeight)<2&&r.textHeight=n){if(o instanceof Xe)return o;if(s>n)break}r=s+o.breakAfter}return null}}class Ir extends Oe{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,o,s){return i&&(!(i instanceof Ir)||!this.widget.compare(i.widget)||e>0&&o<=0||n0}}class cr{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}destroy(e){}}var Pt=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Pt||(Pt={}));class se extends Fo{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new bc(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Kr(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:o,end:s}=OT(e,n);i=(o?n?-3e8:-1:5e8)-1,r=(s?n?2e8:1:-6e8)+1}return new Kr(e,i,r,n,e.widget||null,!0)}static line(e){return new kc(e)}static set(e,n=!1){return xe.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}se.none=xe.empty;class bc extends se{constructor(e){let{start:n,end:i}=OT(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof bc&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&qy(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}bc.prototype.point=!1;class kc extends se{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof kc&&this.spec.class==e.spec.class&&qy(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}kc.prototype.mapMode=Dt.TrackBefore;kc.prototype.point=!0;class Kr extends se{constructor(e,n,i,r,o,s){super(n,i,o,e),this.block=r,this.isReplace=s,this.mapMode=r?n<=0?Dt.TrackBefore:Dt.TrackAfter:Dt.TrackDel}get type(){return this.startSide!=this.endSide?Pt.WidgetRange:this.startSide<=0?Pt.WidgetBefore:Pt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Kr&&u3(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Kr.prototype.point=!0;function OT(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function u3(t,e){return t==e||!!(t&&e&&t.compare(e))}function Rg(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class da{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Ir&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Xe),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(lu(new Vs(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Ir)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(lu(new tr(this.text.slice(this.textOff,this.textOff+r)),n),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof Kr){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=n-e;if(i instanceof Kr)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ir(i.widget||new Zx("div"),l,i));else{let a=Er.create(i.widget||new Zx("span"),l,l?0:i.startSide),c=this.atCursorPos&&!a.isEditable&&o<=r.length&&(e0),u=!a.isEditable&&(er.length||i.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!c&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),c&&(h.append(lu(new Vs(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(lu(a,r),o),this.atCursorPos=u,this.pendingBuffer=u?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,i,r,o){let s=new da(e,n,i,o);return s.openEnd=xe.spans(r,n,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function lu(t,e){for(let n of e)t=new nr(n,[t],t.length);return t}class Zx extends cr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const BT=Q.define(),DT=Q.define(),RT=Q.define(),FT=Q.define(),Fg=Q.define(),NT=Q.define(),PT=Q.define(),IT=Q.define({combine:t=>t.some(e=>e)}),$T=Q.define({combine:t=>t.some(e=>e)});class Jh{constructor(e,n="nearest",i="nearest",r=5,o=5){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=o}map(e){return e.empty?this:new Jh(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const eC=he.define({map:(t,e)=>t.map(e)});function Yn(t,e,n){let i=t.facet(FT);i.length?i[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const ud=Q.define({combine:t=>t.length?t[0]:!0});let h3=0;const Ul=Q.define();class qe{constructor(e,n,i,r,o){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.extension=o(this)}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:o,decorations:s}=n||{};return new qe(h3++,e,i,r,l=>{let a=[Ul.of(l)];return s&&a.push(Ya.of(c=>{let u=c.plugin(l);return u?s(u):se.none})),o&&a.push(o(l)),a})}static fromClass(e,n){return qe.define(i=>new e(i),n)}}class Ap{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(Yn(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){Yn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){Yn(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const zT=Q.define(),Uy=Q.define(),Ya=Q.define(),Ky=Q.define(),jT=Q.define();function tC(t,e,n){let i=t.state.facet(jT);if(!i.length)return i;let r=i.map(s=>s instanceof Function?s(t):s),o=[];return xe.spans(r,e,n,{point(){},span(s,l,a,c){let u=o;for(let h=a.length-1;h>=0;h--,c--){let f=a[h].spec.bidiIsolate,d;if(f!=null)if(c>0&&u.length&&(d=u[u.length-1]).to==s&&d.direction==f)d.to=l,u=d.inner;else{let p={from:s,to:l,direction:f,inner:[]};u.push(p),u=p.inner}}}}),o}const HT=Q.define();function WT(t){let e=0,n=0,i=0,r=0;for(let o of t.state.facet(HT)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(i=Math.max(i,s.top)),s.bottom!=null&&(r=Math.max(r,s.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Kl=Q.define();class Ln{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new Ln(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toAu)break;o+=2}if(!a)return i;new Ln(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),s=a.toA,l=a.toB}}}class Zh{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Je.empty(this.startState.doc.length);for(let o of i)this.changes=this.changes.compose(o.changes);let r=[];this.changes.iterChangedRanges((o,s,l,a)=>r.push(new Ln(o,s,l,a))),this.changedRanges=r}static create(e,n,i){return new Zh(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var Ie=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Ie||(Ie={}));const Ga=Ie.LTR,VT=Ie.RTL;function qT(t){let e=[];for(let n=0;n=n){if(l.level==i)return s;(o<0||(r!=0?r<0?l.fromn:e[o].level>l.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function UT(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;y-=3)if(ri[y+1]==-d){let v=ri[y+2],g=v&2?r:v&4?v&1?o:r:0;g&&(Se[h]=Se[ri[y]]=g),l=y;break}}else{if(ri.length==189)break;ri[l++]=h,ri[l++]=f,ri[l++]=a}else if((p=Se[h])==2||p==1){let y=p==r;a=y?0:1;for(let v=l-3;v>=0;v-=3){let g=ri[v+2];if(g&2)break;if(y)ri[v+2]|=2;else{if(g&4)break;ri[v+2]|=4}}}}}function v3(t,e,n,i){for(let r=0,o=i;r<=n.length;r++){let s=r?n[r-1].to:t,l=ra;)p==v&&(p=n[--y].from,v=y?n[y-1].to:t),Se[--p]=d;a=u}else o=c,a++}}}function Pg(t,e,n,i,r,o,s){let l=i%2?2:1;if(i%2==r%2)for(let a=e,c=0;aa&&s.push(new Ar(a,y.from,d));let v=y.direction==Ga!=!(d%2);Ig(t,v?i+1:i,r,y.inner,y.from,y.to,s),a=y.to}p=y.to}else{if(p==n||(u?Se[p]!=l:Se[p]==l))break;p++}f?Pg(t,a,p,i+1,r,f,s):ae;){let u=!0,h=!1;if(!c||a>o[c-1].to){let y=Se[a-1];y!=l&&(u=!1,h=y==16)}let f=!u&&l==1?[]:null,d=u?i:i+1,p=a;e:for(;;)if(c&&p==o[c-1].to){if(h)break e;let y=o[--c];if(!u)for(let v=y.from,g=c;;){if(v==e)break e;if(g&&o[g-1].to==v)v=o[--g].from;else{if(Se[v-1]==l)break e;break}}if(f)f.push(y);else{y.toSe.length;)Se[Se.length]=256;let i=[],r=e==Ga?0:1;return Ig(t,r,r,n,0,t.length,i),i}function KT(t){return[new Ar(0,t,0)]}let YT="";function C3(t,e,n,i,r){var o;let s=i.head-t.from,l=-1;if(s==0){if(!r||!t.length)return null;e[0].level!=n&&(s=e[0].side(!1,n),l=0)}else if(s==t.length){if(r)return null;let f=e[e.length-1];f.level!=n&&(s=f.side(!0,n),l=e.length-1)}l<0&&(l=Ar.find(e,s,(o=i.bidiLevel)!==null&&o!==void 0?o:-1,i.assoc));let a=e[l];s==a.side(r,n)&&(a=e[l+=r?1:-1],s=a.side(!r,n));let c=r==(a.dir==n),u=_t(t.text,s,c);if(YT=t.text.slice(Math.min(s,u),Math.max(s,u)),u!=a.side(r,n))return I.cursor(u+t.from,c?-1:1,a.level);let h=l==(r?e.length-1:0)?null:e[l+(r?1:-1)];return!h&&a.level!=n?I.cursor(r?t.to:t.from,r?-1:1,n):h&&h.level0&&i.length&&(i.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!E3(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let o=r>-1?b3(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;i=new Ln(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(i.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Z.ie||Z.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,l=this.updateDeco(),a=_3(s,l,e.changes);return i=Ln.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Z.chrome||Z.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||r.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?r[s]:null;if(!l)break;let{fromA:a,toA:c,fromB:u,toB:h}=l,f,d,p,y;if(i&&i.range.fromBu){let C=da.build(this.view.state.doc,u,i.range.fromB,this.decorations,this.dynamicDecorationMap),w=da.build(this.view.state.doc,i.range.toB,h,this.decorations,this.dynamicDecorationMap);d=C.breakAtStart,p=C.openStart,y=w.openEnd;let b=this.compositionView(i);w.breakAtStart?b.breakAfter=1:w.content.length&&b.merge(b.length,b.length,w.content[0],!1,w.openStart,0)&&(b.breakAfter=w.content[0].breakAfter,w.content.shift()),C.content.length&&b.merge(0,0,C.content[C.content.length-1],!0,0,C.openEnd)&&C.content.pop(),f=C.content.concat(b).concat(w.content)}else({content:f,breakAtStart:d,openStart:p,openEnd:y}=da.build(this.view.state.doc,u,h,this.decorations,this.dynamicDecorationMap));let{i:v,off:g}=o.findPos(c,1),{i:m,off:x}=o.findPos(a,-1);ST(this,m,x,v,g,f,d,p,y)}i&&this.fixCompositionDOM(i)}compositionView(e){let n=new tr(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new nr(r,[n],n.length);let i=new Xe;return i.append(n,0),i}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(s);let l=Oe.get(o);l&&l!=s&&(l.dom=null),s.setDOM(o)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let o=e.marks.length-1;o>=-1;o--)i=r.childPos(i.off,1),r=r.children[i.i],n(o>=0?e.marks[o].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,o=!r&&eh(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),c=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(Z.gecko&&l.empty&&!this.hasComposition&&w3(a)){let h=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(h,a.node.childNodes[a.offset]||null)),a=c=new bt(h,0),s=!0}let u=this.view.observer.selectionRange;(s||!u.focusNode||!Qh(a.node,a.offset,u.anchorNode,u.anchorOffset)||!Qh(c.node,c.offset,u.focusNode,u.focusOffset))&&(this.view.observer.ignore(()=>{Z.android&&Z.chrome&&this.dom.contains(u.focusNode)&&T3(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=Xh(this.view.root);if(h)if(l.empty){if(Z.gecko){let f=k3(a.node,a.offset);if(f&&f!=3){let d=XT(a.node,a.offset,f==1?1:-1);d&&(a=new bt(d.node,d.offset))}}h.collapse(a.node,a.offset),l.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=l.bidiLevel)}else if(h.extend){h.collapse(a.node,a.offset);try{h.extend(c.node,c.offset)}catch{}}else{let f=document.createRange();l.anchor>l.head&&([a,c]=[c,a]),f.setEnd(c.node,c.offset),f.setStart(a.node,a.offset),h.removeAllRanges(),h.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,c)),this.impreciseAnchor=a.precise?null:new bt(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new bt(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=Xh(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let s=Xe.find(this,n.head);if(!s)return;let l=s.posAtStart;if(n.head==l||n.head==l+s.length)return;let a=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!a||!c||a.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);i.collapse(u.node,u.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=n.from&&i.collapse(r,o)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r=0;r--){let o=Oe.get(n.childNodes[r]);o instanceof Xe&&(i=o.domAtPos(o.length))}return i?new bt(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=Oe.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;s--){let l=this.children[s],a=o-l.breakAfter,c=a-l.length;if(ae||l.covers(1))&&(!i||l instanceof Xe&&!(i instanceof Xe&&n>=0))&&(i=l,r=c),o=c}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof Xe))return null;for(;r.children.length;){let{i:l,off:a}=r.childPos(i,1);for(;;l++){if(l==r.children.length)return null;if((r=r.children[l]).length)break}i=a}if(!(r instanceof tr))return null;let o=_t(r.text,i);if(o==i)return null;let s=No(r.dom,i,o).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==Ie.LTR;for(let c=0,u=0;ur)break;if(c>=i){let d=h.dom.getBoundingClientRect();if(n.push(d.height),s){let p=h.dom.lastChild,y=p?Ws(p):[];if(y.length){let v=y[y.length-1],g=a?v.right-d.left:d.right-v.left;g>l&&(l=g,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+h.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Ie.RTL:Ie.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Xe){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Ws(e.firstChild)[0];n=e.getBoundingClientRect().height,i=o?o.width/27:7,r=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new kT(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let o=r==n.viewports.length?null:n.viewports[r],s=o?o.from-1:this.length;if(s>i){let l=(n.lineBlockAt(s).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(se.replace({widget:new iC(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,s))}if(!o)break;i=o.to+1}return se.set(e)}updateDeco(){let e=this.view.state.facet(Ya).map((n,i)=>(this.dynamicDecorationMap[i]=typeof n=="function")?n(this.view):n);for(let n=e.length;nn.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let o=WT(this.view),s={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom};t3(this.view.scrollDOM,s,n.head0)i=i.childNodes[r-1],r=er(i);else break}if(n>=0)for(let i=t,r=e;;){if(i.nodeType==3)return{node:i,offset:r};if(i.nodeType==1&&r=0)i=i.childNodes[r],r=0;else break}return null}function k3(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e{ie.from&&(n=!0)}),n}function A3(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),o=e-r.from;if(r.length==0)return I.cursor(e);o==0?n=1:o==r.length&&(n=-1);let s=o,l=o;n<0?s=_t(r.text,o,!1):l=_t(r.text,o);let a=i(r.text.slice(s,l));for(;s>0;){let c=_t(r.text,s,!1);if(i(r.text.slice(c,s))!=a)break;s=c}for(;lt?e.left-t:Math.max(0,t-e.right)}function L3(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Mp(t,e){return t.tope.top+1}function rC(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function $g(t,e,n){let i,r,o,s,l=!1,a,c,u,h;for(let p=t.firstChild;p;p=p.nextSibling){let y=Ws(p);for(let v=0;vx||s==x&&o>m){i=p,r=g,o=m,s=x;let C=x?n0?v0)}m==0?n>g.bottom&&(!u||u.bottomg.top)&&(c=p,h=g):u&&Mp(u,g)?u=oC(u,g.bottom):h&&Mp(h,g)&&(h=rC(h,g.top))}}if(u&&u.bottom>=n?(i=a,r=u):h&&h.top<=n&&(i=c,r=h),!i)return{node:t,offset:0};let f=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return sC(i,f,n);if(l&&i.contentEditable!="false")return $g(i,f,n);let d=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:d}}function sC(t,e,n){let i=t.nodeValue.length,r=-1,o=1e9,s=0;for(let l=0;ln?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&h=(u.left+u.right)/2,d=f;if((Z.chrome||Z.gecko)&&No(t,l).getBoundingClientRect().left==u.right&&(d=!f),h<=0)return{node:t,offset:l+(d?1:0)};r=l+(d?1:0),o=h}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function QT(t,e,n,i=-1){var r,o;let s=t.contentDOM.getBoundingClientRect(),l=s.top+t.viewState.paddingTop,a,{docHeight:c}=t.viewState,{x:u,y:h}=e,f=h-l;if(f<0)return 0;if(f>c)return t.state.doc.length;for(let C=t.viewState.heightOracle.textHeight/2,w=!1;a=t.elementAtHeight(f),a.type!=Pt.Text;)for(;f=i>0?a.bottom+C:a.top-C,!(f>=0&&f<=c);){if(w)return n?null:0;w=!0,i=-i}h=l+f;let d=a.from;if(dt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:lC(t,s,a,u,h);let p=t.dom.ownerDocument,y=t.root.elementFromPoint?t.root:p,v=y.elementFromPoint(u,h);v&&!t.contentDOM.contains(v)&&(v=null),v||(u=Math.max(s.left+1,Math.min(s.right-1,u)),v=y.elementFromPoint(u,h),v&&!t.contentDOM.contains(v)&&(v=null));let g,m=-1;if(v&&((r=t.docView.nearest(v))===null||r===void 0?void 0:r.isEditable)!=!1){if(p.caretPositionFromPoint){let C=p.caretPositionFromPoint(u,h);C&&({offsetNode:g,offset:m}=C)}else if(p.caretRangeFromPoint){let C=p.caretRangeFromPoint(u,h);C&&({startContainer:g,startOffset:m}=C,(!t.contentDOM.contains(g)||Z.safari&&O3(g,m,u)||Z.chrome&&B3(g,m,u))&&(g=void 0))}}if(!g||!t.docView.dom.contains(g)){let C=Xe.find(t.docView,d);if(!C)return f>a.top+a.height/2?a.to:a.from;({node:g,offset:m}=$g(C.dom,u,h))}let x=t.docView.nearest(g);if(!x)return null;if(x.isWidget&&((o=x.dom)===null||o===void 0?void 0:o.nodeType)==1){let C=x.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let l=t.viewState.heightOracle.textHeight,a=Math.floor((r-n.top-(t.defaultLineHeight-l)*.5)/l);o+=a*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+_g(s,o,t.state.tabSize)}function O3(t,e,n){let i;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return No(t,i-1,i).getBoundingClientRect().left>n}function B3(t,e,n){if(e!=0)return!1;for(let r=t;;){let o=r.parentNode;if(!o||o.nodeType!=1||o.firstChild!=r)return!1;if(o.classList.contains("cm-line"))break;r=o}let i=t.nodeType==1?t.getBoundingClientRect():No(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function zg(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let i of n.type)if(i.to>e||i.to==e&&(i.to==n.to||i.type==Pt.Text))return i}return n}function D3(t,e,n,i){let r=zg(t,e.head),o=!i||r.type!=Pt.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),l=t.textDirectionAt(r.from),a=t.posAtCoords({x:n==(l==Ie.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(a!=null)return I.cursor(a,n?-1:1)}return I.cursor(n?r.to:r.from,n?-1:1)}function aC(t,e,n,i){let r=t.state.doc.lineAt(e.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from);for(let l=e,a=null;;){let c=C3(r,o,s,l,n),u=YT;if(!c){if(r.number==(n?t.state.doc.lines:1))return l;u=` +`,r=t.state.doc.line(r.number+(n?1:-1)),o=t.bidiSpans(r),c=I.cursor(n?r.from:r.to)}if(a){if(!a(u))return l}else{if(!i)return c;a=i(u)}l=c}}function R3(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return o=>{let s=i(o);return r==Re.Space&&(r=s),r==s}}function F3(t,e,n,i){let r=e.head,o=n?1:-1;if(r==(n?t.state.doc.length:0))return I.cursor(r,e.assoc);let s=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(r,e.assoc||-1),u=t.documentTop;if(c)s==null&&(s=c.left-a.left),l=o<0?c.top:c.bottom;else{let d=t.viewState.lineBlockAt(r);s==null&&(s=Math.min(a.right-a.left,t.defaultCharacterWidth*(r-d.from))),l=(o<0?d.top:d.bottom)+u}let h=a.left+s,f=i??t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=l+(f+d)*o,y=QT(t,{x:h,y:p},!1,o);if(pa.bottom||(o<0?yr)){let v=t.docView.coordsForChar(y),g=!v||p{if(e>o&&er(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:I.cursor(i,inull),Z.gecko&&J3(e.contentDOM.ownerDocument)}handleEvent(e){!V3(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=P3(e),i=this.handlers,r=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,l=i[o];l&&s!=!l.handlers.length&&(r.removeEventListener(o,this.handleEvent),l=null),l||r.addEventListener(o,this.handleEvent,{passive:s})}for(let o in i)o!="scroll"&&!n[o]&&r.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()i.keyCode==e.keyCode))&&!e.ctrlKey||I3.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,Ls(this.view.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Z.safari&&!Z.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function cC(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){Yn(n.state,r)}}}function P3(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec;if(r&&r.domEventHandlers)for(let o in r.domEventHandlers){let s=r.domEventHandlers[o];s&&n(o).handlers.push(cC(i.value,s))}if(r&&r.domEventObservers)for(let o in r.domEventObservers){let s=r.domEventObservers[o];s&&n(o).observers.push(cC(i.value,s))}}for(let i in ki)n(i).handlers.push(ki[i]);for(let i in Qn)n(i).observers.push(Qn[i]);return e}const JT=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],I3="dthko",ZT=[16,17,18,20,91,92,224,225],au=6;function cu(t){return Math.max(0,t)*.7+8}function $3(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class z3{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=n3(e.contentDOM),this.atoms=e.state.facet(Ky).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(pe.allowMultipleSelections)&&j3(e,n),this.dragging=W3(e,n)&&iE(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&$3(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,r=0,o=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=WT(this.view);e.clientX-s.left<=o.left+au?i=-cu(o.left-e.clientX):e.clientX+s.right>=o.right-au&&(i=cu(e.clientX-o.right)),e.clientY-s.top<=o.top+au?r=-cu(o.top-e.clientY):e.clientY+s.bottom>=o.bottom-au&&(r=cu(e.clientY-o.bottom)),this.setScrollSpeed(i,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;ithis.select(this.lastEvent),20)}}function j3(t,e){let n=t.state.facet(BT);return n.length?n[0](e):Z.mac?e.metaKey:e.ctrlKey}function H3(t,e){let n=t.state.facet(DT);return n.length?n[0](e):Z.mac?!e.altKey:!e.ctrlKey}function W3(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=Xh(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let o=0;o=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function V3(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=Oe.get(n))&&i.ignoreEvent(e))return!1;return!0}const ki=Object.create(null),Qn=Object.create(null),eE=Z.ie&&Z.ie_version<15||Z.ios&&Z.webkit_version<604;function q3(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),tE(t,n.value)},50)}function tE(t,e){let{state:n}=t,i,r=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(jg!=null&&n.selection.ranges.every(a=>a.empty)&&jg==o.toString()){let a=-1;i=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==a)return{range:c};a=u.from;let h=n.toText((s?o.line(r++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:h},range:I.cursor(c.from+h.length)}})}else s?i=n.changeByRange(a=>{let c=o.line(r++);return{changes:{from:a.from,to:a.to,insert:c.text},range:I.cursor(a.from+c.length)}}):i=n.replaceSelection(o);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Qn.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};ki.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1);Qn.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Qn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};ki.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(RT))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=Y3(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new z3(t,e,n,i)),i&&t.observer.ignore(()=>CT(t.contentDOM));let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function uC(t,e,n,i){if(i==1)return I.cursor(e,n);if(i==2)return A3(t.state,e,n);{let r=Xe.find(t.docView,e),o=t.state.doc.lineAt(r?r.posAtEnd:e),s=r?r.posAtStart:o.from,l=r?r.posAtEnd:o.to;return lt>=e.top&&t<=e.bottom,hC=(t,e,n)=>nE(e,n)&&t>=n.left&&t<=n.right;function U3(t,e,n,i){let r=Xe.find(t.docView,e);if(!r)return 1;let o=e-r.posAtStart;if(o==0)return 1;if(o==r.length)return-1;let s=r.coordsAt(o,-1);if(s&&hC(n,i,s))return-1;let l=r.coordsAt(o,1);return l&&hC(n,i,l)?1:s&&nE(i,s)?-1:1}function fC(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:U3(t,n,e.clientX,e.clientY)}}const K3=Z.ie&&Z.ie_version<=11;let dC=null,pC=0,mC=0;function iE(t){if(!K3)return t.detail;let e=dC,n=mC;return dC=t,mC=Date.now(),pC=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(pC+1)%3:1}function Y3(t,e){let n=fC(t,e),i=iE(e),r=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),r=r.map(o.changes))},get(o,s,l){let a=fC(t,o),c,u=uC(t,a.pos,a.bias,i);if(n.pos!=a.pos&&!s){let h=uC(t,n.pos,n.bias,i),f=Math.min(h.from,u.from),d=Math.max(h.to,u.to);u=f1&&(c=G3(r,a.pos))?c:l?r.addRange(u):I.create([u])}}}function G3(t,e){for(let n=0;n=e)return I.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}ki.dragstart=(t,e)=>{let{selection:{main:n}}=t.state,{mouseSelection:i}=t.inputState;return i&&(i.dragging=n),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1};function gC(t,e,n,i){if(!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{mouseSelection:o}=t.inputState,s=i&&o&&o.dragging&&H3(t,e)?{from:o.dragging.from,to:o.dragging.to}:null,l={from:r,insert:n},a=t.state.changes(s?[s,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(r,-1),head:a.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}ki.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,o=()=>{++r==n.length&&gC(t,e,i.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[s]=l.result),o()},l.readAsText(n[s])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return gC(t,e,i,!0),!0}return!1};ki.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=eE?null:e.clipboardData;return n?(tE(t,n.getData("text/plain")||n.getData("text/uri-text")),!0):(q3(t),!1)};function X3(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function Q3(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>r&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),r=s.number}i=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:i}}let jg=null;ki.copy=ki.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=Q3(t.state);if(!n&&!r)return!1;jg=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=eE?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(X3(t,n),!1)};const rE=Ti.define();function oE(t,e){let n=[];for(let i of t.facet(PT)){let r=i(t,e);r&&n.push(r)}return n?t.update({effects:n,annotations:rE.of(!0)}):null}function sE(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=oE(t.state,e);n?t.dispatch(n):t.update([])}},10)}Qn.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),sE(t)};Qn.blur=t=>{t.observer.clearSelectionRange(),sE(t)};Qn.compositionstart=Qn.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};Qn.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Z.chrome&&Z.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};Qn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};ki.beforeinput=(t,e)=>{var n;let i;if(Z.chrome&&Z.android&&(i=JT.find(r=>r.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return!1};const yC=new Set;function J3(t){yC.has(t)||(yC.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const vC=["pre-wrap","normal","pre-line","break-spaces"];class Z3{constructor(e){this.lineWrapping=e,this.doc=ve.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return vC.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,a=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=o,a){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>nh&&(e.heightChanged=!0),this.height=n)}replace(e,n,i){return It.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let o=this,s=i.doc;for(let l=r.length-1;l>=0;l--){let{fromA:a,toA:c,fromB:u,toB:h}=r[l],f=o.lineAt(a,Le.ByPosNoHeight,i.setDoc(n),0,0),d=f.to>=c?f:o.lineAt(c,Le.ByPosNoHeight,i,0,0);for(h+=d.to-c,c=d.to;l>0&&f.from<=r[l-1].toA;)a=r[l-1].fromA,u=r[l-1].fromB,l--,ao*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),i+=1+l.break,r-=l.size}else if(o>r*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,o-=l.size}else break;else if(r=o&&s(this.blockAt(0,i,r,o))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class cn extends lE{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new fi(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof cn||r instanceof at&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof at?r=new cn(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):It.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(e,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class at extends It{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,o=r-i+1,s,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*o);s=a/o,this.length>o+1&&(l=(this.height-a)/(this.length-o-1))}else s=this.height/o;return{firstLine:i,lastLine:r,perLine:s,perChar:l}}blockAt(e,n,i,r){let{firstLine:o,lastLine:s,perLine:l,perChar:a}=this.heightMetrics(n,r);if(n.lineWrapping){let c=r+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),u=n.doc.lineAt(c),h=l+u.length*a,f=Math.max(i,e-h/2);return new fi(u.from,u.length,f,h,0)}else{let c=Math.max(0,Math.min(s-o,Math.floor((e-i)/l))),{from:u,length:h}=n.doc.line(o+c);return new fi(u,h,i+l*c,l,0)}}lineAt(e,n,i,r,o){if(n==Le.ByHeight)return this.blockAt(e,i,r,o);if(n==Le.ByPosNoHeight){let{from:d,to:p}=i.doc.lineAt(e);return new fi(d,p-d,0,0,0)}let{firstLine:s,perLine:l,perChar:a}=this.heightMetrics(i,o),c=i.doc.lineAt(e),u=l+c.length*a,h=c.number-s,f=r+l*h+a*(c.from-o-h);return new fi(c.from,c.length,Math.max(r,Math.min(f,r+this.height-u)),u,0)}forEachLine(e,n,i,r,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:l,perLine:a,perChar:c}=this.heightMetrics(i,o);for(let u=e,h=r;u<=n;){let f=i.doc.lineAt(u);if(u==e){let p=f.number-l;h+=a*p+c*(e-o-p)}let d=a+c*f.length;s(new fi(f.from,f.length,h,d,0)),h+=d,u=f.to+1}}replace(e,n,i){let r=this.length-n;if(r>0){let o=i[i.length-1];o instanceof at?i[i.length-1]=new at(o.length+r):i.push(null,new at(r-1))}if(e>0){let o=i[0];o instanceof at?i[0]=new at(e+o.length):i.unshift(new at(e-1),null)}return It.of(i)}decomposeLeft(e,n){n.push(new at(e-1),null)}decomposeRight(e,n){n.push(null,new at(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let o=n+this.length;if(r&&r.from<=n+this.length&&r.more){let s=[],l=Math.max(n,r.from),a=-1;for(r.from>n&&s.push(new at(r.from-n-1).updateHeight(e,n));l<=o&&r.more;){let u=e.doc.lineAt(l).length;s.length&&s.push(null);let h=r.heights[r.index++];a==-1?a=h:Math.abs(h-a)>=nh&&(a=-2);let f=new cn(u,h);f.outdated=!1,s.push(f),l+=u+1}l<=o&&s.push(null,new at(o-l).updateHeight(e,l));let c=It.of(s);return(a<0||Math.abs(c.height-this.height)>=nh||Math.abs(a-this.heightMetrics(e,n).perLine)>=nh)&&(e.heightChanged=!0),c}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class tN extends It{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let o=i+this.left.height;return el))return c;let u=n==Le.ByPosNoHeight?Le.ByPosNoHeight:Le.ByPos;return a?c.join(this.right.lineAt(l,u,i,s,l)):this.left.lineAt(l,u,i,r,o).join(c)}forEachLine(e,n,i,r,o,s){let l=r+this.left.height,a=o+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,n,i,l,a,s);else{let c=this.lineAt(a,Le.ByPos,i,r,o);e=e&&c.from<=n&&s(c),n>c.to&&this.right.forEachLine(c.to+1,n,i,l,a,s)}}replace(e,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let l of i)o.push(l);if(e>0&&xC(o,s-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?It.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:o,right:s}=this,l=n+o.length+this.break,a=null;return r&&r.from<=n+o.length&&r.more?a=o=o.updateHeight(e,n,i,r):o.updateHeight(e,n,i),r&&r.from<=l+s.length&&r.more?a=s=s.updateHeight(e,l,i,r):s.updateHeight(e,l,i),a?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function xC(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof at&&(i=t[e+1])instanceof at&&t.splice(e-1,3,new at(n.length+1+i.length))}const nN=5;class Yy{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof cn?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new cn(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=nN)&&this.addLineDeco(r,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new cn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new at(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof cn)return e;let n=new cn(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof cn)&&!this.isCovered?this.nodes.push(new cn(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&h.overflow!="visible"){let f=u.getBoundingClientRect();o=Math.max(o,f.left),s=Math.min(s,f.right),l=Math.max(l,f.top),a=c==t.parentNode?f.bottom:Math.min(a,f.bottom)}c=h.position=="absolute"||h.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:l-(n.top+e),bottom:Math.max(l,a)-(n.top+e)}}function sN(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Op{constructor(e,n,i){this.from=e,this.to=n,this.size=i}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new Z3(n),this.stateDeco=e.facet(Ya).filter(i=>typeof i!="function"),this.heightMap=It.empty().applyChanges(this.stateDeco,ve.empty,this.heightOracle.setDoc(e.doc),[new Ln(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=se.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:o,to:s})=>r>=o&&r<=s)){let{from:o,to:s}=this.lineBlockAt(r);e.push(new uu(o,s))}}this.viewports=e.sort((i,r)=>i.from-r.from),this.scaler=this.heightMap.height<=7e6?wC:new uN(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Yl(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Ya).filter(u=>typeof u!="function");let r=e.changedRanges,o=Ln.extendWithRanges(r,iN(i,this.stateDeco,e?e.changes:Je.empty(this.state.doc.length))),s=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,n));let c=!e.changes.empty||e.flags&2||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),c&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet($T)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Ie.RTL:Ie.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),l=n.getBoundingClientRect(),a=s||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let c=0,u=0;if(l.width&&l.height){let C=l.width/n.offsetWidth,w=l.height/n.offsetHeight;(C>.995&&C<1.005||!isFinite(C)||Math.abs(l.width-n.offsetWidth)<1)&&(C=1),(w>.995&&w<1.005||!isFinite(w)||Math.abs(l.height-n.offsetHeight)<1)&&(w=1),(this.scaleX!=C||this.scaleY!=w)&&(this.scaleX=C,this.scaleY=w,c|=8,s=a=!0)}let h=(parseInt(i.paddingTop)||0)*this.scaleY,f=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=bT(e.scrollDOM);let p=(this.printing?sN:oN)(n,this.paddingTop),y=p.top-this.pixelViewport.top,v=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let m=l.width;if((this.contentDOMWidth!=m||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),a){let C=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(C)&&(s=!0),s||r.lineWrapping&&Math.abs(m-this.contentDOMWidth)>r.charWidth){let{lineHeight:w,charWidth:b,textHeight:S}=e.docView.measureTextSize();s=w>0&&r.refresh(o,w,b,S,m/b,C),s&&(e.docView.minWidth=0,c|=8)}y>0&&v>0?u=Math.max(y,v):y<0&&v<0&&(u=Math.min(y,v)),r.heightChanged=!1;for(let w of this.viewports){let b=w.from==this.viewport.from?C:e.docView.measureVisibleLineHeights(w);this.heightMap=(s?It.empty().applyChanges(this.stateDeco,ve.empty,this.heightOracle,[new Ln(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new eN(w.from,b))}r.heightChanged&&(c|=2)}let x=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return x&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(c&2||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:l}=this,a=new uu(r.lineAt(s-i*1e3,Le.ByHeight,o,0,0).from,r.lineAt(l+(1-i)*1e3,Le.ByHeight,o,0,0).to);if(n){let{head:c}=n.range;if(ca.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(c,Le.ByPos,o,0,0),f;n.y=="center"?f=(h.top+h.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c=l+Math.max(10,Math.min(i,250)))&&r>s-2*1e3&&o>1,s=r<<1;if(this.defaultTextDirection!=Ie.LTR&&!i)return[];let l=[],a=(c,u,h,f)=>{if(u-cc&&vv.from>=h.from&&v.to<=h.to&&Math.abs(v.from-c)v.fromg));if(!y){if(uv.from<=u&&v.to>=u)){let v=n.moveToLineBoundary(I.cursor(u),!1,!0).head;v>c&&(u=v)}y=new Op(c,u,this.gapSize(h,c,u,f))}l.push(y)};for(let c of this.viewportLines){if(c.lengthc.from&&a(c.from,f,c,u),dn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];xe.spans(e,this.viewport.from,this.viewport.to,{span(r,o){n.push({from:r,to:o})},point(){}},20);let i=n.length!=this.visibleRanges.length||this.visibleRanges.some((r,o)=>r.from!=n[o].from||r.to!=n[o].to);return this.visibleRanges=n,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Yl(this.heightMap.lineAt(e,Le.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Yl(this.heightMap.lineAt(this.scaler.fromDOM(e),Le.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Yl(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class uu{constructor(e,n){this.from=e,this.to=n}}function aN(t,e,n){let i=[],r=t,o=0;return xe.spans(n,t,e,{span(){},point(s,l){s>r&&(i.push({from:r,to:s}),o+=s-r),r=l}},20),r=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:o,to:s}=e[r],l=s-o;if(i<=l)return o+i;i-=l}}function fu(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function cN(t,e){for(let n of t)if(e(n))return n}const wC={toDOM(t){return t},fromDOM(t){return t},scale:1};class uN{constructor(e,n,i){let r=0,o=0,s=0;this.viewports=i.map(({from:l,to:a})=>{let c=n.lineAt(l,Le.ByPos,e,0,0).top,u=n.lineAt(a,Le.ByPos,e,0,0).bottom;return r+=u-c,{from:l,to:a,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let l of this.viewports)l.domTop=s+(l.top-o)*this.scale,s=l.domBottom=l.domTop+(l.bottom-l.top),o=l.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let o=nYl(r,e)):t._content)}const du=Q.define({combine:t=>t.join(" ")}),Hg=Q.define({combine:t=>t.indexOf(!0)>-1}),Wg=qr.newName(),aE=qr.newName(),cE=qr.newName(),uE={"&light":"."+aE,"&dark":"."+cE};function Vg(t,e,n){return new qr(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const hN=Vg("."+Wg,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},uE),Gl="￿";class fN{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(pe.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Gl}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let o=this.text.length;this.readNode(r);let s=r.nextSibling;if(s==n)break;let l=Oe.get(r),a=Oe.get(s);(l&&a?l.breakAfter:(l?l.breakAfter:bC(r))||bC(s)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>o)&&this.lineBreak(),r=s}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,l;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(l=r.exec(n))&&(o=l.index,s=l[0].length),this.append(n.slice(i,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=s-1);i=o+s}}readNode(e){if(e.cmIgnore)return;let n=Oe.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(dN(e,i.node,i.offset)?n:0))}}function dN(t,e,n){for(;;){if(!e||n-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let l=o||s?[]:yN(e),a=new fN(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=vN(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=o&&o.node==l.focusNode&&o.offset==l.focusOffset||!Ag(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),c=s&&s.node==l.anchorNode&&s.offset==l.anchorOffset||!Ag(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=I.single(c,a)}}}function hE(t,e){let n,{newSel:i}=e,r=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:l}=e.bounds,a=r.from,c=null;(o===8||Z.android&&e.text.length=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:(Z.mac||Z.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=I.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ve.of([" "])}):Z.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==` + `&&t.lineWrapping&&(i&&(i=I.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ve.of([" "])}),n){if(Z.ios&&t.inputState.flushIOSKey()||Z.android&&(n.from==r.from&&n.to==r.to&&n.insert.length==1&&n.insert.lines==2&&Ls(t.contentDOM,"Enter",13)||(n.from==r.from-1&&n.to==r.to&&n.insert.length==0||o==8&&n.insert.lengthr.head)&&Ls(t.contentDOM,"Backspace",8)||n.from==r.from&&n.to==r.to+1&&n.insert.length==0&&Ls(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let l,a=()=>l||(l=mN(t,n,i));return t.state.facet(NT).some(c=>c(t,n.from,n.to,s,a))||t.dispatch(a()),!0}else if(i&&!i.main.eq(r)){let s=!1,l="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),l=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:s,userEvent:l}),!0}else return!1}function mN(t,e,n){let i,r=t.state,o=r.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=o.frome.to?r.sliceDoc(e.to,o.to):"";i=r.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let l=r.changes(e),a=n&&n.main.to<=l.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let c=t.state.sliceDoc(e.from,e.to),u,h=n&>(t,n.main.head);if(h){let p=e.insert.length-(e.to-e.from);u={from:h.from,to:h.to-p}}else u=t.state.doc.lineAt(o.head);let f=o.to-e.to,d=o.to-o.from;i=r.changeByRange(p=>{if(p.from==o.from&&p.to==o.to)return{changes:l,range:a||p.map(l)};let y=p.to-f,v=y-c.length;if(p.to-p.from!=d||t.state.sliceDoc(v,y)!=c||p.to>=u.from&&p.from<=u.to)return{range:p};let g=r.changes({from:v,to:y,insert:e.insert}),m=p.to-o.to;return{changes:g,range:a?I.range(Math.max(0,a.anchor+m),Math.max(0,a.head+m)):p.map(g)}})}else i={changes:l,selection:a&&r.selection.replaceRange(a)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:s,scrollIntoView:!0})}function gN(t,e,n,i){let r=Math.min(t.length,e.length),o=0;for(;o0&&l>0&&t.charCodeAt(s-1)==e.charCodeAt(l-1);)s--,l--;if(i=="end"){let a=Math.max(0,o-Math.min(s,l));n-=s+a-o}if(s=s?o-n:0;o-=a,l=o+(l-s),s=o}else if(l=l?o-n:0;o-=a,s=o+(s-l),l=o}return{from:o,toA:s,toB:l}}function yN(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new kC(n,i)),(r!=n||o!=i)&&e.push(new kC(r,o))),e}function vN(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?I.single(n+e,i+e):null}const xN={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Bp=Z.ie&&Z.ie_version<=11;class CN{constructor(e){this.view=e,this.active=!1,this.selectionRange=new i3,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(Z.ie&&Z.ie_version<=11||Z.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Bp&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(ud)?i.root.activeElement!=this.dom:!eh(i.dom,r))return;let o=r.anchorNode&&i.docView.nearest(r.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Z.ie&&Z.ie_version<=11||Z.android&&Z.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Qh(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Z.safari&&e.root.nodeType==11&&ZF(this.dom.ownerDocument)==this.dom&&wN(this.view)||Xh(e.root);if(!n||this.selectionRange.eq(n))return!1;let i=eh(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&Ls(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(r=!0),n==-1?{from:n,to:i}=s:(n=Math.min(s.from,n),i=Math.max(s.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&eh(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new pN(this.view,e,n,i);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=hE(this.view,n);return this.view.state==i&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=SC(n,e.previousSibling||e.target.previousSibling,-1),r=SC(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function SC(t,e,n){for(;e;){let i=Oe.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function wN(t){let e=null;function n(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let i=e.startContainer,r=e.startOffset,o=e.endContainer,s=e.endOffset,l=t.docView.domAtPos(t.state.selection.main.anchor);return Qh(l.node,l.offset,o,s)&&([i,r,o,s]=[o,s,i,r]),{anchorNode:i,anchorOffset:r,focusNode:o,focusOffset:s}}class Y{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(r=>n(r,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||r3(e.parent)||document,this.viewState=new CC(e.state||pe.create(e)),this.plugins=this.state.facet(Ul).map(i=>new Ap(i));for(let i of this.plugins)i.update(this);this.observer=new CN(this),this.inputState=new N3(this),this.inputState.ensureHandlers(this.plugins),this.docView=new nC(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let n=e.length==1&&e[0]instanceof tt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,l=0,a=null;e.some(f=>f.annotation(rE))?(this.inputState.notifiedFocused=s,l=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,a=oE(o,s),a||(l=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(pe.phrases)!=this.state.facet(pe.phrases))return this.setState(o);r=Zh.create(this,o,e),r.flags|=l;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;h=new Jh(d.empty?d:I.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(eC)&&(h=d.value)}this.viewState.update(r,h),this.bidiCache=ef.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Kl)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(du)!=r.state.facet(du)&&(this.viewState.mustMeasureContent=!0),(n||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!r.empty)for(let f of this.state.facet(Fg))f(r);(a||u)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),u&&!hE(this,u)&&c.force&&Ls(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new CC(e),this.plugins=e.facet(Ul).map(i=>new Ap(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new nC(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Ul),i=e.state.facet(Ul);if(n!=i){let r=[];for(let o of i){let s=n.indexOf(o);if(s<0)r.push(new Ap(o));else{let l=this.plugins[s];l.mustUpdate=e,r.push(l)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(s<0)if(bT(i))o=-1,s=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(r);o=d.from,s=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];a&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(d=>{try{return d.read(this)}catch(p){return Yn(this.state,p),_C}}),h=Zh.create(this,this.state,[]),f=!1;h.flags|=a,n?n.flags|=a:n=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h));for(let d=0;d1||p<-1){r=r+p,i.scrollTop=r/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(Fg))l(n)}get themeClasses(){return Wg+" "+(this.state.facet(Hg)?cE:aE)+" "+this.state.facet(du)}updateAttrs(){let e=TC(this,zT,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(ud)?"true":"false",class:"cm-content",style:`${Z.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),TC(this,Uy,n);let i=this.observer.ignore(()=>{let r=Dg(this.contentDOM,this.contentAttrs,n),o=Dg(this.dom,this.editorAttrs,e);return r||o});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(Y.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Kl);let e=this.state.facet(Y.cspNonce);qr.mount(this.root,this.styleModules.concat(hN).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return Lp(this,e,aC(this,e,n,i))}moveByGroup(e,n){return Lp(this,e,aC(this,e,n,i=>R3(this,e.head,i)))}moveToLineBoundary(e,n,i=!0){return D3(this,e,n,i)}moveVertically(e,n,i){return Lp(this,e,F3(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),QT(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),o=this.bidiSpans(r),s=o[Ar.find(o,e-r.from,-1,n)];return ad(i,s.dir==Ie.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(IT)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>bN)return KT(e.length);let n=this.textDirectionAt(e.from),i;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||UT(o.isolates,i=tC(this,e.from,e.to))))return o.order;i||(i=tC(this,e.from,e.to));let r=x3(e.text,n,i);return this.bidiCache.push(new ef(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Z.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{CT(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return eC.of(new Jh(typeof e=="number"?I.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}static domEventHandlers(e){return qe.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return qe.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=qr.newName(),r=[du.of(i),Kl.of(Vg(`.${i}`,e))];return n&&n.dark&&r.push(Hg.of(!0)),r}static baseTheme(e){return cl.lowest(Kl.of(Vg("."+Wg,e,uE)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&Oe.get(i)||Oe.get(e);return((n=r==null?void 0:r.rootView)===null||n===void 0?void 0:n.view)||null}}Y.styleModule=Kl;Y.inputHandler=NT;Y.focusChangeEffect=PT;Y.perLineTextDirection=IT;Y.exceptionSink=FT;Y.updateListener=Fg;Y.editable=ud;Y.mouseSelectionStyle=RT;Y.dragMovesSelection=DT;Y.clickAddsSelectionRange=BT;Y.decorations=Ya;Y.atomicRanges=Ky;Y.bidiIsolatedRanges=jT;Y.scrollMargins=HT;Y.darkTheme=Hg;Y.cspNonce=Q.define({combine:t=>t.length?t[0]:""});Y.contentAttributes=Uy;Y.editorAttributes=zT;Y.lineWrapping=Y.contentAttributes.of({class:"cm-lineWrapping"});Y.announce=he.define();const bN=4096,_C={};class ef{constructor(e,n,i,r,o,s){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:Ie.LTR;for(let o=Math.max(0,e.length-10);o=0;r--){let o=i[r],s=typeof o=="function"?o(t):o;s&&Bg(s,n)}return n}const kN=Z.mac?"mac":Z.windows?"win":Z.linux?"linux":"key";function SN(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,o,s,l;for(let a=0;ai.concat(r),[]))),n}function TN(t,e,n){return dE(fE(t.state),e,t,n)}let kr=null;const EN=4e3;function AN(t,e=kN){let n=Object.create(null),i=Object.create(null),r=(s,l)=>{let a=i[s];if(a==null)i[s]=l;else if(a!=l)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,l,a,c,u)=>{var h,f;let d=n[s]||(n[s]=Object.create(null)),p=l.split(/ (?!$)/).map(g=>SN(g,e));for(let g=1;g{let C=kr={view:x,prefix:m,scope:s};return setTimeout(()=>{kr==C&&(kr=null)},EN),!0}]})}let y=p.join(" ");r(y,!1);let v=d[y]||(d[y]={preventDefault:!1,stopPropagation:!1,run:((f=(h=d._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});a&&v.run.push(a),c&&(v.preventDefault=!0),u&&(v.stopPropagation=!0)};for(let s of t){let l=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let c of l){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let h in u)u[h].run.push(s.any)}let a=s[e]||s.key;if(a)for(let c of l)o(c,a,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(c,"Shift-"+a,s.shift,s.preventDefault,s.stopPropagation)}return n}function dE(t,e,n,i){let r=JF(e),o=ct(r,0),s=Tn(o)==r.length&&r!=" ",l="",a=!1,c=!1,u=!1;kr&&kr.view==n&&kr.scope==i&&(l=kr.prefix+" ",ZT.indexOf(e.keyCode)<0&&(c=!0,kr=null));let h=new Set,f=v=>{if(v){for(let g of v.run)if(!h.has(g)&&(h.add(g),g(n,e)))return v.stopPropagation&&(u=!0),!0;v.preventDefault&&(v.stopPropagation&&(u=!0),c=!0)}return!1},d=t[i],p,y;return d&&(f(d[l+pu(r,e,!s)])?a=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Z.windows&&e.ctrlKey&&e.altKey)&&(p=Ur[e.keyCode])&&p!=r?(f(d[l+pu(p,e,!0)])||e.shiftKey&&(y=Ua[e.keyCode])!=r&&y!=p&&f(d[l+pu(y,e,!1)]))&&(a=!0):s&&e.shiftKey&&f(d[l+pu(r,e,!0)])&&(a=!0),!a&&f(d._any)&&(a=!0)),c&&(a=!0),a&&u&&e.stopPropagation(),a}class Sc{constructor(e,n,i,r,o){this.className=e,this.left=n,this.top=i,this.width=r,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let o=pE(e);return[new Sc(n,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}else return MN(e,n,i)}}function pE(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Ie.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function AC(t,e,n){let i=I.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(i,!0,!0).from),type:Pt.Text}}function MN(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),o=t.textDirection==Ie.LTR,s=t.contentDOM,l=s.getBoundingClientRect(),a=pE(t),c=s.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),h=l.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=l.right-(u?parseInt(u.paddingRight):0),d=zg(t,i),p=zg(t,r),y=d.type==Pt.Text?d:null,v=p.type==Pt.Text?p:null;if(y&&(t.lineWrapping||d.widgetLineBreaks)&&(y=AC(t,i,y)),v&&(t.lineWrapping||p.widgetLineBreaks)&&(v=AC(t,r,v)),y&&v&&y.from==v.from)return m(x(n.from,n.to,y));{let w=y?x(n.from,null,y):C(d,!1),b=v?x(null,n.to,v):C(p,!0),S=[];return(y||d).to<(v||p).from-(y&&v?1:0)||d.widgetLineBreaks>1&&w.bottom+t.defaultLineHeight/2V&&z.from=B)break;R>F&&D(Math.max(L,F),w==null&&L<=V,Math.min(R,B),b==null&&R>=K,_.dir)}if(F=$.to+1,F>=B)break}return O.length==0&&D(V,w==null,K,b==null,t.textDirection),{top:M,bottom:N,horizontal:O}}function C(w,b){let S=l.top+(b?w.top:w.bottom);return{top:S,bottom:S,horizontal:[]}}}function LN(t,e){return t.constructor==e.constructor&&t.eq(e)}class ON{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(ih)!=e.state.facet(ih)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let n=0,i=e.facet(ih);for(;n!LN(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ih=Q.define();function mE(t){return[qe.define(e=>new ON(e,t)),ih.of(t)]}const gE=!Z.ios,Xa=Q.define({combine(t){return Ei(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function BN(t={}){return[Xa.of(t),DN,RN,FN,$T.of(!0)]}function yE(t){return t.startState.facet(Xa)!=t.state.facet(Xa)}const DN=mE({above:!0,markers(t){let{state:e}=t,n=e.facet(Xa),i=[];for(let r of e.selection.ranges){let o=r==e.selection.main;if(r.empty?!o||gE:n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=r.empty?r:I.cursor(r.head,r.head>r.anchor?-1:1);for(let a of Sc.forRange(t,s,l))i.push(a)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=yE(t);return n&&MC(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){MC(e.state,t)},class:"cm-cursorLayer"});function MC(t,e){e.style.animationDuration=t.facet(Xa).cursorBlinkRate+"ms"}const RN=mE({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Sc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||yE(t)},class:"cm-selectionLayer"}),vE={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};gE&&(vE[".cm-line"].caretColor="transparent !important");const FN=cl.highest(Y.theme(vE)),xE=he.define({map(t,e){return t==null?null:e.mapPos(t)}}),Xl=pt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(xE)?i.value:n,t)}}),NN=qe.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Xl);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Xl)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Xl),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Xl)!=t&&this.view.dispatch({effects:xE.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function PN(){return[Xl,NN]}function LC(t,e,n,i,r){e.lastIndex=0;for(let o=t.iterRange(n,i),s=n,l;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;l=e.exec(o.value);)r(s+l.index,l)}function IN(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:o}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=o:i.push({from:r,to:o});return i}class $N{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:o,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(l,a,c,u)=>r(u,c,c+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,c,u)=>{let h=i(l,a,c);h&&u(c,c+l[0].length,h)};else if(i)this.addMatch=(l,a,c,u)=>u(c,c+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new Vr,i=n.add.bind(n);for(let{from:r,to:o}of IN(e,this.maxLength))LC(e.state.doc,this.regexp,r,o,(s,l)=>this.addMatch(l,e,s,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((o,s,l,a)=>{a>e.view.viewport.from&&l1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let o of e.visibleRanges){let s=Math.max(o.from,i),l=Math.min(o.to,r);if(l>s){let a=e.state.doc.lineAt(s),c=a.toa.from;s--)if(this.boundary.test(a.text[s-1-a.from])){u=s;break}for(;lf.push(g.range(y,v));if(a==c)for(this.regexp.lastIndex=u-a.from;(d=this.regexp.exec(a.text))&&d.indexthis.addMatch(v,e,y,p));n=n.update({filterFrom:u,filterTo:h,filter:(y,v)=>yh,add:f})}}return n}}const qg=/x/.unicode!=null?"gu":"g",zN=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,qg),jN={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Dp=null;function HN(){var t;if(Dp==null&&typeof document<"u"&&document.body){let e=document.body.style;Dp=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Dp||!1}const rh=Q.define({combine(t){let e=Ei(t,{render:null,specialChars:zN,addSpecialChars:null});return(e.replaceTabs=!HN())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,qg)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,qg)),e}});function WN(t={}){return[rh.of(t),VN()]}let OC=null;function VN(){return OC||(OC=qe.fromClass(class{constructor(t){this.view=t,this.decorations=se.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(rh)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new $N({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,o=ct(e[0],0);if(o==9){let s=r.lineAt(i),l=n.state.tabSize,a=ul(s.text,l,i-s.from);return se.replace({widget:new YN((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=se.replace({widget:new KN(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(rh);t.startState.facet(rh)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const qN="•";function UN(t){return t>=32?qN:t==10?"␤":String.fromCharCode(9216+t)}class KN extends cr{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=UN(this.code),i=e.state.phrase("Control character")+" "+(jN[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let o=document.createElement("span");return o.textContent=n,o.title=i,o.setAttribute("aria-label",i),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class YN extends cr{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function GN(){return QN}const XN=se.line({class:"cm-activeLine"}),QN=qe.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(XN.range(r.from)),e=r.from)}return se.set(n)}},{decorations:t=>t.decorations});class JN extends cr{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let n=e.firstChild?Ws(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),r=ad(n[0],i.direction!="rtl"),o=parseInt(i.lineHeight);return r.bottom-r.top>o*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+o}:r}ignoreEvent(){return!1}}function ZN(t){return qe.fromClass(class{constructor(e){this.view=e,this.placeholder=t?se.set([se.widget({widget:new JN(t),side:1}).range(0)]):se.none}get decorations(){return this.view.state.doc.length?se.none:this.placeholder}},{decorations:e=>e.decorations})}const Ug=2e3;function eP(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),o=[];if(e.off>Ug||n.off>Ug||e.col<0||n.col<0){let s=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let a=i;a<=r;a++){let c=t.doc.line(a);c.length<=l&&o.push(I.range(c.from+s,c.to+l))}}else{let s=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let a=i;a<=r;a++){let c=t.doc.line(a),u=_g(c.text,s,t.tabSize,!0);if(u<0)o.push(I.cursor(c.to));else{let h=_g(c.text,l,t.tabSize);o.push(I.range(c.from+u,c.from+h))}}}return o}function tP(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function BC(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,o=r>Ug?-1:r==i.length?tP(t,e.clientX):ul(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:o,off:r}}function nP(t,e){let n=BC(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let o=r.changes.mapPos(r.startState.doc.line(n.line).from),s=r.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},i=i.map(r.changes)}},get(r,o,s){let l=BC(t,r);if(!l)return i;let a=eP(t.state,n,l);return a.length?s?I.create(a.concat(i.ranges)):I.create(a):i}}:null}function iP(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return Y.mouseSelectionStyle.of((n,i)=>e(i)?nP(n,i):null)}const rP={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},oP={style:"cursor: crosshair"};function sP(t={}){let[e,n]=rP[t.key||"Alt"],i=qe.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,Y.contentAttributes.of(r=>{var o;return!((o=r.plugin(i))===null||o===void 0)&&o.isDown?oP:null})]}const Ol="-10000px";class CE{constructor(e,n,i){this.facet=n,this.createTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(r=>r),this.tooltipViews=this.tooltips.map(i)}update(e,n){var i;let r=e.state.facet(this.facet),o=r.filter(a=>a);if(r===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let s=[],l=n?[]:null;for(let a=0;an[c]=a),n.length=l.length),this.input=r,this.tooltips=o,this.tooltipViews=s,!0}}function lP(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Rp=Q.define({combine:t=>{var e,n,i;return{position:Z.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||lP}}}),DC=new WeakMap,wE=qe.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Rp);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new CE(t,Gy,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(Rp);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=Ol,e.dom.style.left="0px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);this.parent&&this.container.remove(),(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(Z.gecko)i=r.offsetParent!=this.container.ownerDocument.body;else if(this.view.scaleX!=1||this.view.scaleY!=1)i=!0;else if(r.style.top==Ol&&r.style.left=="0px"){let o=r.getBoundingClientRect();i=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(i||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,n=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((r,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Rp).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:n,space:i,scaleX:r,scaleY:o}=t,s=[];for(let l=0;l=Math.min(n.bottom,i.bottom)||h.rightMath.min(n.right,i.right)+.1){u.style.top=Ol;continue}let d=a.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,y=f.right-f.left,v=(e=DC.get(c))!==null&&e!==void 0?e:f.bottom-f.top,g=c.offset||cP,m=this.view.textDirection==Ie.LTR,x=f.width>i.right-i.left?m?i.left:i.right-f.width:m?Math.min(h.left-(d?14:0)+g.x,i.right-y):Math.max(i.left,h.left-y+(d?14:0)-g.x),C=this.above[l];!a.strictSide&&(C?h.top-(f.bottom-f.top)-g.yi.bottom)&&C==i.bottom-h.bottom>h.top-i.top&&(C=this.above[l]=!C);let w=(C?h.top-i.top:i.bottom-h.bottom)-p;if(wx&&M.topb&&(b=C?M.top-v-2-p:M.bottom+p+2);if(this.position=="absolute"?(u.style.top=(b-t.parent.top)/o+"px",u.style.left=(x-t.parent.left)/r+"px"):(u.style.top=b/o+"px",u.style.left=x/r+"px"),d){let M=h.left+(m?g.x:-g.x)-(x+14-7);d.style.left=M/r+"px"}c.overlap!==!0&&s.push({left:x,top:b,right:S,bottom:b+v}),u.classList.toggle("cm-tooltip-above",C),u.classList.toggle("cm-tooltip-below",!C),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Ol}},{eventObservers:{scroll(){this.maybeMeasure()}}}),aP=Y.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),cP={x:0,y:0},Gy=Q.define({enables:[wE,aP]}),tf=Q.define();class Xy{static create(e){return new Xy(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new CE(e,tf,n=>this.createHostedView(n))}createHostedView(e){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const uP=Gy.compute([tf],t=>{let e=t.facet(tf).filter(n=>n);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.filter(n=>n.end!=null).map(n=>n.end)),create:Xy.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class hP{constructor(e,n,i,r,o){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;el.bottom||n.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(r)).find(u=>u.from<=r&&u.to>=r),c=a&&a.dir==Ie.RTL?-1:1;o=n.x{this.pending==l&&(this.pending=null,a&&e.dispatch({effects:this.setHover.of(a)}))},a=>Yn(e.state,a,"hover tooltip"))}else s&&e.dispatch({effects:this.setHover.of(s)})}mousemove(e){var n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!RC(this.lastMove.target)||this.pending){let{pos:r}=i||this.pending,o=(n=i==null?void 0:i.end)!==null&&n!==void 0?n:r;(r==o?this.view.posAtCoords(this.lastMove)!=r:!fP(this.view,r,o,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!RC(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function RC(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function fP(t,e,n,i,r,o){let s=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>i||s.rightr||Math.min(s.bottom,l)=e&&a<=n}function dP(t,e={}){let n=he.define(),i=pt.define({create(){return null},update(r,o){if(r&&(e.hideOnChange&&(o.docChanged||o.selection)||e.hideOn&&e.hideOn(o,r)))return null;if(r&&o.docChanged){let s=o.changes.mapPos(r.pos,-1,Dt.TrackDel);if(s==null)return null;let l=Object.assign(Object.create(null),r);l.pos=s,r.end!=null&&(l.end=o.changes.mapPos(r.end)),r=l}for(let s of o.effects)s.is(n)&&(r=s.value),s.is(pP)&&(r=null);return r},provide:r=>tf.from(r)});return[i,qe.define(r=>new hP(r,t,i,n,e.hoverTime||300)),uP]}function bE(t,e){let n=t.plugin(wE);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const pP=he.define(),FC=Q.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Qa(t,e){let n=t.plugin(kE),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const kE=qe.fromClass(class{constructor(t){this.input=t.state.facet(Ja),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(FC);this.top=new mu(t,!0,e.topContainer),this.bottom=new mu(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(FC);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new mu(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new mu(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Ja);if(n!=this.input){let i=n.filter(a=>a),r=[],o=[],s=[],l=[];for(let a of i){let c=this.specs.indexOf(a),u;c<0?(u=a(t.view),l.push(u)):(u=this.panels[c],u.update&&u.update(t)),r.push(u),(u.top?o:s).push(u)}this.specs=i,this.panels=r,this.top.sync(o),this.bottom.sync(s);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Y.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class mu{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=NC(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=NC(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function NC(t){let e=t.nextSibling;return t.remove(),e}const Ja=Q.define({enables:kE});class ir extends Fo{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ir.prototype.elementClass="";ir.prototype.toDOM=void 0;ir.prototype.mapMode=Dt.TrackBefore;ir.prototype.startSide=ir.prototype.endSide=-1;ir.prototype.point=!0;const oh=Q.define(),mP={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>xe.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},pa=Q.define();function gP(t){return[SE(),pa.of(Object.assign(Object.assign({},mP),t))]}const Kg=Q.define({combine:t=>t.some(e=>e)});function SE(t){let e=[yP];return t&&t.fixed===!1&&e.push(Kg.of(!0)),e}const yP=qe.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(pa).map(e=>new IC(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(Kg),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Kg)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=xe.iter(this.view.state.facet(oh),this.view.viewport.from),i=[],r=this.gutters.map(o=>new vP(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(o.type)){let s=!0;for(let l of o.type)if(l.type==Pt.Text&&s){Yg(n,i,l.from);for(let a of r)a.line(this.view,l,i);s=!1}else if(l.widget)for(let a of r)a.widget(this.view,l)}else if(o.type==Pt.Text){Yg(n,i,o.from);for(let s of r)s.line(this.view,o,i)}else if(o.widget)for(let s of r)s.widget(this.view,o);for(let o of r)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(pa),n=t.state.facet(pa),i=t.docChanged||t.heightChanged||t.viewportChanged||!xe.eq(t.startState.facet(oh),t.state.facet(oh),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let o of n){let s=e.indexOf(o);s<0?r.push(new IC(this.view,o)):(this.gutters[s].update(t),r.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),r.indexOf(o)<0&&o.destroy();for(let o of r)this.dom.appendChild(o.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Y.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==Ie.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function PC(t){return Array.isArray(t)?t:[t]}function Yg(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class vP{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=xe.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==r.elements.length){let l=new _E(e,s,o,i);r.elements.push(l),r.dom.appendChild(l.dom)}else r.elements[this.i].update(e,s,o,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];Yg(this.cursor,r,n.from),i.length&&(r=r.concat(i));let o=this.gutter.config.lineMarker(e,n,r);o&&r.unshift(o);let s=this.gutter;r.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n);i&&this.addElement(e,n,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class IC{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let o=r.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let a=o.getBoundingClientRect();s=(a.top+a.bottom)/2}else s=r.clientY;let l=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[i](e,l,r)&&r.preventDefault()});this.markers=PC(n.markers(e)),n.initialSpacer&&(this.spacer=new _E(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=PC(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!xe.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class _E{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),xP(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let o=0,s=0;;){let l=s,a=oo(l,a,c)||s(l,a,c):s}return i}})}});class Fp extends ir{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Np(t,e){return t.state.facet(vs).formatNumber(e,t.state)}const wP=pa.compute([vs],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(CP)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new Fp(Np(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(vs)!=e.state.facet(vs),initialSpacer(e){return new Fp(Np(e,$C(e.state.doc.lines)))},updateSpacer(e,n){let i=Np(n.view,$C(n.view.state.doc.lines));return i==e.number?e:new Fp(i)},domEventHandlers:t.facet(vs).domEventHandlers}));function bP(t={}){return[vs.of(t),SE(),wP]}function $C(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(kP.range(r)))}return xe.of(e)});function _P(){return SP}const TP=1024;let EP=0;class Pp{constructor(e,n){this.from=e,this.to=n}}class ye{constructor(e={}){this.id=EP++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Rn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}ye.closedBy=new ye({deserialize:t=>t.split(" ")});ye.openedBy=new ye({deserialize:t=>t.split(" ")});ye.group=new ye({deserialize:t=>t.split(" ")});ye.contextHash=new ye({perNode:!0});ye.lookAhead=new ye({perNode:!0});ye.mounted=new ye({perNode:!0});class nf{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[ye.mounted.id]}}const AP=Object.create(null);class Rn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):AP,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Rn(e.name||"",n,e.id,i);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(r)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(ye.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(ye.group),o=-1;o<(r?r.length:0);o++){let s=n[o<0?i.name:r[o]];if(s)return s}}}}Rn.none=new Rn("",Object.create(null),0,8);const gu=new WeakMap,zC=new WeakMap;var ht;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(ht||(ht={}));class Tt{constructor(e,n,i,r,o){if(this.type=e,this.children=n,this.positions=i,this.length=r,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,l]of o)this.props[typeof s=="number"?s:s.id]=l}}toString(){let e=nf.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let i of this.children){let r=i.toString();r&&(n&&(n+=","),n+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Xg(this.topNode,e)}cursorAt(e,n=0,i=0){let r=gu.get(this)||this.topNode,o=new Xg(r);return o.moveTo(e,n),gu.set(this,o._tree),o}get topNode(){return new On(this,0,0,null)}resolve(e,n=0){let i=Za(gu.get(this)||this.topNode,e,n,!1);return gu.set(this,i),i}resolveInner(e,n=0){let i=Za(zC.get(this)||this.topNode,e,n,!0);return zC.set(this,i),i}resolveStack(e,n=0){return OP(this,e,n)}iterate(e){let{enter:n,leave:i,from:r=0,to:o=this.length}=e,s=e.mode||0,l=(s&ht.IncludeAnonymous)>0;for(let a=this.cursor(s|ht.IncludeAnonymous);;){let c=!1;if(a.from<=o&&a.to>=r&&(!l&&a.type.isAnonymous||n(a)!==!1)){if(a.firstChild())continue;c=!0}for(;c&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Zy(Rn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new Tt(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new Tt(Rn.none,n,i,r)))}static build(e){return BP(e)}}Tt.empty=new Tt(Rn.none,[],[],0);class Qy{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Qy(this.buffer,this.index)}}class Vo{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Rn.none}toString(){let e=[];for(let n=0;n0));a=s[a+3]);return l}slice(e,n,i){let r=this.buffer,o=new Uint16Array(n-e),s=0;for(let l=e,a=0;l=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function Za(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?l.length:-1;e!=c;e+=n){let u=l[e],h=a[e]+s.from;if(TE(r,i,h,h+u.length)){if(u instanceof Vo){if(o&ht.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,n,i-h,r);if(f>-1)return new Mr(new MP(s,u,e,h),null,f)}else if(o&ht.IncludeAnonymous||!u.type.isAnonymous||Jy(u)){let f;if(!(o&ht.IgnoreMounts)&&(f=nf.get(u))&&!f.overlay)return new On(f.tree,h,e,s);let d=new On(u,h,e,s);return o&ht.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(n<0?u.children.length-1:0,n,i,r)}}}if(o&ht.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let r;if(!(i&ht.IgnoreOverlays)&&(r=nf.get(this._tree))&&r.overlay){let o=e-this.from;for(let{from:s,to:l}of r.overlay)if((n>0?s<=o:s=o:l>o))return new On(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function jC(t,e,n,i){let r=t.cursor(),o=[];if(!r.firstChild())return o;if(n!=null){for(;!r.type.is(n);)if(!r.nextSibling())return o}for(;;){if(i!=null&&r.type.is(i))return o;if(r.type.is(e)&&o.push(r.node),!r.nextSibling())return i==null?o:[]}}function Gg(t,e,n=e.length-1){for(let i=t.parent;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class MP{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class Mr extends EE{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return o<0?null:new Mr(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&ht.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Mr(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Mr(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Mr(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,o=i.buffer[this.index+3];if(o>r){let s=i.buffer[this.index+1];e.push(i.slice(r,o,s)),n.push(0)}return new Tt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function AE(t){if(!t.length)return null;if(t.length==1)return t[0];let e=0,n=t[0];for(let o=1;on.from||s.to=e){let l=new On(s.tree,s.overlay[0].from+o.from,0,null);(r||(r=[i])).push(Za(l,e,n,!1))}}return r?AE(r):i}class Xg{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof On)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof On?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&ht.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ht.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ht.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let o=n+e,s=e<0?-1:i._tree.children.length;o!=s;o+=e){let l=i._tree.children[o];if(this.mode&ht.IncludeAnonymous||l instanceof Vo||!l.type.isAnonymous||Jy(l))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let s=e;s;s=s._parent)if(s.index==r){if(r==this.index)return s;n=s,i=o+1;break e}r=this.stack[--o]}for(let r=i;r=0;o--){if(o<0)return Gg(this.node,e,r);let s=i[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[r]&&e[r]!=s.name)return!1;r--}}return!0}}function Jy(t){return t.children.some(e=>e instanceof Vo||!e.type.isAnonymous||Jy(e))}function BP(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=TP,reused:o=[],minRepeatType:s=i.types.length}=t,l=Array.isArray(n)?new Qy(n,n.length):n,a=i.types,c=0,u=0;function h(C,w,b,S,M){let{id:N,start:O,end:D,size:V}=l,K=u;for(;V<0;)if(l.next(),V==-1){let _=o[N];b.push(_),S.push(O-C);return}else if(V==-3){c=N;return}else if(V==-4){u=N;return}else throw new RangeError(`Unrecognized record size: ${V}`);let z=a[N],F,B,$=O-C;if(D-O<=r&&(B=y(l.pos-w,M))){let _=new Uint16Array(B.size-B.skip),L=l.pos-B.size,R=_.length;for(;l.pos>L;)R=v(B.start,_,R);F=new Vo(_,D-B.start,i),$=B.start-C}else{let _=l.pos-V;l.next();let L=[],R=[],H=N>=s?N:-1,J=0,X=D;for(;l.pos>_;)H>=0&&l.id==H&&l.size>=0?(l.end<=X-r&&(d(L,R,O,J,l.end,X,H,K),J=L.length,X=l.end),l.next()):h(O,_,L,R,H);if(H>=0&&J>0&&J-1&&J>0){let ae=f(z);F=Zy(z,L,R,0,L.length,0,D-O,ae,ae)}else F=p(z,L,R,D-O,K-D)}b.push(F),S.push($)}function f(C){return(w,b,S)=>{let M=0,N=w.length-1,O,D;if(N>=0&&(O=w[N])instanceof Tt){if(!N&&O.type==C&&O.length==S)return O;(D=O.prop(ye.lookAhead))&&(M=b[N]+O.length+D)}return p(C,w,b,S,M)}}function d(C,w,b,S,M,N,O,D){let V=[],K=[];for(;C.length>S;)V.push(C.pop()),K.push(w.pop()+b-M);C.push(p(i.types[O],V,K,N-M,D-N)),w.push(M-b)}function p(C,w,b,S,M=0,N){if(c){let O=[ye.contextHash,c];N=N?[O].concat(N):[O]}if(M>25){let O=[ye.lookAhead,M];N=N?[O].concat(N):[O]}return new Tt(C,w,b,S,N)}function y(C,w){let b=l.fork(),S=0,M=0,N=0,O=b.end-r,D={size:0,start:0,skip:0};e:for(let V=b.pos-C;b.pos>V;){let K=b.size;if(b.id==w&&K>=0){D.size=S,D.start=M,D.skip=N,N+=4,S+=4,b.next();continue}let z=b.pos-K;if(K<0||z=s?4:0,B=b.start;for(b.next();b.pos>z;){if(b.size<0)if(b.size==-3)F+=4;else break e;else b.id>=s&&(F+=4);b.next()}M=B,S+=K,N+=F}return(w<0||S==C)&&(D.size=S,D.start=M,D.skip=N),D.size>4?D:void 0}function v(C,w,b){let{id:S,start:M,end:N,size:O}=l;if(l.next(),O>=0&&S4){let V=l.pos-(O-4);for(;l.pos>V;)b=v(C,w,b)}w[--b]=D,w[--b]=N-C,w[--b]=M-C,w[--b]=S}else O==-3?c=S:O==-4&&(u=S);return b}let g=[],m=[];for(;l.pos>0;)h(t.start||0,t.bufferStart||0,g,m,-1);let x=(e=t.length)!==null&&e!==void 0?e:g.length?m[0]+g[0].length:0;return new Tt(a[t.topID],g.reverse(),m.reverse(),x)}const HC=new WeakMap;function sh(t,e){if(!t.isAnonymous||e instanceof Vo||e.type!=t)return 1;let n=HC.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof Tt)){n=1;break}n+=sh(t,i)}HC.set(e,n)}return n}function Zy(t,e,n,i,r,o,s,l,a){let c=0;for(let p=i;p=u)break;b+=S}if(x==C+1){if(b>u){let S=p[C];d(S.children,S.positions,0,S.children.length,y[C]+m);continue}h.push(p[C])}else{let S=y[x-1]+p[x-1].length-w;h.push(Zy(t,p,y,C,x,w,S,null,a))}f.push(w+m-o)}}return d(e,n,i,r,0),(l||a)(h,f,s)}class So{constructor(e,n,i,r,o=!1,s=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new So(0,e.length,e,0,!1,i)];for(let o of n)o.to>e.length&&r.push(o);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],o=1,s=e.length?e[0]:null;for(let l=0,a=0,c=0;;l++){let u=l=i)for(;s&&s.from=f.from||h<=f.to||c){let d=Math.max(f.from,a)-c,p=Math.min(f.to,h)-c;f=d>=p?null:new So(d,p,f.tree,f.offset+c,l>0,!!u)}if(f&&r.push(f),s.to>h)break;s=onew Pp(r.from,r.to)):[new Pp(0,0)]:[new Pp(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let o=r.advance();if(o)return o}}}class RP{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new ye({perNode:!0});let FP=0;class ci{constructor(e,n,i){this.set=e,this.base=n,this.modified=i,this.id=FP++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new ci([],null,[]);if(n.set.push(n),e)for(let i of e.set)n.set.push(i);return n}static defineModifier(){let e=new rf;return n=>n.modified.indexOf(e)>-1?n:rf.get(n.base||n,n.modified.concat(e).sort((i,r)=>i.id-r.id))}}let NP=0;class rf{constructor(){this.instances=[],this.id=NP++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(l=>l.base==e&&PP(n,l.modified));if(i)return i;let r=[],o=new ci(r,e,n);for(let l of n)l.instances.push(o);let s=IP(n);for(let l of e.set)if(!l.modified.length)for(let a of s)r.push(rf.get(l,a));return o}}function PP(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function IP(t){let e=[[]];for(let n=0;ni.length-n.length)}function $P(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let o=[],s=2,l=r;for(let h=0;;){if(l=="..."&&h>0&&h+3==r.length){s=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+r);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==r.length)break;let d=r[h++];if(h==r.length&&d=="!"){s=0;break}if(d!="/")throw new RangeError("Invalid path: "+r);l=r.slice(h)}let a=o.length-1,c=o[a];if(!c)throw new RangeError("Invalid path: "+r);let u=new of(i,s,a>0?o.slice(0,a):null);e[c]=u.sort(e[c])}}return ME.add(e)}const ME=new ye;class of{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let s=r;for(let l of o)for(let a of l.set){let c=n[a.id];if(c){s=s?s+" "+c:c;break}}return s},scope:i}}function zP(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function jP(t,e,n,i=0,r=t.length){let o=new HP(i,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}class HP{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,o){let{type:s,from:l,to:a}=e;if(l>=i||a<=n)return;s.isTop&&(o=this.highlighters.filter(d=>!d.scope||d.scope(s)));let c=r,u=WP(e)||of.empty,h=zP(o,u.tags);if(h&&(c&&(c+=" "),c+=h,u.mode==1&&(r+=(r?" ":"")+h)),this.startSpan(Math.max(n,l),c),u.opaque)return;let f=e.tree&&e.tree.prop(ye.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+l,1),p=this.highlighters.filter(v=>!v.scope||v.scope(f.tree.type)),y=e.firstChild();for(let v=0,g=l;;v++){let m=v=x||!e.nextSibling())););if(!m||x>i)break;g=m.to+l,g>n&&(this.highlightRange(d.cursor(),Math.max(n,m.from+l),Math.min(i,g),"",p),this.startSpan(Math.min(i,g),c))}y&&e.parent()}else if(e.firstChild()){f&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,o),this.startSpan(Math.min(i,e.to),c)}while(e.nextSibling());e.parent()}}}function WP(t){let e=t.type.prop(ME);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const q=ci.define,yu=q(),yr=q(),WC=q(yr),VC=q(yr),vr=q(),vu=q(vr),Ip=q(vr),li=q(),ao=q(li),oi=q(),si=q(),Qg=q(),Bl=q(Qg),xu=q(),P={comment:yu,lineComment:q(yu),blockComment:q(yu),docComment:q(yu),name:yr,variableName:q(yr),typeName:WC,tagName:q(WC),propertyName:VC,attributeName:q(VC),className:q(yr),labelName:q(yr),namespace:q(yr),macroName:q(yr),literal:vr,string:vu,docString:q(vu),character:q(vu),attributeValue:q(vu),number:Ip,integer:q(Ip),float:q(Ip),bool:q(vr),regexp:q(vr),escape:q(vr),color:q(vr),url:q(vr),keyword:oi,self:q(oi),null:q(oi),atom:q(oi),unit:q(oi),modifier:q(oi),operatorKeyword:q(oi),controlKeyword:q(oi),definitionKeyword:q(oi),moduleKeyword:q(oi),operator:si,derefOperator:q(si),arithmeticOperator:q(si),logicOperator:q(si),bitwiseOperator:q(si),compareOperator:q(si),updateOperator:q(si),definitionOperator:q(si),typeOperator:q(si),controlOperator:q(si),punctuation:Qg,separator:q(Qg),bracket:Bl,angleBracket:q(Bl),squareBracket:q(Bl),paren:q(Bl),brace:q(Bl),content:li,heading:ao,heading1:q(ao),heading2:q(ao),heading3:q(ao),heading4:q(ao),heading5:q(ao),heading6:q(ao),contentSeparator:q(li),list:q(li),quote:q(li),emphasis:q(li),strong:q(li),link:q(li),monospace:q(li),strikethrough:q(li),inserted:q(),deleted:q(),changed:q(),invalid:q(),meta:xu,documentMeta:q(xu),annotation:q(xu),processingInstruction:q(xu),definition:ci.defineModifier(),constant:ci.defineModifier(),function:ci.defineModifier(),standard:ci.defineModifier(),local:ci.defineModifier(),special:ci.defineModifier()};LE([{tag:P.link,class:"tok-link"},{tag:P.heading,class:"tok-heading"},{tag:P.emphasis,class:"tok-emphasis"},{tag:P.strong,class:"tok-strong"},{tag:P.keyword,class:"tok-keyword"},{tag:P.atom,class:"tok-atom"},{tag:P.bool,class:"tok-bool"},{tag:P.url,class:"tok-url"},{tag:P.labelName,class:"tok-labelName"},{tag:P.inserted,class:"tok-inserted"},{tag:P.deleted,class:"tok-deleted"},{tag:P.literal,class:"tok-literal"},{tag:P.string,class:"tok-string"},{tag:P.number,class:"tok-number"},{tag:[P.regexp,P.escape,P.special(P.string)],class:"tok-string2"},{tag:P.variableName,class:"tok-variableName"},{tag:P.local(P.variableName),class:"tok-variableName tok-local"},{tag:P.definition(P.variableName),class:"tok-variableName tok-definition"},{tag:P.special(P.variableName),class:"tok-variableName2"},{tag:P.definition(P.propertyName),class:"tok-propertyName tok-definition"},{tag:P.typeName,class:"tok-typeName"},{tag:P.namespace,class:"tok-namespace"},{tag:P.className,class:"tok-className"},{tag:P.macroName,class:"tok-macroName"},{tag:P.propertyName,class:"tok-propertyName"},{tag:P.operator,class:"tok-operator"},{tag:P.comment,class:"tok-comment"},{tag:P.meta,class:"tok-meta"},{tag:P.invalid,class:"tok-invalid"},{tag:P.punctuation,class:"tok-punctuation"}]);var $p;const Ql=new ye,VP=new ye;class di{constructor(e,n,i=[],r=""){this.data=e,this.name=r,pe.prototype.hasOwnProperty("tree")||Object.defineProperty(pe.prototype,"tree",{get(){return Mt(this)}}),this.parser=n,this.extension=[Yr.of(this),pe.languageData.of((o,s,l)=>{let a=qC(o,s,l),c=a.type.prop(Ql);if(!c)return[];let u=o.facet(c),h=a.type.prop(VP);if(h){let f=a.resolve(s-a.from,l);for(let d of h)if(d.test(f,o)){let p=o.facet(d.facet);return d.type=="replace"?p:p.concat(u)}}return u})].concat(i)}isActiveAt(e,n,i=-1){return qC(e,n,i).type.prop(Ql)==this.data}findRegions(e){let n=e.facet(Yr);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(o,s)=>{if(o.prop(Ql)==this.data){i.push({from:s,to:s+o.length});return}let l=o.prop(ye.mounted);if(l){if(l.tree.prop(Ql)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+s,to:a.to+s});else i.push({from:s,to:s+o.length});return}else if(l.overlay){let a=i.length;if(r(l.tree,l.overlay[0].from+s),i.length>a)return}}for(let a=0;a=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Dl=null;class sf{constructor(e,n,i=[],r,o,s,l,a){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new sf(e,n,[],Tt.empty,0,i,[],null)}startParse(){return this.parser.startParse(new qP(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Tt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(So.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Dl;Dl=this;try{return e()}finally{Dl=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=UC(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:o,viewport:s,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((c,u,h,f)=>a.push({fromA:c,toA:u,fromB:h,toB:f})),i=So.applyChanges(i,a),r=Tt.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){l=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),h=e.mapPos(c.to,-1);ue.from&&(this.fragments=UC(this.fragments,r,o),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends DP{createParse(n,i,r){let o=r[0].from,s=r[r.length-1].to;return{parsedPos:o,advance(){let a=Dl;if(a){for(let c of r)a.tempSkipped.push(c);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=s,new Tt(Rn.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Dl}}function UC(t,e,n){return So.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class qs{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new qs(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=sf.create(e.facet(Yr).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new qs(i)}}di.state=pt.define({create:qs.init,update(t,e){for(let n of e.effects)if(n.is(di.setState))return n.value;return e.startState.facet(Yr)!=e.state.facet(Yr)?qs.init(e.state):t.apply(e)}});let OE=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(OE=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const zp=typeof navigator<"u"&&(!(($p=navigator.scheduling)===null||$p===void 0)&&$p.isInputPending)?()=>navigator.scheduling.isInputPending():null,UP=qe.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(di.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(di.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=OE(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,a=o.context.work(()=>zp&&zp()||Date.now()>s,r+(l?0:1e5));this.chunkBudget-=Date.now()-n,(a||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:di.setState.of(new qs(o.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Yn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Yr=Q.define({combine(t){return t.length?t[0]:null},enables:t=>[di.state,UP,Y.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]}),KP=Q.define(),fd=Q.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function lf(t){let e=t.facet(fd);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function ec(t,e){let n="",i=t.tabSize,r=t.facet(fd)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let o=0;o=e?GP(t,n,e):null}class dd{constructor(e,n={}){this.state=e,this.options=n,this.unit=lf(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return r!=null&&r>=i.from&&r<=i.to?o&&r==e?{text:"",from:e}:(n<0?r-1&&(o+=s-this.countColumn(i,i.search(/\S|$/))),o}countColumn(e,n=e.length){return ul(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(r);if(s>-1)return s}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const YP=new ye;function GP(t,e,n){let i=e.resolveStack(n),r=i.node.enterUnfinishedNodesBefore(n);if(r!=i.node){let o=[];for(let s=r;s!=i.node;s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)i={node:o[s],next:i}}return BE(i,t,n)}function BE(t,e,n){for(let i=t;i;i=i.next){let r=QP(i.node);if(r)return r(tv.create(e,n,i))}return 0}function XP(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function QP(t){let e=t.type.prop(YP);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(ye.closedBy))){let r=t.lastChild,o=r&&i.indexOf(r.name)>-1;return s=>t5(s,!0,1,void 0,o&&!XP(s)?r.from:void 0)}return t.parent==null?JP:null}function JP(){return 0}class tv extends dd{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new tv(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(ZP(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return BE(this.context.next,this.base,this.pos)}}function ZP(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function e5(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=r==null||r<=o.from?o.to:Math.min(o.to,r);for(let l=n.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped)return a.from{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+n5)return t;let o=n.sliceString(r.from,i);if(!e.some(c=>c.test(o)))return t;let{state:s}=t,l=-1,a=[];for(let{head:c}of s.selection.ranges){let u=s.doc.lineAt(c);if(u.from==l)continue;l=u.from;let h=ev(s,u.from);if(h==null)continue;let f=/^\s*/.exec(u.text)[0],d=ec(s,h);f!=d&&a.push({from:u.from,to:u.from+f.length,insert:d})}return a.length?[t,{changes:a,sequential:!0}]:t})}const r5=Q.define(),o5=new ye;function s5(t,e,n){let i=Mt(t);if(i.lengthn)continue;if(o&&l.from=e&&c.to>n&&(o=c)}}return o}function l5(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function af(t,e,n){for(let i of t.facet(r5)){let r=i(t,e,n);if(r)return r}return s5(t,e,n)}function DE(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const pd=he.define({map:DE}),_c=he.define({map:DE});function RE(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Po=pt.define({create(){return se.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(pd)&&!a5(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(nv),r=i?se.replace({widget:new m5(i(e.state,n.value))}):KC;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(_c)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:i}=e.selection.main;t.between(i,i,(r,o)=>{ri&&(n=!0)}),n&&(t=t.update({filterFrom:i,filterTo:i,filter:(r,o)=>o<=i||r>=i}))}return t},provide:t=>Y.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!r||r.from>o)&&(r={from:o,to:s})}),r}function a5(t,e,n){let i=!1;return t.between(e,e,(r,o)=>{r==e&&o==n&&(i=!0)}),i}function FE(t,e){return t.field(Po,!1)?e:e.concat(he.appendConfig.of(PE()))}const c5=t=>{for(let e of RE(t)){let n=af(t.state,e.from,e.to);if(n)return t.dispatch({effects:FE(t.state,[pd.of(n),NE(t,n)])}),!0}return!1},u5=t=>{if(!t.state.field(Po,!1))return!1;let e=[];for(let n of RE(t)){let i=cf(t.state,n.from,n.to);i&&e.push(_c.of(i),NE(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function NE(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return Y.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const h5=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(Po,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(_c.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},d5=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:c5},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:u5},{key:"Ctrl-Alt-[",run:h5},{key:"Ctrl-Alt-]",run:f5}],p5={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},nv=Q.define({combine(t){return Ei(t,p5)}});function PE(t){let e=[Po,v5];return t&&e.push(nv.of(t)),e}function IE(t,e){let{state:n}=t,i=n.facet(nv),r=s=>{let l=t.lineBlockAt(t.posAtDOM(s.target)),a=cf(t.state,l.from,l.to);a&&t.dispatch({effects:_c.of(a)}),s.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let o=document.createElement("span");return o.textContent=i.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=r,o}const KC=se.replace({widget:new class extends cr{toDOM(t){return IE(t,null)}}});class m5 extends cr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return IE(e,this.value)}}const g5={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class jp extends ir{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function y5(t={}){let e=Object.assign(Object.assign({},g5),t),n=new jp(e,!0),i=new jp(e,!1),r=qe.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Yr)!=s.state.facet(Yr)||s.startState.field(Po,!1)!=s.state.field(Po,!1)||Mt(s.startState)!=Mt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let l=new Vr;for(let a of s.viewportLineBlocks){let c=cf(s.state,a.from,a.to)?i:af(s.state,a.from,a.to)?n:null;c&&l.add(a.from,a.from,c)}return l.finish()}}),{domEventHandlers:o}=e;return[r,gP({class:"cm-foldGutter",markers(s){var l;return((l=s.plugin(r))===null||l===void 0?void 0:l.markers)||xe.empty},initialSpacer(){return new jp(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,l,a)=>{if(o.click&&o.click(s,l,a))return!0;let c=cf(s.state,l.from,l.to);if(c)return s.dispatch({effects:_c.of(c)}),!0;let u=af(s.state,l.from,l.to);return u?(s.dispatch({effects:pd.of(u)}),!0):!1}})}),PE()]}const v5=Y.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Tc{constructor(e,n){this.specs=e;let i;function r(l){let a=qr.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const o=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,s=n.scope;this.scope=s instanceof di?l=>l.prop(Ql)==s.data:s?l=>l==s:void 0,this.style=LE(e.map(l=>({tag:l.tag,class:l.class||r(Object.assign({},l,{tag:null}))})),{all:o}).style,this.module=i?new qr(i):null,this.themeType=n.themeType}static define(e,n){return new Tc(e,n||{})}}const Jg=Q.define(),$E=Q.define({combine(t){return t.length?[t[0]]:null}});function Hp(t){let e=t.facet(Jg);return e.length?e:t.facet($E)}function zE(t,e){let n=[C5],i;return t instanceof Tc&&(t.module&&n.push(Y.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push($E.of(t)):i?n.push(Jg.computeN([Y.darkTheme],r=>r.facet(Y.darkTheme)==(i=="dark")?[t]:[])):n.push(Jg.of(t)),n}class x5{constructor(e){this.markCache=Object.create(null),this.tree=Mt(e.state),this.decorations=this.buildDeco(e,Hp(e.state))}update(e){let n=Mt(e.state),i=Hp(e.state),r=i!=Hp(e.startState);n.length{i.add(s,l,this.markCache[a]||(this.markCache[a]=se.mark({class:a})))},r,o);return i.finish()}}const C5=cl.high(qe.fromClass(x5,{decorations:t=>t.decorations})),w5=Tc.define([{tag:P.meta,color:"#404740"},{tag:P.link,textDecoration:"underline"},{tag:P.heading,textDecoration:"underline",fontWeight:"bold"},{tag:P.emphasis,fontStyle:"italic"},{tag:P.strong,fontWeight:"bold"},{tag:P.strikethrough,textDecoration:"line-through"},{tag:P.keyword,color:"#708"},{tag:[P.atom,P.bool,P.url,P.contentSeparator,P.labelName],color:"#219"},{tag:[P.literal,P.inserted],color:"#164"},{tag:[P.string,P.deleted],color:"#a11"},{tag:[P.regexp,P.escape,P.special(P.string)],color:"#e40"},{tag:P.definition(P.variableName),color:"#00f"},{tag:P.local(P.variableName),color:"#30a"},{tag:[P.typeName,P.namespace],color:"#085"},{tag:P.className,color:"#167"},{tag:[P.special(P.variableName),P.macroName],color:"#256"},{tag:P.definition(P.propertyName),color:"#00c"},{tag:P.comment,color:"#940"},{tag:P.invalid,color:"#f00"}]),b5=Y.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),jE=1e4,HE="()[]{}",WE=Q.define({combine(t){return Ei(t,{afterCursor:!0,brackets:HE,maxScanDistance:jE,renderMatch:_5})}}),k5=se.mark({class:"cm-matchingBracket"}),S5=se.mark({class:"cm-nonmatchingBracket"});function _5(t){let e=[],n=t.matched?k5:S5;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const T5=pt.define({create(){return se.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(WE);for(let r of e.state.selection.ranges){if(!r.empty)continue;let o=pi(e.state,r.head,-1,i)||r.head>0&&pi(e.state,r.head-1,1,i)||i.afterCursor&&(pi(e.state,r.head,1,i)||r.headY.decorations.from(t)}),E5=[T5,b5];function A5(t={}){return[WE.of(t),E5]}const M5=new ye;function Zg(t,e,n){let i=t.prop(e<0?ye.openedBy:ye.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function e0(t){let e=t.type.prop(M5);return e?e(t.node):t}function pi(t,e,n,i={}){let r=i.maxScanDistance||jE,o=i.brackets||HE,s=Mt(t),l=s.resolveInner(e,n);for(let a=l;a;a=a.parent){let c=Zg(a.type,n,o);if(c&&a.from0?e>=u.from&&eu.from&&e<=u.to))return L5(t,e,n,a,u,c,o)}}return O5(t,e,n,s,l.type,r,o)}function L5(t,e,n,i,r,o,s){let l=i.parent,a={from:r.from,to:r.to},c=0,u=l==null?void 0:l.cursor();if(u&&(n<0?u.childBefore(i.from):u.childAfter(i.to)))do if(n<0?u.to<=i.from:u.from>=i.to){if(c==0&&o.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let f=0;!u.next().done&&f<=o;){let d=u.value;n<0&&(f+=d.length);let p=e+f*n;for(let y=n>0?0:d.length-1,v=n>0?d.length:-1;y!=v;y+=n){let g=s.indexOf(d[y]);if(!(g<0||i.resolveInner(p+y,1).type!=r))if(g%2==0==n>0)h++;else{if(h==1)return{start:c,end:{from:p+y,to:p+y+1},matched:g>>1==a>>1};h--}}n>0&&(f+=d.length)}return u.done?{start:c,matched:!1}:null}const B5=Object.create(null),YC=[Rn.none],GC=[],D5=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])D5[t]=R5(B5,e);function Wp(t,e){GC.indexOf(t)>-1||(GC.push(t),console.warn(e))}function R5(t,e){let n=[];for(let o of e.split(" ")){let s=[];for(let l of o.split(".")){let a=t[l]||P[l];a?typeof a=="function"?s.length?s=s.map(a):Wp(l,`Modifier ${l} used at start of tag`):s.length?Wp(l,`Tag ${l} used as modifier`):s=Array.isArray(a)?a:[a]:Wp(l,`Unknown highlighting tag ${l}`)}for(let l of s)n.push(l)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=Rn.define({id:YC.length,name:i,props:[$P({[i]:n})]});return YC.push(r),r.id}const F5=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=rv(t.state,n.from);return i.line?N5(t):i.block?I5(t):!1};function iv(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const N5=iv(j5,0),P5=iv(VE,0),I5=iv((t,e)=>VE(t,e,z5(e)),0);function rv(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Rl=50;function $5(t,{open:e,close:n},i,r){let o=t.sliceDoc(i-Rl,i),s=t.sliceDoc(r,r+Rl),l=/\s*$/.exec(o)[0].length,a=/^\s*/.exec(s)[0].length,c=o.length-l;if(o.slice(c-e.length,c)==e&&s.slice(a,a+n.length)==n)return{open:{pos:i-l,margin:l&&1},close:{pos:r+a,margin:a&&1}};let u,h;r-i<=2*Rl?u=h=t.sliceDoc(i,r):(u=t.sliceDoc(i,i+Rl),h=t.sliceDoc(r-Rl,r));let f=/^\s*/.exec(u)[0].length,d=/\s*$/.exec(h)[0].length,p=h.length-d-n.length;return u.slice(f,f+e.length)==e&&h.slice(p,p+n.length)==n?{open:{pos:i+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:r-d-n.length,margin:/\s/.test(h.charAt(p-1))?1:0}}:null}function z5(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to),o=e.length-1;o>=0&&e[o].to>i.from?e[o].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function VE(t,e,n=e.selection.ranges){let i=n.map(o=>rv(e,o.from).block);if(!i.every(o=>o))return null;let r=n.map((o,s)=>$5(e,i[s],o.from,o.to));if(t!=2&&!r.every(o=>o))return{changes:e.changes(n.map((o,s)=>r[s]?[]:[{from:o.from,insert:i[s].open+" "},{from:o.to,insert:" "+i[s].close}]))};if(t!=1&&r.some(o=>o)){let o=[];for(let s=0,l;sr&&(o==s||s>h.from)){r=h.from;let f=/^\s*/.exec(h.text)[0].length,d=f==h.length,p=h.text.slice(f,f+c.length)==c?f:-1;fo.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:l,token:a,indent:c,empty:u,single:h}of i)(h||!u)&&o.push({from:l.from+c,insert:a+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&i.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:l,token:a}of i)if(l>=0){let c=s.from+l,u=c+a.length;s.text[u-s.from]==" "&&u++,o.push({from:c,to:u})}return{changes:o}}return null}const t0=Ti.define(),H5=Ti.define(),W5=Q.define(),qE=Q.define({combine(t){return Ei(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}});function V5(t){let e=0;return t.iterChangedRanges((n,i)=>e=i),e}const UE=pt.define({create(){return mi.empty},update(t,e){let n=e.state.facet(qE),i=e.annotation(t0);if(i){let a=e.docChanged?I.single(V5(e.changes)):void 0,c=Gt.fromTransaction(e,a),u=i.side,h=u==0?t.undone:t.done;return c?h=uf(h,h.length,n.minDepth,c):h=GE(h,e.startState.selection),new mi(u==0?i.rest:h,u==0?h:i.rest)}let r=e.annotation(H5);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(tt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Gt.fromTransaction(e),s=e.annotation(tt.time),l=e.annotation(tt.userEvent);return o?t=t.addChanges(o,s,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,l,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new mi(t.done.map(Gt.fromJSON),t.undone.map(Gt.fromJSON))}});function q5(t={}){return[UE,qE.of(t),Y.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?KE:e.inputType=="historyRedo"?n0:null;return i?(e.preventDefault(),i(n)):!1}})]}function md(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(UE,!1);if(!r)return!1;let o=r.pop(t,n,e);return o?(i(o),!0):!1}}const KE=md(0,!1),n0=md(1,!1),U5=md(0,!0),K5=md(1,!0);class Gt{constructor(e,n,i,r,o){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new Gt(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new Gt(e.changes&&Je.fromJSON(e.changes),[],e.mapped&&vi.fromJSON(e.mapped),e.startSelection&&I.fromJSON(e.startSelection),e.selectionsAfter.map(I.fromJSON))}static fromTransaction(e,n){let i=An;for(let r of e.startState.facet(W5)){let o=r(e);o.length&&(i=i.concat(o))}return!i.length&&e.changes.empty?null:new Gt(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,An)}static selection(e){return new Gt(void 0,An,void 0,void 0,e)}}function uf(t,e,n,i){let r=e+1>n+20?e-n-1:0,o=t.slice(r,e);return o.push(i),o}function Y5(t,e){let n=[],i=!1;return t.iterChangedRanges((r,o)=>n.push(r,o)),e.iterChangedRanges((r,o,s,l)=>{for(let a=0;a=c&&s<=u&&(i=!0)}}),i}function G5(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function YE(t,e){return t.length?e.length?t.concat(e):t:e}const An=[],X5=200;function GE(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-X5));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),uf(t,t.length-1,1e9,n.setSelAfter(i)))}else return[Gt.selection([e])]}function Q5(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Vp(t,e){if(!t.length)return t;let n=t.length,i=An;for(;n;){let r=J5(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let o=t.slice(0,n);return o[n-1]=r,o}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[Gt.selection(i)]:An}function J5(t,e,n){let i=YE(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):An,n);if(!t.changes)return Gt.selection(i);let r=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new Gt(r,he.mapEffects(t.effects,e),s,t.startSelection.map(o),i)}const Z5=/^(input\.type|delete)($|\.)/;class mi{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new mi(this.done,this.undone):this}addChanges(e,n,i,r,o){let s=this.done,l=s[s.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||Z5.test(i))&&(!l.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):gd(n,e))}function Lt(t){return t.textDirectionAt(t.state.selection.main.head)==Ie.LTR}const QE=t=>XE(t,!Lt(t)),JE=t=>XE(t,Lt(t));function ZE(t,e){return Zn(t,n=>n.empty?t.moveByGroup(n,e):gd(n,e))}const tI=t=>ZE(t,!Lt(t)),nI=t=>ZE(t,Lt(t));function iI(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function yd(t,e,n){let i=Mt(t).resolveInner(e.head),r=n?ye.closedBy:ye.openedBy;for(let a=e.head;;){let c=n?i.childAfter(a):i.childBefore(a);if(!c)break;iI(t,c,r)?i=c:a=n?c.to:c.from}let o=i.type.prop(r),s,l;return o&&(s=n?pi(t,i.from,1):pi(t,i.to,-1))&&s.matched?l=n?s.end.to:s.end.from:l=n?i.to:i.from,I.cursor(l,n?-1:1)}const rI=t=>Zn(t,e=>yd(t.state,e,!Lt(t))),oI=t=>Zn(t,e=>yd(t.state,e,Lt(t)));function eA(t,e){return Zn(t,n=>{if(!n.empty)return gd(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const tA=t=>eA(t,!1),nA=t=>eA(t,!0);function iA(t){let e=t.scrollDOM.clientHeights.empty?t.moveVertically(s,e,n.height):gd(s,e));if(r.eq(i.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(i.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,c=l.bottom-n.marginBottom;s&&s.top>a&&s.bottomrA(t,!1),i0=t=>rA(t,!0);function no(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let o=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;o&&e.head!=i.from+o&&(r=I.cursor(i.from+o))}return r}const sI=t=>Zn(t,e=>no(t,e,!0)),lI=t=>Zn(t,e=>no(t,e,!1)),aI=t=>Zn(t,e=>no(t,e,!Lt(t))),cI=t=>Zn(t,e=>no(t,e,Lt(t))),uI=t=>Zn(t,e=>I.cursor(t.lineBlockAt(e.head).from,1)),hI=t=>Zn(t,e=>I.cursor(t.lineBlockAt(e.head).to,-1));function fI(t,e,n){let i=!1,r=hl(t.selection,o=>{let s=pi(t,o.head,-1)||pi(t,o.head,1)||o.head>0&&pi(t,o.head-1,1)||o.headfI(t,e,!1);function $n(t,e){let n=hl(t.state.selection,i=>{let r=e(i);return I.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Ai(t.state,n)),!0)}function oA(t,e){return $n(t,n=>t.moveByChar(n,e))}const sA=t=>oA(t,!Lt(t)),lA=t=>oA(t,Lt(t));function aA(t,e){return $n(t,n=>t.moveByGroup(n,e))}const pI=t=>aA(t,!Lt(t)),mI=t=>aA(t,Lt(t)),gI=t=>$n(t,e=>yd(t.state,e,!Lt(t))),yI=t=>$n(t,e=>yd(t.state,e,Lt(t)));function cA(t,e){return $n(t,n=>t.moveVertically(n,e))}const uA=t=>cA(t,!1),hA=t=>cA(t,!0);function fA(t,e){return $n(t,n=>t.moveVertically(n,e,iA(t).height))}const QC=t=>fA(t,!1),JC=t=>fA(t,!0),vI=t=>$n(t,e=>no(t,e,!0)),xI=t=>$n(t,e=>no(t,e,!1)),CI=t=>$n(t,e=>no(t,e,!Lt(t))),wI=t=>$n(t,e=>no(t,e,Lt(t))),bI=t=>$n(t,e=>I.cursor(t.lineBlockAt(e.head).from)),kI=t=>$n(t,e=>I.cursor(t.lineBlockAt(e.head).to)),ZC=({state:t,dispatch:e})=>(e(Ai(t,{anchor:0})),!0),ew=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.doc.length})),!0),tw=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.selection.main.anchor,head:0})),!0),nw=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),SI=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),_I=({state:t,dispatch:e})=>{let n=vd(t).map(({from:i,to:r})=>I.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:I.create(n),userEvent:"select"})),!0},TI=({state:t,dispatch:e})=>{let n=hl(t.selection,i=>{var r;let o=Mt(t).resolveStack(i.from,1);for(let s=o;s;s=s.next){let{node:l}=s;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&(!((r=l.parent)===null||r===void 0)&&r.parent))return I.range(l.to,l.from)}return i});return e(Ai(t,n)),!0},EI=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=I.create([n.main]):n.main.empty||(i=I.create([I.cursor(n.main.head)])),i?(e(Ai(t,i)),!0):!1};function Ec(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(o=>{let{from:s,to:l}=o;if(s==l){let a=e(o);as&&(n="delete.forward",a=Cu(t,a,!0)),s=Math.min(s,a),l=Math.max(l,a)}else s=Cu(t,s,!1),l=Cu(t,l,!0);return s==l?{range:o}:{changes:{from:s,to:l},range:I.cursor(s,sr(t)))i.between(e,e,(r,o)=>{re&&(e=n?o:r)});return e}const dA=(t,e)=>Ec(t,n=>{let i=n.from,{state:r}=t,o=r.doc.lineAt(i),s,l;if(!e&&i>o.from&&idA(t,!1),pA=t=>dA(t,!0),mA=(t,e)=>Ec(t,n=>{let i=n.head,{state:r}=t,o=r.doc.lineAt(i),s=r.charCategorizer(i);for(let l=null;;){if(i==(e?o.to:o.from)){i==n.head&&o.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let a=_t(o.text,i-o.from,e)+o.from,c=o.text.slice(Math.min(i,a)-o.from,Math.max(i,a)-o.from),u=s(c);if(l!=null&&u!=l)break;(c!=" "||i!=n.head)&&(l=u),i=a}return i}),gA=t=>mA(t,!1),AI=t=>mA(t,!0),MI=t=>Ec(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headEc(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),OI=t=>Ec(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:ve.of(["",""])},range:I.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},DI=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,o=t.doc.lineAt(r),s=r==o.from?r-1:_t(o.text,r-o.from,!1)+o.from,l=r==o.to?r+1:_t(o.text,r-o.from,!0)+o.from;return{changes:{from:s,to:l,insert:t.doc.slice(r,l).append(t.doc.slice(s,r))},range:I.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function vd(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),o=t.doc.lineAt(i.to);if(!i.empty&&i.to==o.from&&(o=t.doc.lineAt(i.to-1)),n>=r.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(i)}else e.push({from:r.from,to:o.to,ranges:[i]});n=o.number+1}return e}function yA(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let o of vd(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),l=s.length+1;if(n){i.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let a of o.ranges)r.push(I.range(Math.min(t.doc.length,a.anchor+l),Math.min(t.doc.length,a.head+l)))}else{i.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let a of o.ranges)r.push(I.range(a.anchor-l,a.head-l))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:I.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const RI=({state:t,dispatch:e})=>yA(t,e,!1),FI=({state:t,dispatch:e})=>yA(t,e,!0);function vA(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of vd(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const NI=({state:t,dispatch:e})=>vA(t,e,!1),PI=({state:t,dispatch:e})=>vA(t,e,!0),II=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(vd(e).map(({from:r,to:o})=>(r>0?r--:ot.moveVertically(r,!0)).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function $I(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Mt(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),o;return i&&r&&i.to<=e&&r.from>=e&&(o=i.type.prop(ye.closedBy))&&o.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const zI=xA(!1),jI=xA(!0);function xA(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:o,to:s}=r,l=e.doc.lineAt(o),a=!t&&o==s&&$I(e,o);t&&(o=s=(s<=l.to?l:e.doc.lineAt(s)).to);let c=new dd(e,{simulateBreak:o,simulateDoubleBreak:!!a}),u=ev(c,o);for(u==null&&(u=ul(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));sl.from&&o{let r=[];for(let s=i.from;s<=i.to;){let l=t.doc.lineAt(s);l.number>n&&(i.empty||i.to>l.from)&&(e(l,r,i),n=l.number),s=l.to+1}let o=t.changes(r);return{changes:r,range:I.range(o.mapPos(i.anchor,1),o.mapPos(i.head,1))}})}const HI=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new dd(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),r=ov(t,(o,s,l)=>{let a=ev(i,o.from);if(a==null)return;/\S/.test(o.text)||(a=0);let c=/^\s*/.exec(o.text)[0],u=ec(t,a);(c!=u||l.fromt.readOnly?!1:(e(t.update(ov(t,(n,i)=>{i.push({from:n.from,insert:t.facet(fd)})}),{userEvent:"input.indent"})),!0),wA=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(ov(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let o=ul(r,t.tabSize),s=0,l=ec(t,Math.max(0,o-lf(t)));for(;s({mac:t.key,run:t.run,shift:t.shift}))),qI=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:rI,shift:gI},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:oI,shift:yI},{key:"Alt-ArrowUp",run:RI},{key:"Shift-Alt-ArrowUp",run:NI},{key:"Alt-ArrowDown",run:FI},{key:"Shift-Alt-ArrowDown",run:PI},{key:"Escape",run:EI},{key:"Mod-Enter",run:jI},{key:"Alt-l",mac:"Ctrl-l",run:_I},{key:"Mod-i",run:TI,preventDefault:!0},{key:"Mod-[",run:wA},{key:"Mod-]",run:CA},{key:"Mod-Alt-\\",run:HI},{key:"Shift-Mod-k",run:II},{key:"Shift-Mod-\\",run:dI},{key:"Mod-/",run:F5},{key:"Alt-A",run:P5}].concat(VI),UI={key:"Tab",run:CA,shift:wA};function Te(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;et.normalize("NFKD"):t=>t;class Us{constructor(e,n,i=0,r=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=o?l=>o(iw(l)):iw,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ct(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=zy(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Tn(e);let r=this.normalize(n);for(let o=0,s=i;;o++){let l=r.charCodeAt(o),a=this.match(l,s);if(o==r.length-1){if(a)return this.value=a,this;break}s==i&&othis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=hf(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let l=new Os(n,e.sliceString(n,i));return qp.set(e,l),l}if(r.from==n&&r.to==i)return r;let{text:o,from:s}=r;return s>n&&(o=e.sliceString(n,s)+o,s=n),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=hf(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Os.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(SA.prototype[Symbol.iterator]=_A.prototype[Symbol.iterator]=function(){return this});function KI(t){try{return new RegExp(t,sv),!0}catch{return!1}}function hf(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function o0(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=Te("input",{class:"cm-textfield",name:"line",value:e}),i=Te("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:ff.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),r())},onsubmit:o=>{o.preventDefault(),r()}},Te("label",t.state.phrase("Go to line"),": ",n)," ",Te("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function r(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,l=s.doc.lineAt(s.selection.main.head),[,a,c,u,h]=o,f=u?+u.slice(1):0,d=c?+c:l.number;if(c&&h){let v=d/100;a&&(v=v*(a=="-"?-1:1)+l.number/s.doc.lines),d=Math.round(s.doc.lines*v)}else c&&a&&(d=d*(a=="-"?-1:1)+l.number);let p=s.doc.line(Math.max(1,Math.min(s.doc.lines,d))),y=I.cursor(p.from+Math.max(0,Math.min(f,p.length)));t.dispatch({effects:[ff.of(!1),Y.scrollIntoView(y.from,{y:"center"})],selection:y}),t.focus()}return{dom:i}}const ff=he.define(),rw=pt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(ff)&&(t=n.value);return t},provide:t=>Ja.from(t,e=>e?o0:null)}),YI=t=>{let e=Qa(t,o0);if(!e){let n=[ff.of(!0)];t.state.field(rw,!1)==null&&n.push(he.appendConfig.of([rw,GI])),t.dispatch({effects:n}),e=Qa(t,o0)}return e&&e.dom.querySelector("input").select(),!0},GI=Y.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),XI={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},TA=Q.define({combine(t){return Ei(t,XI,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function QI(t){let e=[n4,t4];return t&&e.push(TA.of(t)),e}const JI=se.mark({class:"cm-selectionMatch"}),ZI=se.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function ow(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=Re.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=Re.Word)}function e4(t,e,n,i){return t(e.sliceDoc(n,n+1))==Re.Word&&t(e.sliceDoc(i-1,i))==Re.Word}const t4=qe.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(TA),{state:n}=t,i=n.selection;if(i.ranges.length>1)return se.none;let r=i.main,o,s=null;if(r.empty){if(!e.highlightWordAroundCursor)return se.none;let a=n.wordAt(r.head);if(!a)return se.none;s=n.charCategorizer(r.head),o=n.sliceDoc(a.from,a.to)}else{let a=r.to-r.from;if(a200)return se.none;if(e.wholeWords){if(o=n.sliceDoc(r.from,r.to),s=n.charCategorizer(r.head),!(ow(s,n,r.from,r.to)&&e4(s,n,r.from,r.to)))return se.none}else if(o=n.sliceDoc(r.from,r.to).trim(),!o)return se.none}let l=[];for(let a of t.visibleRanges){let c=new Us(n.doc,o,a.from,a.to);for(;!c.next().done;){let{from:u,to:h}=c.value;if((!s||ow(s,n,u,h))&&(r.empty&&u<=r.from&&h>=r.to?l.push(ZI.range(u,h)):(u>=r.to||h<=r.from)&&l.push(JI.range(u,h)),l.length>e.maxMatches))return se.none}}return se.set(l)}},{decorations:t=>t.decorations}),n4=Y.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),i4=({state:t,dispatch:e})=>{let{selection:n}=t,i=I.create(n.ranges.map(r=>t.wordAt(r.head)||I.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function r4(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),o=r&&r.from==n.from&&r.to==n.to;for(let s=!1,l=new Us(t.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(s)return null;l=new Us(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),s=!0}else{if(s&&i.some(a=>a.from==l.value.from))continue;if(o){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const o4=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return i4({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=i))return!1;let r=r4(t,i);return r?(e(t.update({selection:t.selection.addRange(I.range(r.from,r.to),!1),effects:Y.scrollIntoView(r.to)})),!0):!1},fl=Q.define({combine(t){return Ei(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new y4(e),scrollToMatch:e=>Y.scrollIntoView(e)})}});class EA{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||KI(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new c4(this):new l4(this)}getCursor(e,n=0,i){let r=e.doc?e:pe.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?os(this,r,n,i):rs(this,r,n,i)}}class AA{constructor(e){this.spec=e}}function rs(t,e,n,i){return new Us(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?s4(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function s4(t,e){return(n,i,r,o)=>((o>n||o+r.length=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let o=rs(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function os(t,e,n,i){return new SA(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?a4(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function df(t,e){return t.slice(_t(t,e,!1),e)}function pf(t,e){return t.slice(e,_t(t,e))}function a4(t){return(e,n,i)=>!i[0].length||(t(df(i.input,i.index))!=Re.Word||t(pf(i.input,i.index))!=Re.Word)&&(t(pf(i.input,i.index+i[0].length))!=Re.Word||t(df(i.input,i.index+i[0].length))!=Re.Word)}class c4 extends AA{nextMatch(e,n,i){let r=os(this.spec,e,i,e.doc.length).next();return r.done&&(r=os(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let o=Math.max(n,i-r*1e4),s=os(this.spec,e,o,i),l=null;for(;!s.next().done;)l=s.value;if(l&&(o==n||l.from>o+10))return l;if(o==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let o=os(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const tc=he.define(),lv=he.define(),$r=pt.define({create(t){return new Up(s0(t).create(),null)},update(t,e){for(let n of e.effects)n.is(tc)?t=new Up(n.value.create(),t.panel):n.is(lv)&&(t=new Up(t.query,n.value?av:null));return t},provide:t=>Ja.from(t,e=>e.panel)});class Up{constructor(e,n){this.query=e,this.panel=n}}const u4=se.mark({class:"cm-searchMatch"}),h4=se.mark({class:"cm-searchMatch cm-searchMatch-selected"}),f4=qe.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field($r))}update(t){let e=t.state.field($r);(e!=t.startState.field($r)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return se.none;let{view:n}=this,i=new Vr;for(let r=0,o=n.visibleRanges,s=o.length;ro[r+1].from-2*250;)a=o[++r].to;t.highlight(n.state,l,a,(c,u)=>{let h=n.state.selection.ranges.some(f=>f.from==c&&f.to==u);i.add(c,u,h?h4:u4)})}return i.finish()}},{decorations:t=>t.decorations});function Ac(t){return e=>{let n=e.state.field($r,!1);return n&&n.query.spec.valid?t(e,n):OA(e)}}const mf=Ac((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=I.single(i.from,i.to),o=t.state.facet(fl);return t.dispatch({selection:r,effects:[cv(t,i),o.scrollToMatch(r.main,t)],userEvent:"select.search"}),LA(t),!0}),gf=Ac((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let o=I.single(r.from,r.to),s=t.state.facet(fl);return t.dispatch({selection:o,effects:[cv(t,r),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),LA(t),!0}),d4=Ac((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:I.create(n.map(i=>I.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),p4=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,o=[],s=0;for(let l=new Us(t.doc,t.sliceDoc(i,r));!l.next().done;){if(o.length>1e3)return!1;l.value.from==i&&(s=o.length),o.push(I.range(l.value.from,l.value.to))}return e(t.update({selection:I.create(o,s),userEvent:"select.search.matches"})),!0},sw=Ac((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,i,i);if(!o)return!1;let s=[],l,a,c=[];if(o.from==i&&o.to==r&&(a=n.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:a}),o=e.nextMatch(n,o.from,o.to),c.push(Y.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),o){let u=s.length==0||s[0].from>=o.to?0:o.to-o.from-a.length;l=I.single(o.from-u,o.to-u),c.push(cv(t,o)),c.push(n.facet(fl).scrollToMatch(l.main,t))}return t.dispatch({changes:s,selection:l,effects:c,userEvent:"input.replace"}),!0}),m4=Ac((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:o,to:s}=r;return{from:o,to:s,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Y.announce.of(i),userEvent:"input.replace.all"}),!0});function av(t){return t.state.facet(fl).createPanel(t)}function s0(t,e){var n,i,r,o,s;let l=t.selection.main,a=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!a)return e;let c=t.facet(fl);return new EA({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:c.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:c.wholeWord})}function MA(t){let e=Qa(t,av);return e&&e.dom.querySelector("[main-field]")}function LA(t){let e=MA(t);e&&e==t.root.activeElement&&e.select()}const OA=t=>{let e=t.state.field($r,!1);if(e&&e.panel){let n=MA(t);if(n&&n!=t.root.activeElement){let i=s0(t.state,e.query.spec);i.valid&&t.dispatch({effects:tc.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[lv.of(!0),e?tc.of(s0(t.state,e.query.spec)):he.appendConfig.of(x4)]});return!0},BA=t=>{let e=t.state.field($r,!1);if(!e||!e.panel)return!1;let n=Qa(t,av);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:lv.of(!1)}),!0},g4=[{key:"Mod-f",run:OA,scope:"editor search-panel"},{key:"F3",run:mf,shift:gf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:mf,shift:gf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:BA,scope:"editor search-panel"},{key:"Mod-Shift-l",run:p4},{key:"Alt-g",run:YI},{key:"Mod-d",run:o4,preventDefault:!0}];class y4{constructor(e){this.view=e;let n=this.query=e.state.field($r).query.spec;this.commit=this.commit.bind(this),this.searchField=Te("input",{value:n.search,placeholder:sn(e,"Find"),"aria-label":sn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Te("input",{value:n.replace,placeholder:sn(e,"Replace"),"aria-label":sn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Te("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Te("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Te("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,o,s){return Te("button",{class:"cm-button",name:r,onclick:o,type:"button"},s)}this.dom=Te("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>mf(e),[sn(e,"next")]),i("prev",()=>gf(e),[sn(e,"previous")]),i("select",()=>d4(e),[sn(e,"all")]),Te("label",null,[this.caseField,sn(e,"match case")]),Te("label",null,[this.reField,sn(e,"regexp")]),Te("label",null,[this.wordField,sn(e,"by word")]),...e.state.readOnly?[]:[Te("br"),this.replaceField,i("replace",()=>sw(e),[sn(e,"replace")]),i("replaceAll",()=>m4(e),[sn(e,"replace all")])],Te("button",{name:"close",onclick:()=>BA(e),"aria-label":sn(e,"close"),type:"button"},["×"])])}commit(){let e=new EA({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:tc.of(e)}))}keydown(e){TN(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?gf:mf)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),sw(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(tc)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(fl).top}}function sn(t,e){return t.state.phrase(e)}const wu=30,bu=/[\s\.,:;?!]/;function cv(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,o=Math.max(i.from,e-wu),s=Math.min(r,n+wu),l=t.state.sliceDoc(o,s);if(o!=i.from){for(let a=0;al.length-wu;a--)if(!bu.test(l[a-1])&&bu.test(l[a])){l=l.slice(0,a);break}}return Y.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${i.number}.`)}const v4=Y.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),x4=[$r,cl.low(f4),v4];class DA{constructor(e,n,i){this.state=e,this.pos=n,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let n=Mt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),o=r.search(RA(e,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function lw(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function C4(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let o=1;otypeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:C4(e);return r=>{let o=r.matchBefore(i);return o||r.explicit?{from:o?o.from:r.pos,options:e,validFor:n}:null}}class aw{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function zr(t){return t.selection.main.from}function RA(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",o=i[i.length-1]!="$";return!r&&!o?t:new RegExp(`${r?"^":""}(?:${i})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const b4=Ti.define();function k4(t,e,n,i){let{main:r}=t.selection,o=n-r.from,s=i-r.from;return Object.assign(Object.assign({},t.changeByRange(l=>l!=r&&n!=i&&t.sliceDoc(l.from+o,l.from+s)!=t.sliceDoc(n,i)?{range:l}:{changes:{from:l.from+o,to:i==r.from?l.to:l.from+s,insert:e},range:I.cursor(l.from+o+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const cw=new WeakMap;function S4(t){if(!Array.isArray(t))return t;let e=cw.get(t);return e||cw.set(t,e=w4(t)),e}const uv=he.define(),nc=he.define();class _4{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(b=zy(w))!=b.toLowerCase()?1:b!=b.toUpperCase()?2:0;(!m||S==1&&v||C==0&&S!=0)&&(n[h]==w||i[h]==w&&(f=!0)?s[h++]=m:s.length&&(g=!1)),C=S,m+=Tn(w)}return h==a&&s[0]==0&&g?this.result(-100+(f?-200:0),s,e):d==a&&p==0?this.ret(-200-e.length+(y==e.length?0:-100),[0,y]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-200+-700-e.length,[p,y]):h==a?this.result(-100+(f?-200:0)+-700+(g?0:-1100),s,e):n.length==2?!1:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],o=0;for(let s of n){let l=s+(this.astral?Tn(ct(i,s)):1);o&&r[o-1]==s?r[o-1]=l:(r[o++]=s,r[o++]=l)}return this.ret(e-i.length,r)}}const kt=Q.define({combine(t){return Ei(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:T4,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>uw(e(i),n(i)),optionClass:(e,n)=>i=>uw(e(i),n(i)),addToOptions:(e,n)=>e.concat(n)})}});function uw(t,e){return t?e?t+" "+e:t:e}function T4(t,e,n,i,r,o){let s=t.textDirection==Ie.RTL,l=s,a=!1,c="top",u,h,f=e.left-r.left,d=r.right-e.right,p=i.right-i.left,y=i.bottom-i.top;if(l&&f=y||m>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let v=(e.bottom-e.top)/o.offsetHeight,g=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/v}px; max-width: ${h/g}px`,class:"cm-completionInfo-"+(a?s?"left-narrow":"right-narrow":l?"left":"right")}}function E4(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r){let o=document.createElement("span");o.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let a=0;al&&o.appendChild(document.createTextNode(s.slice(l,c)));let h=o.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(s.slice(c,u))),h.className="cm-completionMatchedText",l=u}return ln.position-i.position).map(n=>n.render)}function Kp(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class A4{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:o,selected:s}=r.open,l=e.state.facet(kt);this.optionContent=E4(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=Kp(o.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:c}=e.state.field(n).open;for(let u=a.target,h;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(h=/-(\d+)$/.exec(u.id))&&+h[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(kt).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:nc.of(null)})}),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:o,selected:s,disabled:l}=i.open;(!r.open||r.open.options!=o)&&(this.range=Kp(o.length,s,e.state.facet(kt).maxRenderedOptions),this.showOptions(o,i.id)),this.updateSel(),l!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=Kp(n.options.length,n.selected,this.view.state.facet(kt).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:r}=i;if(!r)return;let o=typeof r=="string"?document.createTextNode(r):r(i);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,i)}).catch(s=>Yn(this.view.state,s,"completion info")):this.addInfoPane(o,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:o}=e;i.appendChild(r),this.infoDestroy=o||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&L4(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return r.top>Math.min(o.bottom,n.bottom)-10||r.bottomi.from||i.from==0))if(o=f,typeof c!="string"&&c.header)r.appendChild(c.header(c));else{let d=r.appendChild(document.createElement("completion-section"));d.textContent=f}}const u=r.appendChild(document.createElement("li"));u.id=n+"-"+s,u.setAttribute("role","option");let h=this.optionClass(l);h&&(u.className=h);for(let f of this.optionContent){let d=f(l,this.view.state,a);d&&u.appendChild(d)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew A4(n,t,e)}function L4(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function hw(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function O4(t,e){let n=[],i=null,r=a=>{n.push(a);let{section:c}=a.completion;if(c){i||(i=[]);let u=typeof c=="string"?c:c.name;i.some(h=>h.name==u)||i.push(typeof c=="string"?{name:u}:c)}};for(let a of t)if(a.hasResult()){let c=a.result.getMatch;if(a.result.filter===!1)for(let u of a.result.options)r(new aw(u,a.source,c?c(u):[],1e9-n.length));else{let u=new _4(e.sliceDoc(a.from,a.to));for(let h of a.result.options)if(u.match(h.label)){let f=h.displayLabel?c?c(h,u.matched):[]:u.matched;r(new aw(h,a.source,f,u.score+(h.boost||0)))}}}if(i){let a=Object.create(null),c=0,u=(h,f)=>{var d,p;return((d=h.rank)!==null&&d!==void 0?d:1e9)-((p=f.rank)!==null&&p!==void 0?p:1e9)||(h.nameu.score-c.score||l(c.completion,u.completion))){let c=a.completion;!s||s.label!=c.label||s.detail!=c.detail||s.type!=null&&c.type!=null&&s.type!=c.type||s.apply!=c.apply||s.boost!=c.boost?o.push(a):hw(a.completion)>hw(s)&&(o[o.length-1]=a),s=a.completion}return o}class xs{constructor(e,n,i,r,o,s){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new xs(this.options,fw(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,o){let s=O4(e,n);if(!s.length)return r&&e.some(a=>a.state==1)?new xs(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let l=n.facet(kt).selectOnOpen?0:-1;if(r&&r.selected!=l&&r.selected!=-1){let a=r.options[r.selected].completion;for(let c=0;cc.hasResult()?Math.min(a,c.from):a,1e8),create:N4,above:o.aboveCursor},r?r.timestamp:Date.now(),l,!1)}map(e){return new xs(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class yf{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new yf(R4,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(kt),o=(i.override||n.languageDataAt("autocomplete",zr(n)).map(S4)).map(l=>(this.active.find(c=>c.source==l)||new Ut(l,this.active.some(c=>c.state!=0)?1:0)).update(e,i));o.length==this.active.length&&o.every((l,a)=>l==this.active[a])&&(o=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!B4(o,this.active)?s=xs.build(o,n,this.id,s,i):s&&s.disabled&&!o.some(l=>l.state==1)&&(s=null),!s&&o.every(l=>l.state!=1)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new Ut(l.source,0):l));for(let l of e.effects)l.is(NA)&&(s=s&&s.setSelected(l.value,this.id));return o==this.active&&s==this.open?this:new yf(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:D4}}function B4(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const R4=[];function l0(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Ut{constructor(e,n,i=-1){this.source=e,this.state=n,this.explicitPos=i}hasResult(){return!1}update(e,n){let i=l0(e),r=this;i?r=r.handleUserEvent(e,i,n):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new Ut(r.source,0));for(let o of e.effects)if(o.is(uv))r=new Ut(r.source,1,o.value?zr(e.state):-1);else if(o.is(nc))r=new Ut(r.source,0);else if(o.is(FA))for(let s of o.value)s.source==r.source&&(r=s);return r}handleUserEvent(e,n,i){return n=="delete"||!i.activateOnTyping?this.map(e.changes):new Ut(this.source,1)}handleChange(e){return e.changes.touchesRange(zr(e.startState))?new Ut(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Ut(this.source,this.state,e.mapPos(this.explicitPos))}}class Bs extends Ut{constructor(e,n,i,r,o){super(e,2,n),this.result=i,this.from=r,this.to=o}hasResult(){return!0}handleUserEvent(e,n,i){var r;let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),l=zr(e.state);if((this.explicitPos<0?l<=o:ls||n=="delete"&&zr(e.startState)==this.from)return new Ut(this.source,n=="input"&&i.activateOnTyping?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),c;return F4(this.result.validFor,e.state,o,s)?new Bs(this.source,a,this.result,o,s):this.result.update&&(c=this.result.update(this.result,o,s,new DA(e.state,l,a>=0)))?new Bs(this.source,a,c,c.from,(r=c.to)!==null&&r!==void 0?r:zr(e.state)):new Ut(this.source,1,a)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Ut(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new Bs(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function F4(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):RA(t,!0).test(r)}const FA=he.define({map(t,e){return t.map(n=>n.map(e))}}),NA=he.define(),un=pt.define({create(){return yf.start()},update(t,e){return t.update(e)},provide:t=>[Gy.from(t,e=>e.tooltip),Y.contentAttributes.from(t,e=>e.attrs)]});function PA(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(un).active.find(r=>r.source==e.source);return i instanceof Bs?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},k4(t.state,n,i.from,i.to)),{annotations:b4.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}const N4=M4(un,PA);function ku(t,e="option"){return n=>{let i=n.state.field(un,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(t?1:-1):t?0:s-1;return l<0?l=e=="page"?0:s-1:l>=s&&(l=e=="page"?s-1:0),n.dispatch({effects:NA.of(l)}),!0}}const P4=t=>{let e=t.state.field(un,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(un,!1)?(t.dispatch({effects:uv.of(!0)}),!0):!1,$4=t=>{let e=t.state.field(un,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:nc.of(null)}),!0)};class z4{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const j4=50,H4=1e3,W4=qe.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(un).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(un);if(!t.selectionSet&&!t.docChanged&&t.startState.field(un)==e)return;let n=t.transactions.some(i=>(i.selection||i.docChanged)&&!l0(i));for(let i=0;ij4&&Date.now()-r.time>H4){for(let o of r.context.abortListeners)try{o()}catch(s){Yn(this.view.state,s)}r.context.abortListeners=null,this.running.splice(i--,1)}else r.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(r=>r.active.source==i.source))?setTimeout(()=>this.startUpdate(),50):-1,this.composing!=0)for(let i of t.transactions)l0(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(un);for(let n of e.active)n.state==1&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=zr(e),i=new DA(e,n,t.explicitPos==n),r=new z4(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(o=>{r.context.aborted||(r.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:nc.of(null)}),Yn(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(kt).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(kt);for(let i=0;is.source==r.active.source);if(o&&o.state==1)if(r.done==null){let s=new Ut(r.active.source,0);for(let l of r.updates)s=s.update(l,n);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:FA.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(un,!1);if(e&&e.tooltip&&this.view.state.facet(kt).closeOnBlur){let n=e.open&&bE(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:nc.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:uv.of(!1)}),20),this.composing=0}}}),V4=Y.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),ic={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Co=he.define({map(t,e){let n=e.mapPos(t,-1,Dt.TrackAfter);return n??void 0}}),hv=new class extends Fo{};hv.startSide=1;hv.endSide=-1;const IA=pt.define({create(){return xe.empty},update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;n!=e.changes.mapPos(i,-1)&&(t=xe.empty)}t=t.map(e.changes);for(let n of e.effects)n.is(Co)&&(t=t.update({add:[hv.range(n.value,n.value+1)]}));return t}});function q4(){return[K4,IA]}const Yp="()[]{}<>";function $A(t){for(let e=0;e{if((U4?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&Tn(ct(i,0))==1||e!=r.from||n!=r.to)return!1;let o=X4(t.state,i);return o?(t.dispatch(o),!0):!1}),Y4=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=zA(t,t.selection.main.head).brackets||ic.brackets,r=null,o=t.changeByRange(s=>{if(s.empty){let l=Q4(t.doc,s.head);for(let a of i)if(a==l&&xd(t.doc,s.head)==$A(ct(a,0)))return{changes:{from:s.head-a.length,to:s.head+a.length},range:I.cursor(s.head-a.length)}}return{range:r=s}});return r||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},G4=[{key:"Backspace",run:Y4}];function X4(t,e){let n=zA(t,t.selection.main.head),i=n.brackets||ic.brackets;for(let r of i){let o=$A(ct(r,0));if(e==r)return o==r?e$(t,r,i.indexOf(r+r+r)>-1,n):J4(t,r,o,n.before||ic.before);if(e==o&&jA(t,t.selection.main.from))return Z4(t,r,o)}return null}function jA(t,e){let n=!1;return t.field(IA).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function xd(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Tn(ct(n,0)))}function Q4(t,e){let n=t.sliceString(e-2,e);return Tn(ct(n,0))==n.length?n:n.slice(1)}function J4(t,e,n,i){let r=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:Co.of(s.to+e.length),range:I.range(s.anchor+e.length,s.head+e.length)};let l=xd(t.doc,s.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+n,from:s.head},effects:Co.of(s.head+e.length),range:I.cursor(s.head+e.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Z4(t,e,n){let i=null,r=t.changeByRange(o=>o.empty&&xd(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:I.cursor(o.head+n.length)}:i={range:o});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function e$(t,e,n,i){let r=i.stringPrefixes||ic.stringPrefixes,o=null,s=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:Co.of(l.to+e.length),range:I.range(l.anchor+e.length,l.head+e.length)};let a=l.head,c=xd(t.doc,a),u;if(c==e){if(dw(t,a))return{changes:{insert:e+e,from:a},effects:Co.of(a+e.length),range:I.cursor(a+e.length)};if(jA(t,a)){let f=n&&t.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+f.length,insert:f},range:I.cursor(a+f.length)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(u=pw(t,a-2*e.length,r))>-1&&dw(t,u))return{changes:{insert:e+e+e+e,from:a},effects:Co.of(a+e.length),range:I.cursor(a+e.length)};if(t.charCategorizer(a)(c)!=Re.Word&&pw(t,a,r)>-1&&!t$(t,a,e,r))return{changes:{insert:e+e,from:a},effects:Co.of(a+e.length),range:I.cursor(a+e.length)}}return{range:o=l}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function dw(t,e){let n=Mt(t).resolveInner(e+1);return n.parent&&n.from==e}function t$(t,e,n,i){let r=Mt(t).resolveInner(e,-1),o=i.reduce((s,l)=>Math.max(s,l.length),0);for(let s=0;s<5;s++){let l=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+o)),a=l.indexOf(n);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let u=r.firstChild;for(;u&&u.from==r.from&&u.to-u.from>n.length+a;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=r.to==e&&r.parent;if(!c)break;r=c}return!1}function pw(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=Re.Word)return e;for(let r of n){let o=e-r.length;if(t.sliceDoc(o,e)==r&&i(t.sliceDoc(o-1,o))!=Re.Word)return o}return-1}function n$(t={}){return[un,kt.of(t),W4,i$,V4]}const HA=[{key:"Ctrl-Space",run:I4},{key:"Escape",run:$4},{key:"ArrowDown",run:ku(!0)},{key:"ArrowUp",run:ku(!1)},{key:"PageDown",run:ku(!0,"page")},{key:"PageUp",run:ku(!1,"page")},{key:"Enter",run:P4}],i$=cl.highest(hd.computeN([kt],t=>t.facet(kt).defaultKeymap?[HA]:[]));class r${constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class po{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=e,o=i.facet(qA).markerFilter;o&&(r=o(r));let s=se.set(r.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?se.widget({widget:new d$(l),diagnostic:l}).range(l.from):se.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new po(s,n,Ks(s))}}function Ks(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return i=new r$(r,o,s.diagnostic),!1}),i}function o$(t,e){let n=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(i=>i.is(WA))||t.changes.touchesRange(n.from,n.to))}function s$(t,e){return t.field(pn,!1)?e:e.concat(he.appendConfig.of(g$))}const WA=he.define(),fv=he.define(),VA=he.define(),pn=pt.define({create(){return new po(se.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),i=null;if(t.selected){let r=e.changes.mapPos(t.selected.from,1);i=Ks(n,t.selected.diagnostic,r)||Ks(n,null,r)}t=new po(n,t.panel,i)}for(let n of e.effects)n.is(WA)?t=po.init(n.value,t.panel,e.state):n.is(fv)?t=new po(t.diagnostics,n.value?Cd.open:null,t.selected):n.is(VA)&&(t=new po(t.diagnostics,t.panel,n.value));return t},provide:t=>[Ja.from(t,e=>e.panel),Y.decorations.from(t,e=>e.diagnostics)]}),l$=se.mark({class:"cm-lintRange cm-lintRange-active"});function a$(t,e,n){let{diagnostics:i}=t.state.field(pn),r=[],o=2e8,s=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(a,c,{spec:u})=>{e>=a&&e<=c&&(a==c||(e>a||n>0)&&(eKA(t,n,!1)))}const u$=t=>{let e=t.state.field(pn,!1);(!e||!e.panel)&&t.dispatch({effects:s$(t.state,[fv.of(!0)])});let n=Qa(t,Cd.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},mw=t=>{let e=t.state.field(pn,!1);return!e||!e.panel?!1:(t.dispatch({effects:fv.of(!1)}),!0)},h$=t=>{let e=t.state.field(pn,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},f$=[{key:"Mod-Shift-m",run:u$,preventDefault:!0},{key:"F8",run:h$}],qA=Q.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},Ei(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function UA(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;io.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function KA(t,e,n){var i;let r=n?UA(e.actions):[];return Te("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Te("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(i=e.actions)===null||i===void 0?void 0:i.map((o,s)=>{let l=!1,a=f=>{if(f.preventDefault(),l)return;l=!0;let d=Ks(t.state.field(pn).diagnostics,e);d&&o.apply(t,d.from,d.to)},{name:c}=o,u=r[s]?c.indexOf(r[s]):-1,h=u<0?c:[c.slice(0,u),Te("u",c.slice(u,u+1)),c.slice(u+1)];return Te("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${c}${u<0?"":` (access key "${r[s]})"`}.`},h)}),e.source&&Te("div",{class:"cm-diagnosticSource"},e.source))}class d$ extends cr{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Te("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class gw{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=KA(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Cd{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)mw(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=UA(o.actions);for(let l=0;l{for(let o=0;omw(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(pn).selected;if(!e)return-1;for(let n=0;n{let c=-1,u;for(let h=i;hi&&(this.items.splice(i,c-i),r=!0)),n&&u.diagnostic==n.diagnostic?u.dom.hasAttribute("aria-selected")||(u.dom.setAttribute("aria-selected","true"),o=u):u.dom.hasAttribute("aria-selected")&&u.dom.removeAttribute("aria-selected"),i++});i({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{let a=l.height/this.list.offsetHeight;s.topl.bottom&&(this.list.scrollTop+=(s.bottom-l.bottom)/a)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(pn),i=Ks(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:VA.of(i)})}static open(e){return new Cd(e)}}function p$(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Su(t){return p$(``,'width="6" height="3"')}const m$=Y.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Su("#d11")},".cm-lintRange-warning":{backgroundImage:Su("orange")},".cm-lintRange-info":{backgroundImage:Su("#999")},".cm-lintRange-hint":{backgroundImage:Su("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),g$=[pn,Y.decorations.compute([pn],t=>{let{selected:e,panel:n}=t.field(pn);return!e||!n||e.from==e.to?se.none:se.set([l$.range(e.from,e.to)])}),dP(a$,{hideOn:o$}),m$];var yw=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,i=[];e.closeBracketsKeymap!==!1&&(i=i.concat(G4)),e.defaultKeymap!==!1&&(i=i.concat(qI)),e.searchKeymap!==!1&&(i=i.concat(g4)),e.historyKeymap!==!1&&(i=i.concat(eI)),e.foldKeymap!==!1&&(i=i.concat(d5)),e.completionKeymap!==!1&&(i=i.concat(HA)),e.lintKeymap!==!1&&(i=i.concat(f$));var r=[];return e.lineNumbers!==!1&&r.push(bP()),e.highlightActiveLineGutter!==!1&&r.push(_P()),e.highlightSpecialChars!==!1&&r.push(WN()),e.history!==!1&&r.push(q5()),e.foldGutter!==!1&&r.push(y5()),e.drawSelection!==!1&&r.push(BN()),e.dropCursor!==!1&&r.push(PN()),e.allowMultipleSelections!==!1&&r.push(pe.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&r.push(i5()),e.syntaxHighlighting!==!1&&r.push(zE(w5,{fallback:!0})),e.bracketMatching!==!1&&r.push(A5()),e.closeBrackets!==!1&&r.push(q4()),e.autocompletion!==!1&&r.push(n$()),e.rectangularSelection!==!1&&r.push(iP()),n!==!1&&r.push(sP()),e.highlightActiveLine!==!1&&r.push(GN()),e.highlightSelectionMatches!==!1&&r.push(QI()),e.tabSize&&typeof e.tabSize=="number"&&r.push(fd.of(" ".repeat(e.tabSize))),r.concat([hd.of(i.flat())]).filter(Boolean)};const y$="#e5c07b",vw="#e06c75",v$="#56b6c2",x$="#ffffff",lh="#abb2bf",a0="#7d8799",C$="#61afef",w$="#98c379",xw="#d19a66",b$="#c678dd",k$="#21252b",Cw="#2c313a",ww="#282c34",Gp="#353a42",S$="#3E4451",bw="#528bff",_$=Y.theme({"&":{color:lh,backgroundColor:ww},".cm-content":{caretColor:bw},".cm-cursor, .cm-dropCursor":{borderLeftColor:bw},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:S$},".cm-panels":{backgroundColor:k$,color:lh},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:ww,color:a0,border:"none"},".cm-activeLineGutter":{backgroundColor:Cw},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Gp},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Gp,borderBottomColor:Gp},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Cw,color:lh}}},{dark:!0}),T$=Tc.define([{tag:P.keyword,color:b$},{tag:[P.name,P.deleted,P.character,P.propertyName,P.macroName],color:vw},{tag:[P.function(P.variableName),P.labelName],color:C$},{tag:[P.color,P.constant(P.name),P.standard(P.name)],color:xw},{tag:[P.definition(P.name),P.separator],color:lh},{tag:[P.typeName,P.className,P.number,P.changed,P.annotation,P.modifier,P.self,P.namespace],color:y$},{tag:[P.operator,P.operatorKeyword,P.url,P.escape,P.regexp,P.link,P.special(P.string)],color:v$},{tag:[P.meta,P.comment],color:a0},{tag:P.strong,fontWeight:"bold"},{tag:P.emphasis,fontStyle:"italic"},{tag:P.strikethrough,textDecoration:"line-through"},{tag:P.link,color:a0,textDecoration:"underline"},{tag:P.heading,fontWeight:"bold",color:vw},{tag:[P.atom,P.bool,P.special(P.variableName)],color:xw},{tag:[P.processingInstruction,P.string,P.inserted],color:w$},{tag:P.invalid,color:x$}]),E$=[_$,zE(T$)];var A$=Y.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),M$=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:i=!0,readOnly:r=!1,theme:o="light",placeholder:s="",basicSetup:l=!0}=e,a=[];switch(n&&a.unshift(hd.of([UI])),l&&(typeof l=="boolean"?a.unshift(yw()):a.unshift(yw(l))),s&&a.unshift(ZN(s)),o){case"light":a.push(A$);break;case"dark":a.push(E$);break;case"none":break;default:a.push(o);break}return i===!1&&a.push(Y.editable.of(!1)),r&&a.push(pe.readOnly.of(!0)),[...a]},L$=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),kw=Ti.define(),O$=[];function B$(t){var{value:e,selection:n,onChange:i,onStatistics:r,onCreateEditor:o,onUpdate:s,extensions:l=O$,autoFocus:a,theme:c="light",height:u=null,minHeight:h=null,maxHeight:f=null,width:d=null,minWidth:p=null,maxWidth:y=null,placeholder:v="",editable:g=!0,readOnly:m=!1,indentWithTab:x=!0,basicSetup:C=!0,root:w,initialState:b}=t,[S,M]=k.useState(),[N,O]=k.useState(),[D,V]=k.useState(),K=Y.theme({"&":{height:u,minHeight:h,maxHeight:f,width:d,minWidth:p,maxWidth:y},"& .cm-scroller":{height:"100% !important"}}),z=Y.updateListener.of($=>{if($.docChanged&&typeof i=="function"&&!$.transactions.some(R=>R.annotation(kw))){var _=$.state.doc,L=_.toString();i(L,$)}r&&r(L$($))}),F=M$({theme:c,editable:g,readOnly:m,placeholder:v,indentWithTab:x,basicSetup:C}),B=[z,K,...F];return s&&typeof s=="function"&&B.push(Y.updateListener.of(s)),B=B.concat(l),k.useEffect(()=>{if(S&&!D){var $={doc:e,selection:n,extensions:B},_=b?pe.fromJSON(b.json,$,b.fields):pe.create($);if(V(_),!N){var L=new Y({state:_,parent:S,root:w});O(L),o&&o(L,_)}}return()=>{N&&(V(void 0),O(void 0))}},[S,D]),k.useEffect(()=>M(t.container),[t.container]),k.useEffect(()=>()=>{N&&(N.destroy(),O(void 0))},[N]),k.useEffect(()=>{a&&N&&N.focus()},[a,N]),k.useEffect(()=>{N&&N.dispatch({effects:he.reconfigure.of(B)})},[c,l,u,h,f,d,p,y,v,g,m,x,C,i,s]),k.useEffect(()=>{if(e!==void 0){var $=N?N.state.doc.toString():"";N&&e!==$&&N.dispatch({changes:{from:0,to:$.length,insert:e||""},annotations:[kw.of(!0)]})}},[e,N]),{state:D,setState:V,view:N,setView:O,container:S,setContainer:M}}var D$=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],YA=k.forwardRef((t,e)=>{var{className:n,value:i="",selection:r,extensions:o=[],onChange:s,onStatistics:l,onCreateEditor:a,onUpdate:c,autoFocus:u,theme:h="light",height:f,minHeight:d,maxHeight:p,width:y,minWidth:v,maxWidth:g,basicSetup:m,placeholder:x,indentWithTab:C,editable:w,readOnly:b,root:S,initialState:M}=t,N=Ly(t,D$),O=k.useRef(null),{state:D,view:V,container:K}=B$({container:O.current,root:S,value:i,autoFocus:u,theme:h,height:f,minHeight:d,maxHeight:p,width:y,minWidth:v,maxWidth:g,basicSetup:m,placeholder:x,indentWithTab:C,editable:w,readOnly:b,selection:r,onChange:s,onStatistics:l,onCreateEditor:a,onUpdate:c,extensions:o,initialState:M});if(k.useImperativeHandle(e,()=>({editor:O.current,state:D,view:V}),[O,K,D,V]),typeof i!="string")throw new Error("value must be typeof string but got "+typeof i);var z=typeof h=="string"?"cm-theme-"+h:"cm-theme";return A.jsx("div",Uh({ref:O,className:""+z+(n?" "+n:"")},N))});YA.displayName="CodeMirror";const c0=2**31-1;function GA(t,e,n){const i=n-Date.now();t.current=i<=c0?setTimeout(e,i):setTimeout(()=>GA(t,e,n),c0)}function XA(){const t=Ry(),e=k.useRef();return R_(()=>clearTimeout(e.current)),k.useMemo(()=>{const n=()=>clearTimeout(e.current);function i(r,o=0){t()&&(n(),o<=c0?e.current=setTimeout(r,o):GA(e,r,Date.now()+o))}return{set:i,clear:n}},[])}var R$=function(){},F$=R$;const N$=sr(F$);function u0(){return k.useState(null)}var Sw=Object.prototype.hasOwnProperty;function _w(t,e,n){for(n of t.keys())if(ma(n,e))return n}function ma(t,e){var n,i,r;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((i=t.length)===e.length)for(;i--&&ma(t[i],e[i]););return i===-1}if(n===Set){if(t.size!==e.size)return!1;for(i of t)if(r=i,r&&typeof r=="object"&&(r=_w(e,r),!r)||!e.has(r))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(i of t)if(r=i[0],r&&typeof r=="object"&&(r=_w(e,r),!r)||!ma(i[1],e.get(r)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((i=t.byteLength)===e.byteLength)for(;i--&&t.getInt8(i)===e.getInt8(i););return i===-1}if(ArrayBuffer.isView(t)){if((i=t.byteLength)===e.byteLength)for(;i--&&t[i]===e[i];);return i===-1}if(!n||typeof t=="object"){i=0;for(n in t)if(Sw.call(t,n)&&++i&&!Sw.call(e,n)||!(n in e)||!ma(t[n],e[n]))return!1;return Object.keys(e).length===i}}return t!==t&&e!==e}function P$(t){const e=Ry();return[t[0],k.useCallback(n=>{if(e())return t[1](n)},[e,t[1]])]}var nn="top",Fn="bottom",Nn="right",rn="left",dv="auto",Mc=[nn,Fn,Nn,rn],Ys="start",rc="end",I$="clippingParents",QA="viewport",Fl="popper",$$="reference",Tw=Mc.reduce(function(t,e){return t.concat([e+"-"+Ys,e+"-"+rc])},[]),JA=[].concat(Mc,[dv]).reduce(function(t,e){return t.concat([e,e+"-"+Ys,e+"-"+rc])},[]),z$="beforeRead",j$="read",H$="afterRead",W$="beforeMain",V$="main",q$="afterMain",U$="beforeWrite",K$="write",Y$="afterWrite",G$=[z$,j$,H$,W$,V$,q$,U$,K$,Y$];function xi(t){return t.split("-")[0]}function yn(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Io(t){var e=yn(t).Element;return t instanceof e||t instanceof Element}function Ci(t){var e=yn(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function pv(t){if(typeof ShadowRoot>"u")return!1;var e=yn(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}var _o=Math.max,vf=Math.min,Gs=Math.round;function h0(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ZA(){return!/^((?!chrome|android).)*safari/i.test(h0())}function Xs(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&Ci(t)&&(r=t.offsetWidth>0&&Gs(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Gs(i.height)/t.offsetHeight||1);var s=Io(t)?yn(t):window,l=s.visualViewport,a=!ZA()&&n,c=(i.left+(a&&l?l.offsetLeft:0))/r,u=(i.top+(a&&l?l.offsetTop:0))/o,h=i.width/r,f=i.height/o;return{width:h,height:f,top:u,right:c+h,bottom:u+f,left:c,x:c,y:u}}function mv(t){var e=Xs(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function e2(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&pv(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Gr(t){return t?(t.nodeName||"").toLowerCase():null}function rr(t){return yn(t).getComputedStyle(t)}function X$(t){return["table","td","th"].indexOf(Gr(t))>=0}function io(t){return((Io(t)?t.ownerDocument:t.document)||window.document).documentElement}function wd(t){return Gr(t)==="html"?t:t.assignedSlot||t.parentNode||(pv(t)?t.host:null)||io(t)}function Ew(t){return!Ci(t)||rr(t).position==="fixed"?null:t.offsetParent}function Q$(t){var e=/firefox/i.test(h0()),n=/Trident/i.test(h0());if(n&&Ci(t)){var i=rr(t);if(i.position==="fixed")return null}var r=wd(t);for(pv(r)&&(r=r.host);Ci(r)&&["html","body"].indexOf(Gr(r))<0;){var o=rr(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function Lc(t){for(var e=yn(t),n=Ew(t);n&&X$(n)&&rr(n).position==="static";)n=Ew(n);return n&&(Gr(n)==="html"||Gr(n)==="body"&&rr(n).position==="static")?e:n||Q$(t)||e}function gv(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ga(t,e,n){return _o(t,vf(e,n))}function J$(t,e,n){var i=ga(t,e,n);return i>n?n:i}function t2(){return{top:0,right:0,bottom:0,left:0}}function n2(t){return Object.assign({},t2(),t)}function i2(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var Z$=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,n2(typeof e!="number"?e:i2(e,Mc))};function e6(t){var e,n=t.state,i=t.name,r=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=xi(n.placement),a=gv(l),c=[rn,Nn].indexOf(l)>=0,u=c?"height":"width";if(!(!o||!s)){var h=Z$(r.padding,n),f=mv(o),d=a==="y"?nn:rn,p=a==="y"?Fn:Nn,y=n.rects.reference[u]+n.rects.reference[a]-s[a]-n.rects.popper[u],v=s[a]-n.rects.reference[a],g=Lc(o),m=g?a==="y"?g.clientHeight||0:g.clientWidth||0:0,x=y/2-v/2,C=h[d],w=m-f[u]-h[p],b=m/2-f[u]/2+x,S=ga(C,b,w),M=a;n.modifiersData[i]=(e={},e[M]=S,e.centerOffset=S-b,e)}}function t6(t){var e=t.state,n=t.options,i=n.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||e2(e.elements.popper,r)&&(e.elements.arrow=r))}const n6={name:"arrow",enabled:!0,phase:"main",fn:e6,effect:t6,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qs(t){return t.split("-")[1]}var i6={top:"auto",right:"auto",bottom:"auto",left:"auto"};function r6(t,e){var n=t.x,i=t.y,r=e.devicePixelRatio||1;return{x:Gs(n*r)/r||0,y:Gs(i*r)/r||0}}function Aw(t){var e,n=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,l=t.position,a=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,h=t.isFixed,f=s.x,d=f===void 0?0:f,p=s.y,y=p===void 0?0:p,v=typeof u=="function"?u({x:d,y}):{x:d,y};d=v.x,y=v.y;var g=s.hasOwnProperty("x"),m=s.hasOwnProperty("y"),x=rn,C=nn,w=window;if(c){var b=Lc(n),S="clientHeight",M="clientWidth";if(b===yn(n)&&(b=io(n),rr(b).position!=="static"&&l==="absolute"&&(S="scrollHeight",M="scrollWidth")),b=b,r===nn||(r===rn||r===Nn)&&o===rc){C=Fn;var N=h&&b===w&&w.visualViewport?w.visualViewport.height:b[S];y-=N-i.height,y*=a?1:-1}if(r===rn||(r===nn||r===Fn)&&o===rc){x=Nn;var O=h&&b===w&&w.visualViewport?w.visualViewport.width:b[M];d-=O-i.width,d*=a?1:-1}}var D=Object.assign({position:l},c&&i6),V=u===!0?r6({x:d,y},yn(n)):{x:d,y};if(d=V.x,y=V.y,a){var K;return Object.assign({},D,(K={},K[C]=m?"0":"",K[x]=g?"0":"",K.transform=(w.devicePixelRatio||1)<=1?"translate("+d+"px, "+y+"px)":"translate3d("+d+"px, "+y+"px, 0)",K))}return Object.assign({},D,(e={},e[C]=m?y+"px":"",e[x]=g?d+"px":"",e.transform="",e))}function o6(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=i===void 0?!0:i,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,a=l===void 0?!0:l,c={placement:xi(e.placement),variation:Qs(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Aw(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Aw(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const s6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:o6,data:{}};var _u={passive:!0};function l6(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=r===void 0?!0:r,s=i.resize,l=s===void 0?!0:s,a=yn(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,_u)}),l&&a.addEventListener("resize",n.update,_u),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,_u)}),l&&a.removeEventListener("resize",n.update,_u)}}const a6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:l6,data:{}};var c6={left:"right",right:"left",bottom:"top",top:"bottom"};function ah(t){return t.replace(/left|right|bottom|top/g,function(e){return c6[e]})}var u6={start:"end",end:"start"};function Mw(t){return t.replace(/start|end/g,function(e){return u6[e]})}function yv(t){var e=yn(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function vv(t){return Xs(io(t)).left+yv(t).scrollLeft}function h6(t,e){var n=yn(t),i=io(t),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,l=0,a=0;if(r){o=r.width,s=r.height;var c=ZA();(c||!c&&e==="fixed")&&(l=r.offsetLeft,a=r.offsetTop)}return{width:o,height:s,x:l+vv(t),y:a}}function f6(t){var e,n=io(t),i=yv(t),r=(e=t.ownerDocument)==null?void 0:e.body,o=_o(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=_o(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-i.scrollLeft+vv(t),a=-i.scrollTop;return rr(r||n).direction==="rtl"&&(l+=_o(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:l,y:a}}function xv(t){var e=rr(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function r2(t){return["html","body","#document"].indexOf(Gr(t))>=0?t.ownerDocument.body:Ci(t)&&xv(t)?t:r2(wd(t))}function ya(t,e){var n;e===void 0&&(e=[]);var i=r2(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),o=yn(i),s=r?[o].concat(o.visualViewport||[],xv(i)?i:[]):i,l=e.concat(s);return r?l:l.concat(ya(wd(s)))}function f0(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function d6(t,e){var n=Xs(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Lw(t,e,n){return e===QA?f0(h6(t,n)):Io(e)?d6(e,n):f0(f6(io(t)))}function p6(t){var e=ya(wd(t)),n=["absolute","fixed"].indexOf(rr(t).position)>=0,i=n&&Ci(t)?Lc(t):t;return Io(i)?e.filter(function(r){return Io(r)&&e2(r,i)&&Gr(r)!=="body"}):[]}function m6(t,e,n,i){var r=e==="clippingParents"?p6(t):[].concat(e),o=[].concat(r,[n]),s=o[0],l=o.reduce(function(a,c){var u=Lw(t,c,i);return a.top=_o(u.top,a.top),a.right=vf(u.right,a.right),a.bottom=vf(u.bottom,a.bottom),a.left=_o(u.left,a.left),a},Lw(t,s,i));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function o2(t){var e=t.reference,n=t.element,i=t.placement,r=i?xi(i):null,o=i?Qs(i):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,a;switch(r){case nn:a={x:s,y:e.y-n.height};break;case Fn:a={x:s,y:e.y+e.height};break;case Nn:a={x:e.x+e.width,y:l};break;case rn:a={x:e.x-n.width,y:l};break;default:a={x:e.x,y:e.y}}var c=r?gv(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Ys:a[c]=a[c]-(e[u]/2-n[u]/2);break;case rc:a[c]=a[c]+(e[u]/2-n[u]/2);break}}return a}function oc(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=i===void 0?t.placement:i,o=n.strategy,s=o===void 0?t.strategy:o,l=n.boundary,a=l===void 0?I$:l,c=n.rootBoundary,u=c===void 0?QA:c,h=n.elementContext,f=h===void 0?Fl:h,d=n.altBoundary,p=d===void 0?!1:d,y=n.padding,v=y===void 0?0:y,g=n2(typeof v!="number"?v:i2(v,Mc)),m=f===Fl?$$:Fl,x=t.rects.popper,C=t.elements[p?m:f],w=m6(Io(C)?C:C.contextElement||io(t.elements.popper),a,u,s),b=Xs(t.elements.reference),S=o2({reference:b,element:x,strategy:"absolute",placement:r}),M=f0(Object.assign({},x,S)),N=f===Fl?M:b,O={top:w.top-N.top+g.top,bottom:N.bottom-w.bottom+g.bottom,left:w.left-N.left+g.left,right:N.right-w.right+g.right},D=t.modifiersData.offset;if(f===Fl&&D){var V=D[r];Object.keys(O).forEach(function(K){var z=[Nn,Fn].indexOf(K)>=0?1:-1,F=[nn,Fn].indexOf(K)>=0?"y":"x";O[K]+=V[F]*z})}return O}function g6(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,c=a===void 0?JA:a,u=Qs(i),h=u?l?Tw:Tw.filter(function(p){return Qs(p)===u}):Mc,f=h.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=h);var d=f.reduce(function(p,y){return p[y]=oc(t,{placement:y,boundary:r,rootBoundary:o,padding:s})[xi(y)],p},{});return Object.keys(d).sort(function(p,y){return d[p]-d[y]})}function y6(t){if(xi(t)===dv)return[];var e=ah(t);return[Mw(t),e,Mw(e)]}function v6(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,o=r===void 0?!0:r,s=n.altAxis,l=s===void 0?!0:s,a=n.fallbackPlacements,c=n.padding,u=n.boundary,h=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,p=d===void 0?!0:d,y=n.allowedAutoPlacements,v=e.options.placement,g=xi(v),m=g===v,x=a||(m||!p?[ah(v)]:y6(v)),C=[v].concat(x).reduce(function(ae,ce){return ae.concat(xi(ce)===dv?g6(e,{placement:ce,boundary:u,rootBoundary:h,padding:c,flipVariations:p,allowedAutoPlacements:y}):ce)},[]),w=e.rects.reference,b=e.rects.popper,S=new Map,M=!0,N=C[0],O=0;O=0,F=z?"width":"height",B=oc(e,{placement:D,boundary:u,rootBoundary:h,altBoundary:f,padding:c}),$=z?K?Nn:rn:K?Fn:nn;w[F]>b[F]&&($=ah($));var _=ah($),L=[];if(o&&L.push(B[V]<=0),l&&L.push(B[$]<=0,B[_]<=0),L.every(function(ae){return ae})){N=D,M=!1;break}S.set(D,L)}if(M)for(var R=p?3:1,H=function(ce){var Ce=C.find(function(Fe){var nt=S.get(Fe);if(nt)return nt.slice(0,ce).every(function(it){return it})});if(Ce)return N=Ce,"break"},J=R;J>0;J--){var X=H(J);if(X==="break")break}e.placement!==N&&(e.modifiersData[i]._skip=!0,e.placement=N,e.reset=!0)}}const x6={name:"flip",enabled:!0,phase:"main",fn:v6,requiresIfExists:["offset"],data:{_skip:!1}};function Ow(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Bw(t){return[nn,Nn,Fn,rn].some(function(e){return t[e]>=0})}function C6(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=oc(e,{elementContext:"reference"}),l=oc(e,{altBoundary:!0}),a=Ow(s,i),c=Ow(l,r,o),u=Bw(a),h=Bw(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}const w6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:C6};function b6(t,e,n){var i=xi(t),r=[rn,nn].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*r,[rn,Nn].indexOf(i)>=0?{x:l,y:s}:{x:s,y:l}}function k6(t){var e=t.state,n=t.options,i=t.name,r=n.offset,o=r===void 0?[0,0]:r,s=JA.reduce(function(u,h){return u[h]=b6(h,e.rects,o),u},{}),l=s[e.placement],a=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=s}const S6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:k6};function _6(t){var e=t.state,n=t.name;e.modifiersData[n]=o2({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const T6={name:"popperOffsets",enabled:!0,phase:"read",fn:_6,data:{}};function E6(t){return t==="x"?"y":"x"}function A6(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,o=r===void 0?!0:r,s=n.altAxis,l=s===void 0?!1:s,a=n.boundary,c=n.rootBoundary,u=n.altBoundary,h=n.padding,f=n.tether,d=f===void 0?!0:f,p=n.tetherOffset,y=p===void 0?0:p,v=oc(e,{boundary:a,rootBoundary:c,padding:h,altBoundary:u}),g=xi(e.placement),m=Qs(e.placement),x=!m,C=gv(g),w=E6(C),b=e.modifiersData.popperOffsets,S=e.rects.reference,M=e.rects.popper,N=typeof y=="function"?y(Object.assign({},e.rects,{placement:e.placement})):y,O=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,V={x:0,y:0};if(b){if(o){var K,z=C==="y"?nn:rn,F=C==="y"?Fn:Nn,B=C==="y"?"height":"width",$=b[C],_=$+v[z],L=$-v[F],R=d?-M[B]/2:0,H=m===Ys?S[B]:M[B],J=m===Ys?-M[B]:-S[B],X=e.elements.arrow,ae=d&&X?mv(X):{width:0,height:0},ce=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:t2(),Ce=ce[z],Fe=ce[F],nt=ga(0,S[B],ae[B]),it=x?S[B]/2-R-nt-Ce-O.mainAxis:H-nt-Ce-O.mainAxis,ke=x?-S[B]/2+R+nt+Fe+O.mainAxis:J+nt+Fe+O.mainAxis,je=e.elements.arrow&&Lc(e.elements.arrow),Ht=je?C==="y"?je.clientTop||0:je.clientLeft||0:0,Ot=(K=D==null?void 0:D[C])!=null?K:0,on=$+it-Ot-Ht,be=$+ke-Ot,ti=ga(d?vf(_,on):_,$,d?_o(L,be):L);b[C]=ti,V[C]=ti-$}if(l){var Oi,Pc=C==="x"?nn:rn,Hd=C==="x"?Fn:Nn,zn=b[w],ni=w==="y"?"height":"width",Bi=zn+v[Pc],Di=zn-v[Hd],Yo=[nn,rn].indexOf(g)!==-1,gl=(Oi=D==null?void 0:D[w])!=null?Oi:0,yl=Yo?Bi:zn-S[ni]-M[ni]-gl+O.altAxis,Go=Yo?zn+S[ni]+M[ni]-gl-O.altAxis:Di,vl=d&&Yo?J$(yl,zn,Go):ga(d?yl:Bi,zn,d?Go:Di);b[w]=vl,V[w]=vl-zn}e.modifiersData[i]=V}}const M6={name:"preventOverflow",enabled:!0,phase:"main",fn:A6,requiresIfExists:["offset"]};function L6(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function O6(t){return t===yn(t)||!Ci(t)?yv(t):L6(t)}function B6(t){var e=t.getBoundingClientRect(),n=Gs(e.width)/t.offsetWidth||1,i=Gs(e.height)/t.offsetHeight||1;return n!==1||i!==1}function D6(t,e,n){n===void 0&&(n=!1);var i=Ci(e),r=Ci(e)&&B6(e),o=io(e),s=Xs(t,r,n),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(i||!i&&!n)&&((Gr(e)!=="body"||xv(o))&&(l=O6(e)),Ci(e)?(a=Xs(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):o&&(a.x=vv(o))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function R6(t){var e=new Map,n=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function r(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var a=e.get(l);a&&r(a)}}),i.push(o)}return t.forEach(function(o){n.has(o.name)||r(o)}),i}function F6(t){var e=R6(t);return G$.reduce(function(n,i){return n.concat(e.filter(function(r){return r.phase===i}))},[])}function N6(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function P6(t){var e=t.reduce(function(n,i){var r=n[i.name];return n[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var Dw={placement:"bottom",modifiers:[],strategy:"absolute"};function Rw(){for(var t=arguments.length,e=new Array(t),n=0;n=0)&&(n[r]=t[r]);return n}const H6={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},W6={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:t})=>()=>{const{reference:e,popper:n}=t.elements;if("removeAttribute"in e){const i=(e.getAttribute("aria-describedby")||"").split(",").filter(r=>r.trim()!==n.id);i.length?e.setAttribute("aria-describedby",i.join(",")):e.removeAttribute("aria-describedby")}},fn:({state:t})=>{var e;const{popper:n,reference:i}=t.elements,r=(e=n.getAttribute("role"))==null?void 0:e.toLowerCase();if(n.id&&r==="tooltip"&&"setAttribute"in i){const o=i.getAttribute("aria-describedby");if(o&&o.split(",").indexOf(n.id)!==-1)return;i.setAttribute("aria-describedby",o?`${o},${n.id}`:n.id)}}},V6=[];function s2(t,e,n={}){let{enabled:i=!0,placement:r="bottom",strategy:o="absolute",modifiers:s=V6}=n,l=j6(n,z6);const a=k.useRef(s),c=k.useRef(),u=k.useCallback(()=>{var v;(v=c.current)==null||v.update()},[]),h=k.useCallback(()=>{var v;(v=c.current)==null||v.forceUpdate()},[]),[f,d]=P$(k.useState({placement:r,update:u,forceUpdate:h,attributes:{},styles:{popper:{},arrow:{}}})),p=k.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:v})=>{const g={},m={};Object.keys(v.elements).forEach(x=>{g[x]=v.styles[x],m[x]=v.attributes[x]}),d({state:v,styles:g,attributes:m,update:u,forceUpdate:h,placement:v.placement})}}),[u,h,d]),y=k.useMemo(()=>(ma(a.current,s)||(a.current=s),a.current),[s]);return k.useEffect(()=>{!c.current||!i||c.current.setOptions({placement:r,strategy:o,modifiers:[...y,p,H6]})},[o,r,p,i,y]),k.useEffect(()=>{if(!(!i||t==null||e==null))return c.current=$6(t,e,Object.assign({},l,{placement:r,strategy:o,modifiers:[...y,W6,p]})),()=>{c.current!=null&&(c.current.destroy(),c.current=void 0,d(v=>Object.assign({},v,{attributes:{},styles:{popper:{}}})))}},[i,t,e]),f}const Fw=()=>{};function q6(t){return t.button===0}function U6(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}const ch=t=>t&&("current"in t?t.current:t),Nw={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function l2(t,e=Fw,{disabled:n,clickTrigger:i="click"}={}){const r=k.useRef(!1),o=k.useRef(!1),s=k.useCallback(c=>{const u=ch(t);N$(!!u,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),r.current=!u||U6(c)||!q6(c)||!!Wa(u,c.target)||o.current,o.current=!1},[t]),l=Pe(c=>{const u=ch(t);u&&Wa(u,c.target)&&(o.current=!0)}),a=Pe(c=>{r.current||e(c)});k.useEffect(()=>{var c,u;if(n||t==null)return;const h=wc(ch(t)),f=h.defaultView||window;let d=(c=f.event)!=null?c:(u=f.parent)==null?void 0:u.event,p=null;Nw[i]&&(p=Ui(h,Nw[i],l,!0));const y=Ui(h,i,s,!0),v=Ui(h,i,m=>{if(m===d){d=void 0;return}a(m)});let g=[];return"ontouchstart"in h.documentElement&&(g=[].slice.call(h.body.children).map(m=>Ui(m,"mousemove",Fw))),()=>{p==null||p(),y(),v(),g.forEach(m=>m())}},[t,n,i,s,l,a])}const K6=()=>{};function Y6(t,e,{disabled:n,clickTrigger:i}={}){const r=e||K6;l2(t,r,{disabled:n,clickTrigger:i});const o=Pe(s=>{P_(s)&&r(s)});k.useEffect(()=>{if(n||t==null)return;const s=wc(ch(t));let l=(s.defaultView||window).event;const a=Ui(s,"keyup",c=>{if(c===l){l=void 0;return}o(c)});return()=>{a()}},[t,n,o])}function G6(t){const e={};return Array.isArray(t)?(t==null||t.forEach(n=>{e[n.name]=n}),e):t||e}function X6(t={}){return Array.isArray(t)?t:Object.keys(t).map(e=>(t[e].name=e,t[e]))}function a2({enabled:t,enableEvents:e,placement:n,flip:i,offset:r,fixed:o,containerPadding:s,arrowElement:l,popperConfig:a={}}){var c,u,h,f,d;const p=G6(a.modifiers);return Object.assign({},a,{placement:n,enabled:t,strategy:o?"fixed":a.strategy,modifiers:X6(Object.assign({},p,{eventListeners:{enabled:e,options:(c=p.eventListeners)==null?void 0:c.options},preventOverflow:Object.assign({},p.preventOverflow,{options:s?Object.assign({padding:s},(u=p.preventOverflow)==null?void 0:u.options):(h=p.preventOverflow)==null?void 0:h.options}),offset:{options:Object.assign({offset:r},(f=p.offset)==null?void 0:f.options)},arrow:Object.assign({},p.arrow,{enabled:!!l,options:Object.assign({},(d=p.arrow)==null?void 0:d.options,{element:l})}),flip:Object.assign({enabled:!!i},p.flip)}))})}const c2=k.forwardRef((t,e)=>{const{flip:n,offset:i,placement:r,containerPadding:o,popperConfig:s={},transition:l,runTransition:a}=t,[c,u]=u0(),[h,f]=u0(),d=to(u,e),p=fg(t.container),y=fg(t.target),[v,g]=k.useState(!t.show),m=s2(y,c,a2({placement:r,enableEvents:!!t.show,containerPadding:o||5,flip:n,offset:i,arrowElement:h,popperConfig:s}));t.show&&v&&g(!1);const x=(...D)=>{g(!0),t.onExited&&t.onExited(...D)},C=t.show||!v;if(Y6(c,t.onHide,{disabled:!t.rootClose||t.rootCloseDisabled,clickTrigger:t.rootCloseEvent}),!C)return null;const{onExit:w,onExiting:b,onEnter:S,onEntering:M,onEntered:N}=t;let O=t.children(Object.assign({},m.attributes.popper,{style:m.styles.popper,ref:d}),{popper:m,placement:r,show:!!t.show,arrowProps:Object.assign({},m.attributes.arrow,{style:m.styles.arrow,ref:f})});return O=dg(l,a,{in:!!t.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:O,onExit:w,onExiting:b,onExited:x,onEnter:S,onEntering:M,onEntered:N}),p?vo.createPortal(O,p):null});c2.displayName="Overlay";const Q6=c2,u2=k.forwardRef(({className:t,bsPrefix:e,as:n="div",...i},r)=>(e=me(e,"popover-header"),A.jsx(n,{ref:r,className:fe(t,e),...i})));u2.displayName="PopoverHeader";const J6=u2,h2=k.forwardRef(({className:t,bsPrefix:e,as:n="div",...i},r)=>(e=me(e,"popover-body"),A.jsx(n,{ref:r,className:fe(t,e),...i})));h2.displayName="PopoverBody";const f2=h2;function d2(t,e){let n=t;return t==="left"?n=e?"end":"start":t==="right"&&(n=e?"start":"end"),n}function p2(t="absolute"){return{position:t,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const Z6=k.forwardRef(({bsPrefix:t,placement:e="right",className:n,style:i,children:r,body:o,arrowProps:s,hasDoneInitialMeasure:l,popper:a,show:c,...u},h)=>{const f=me(t,"popover"),d=My(),[p]=(e==null?void 0:e.split("-"))||[],y=d2(p,d);let v=i;return c&&!l&&(v={...i,...p2(a==null?void 0:a.strategy)}),A.jsxs("div",{ref:h,role:"tooltip",style:v,"x-placement":p,className:fe(n,f,p&&`bs-popover-${y}`),...u,children:[A.jsx("div",{className:"popover-arrow",...s}),o?A.jsx(f2,{children:r}):r]})}),e8=Object.assign(Z6,{Header:J6,Body:f2,POPPER_OFFSET:[0,8]}),m2=k.forwardRef(({bsPrefix:t,placement:e="right",className:n,style:i,children:r,arrowProps:o,hasDoneInitialMeasure:s,popper:l,show:a,...c},u)=>{t=me(t,"tooltip");const h=My(),[f]=(e==null?void 0:e.split("-"))||[],d=d2(f,h);let p=i;return a&&!s&&(p={...i,...p2(l==null?void 0:l.strategy)}),A.jsxs("div",{ref:u,style:p,role:"tooltip","x-placement":f,className:fe(n,t,`bs-tooltip-${d}`),...c,children:[A.jsx("div",{className:"tooltip-arrow",...o}),A.jsx("div",{className:`${t}-inner`,children:r})]})});m2.displayName="Tooltip";const Cv=Object.assign(m2,{TOOLTIP_OFFSET:[0,6]});function t8(t){const e=k.useRef(null),n=me(void 0,"popover"),i=me(void 0,"tooltip"),r=k.useMemo(()=>({name:"offset",options:{offset:()=>{if(t)return t;if(e.current){if(pg(e.current,n))return e8.POPPER_OFFSET;if(pg(e.current,i))return Cv.TOOLTIP_OFFSET}return[0,0]}}}),[t,n,i]);return[e,[r]]}function n8(t,e){const{ref:n}=t,{ref:i}=e;t.ref=n.__wrapped||(n.__wrapped=r=>n(Kh(r))),e.ref=i.__wrapped||(i.__wrapped=r=>i(Kh(r)))}const g2=k.forwardRef(({children:t,transition:e=Hs,popperConfig:n={},rootClose:i=!1,placement:r="top",show:o=!1,...s},l)=>{const a=k.useRef({}),[c,u]=k.useState(null),[h,f]=t8(s.offset),d=to(l,h),p=e===!0?Hs:e||void 0,y=Pe(v=>{u(v),n==null||n.onFirstUpdate==null||n.onFirstUpdate(v)});return Ha(()=>{c&&s.target&&(a.current.scheduleUpdate==null||a.current.scheduleUpdate())},[c,s.target]),k.useEffect(()=>{o||u(null)},[o]),A.jsx(Q6,{...s,ref:d,popperConfig:{...n,modifiers:f.concat(n.modifiers||[]),onFirstUpdate:y},transition:p,rootClose:i,placement:r,show:o,children:(v,{arrowProps:g,popper:m,show:x})=>{var C,w;n8(v,g);const b=m==null?void 0:m.placement,S=Object.assign(a.current,{state:m==null?void 0:m.state,scheduleUpdate:m==null?void 0:m.update,placement:b,outOfBoundaries:(m==null||(C=m.state)==null||(w=C.modifiersData.hide)==null?void 0:w.isReferenceHidden)||!1,strategy:n.strategy}),M=!!c;return typeof t=="function"?t({...v,placement:b,show:x,...!e&&x&&{className:"show"},popper:S,arrowProps:g,hasDoneInitialMeasure:M}):k.cloneElement(t,{...v,placement:b,arrowProps:g,popper:S,hasDoneInitialMeasure:M,className:fe(t.props.className,!e&&x&&"show"),style:{...t.props.style,...v.style}})}})});g2.displayName="Overlay";const i8=g2;function r8(t){return t&&typeof t=="object"?t:{show:t,hide:t}}function Pw(t,e,n){const[i]=e,r=i.currentTarget,o=i.relatedTarget||i.nativeEvent[n];(!o||o!==r)&&!Wa(r,o)&&t(...e)}Qu.oneOf(["click","hover","focus"]);const o8=({trigger:t=["hover","focus"],overlay:e,children:n,popperConfig:i={},show:r,defaultShow:o=!1,onToggle:s,delay:l,placement:a,flip:c=a&&a.indexOf("auto")!==-1,...u})=>{const h=k.useRef(null),f=to(h,n.ref),d=XA(),p=k.useRef(""),[y,v]=k_(r,o,s),g=r8(l),{onFocus:m,onBlur:x,onClick:C}=typeof n!="function"?k.Children.only(n).props:{},w=F=>{f(Kh(F))},b=k.useCallback(()=>{if(d.clear(),p.current="show",!g.show){v(!0);return}d.set(()=>{p.current==="show"&&v(!0)},g.show)},[g.show,v,d]),S=k.useCallback(()=>{if(d.clear(),p.current="hide",!g.hide){v(!1);return}d.set(()=>{p.current==="hide"&&v(!1)},g.hide)},[g.hide,v,d]),M=k.useCallback((...F)=>{b(),m==null||m(...F)},[b,m]),N=k.useCallback((...F)=>{S(),x==null||x(...F)},[S,x]),O=k.useCallback((...F)=>{v(!y),C==null||C(...F)},[C,v,y]),D=k.useCallback((...F)=>{Pw(b,F,"fromElement")},[b]),V=k.useCallback((...F)=>{Pw(S,F,"toElement")},[S]),K=t==null?[]:[].concat(t),z={ref:w};return K.indexOf("click")!==-1&&(z.onClick=O),K.indexOf("focus")!==-1&&(z.onFocus=M,z.onBlur=N),K.indexOf("hover")!==-1&&(z.onMouseOver=D,z.onMouseOut=V),A.jsxs(A.Fragment,{children:[typeof n=="function"?n(z):k.cloneElement(n,z),A.jsx(i8,{...u,show:y,onHide:S,flip:c,placement:a,popperConfig:i,target:h.current,children:e})]})},y2=o8,s8=({initialValue:t="",theme:e=dn.Light,onSubmit:n,onChangeStaleness:i})=>{const[r,o]=k.useState(t),s=m=>o(m),[l,a]=k.useState(t),[c,u]=k.useState(!1);k.useEffect(()=>{c&&r===l?(u(!1),i(!1)):!c&&r!==l&&(u(!0),i(!0))},[r,l,c,i]);const h=()=>{a(r),n(r)},f=()=>{o(l)},[d,p]=k.useState(!1),y=()=>{o(""),p(!1)},v=()=>p(!0),g=()=>p(!1);return A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"d-flex justify-content-between",children:[A.jsx("h2",{children:"Makefile"}),A.jsx(y2,{delay:{show:1e3,hide:500},overlay:A.jsx(Cv,{children:"Undo the latest changes to the Makefile"}),children:A.jsxs(Ro,{size:"sm",onClick:f,disabled:!c,className:c?"text-decoration-none text-muted":"text-decoration-none text-secondary",variant:"link",children:[A.jsx("i",{className:"bi bi-arrow-counterclockwise me-2"}),A.jsx("span",{children:"Revert"})]})})]}),A.jsx("div",{className:"mb-3",children:A.jsx(YA,{autoFocus:!0,indentWithTab:!1,theme:e,value:r,onChange:s,height:"200px",placeholder:"Paste or drop your Makefile here...",onDrop:y,onDragEnter:v,onDragLeave:g,style:{outlineWidth:0,outlineStyle:"solid"}})}),A.jsx("div",{className:"d-flex justify-content-between",children:A.jsxs(Ro,{onClick:h,disabled:!c,className:c?"shadow-sm":"shadow-none",children:[A.jsx("i",{className:"bi bi-check-circle me-2"}),A.jsx("span",{children:"Update diagram"})]})})]})};function l8(t){for(var e=[],n=1;n{if(o=m8(o),o in $w)return;$w[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!i)for(let u=r.length-1;u>=0;u--){const h=r[u];if(h.href===o&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":p8,s||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),s)return new Promise((u,h)=>{c.addEventListener("load",u),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};var S2={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Cr,function(){var n=1e3,i=6e4,r=36e5,o="millisecond",s="second",l="minute",a="hour",c="day",u="week",h="month",f="quarter",d="year",p="date",y="Invalid Date",v=/^(\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,m={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(z){var F=["th","st","nd","rd"],B=z%100;return"["+z+(F[(B-20)%10]||F[B]||F[0])+"]"}},x=function(z,F,B){var $=String(z);return!$||$.length>=F?z:""+Array(F+1-$.length).join(B)+z},C={s:x,z:function(z){var F=-z.utcOffset(),B=Math.abs(F),$=Math.floor(B/60),_=B%60;return(F<=0?"+":"-")+x($,2,"0")+":"+x(_,2,"0")},m:function z(F,B){if(F.date()1)return z(R[0])}else{var H=F.name;b[H]=F,_=H}return!$&&_&&(w=_),_||!$&&w},O=function(z,F){if(M(z))return z.clone();var B=typeof F=="object"?F:{};return B.date=z,B.args=arguments,new V(B)},D=C;D.l=N,D.i=M,D.w=function(z,F){return O(z,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var V=function(){function z(B){this.$L=N(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[S]=!0}var F=z.prototype;return F.parse=function(B){this.$d=function($){var _=$.date,L=$.utc;if(_===null)return new Date(NaN);if(D.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var R=_.match(v);if(R){var H=R[2]-1||0,J=(R[7]||"0").substring(0,3);return L?new Date(Date.UTC(R[1],H,R[3]||1,R[4]||0,R[5]||0,R[6]||0,J)):new Date(R[1],H,R[3]||1,R[4]||0,R[5]||0,R[6]||0,J)}}return new Date(_)}(B),this.init()},F.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},F.$utils=function(){return D},F.isValid=function(){return this.$d.toString()!==y},F.isSame=function(B,$){var _=O(B);return this.startOf($)<=_&&_<=this.endOf($)},F.isAfter=function(B,$){return O(B)-1}function a(u){var h=u.replace(r,"");return h.replace(n,function(f,d){return String.fromCharCode(d)})}function c(u){if(!u)return t.BLANK_URL;var h=a(u).replace(i,"").replace(r,"").trim();if(!h)return t.BLANK_URL;if(l(h))return h;var f=h.match(o);if(!f)return h;var d=f[0];return e.test(d)?t.BLANK_URL:h}t.sanitizeUrl=c})(_2);var v8={value:()=>{}};function T2(){for(var t=0,e=arguments.length,n={},i;t=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}uh.prototype=T2.prototype={constructor:uh,on:function(t,e){var n=this._,i=x8(t+"",n),r,o=-1,s=i.length;if(arguments.length<2){for(;++o0)for(var n=new Array(r),i=0,r,o;i=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),jw.hasOwnProperty(e)?{space:jw[e],local:t}:t}function w8(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===d0&&e.documentElement.namespaceURI===d0?e.createElement(t):e.createElementNS(n,t)}}function b8(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function E2(t){var e=bd(t);return(e.local?b8:w8)(e)}function k8(){}function wv(t){return t==null?k8:function(){return this.querySelector(t)}}function S8(t){typeof t!="function"&&(t=wv(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r=x&&(x=m+1);!(w=v[x])&&++x=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function G8(t){t||(t=X8);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,i=n.length,r=new Array(i),o=0;oe?1:t>=e?0:NaN}function Q8(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function J8(){return Array.from(this)}function Z8(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?uz:typeof e=="function"?fz:hz)(t,e,n??"")):Js(this.node(),t)}function Js(t,e){return t.style.getPropertyValue(e)||B2(t).getComputedStyle(t,null).getPropertyValue(e)}function pz(t){return function(){delete this[t]}}function mz(t,e){return function(){this[t]=e}}function gz(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function yz(t,e){return arguments.length>1?this.each((e==null?pz:typeof e=="function"?gz:mz)(t,e)):this.node()[t]}function D2(t){return t.trim().split(/^|\s+/)}function bv(t){return t.classList||new R2(t)}function R2(t){this._node=t,this._names=D2(t.getAttribute("class")||"")}R2.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function F2(t,e){for(var n=bv(t),i=-1,r=e.length;++i=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function qz(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Tu(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Tu(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=e9.exec(t))?new Xt(e[1],e[2],e[3],1):(e=t9.exec(t))?new Xt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=n9.exec(t))?Tu(e[1],e[2],e[3],e[4]):(e=i9.exec(t))?Tu(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=r9.exec(t))?Yw(e[1],e[2]/100,e[3]/100,1):(e=o9.exec(t))?Yw(e[1],e[2]/100,e[3]/100,e[4]):Hw.hasOwnProperty(t)?qw(Hw[t]):t==="transparent"?new Xt(NaN,NaN,NaN,0):null}function qw(t){return new Xt(t>>16&255,t>>8&255,t&255,1)}function Tu(t,e,n,i){return i<=0&&(t=e=n=NaN),new Xt(t,e,n,i)}function a9(t){return t instanceof Bc||(t=ac(t)),t?(t=t.rgb(),new Xt(t.r,t.g,t.b,t.opacity)):new Xt}function p0(t,e,n,i){return arguments.length===1?a9(t):new Xt(t,e,n,i??1)}function Xt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}kv(Xt,p0,$2(Bc,{brighter(t){return t=t==null?Cf:Math.pow(Cf,t),new Xt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?sc:Math.pow(sc,t),new Xt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Xt(To(this.r),To(this.g),To(this.b),wf(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:Uw,formatHex:Uw,formatHex8:c9,formatRgb:Kw,toString:Kw}));function Uw(){return`#${wo(this.r)}${wo(this.g)}${wo(this.b)}`}function c9(){return`#${wo(this.r)}${wo(this.g)}${wo(this.b)}${wo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kw(){const t=wf(this.opacity);return`${t===1?"rgb(":"rgba("}${To(this.r)}, ${To(this.g)}, ${To(this.b)}${t===1?")":`, ${t})`}`}function wf(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function To(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function wo(t){return t=To(t),(t<16?"0":"")+t.toString(16)}function Yw(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new qn(t,e,n,i)}function z2(t){if(t instanceof qn)return new qn(t.h,t.s,t.l,t.opacity);if(t instanceof Bc||(t=ac(t)),!t)return new qn;if(t instanceof qn)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,l=o-r,a=(o+r)/2;return l?(e===o?s=(n-i)/l+(n0&&a<1?0:s,new qn(s,l,a,t.opacity)}function u9(t,e,n,i){return arguments.length===1?z2(t):new qn(t,e,n,i??1)}function qn(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}kv(qn,u9,$2(Bc,{brighter(t){return t=t==null?Cf:Math.pow(Cf,t),new qn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?sc:Math.pow(sc,t),new qn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Xt(Xp(t>=240?t-240:t+120,r,i),Xp(t,r,i),Xp(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new qn(Gw(this.h),Eu(this.s),Eu(this.l),wf(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=wf(this.opacity);return`${t===1?"hsl(":"hsla("}${Gw(this.h)}, ${Eu(this.s)*100}%, ${Eu(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Gw(t){return t=(t||0)%360,t<0?t+360:t}function Eu(t){return Math.max(0,Math.min(1,t||0))}function Xp(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Sv=t=>()=>t;function j2(t,e){return function(n){return t+n*e}}function h9(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function tJ(t,e){var n=e-t;return n?j2(t,n>180||n<-180?n-360*Math.round(n/360):n):Sv(isNaN(t)?e:t)}function f9(t){return(t=+t)==1?H2:function(e,n){return n-e?h9(e,n,t):Sv(isNaN(e)?n:e)}}function H2(t,e){var n=e-t;return n?j2(t,n):Sv(isNaN(t)?e:t)}const Xw=function t(e){var n=f9(e);function i(r,o){var s=n((r=p0(r)).r,(o=p0(o)).r),l=n(r.g,o.g),a=n(r.b,o.b),c=H2(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=l(u),r.b=a(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function xr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var m0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qp=new RegExp(m0.source,"g");function d9(t){return function(){return t}}function p9(t){return function(e){return t(e)+""}}function m9(t,e){var n=m0.lastIndex=Qp.lastIndex=0,i,r,o,s=-1,l=[],a=[];for(t=t+"",e=e+"";(i=m0.exec(t))&&(r=Qp.exec(e));)(o=r.index)>n&&(o=e.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(i=i[0])===(r=r[0])?l[s]?l[s]+=r:l[++s]=r:(l[++s]=null,a.push({i:s,x:xr(i,r)})),n=Qp.lastIndex;return n180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(r(h)+"rotate(",null,i)-2,x:xr(c,u)})):u&&h.push(r(h)+"rotate("+u+i)}function l(c,u,h,f){c!==u?f.push({i:h.push(r(h)+"skewX(",null,i)-2,x:xr(c,u)}):u&&h.push(r(h)+"skewX("+u+i)}function a(c,u,h,f,d,p){if(c!==h||u!==f){var y=d.push(r(d)+"scale(",null,",",null,")");p.push({i:y-4,x:xr(c,h)},{i:y-2,x:xr(u,f)})}else(h!==1||f!==1)&&d.push(r(d)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=t(c),u=t(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),s(c.rotate,u.rotate,h,f),l(c.skewX,u.skewX,h,f),a(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(d){for(var p=-1,y=f.length,v;++p=0&&t._call.call(void 0,e),t=t._next;--Zs}function Jw(){$o=(kf=cc.now())+kd,Zs=Jl=0;try{w9()}finally{Zs=0,k9(),$o=0}}function b9(){var t=cc.now(),e=t-kf;e>q2&&(kd-=e,kf=t)}function k9(){for(var t,e=bf,n,i=1/0;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:bf=n);Zl=t,y0(i)}function y0(t){if(!Zs){Jl&&(Jl=clearTimeout(Jl));var e=t-$o;e>24?(t<1/0&&(Jl=setTimeout(Jw,t-cc.now()-kd)),Nl&&(Nl=clearInterval(Nl))):(Nl||(kf=cc.now(),Nl=setInterval(b9,q2)),Zs=1,U2(Jw))}}function Zw(t,e,n){var i=new Sf;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var S9=T2("start","end","cancel","interrupt"),_9=[],Y2=0,eb=1,v0=2,hh=3,tb=4,x0=5,fh=6;function Sd(t,e,n,i,r,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;T9(t,n,{name:e,index:i,group:r,on:S9,tween:_9,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Y2})}function Tv(t,e){var n=ei(t,e);if(n.state>Y2)throw new Error("too late; already scheduled");return n}function Mi(t,e){var n=ei(t,e);if(n.state>hh)throw new Error("too late; already running");return n}function ei(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function T9(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=K2(o,0,n.time);function o(c){n.state=eb,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var u,h,f,d;if(n.state!==eb)return a();for(u in i)if(d=i[u],d.name===n.name){if(d.state===hh)return Zw(s);d.state===tb?(d.state=fh,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[u]):+uv0&&i.state=0&&(e=e.slice(0,n)),!e||e==="start"})}function ij(t,e,n){var i,r,o=nj(e)?Tv:Mi;return function(){var s=o(this,t),l=s.on;l!==i&&(r=(i=l).copy()).on(e,n),s.on=r}}function rj(t,e){var n=this._id;return arguments.length<2?ei(this.node(),n).on.on(t):this.each(ij(n,t,e))}function oj(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function sj(){return this.on("end.remove",oj(this._id))}function lj(t){var e=this._name,n=this._id;typeof t!="function"&&(t=wv(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s1?0:t<-1?Av:Math.acos(t)}function hJ(t){return t>=1?ib:t<=-1?-ib:Math.asin(t)}function J2(t){this._context=t}J2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function Bj(t){return new J2(t)}class Z2{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}function Dj(t){return new Z2(t,!0)}function Rj(t){return new Z2(t,!1)}function Xr(){}function _f(t,e,n){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+n)/6)}function _d(t){this._context=t}_d.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:_f(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Fj(t){return new _d(t)}function eM(t){this._context=t}eM.prototype={areaStart:Xr,areaEnd:Xr,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);break}}},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:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Nj(t){return new eM(t)}function tM(t){this._context=t}tM.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||this._line!==0&&this._point===3)&&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 n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Pj(t){return new tM(t)}function nM(t,e){this._basis=new _d(t),this._beta=e}nM.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i=t[0],r=e[0],o=t[n]-i,s=e[n]-r,l=-1,a;++l<=n;)a=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+a*o),this._beta*e[l]+(1-this._beta)*(r+a*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Ij=function t(e){function n(i){return e===1?new _d(i):new nM(i,e)}return n.beta=function(i){return t(+i)},n}(.85);function Tf(t,e,n){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-n),t._x2,t._y2)}function Mv(t,e){this._context=t,this._k=(1-e)/6}Mv.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:Tf(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:Tf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $j=function t(e){function n(i){return new Mv(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Lv(t,e){this._context=t,this._k=(1-e)/6}Lv.prototype={areaStart:Xr,areaEnd:Xr,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);break}}},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:Tf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zj=function t(e){function n(i){return new Lv(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Ov(t,e){this._context=t,this._k=(1-e)/6}Ov.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||this._line!==0&&this._point===3)&&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:Tf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const jj=function t(e){function n(i){return new Ov(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Bv(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>nb){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,r=(r*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>nb){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function iM(t,e){this._context=t,this._alpha=e}iM.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:Bv(this,t,e);break}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 Hj=function t(e){function n(i){return e?new iM(i,e):new Mv(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function rM(t,e){this._context=t,this._alpha=e}rM.prototype={areaStart:Xr,areaEnd:Xr,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);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:Bv(this,t,e);break}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 Wj=function t(e){function n(i){return e?new rM(i,e):new Lv(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function oM(t,e){this._context=t,this._alpha=e}oM.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:Bv(this,t,e);break}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 Vj=function t(e){function n(i){return e?new oM(i,e):new Ov(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function sM(t){this._context=t}sM.prototype={areaStart:Xr,areaEnd:Xr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function qj(t){return new sM(t)}function rb(t){return t<0?-1:1}function ob(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),l=(o*r+s*i)/(i+r);return(rb(o)+rb(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(l))||0}function sb(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Jp(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,l=(o-i)/3;t._context.bezierCurveTo(i+l,r+l*e,o-l,s-l*n,o,s)}function Ef(t){this._context=t}Ef.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Jp(this,this._t0,sb(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){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,Jp(this,sb(this,n=ob(this,t,e)),n);break;default:Jp(this,this._t0,n=ob(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function lM(t){this._context=new aM(t)}(lM.prototype=Object.create(Ef.prototype)).point=function(t,e){Ef.prototype.point.call(this,e,t)};function aM(t){this._context=t}aM.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}};function Uj(t){return new Ef(t)}function Kj(t){return new lM(t)}function cM(t){this._context=t}cM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=lb(t),r=lb(e),o=0,s=1;s=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[n-1]=(t[n]+r[n-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 n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function Gj(t){return new Td(t,.5)}function Xj(t){return new Td(t,0)}function Qj(t){return new Td(t,1)}function ea(t,e,n){this.k=t,this.x=e,this.y=n}ea.prototype={constructor:ea,scale:function(t){return t===1?this:new ea(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ea(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+")"}};ea.prototype;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:uM,setPrototypeOf:ab,isFrozen:Jj,getPrototypeOf:Zj,getOwnPropertyDescriptor:hM}=Object;let{freeze:$t,seal:Jn,create:fM}=Object,{apply:C0,construct:w0}=typeof Reflect<"u"&&Reflect;$t||($t=function(e){return e});Jn||(Jn=function(e){return e});C0||(C0=function(e,n,i){return e.apply(n,i)});w0||(w0=function(e,n){return new e(...n)});const Mu=Pn(Array.prototype.forEach),cb=Pn(Array.prototype.pop),Pl=Pn(Array.prototype.push),dh=Pn(String.prototype.toLowerCase),Zp=Pn(String.prototype.toString),eH=Pn(String.prototype.match),Il=Pn(String.prototype.replace),tH=Pn(String.prototype.indexOf),nH=Pn(String.prototype.trim),ln=Pn(RegExp.prototype.test),$l=iH(TypeError);function Pn(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:dh;ab&&ab(t,null);let i=e.length;for(;i--;){let r=e[i];if(typeof r=="string"){const o=n(r);o!==r&&(Jj(e)||(e[i]=o),r=o)}t[r]=!0}return t}function ns(t){const e=fM(null);for(const[n,i]of uM(t))hM(t,n)!==void 0&&(e[n]=i);return e}function Lu(t,e){for(;t!==null;){const i=hM(t,e);if(i){if(i.get)return Pn(i.get);if(typeof i.value=="function")return Pn(i.value)}t=Zj(t)}function n(i){return console.warn("fallback value for",i),null}return n}const ub=$t(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),em=$t(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tm=$t(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),rH=$t(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),nm=$t(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),oH=$t(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hb=$t(["#text"]),fb=$t(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),im=$t(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),db=$t(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ou=$t(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sH=Jn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),lH=Jn(/<%[\w\W]*|[\w\W]*%>/gm),aH=Jn(/\${[\w\W]*}/gm),cH=Jn(/^data-[\-\w.\u00B7-\uFFFF]/),uH=Jn(/^aria-[\-\w]+$/),dM=Jn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hH=Jn(/^(?:\w+script|data):/i),fH=Jn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pM=Jn(/^html$/i);var pb=Object.freeze({__proto__:null,MUSTACHE_EXPR:sH,ERB_EXPR:lH,TMPLIT_EXPR:aH,DATA_ATTR:cH,ARIA_ATTR:uH,IS_ALLOWED_URI:dM,IS_SCRIPT_OR_DATA:hH,ATTR_WHITESPACE:fH,DOCTYPE_NAME:pM});const dH=function(){return typeof window>"u"?null:window},pH=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(i=n.getAttribute(r));const o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function mM(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dH();const e=te=>mM(te);if(e.version="3.0.6",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const i=n,r=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:a,NodeFilter:c,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:d}=t,p=a.prototype,y=Lu(p,"cloneNode"),v=Lu(p,"nextSibling"),g=Lu(p,"childNodes"),m=Lu(p,"parentNode");if(typeof s=="function"){const te=n.createElement("template");te.content&&te.content.ownerDocument&&(n=te.content.ownerDocument)}let x,C="";const{implementation:w,createNodeIterator:b,createDocumentFragment:S,getElementsByTagName:M}=n,{importNode:N}=i;let O={};e.isSupported=typeof uM=="function"&&typeof m=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:D,ERB_EXPR:V,TMPLIT_EXPR:K,DATA_ATTR:z,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:$}=pb;let{IS_ALLOWED_URI:_}=pb,L=null;const R=ue({},[...ub,...em,...tm,...nm,...hb]);let H=null;const J=ue({},[...fb,...im,...db,...Ou]);let X=Object.seal(fM(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}})),ae=null,ce=null,Ce=!0,Fe=!0,nt=!1,it=!0,ke=!1,je=!1,Ht=!1,Ot=!1,on=!1,be=!1,ti=!1,Oi=!0,Pc=!1;const Hd="user-content-";let zn=!0,ni=!1,Bi={},Di=null;const Yo=ue({},["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 gl=null;const yl=ue({},["audio","video","img","source","image","track"]);let Go=null;const vl=ue({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ic="http://www.w3.org/1998/Math/MathML",$c="http://www.w3.org/2000/svg",Ri="http://www.w3.org/1999/xhtml";let Xo=Ri,Wd=!1,Vd=null;const CO=ue({},[Ic,$c,Ri],Zp);let oo=null;const wO=["application/xhtml+xml","text/html"],bO="text/html";let rt=null,Qo=null;const kO=n.createElement("form"),n1=function(T){return T instanceof RegExp||T instanceof Function},qd=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Qo&&Qo===T)){if((!T||typeof T!="object")&&(T={}),T=ns(T),oo=wO.indexOf(T.PARSER_MEDIA_TYPE)===-1?oo=bO:oo=T.PARSER_MEDIA_TYPE,rt=oo==="application/xhtml+xml"?Zp:dh,L="ALLOWED_TAGS"in T?ue({},T.ALLOWED_TAGS,rt):R,H="ALLOWED_ATTR"in T?ue({},T.ALLOWED_ATTR,rt):J,Vd="ALLOWED_NAMESPACES"in T?ue({},T.ALLOWED_NAMESPACES,Zp):CO,Go="ADD_URI_SAFE_ATTR"in T?ue(ns(vl),T.ADD_URI_SAFE_ATTR,rt):vl,gl="ADD_DATA_URI_TAGS"in T?ue(ns(yl),T.ADD_DATA_URI_TAGS,rt):yl,Di="FORBID_CONTENTS"in T?ue({},T.FORBID_CONTENTS,rt):Yo,ae="FORBID_TAGS"in T?ue({},T.FORBID_TAGS,rt):{},ce="FORBID_ATTR"in T?ue({},T.FORBID_ATTR,rt):{},Bi="USE_PROFILES"in T?T.USE_PROFILES:!1,Ce=T.ALLOW_ARIA_ATTR!==!1,Fe=T.ALLOW_DATA_ATTR!==!1,nt=T.ALLOW_UNKNOWN_PROTOCOLS||!1,it=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ke=T.SAFE_FOR_TEMPLATES||!1,je=T.WHOLE_DOCUMENT||!1,on=T.RETURN_DOM||!1,be=T.RETURN_DOM_FRAGMENT||!1,ti=T.RETURN_TRUSTED_TYPE||!1,Ot=T.FORCE_BODY||!1,Oi=T.SANITIZE_DOM!==!1,Pc=T.SANITIZE_NAMED_PROPS||!1,zn=T.KEEP_CONTENT!==!1,ni=T.IN_PLACE||!1,_=T.ALLOWED_URI_REGEXP||dM,Xo=T.NAMESPACE||Ri,X=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&n1(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(X.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&n1(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(X.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(X.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(Fe=!1),be&&(on=!0),Bi&&(L=ue({},[...hb]),H=[],Bi.html===!0&&(ue(L,ub),ue(H,fb)),Bi.svg===!0&&(ue(L,em),ue(H,im),ue(H,Ou)),Bi.svgFilters===!0&&(ue(L,tm),ue(H,im),ue(H,Ou)),Bi.mathMl===!0&&(ue(L,nm),ue(H,db),ue(H,Ou))),T.ADD_TAGS&&(L===R&&(L=ns(L)),ue(L,T.ADD_TAGS,rt)),T.ADD_ATTR&&(H===J&&(H=ns(H)),ue(H,T.ADD_ATTR,rt)),T.ADD_URI_SAFE_ATTR&&ue(Go,T.ADD_URI_SAFE_ATTR,rt),T.FORBID_CONTENTS&&(Di===Yo&&(Di=ns(Di)),ue(Di,T.FORBID_CONTENTS,rt)),zn&&(L["#text"]=!0),je&&ue(L,["html","head","body"]),L.table&&(ue(L,["tbody"]),delete ae.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw $l('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $l('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=T.TRUSTED_TYPES_POLICY,C=x.createHTML("")}else x===void 0&&(x=pH(d,r)),x!==null&&typeof C=="string"&&(C=x.createHTML(""));$t&&$t(T),Qo=T}},i1=ue({},["mi","mo","mn","ms","mtext"]),r1=ue({},["foreignobject","desc","title","annotation-xml"]),SO=ue({},["title","style","font","a","script"]),zc=ue({},em);ue(zc,tm),ue(zc,rH);const Ud=ue({},nm);ue(Ud,oH);const _O=function(T){let W=m(T);(!W||!W.tagName)&&(W={namespaceURI:Xo,tagName:"template"});const ee=dh(T.tagName),_e=dh(W.tagName);return Vd[T.namespaceURI]?T.namespaceURI===$c?W.namespaceURI===Ri?ee==="svg":W.namespaceURI===Ic?ee==="svg"&&(_e==="annotation-xml"||i1[_e]):!!zc[ee]:T.namespaceURI===Ic?W.namespaceURI===Ri?ee==="math":W.namespaceURI===$c?ee==="math"&&r1[_e]:!!Ud[ee]:T.namespaceURI===Ri?W.namespaceURI===$c&&!r1[_e]||W.namespaceURI===Ic&&!i1[_e]?!1:!Ud[ee]&&(SO[ee]||!zc[ee]):!!(oo==="application/xhtml+xml"&&Vd[T.namespaceURI]):!1},so=function(T){Pl(e.removed,{element:T});try{T.parentNode.removeChild(T)}catch{T.remove()}},Kd=function(T,W){try{Pl(e.removed,{attribute:W.getAttributeNode(T),from:W})}catch{Pl(e.removed,{attribute:null,from:W})}if(W.removeAttribute(T),T==="is"&&!H[T])if(on||be)try{so(W)}catch{}else try{W.setAttribute(T,"")}catch{}},o1=function(T){let W=null,ee=null;if(Ot)T=""+T;else{const gt=eH(T,/^[\r\n\t ]+/);ee=gt&>[0]}oo==="application/xhtml+xml"&&Xo===Ri&&(T=''+T+"");const _e=x?x.createHTML(T):T;if(Xo===Ri)try{W=new f().parseFromString(_e,oo)}catch{}if(!W||!W.documentElement){W=w.createDocument(Xo,"template",null);try{W.documentElement.innerHTML=Wd?C:_e}catch{}}const mt=W.body||W.documentElement;return T&&ee&&mt.insertBefore(n.createTextNode(ee),mt.childNodes[0]||null),Xo===Ri?M.call(W,je?"html":"body")[0]:je?W.documentElement:mt},s1=function(T){return b.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null)},TO=function(T){return T instanceof h&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof u)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},l1=function(T){return typeof l=="function"&&T instanceof l},Fi=function(T,W,ee){O[T]&&Mu(O[T],_e=>{_e.call(e,W,ee,Qo)})},a1=function(T){let W=null;if(Fi("beforeSanitizeElements",T,null),TO(T))return so(T),!0;const ee=rt(T.nodeName);if(Fi("uponSanitizeElement",T,{tagName:ee,allowedTags:L}),T.hasChildNodes()&&!l1(T.firstElementChild)&&ln(/<[/\w]/g,T.innerHTML)&&ln(/<[/\w]/g,T.textContent))return so(T),!0;if(!L[ee]||ae[ee]){if(!ae[ee]&&u1(ee)&&(X.tagNameCheck instanceof RegExp&&ln(X.tagNameCheck,ee)||X.tagNameCheck instanceof Function&&X.tagNameCheck(ee)))return!1;if(zn&&!Di[ee]){const _e=m(T)||T.parentNode,mt=g(T)||T.childNodes;if(mt&&_e){const gt=mt.length;for(let Wt=gt-1;Wt>=0;--Wt)_e.insertBefore(y(mt[Wt],!0),v(T))}}return so(T),!0}return T instanceof a&&!_O(T)||(ee==="noscript"||ee==="noembed"||ee==="noframes")&&ln(/<\/no(script|embed|frames)/i,T.innerHTML)?(so(T),!0):(ke&&T.nodeType===3&&(W=T.textContent,Mu([D,V,K],_e=>{W=Il(W,_e," ")}),T.textContent!==W&&(Pl(e.removed,{element:T.cloneNode()}),T.textContent=W)),Fi("afterSanitizeElements",T,null),!1)},c1=function(T,W,ee){if(Oi&&(W==="id"||W==="name")&&(ee in n||ee in kO))return!1;if(!(Fe&&!ce[W]&&ln(z,W))){if(!(Ce&&ln(F,W))){if(!H[W]||ce[W]){if(!(u1(T)&&(X.tagNameCheck instanceof RegExp&&ln(X.tagNameCheck,T)||X.tagNameCheck instanceof Function&&X.tagNameCheck(T))&&(X.attributeNameCheck instanceof RegExp&&ln(X.attributeNameCheck,W)||X.attributeNameCheck instanceof Function&&X.attributeNameCheck(W))||W==="is"&&X.allowCustomizedBuiltInElements&&(X.tagNameCheck instanceof RegExp&&ln(X.tagNameCheck,ee)||X.tagNameCheck instanceof Function&&X.tagNameCheck(ee))))return!1}else if(!Go[W]){if(!ln(_,Il(ee,$,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&T!=="script"&&tH(ee,"data:")===0&&gl[T])){if(!(nt&&!ln(B,Il(ee,$,"")))){if(ee)return!1}}}}}}return!0},u1=function(T){return T.indexOf("-")>0},h1=function(T){Fi("beforeSanitizeAttributes",T,null);const{attributes:W}=T;if(!W)return;const ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};let _e=W.length;for(;_e--;){const mt=W[_e],{name:gt,namespaceURI:Wt,value:lo}=mt,xl=rt(gt);let Vt=gt==="value"?lo:nH(lo);if(ee.attrName=xl,ee.attrValue=Vt,ee.keepAttr=!0,ee.forceKeepAttr=void 0,Fi("uponSanitizeAttribute",T,ee),Vt=ee.attrValue,ee.forceKeepAttr||(Kd(gt,T),!ee.keepAttr))continue;if(!it&&ln(/\/>/i,Vt)){Kd(gt,T);continue}ke&&Mu([D,V,K],d1=>{Vt=Il(Vt,d1," ")});const f1=rt(T.nodeName);if(c1(f1,xl,Vt)){if(Pc&&(xl==="id"||xl==="name")&&(Kd(gt,T),Vt=Hd+Vt),x&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Wt)switch(d.getAttributeType(f1,xl)){case"TrustedHTML":{Vt=x.createHTML(Vt);break}case"TrustedScriptURL":{Vt=x.createScriptURL(Vt);break}}try{Wt?T.setAttributeNS(Wt,gt,Vt):T.setAttribute(gt,Vt),cb(e.removed)}catch{}}}Fi("afterSanitizeAttributes",T,null)},EO=function te(T){let W=null;const ee=s1(T);for(Fi("beforeSanitizeShadowDOM",T,null);W=ee.nextNode();)Fi("uponSanitizeShadowNode",W,null),!a1(W)&&(W.content instanceof o&&te(W.content),h1(W));Fi("afterSanitizeShadowDOM",T,null)};return e.sanitize=function(te){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,ee=null,_e=null,mt=null;if(Wd=!te,Wd&&(te=""),typeof te!="string"&&!l1(te))if(typeof te.toString=="function"){if(te=te.toString(),typeof te!="string")throw $l("dirty is not a string, aborting")}else throw $l("toString is not a function");if(!e.isSupported)return te;if(Ht||qd(T),e.removed=[],typeof te=="string"&&(ni=!1),ni){if(te.nodeName){const lo=rt(te.nodeName);if(!L[lo]||ae[lo])throw $l("root node is forbidden and cannot be sanitized in-place")}}else if(te instanceof l)W=o1(""),ee=W.ownerDocument.importNode(te,!0),ee.nodeType===1&&ee.nodeName==="BODY"||ee.nodeName==="HTML"?W=ee:W.appendChild(ee);else{if(!on&&!ke&&!je&&te.indexOf("<")===-1)return x&&ti?x.createHTML(te):te;if(W=o1(te),!W)return on?null:ti?C:""}W&&Ot&&so(W.firstChild);const gt=s1(ni?te:W);for(;_e=gt.nextNode();)a1(_e)||(_e.content instanceof o&&EO(_e.content),h1(_e));if(ni)return te;if(on){if(be)for(mt=S.call(W.ownerDocument);W.firstChild;)mt.appendChild(W.firstChild);else mt=W;return(H.shadowroot||H.shadowrootmode)&&(mt=N.call(i,mt,!0)),mt}let Wt=je?W.outerHTML:W.innerHTML;return je&&L["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&ln(pM,W.ownerDocument.doctype.name)&&(Wt=" -`+Wt),ke&&Mu([D,V,K],lo=>{Wt=Il(Wt,lo," ")}),x&&ti?x.createHTML(Wt):Wt},e.setConfig=function(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qd(te),Ht=!0},e.clearConfig=function(){Qo=null,Ht=!1},e.isValidAttribute=function(te,T,W){Qo||qd({});const ee=rt(te),_e=rt(T);return c1(ee,_e,W)},e.addHook=function(te,T){typeof T=="function"&&(O[te]=O[te]||[],Pl(O[te],T))},e.removeHook=function(te){if(O[te])return cb(O[te])},e.removeHooks=function(te){O[te]&&(O[te]=[])},e.removeAllHooks=function(){O={}},e}var Af=mM();const ph={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,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},i)=>{if(!e)return n*2.55;t/=360,e/=100,n/=100;const r=n<.5?n*(1+e):n+e-n*e,o=2*n-r;switch(i){case"r":return ph.hue2rgb(o,r,t+1/3)*255;case"g":return ph.hue2rgb(o,r,t)*255;case"b":return ph.hue2rgb(o,r,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:n},i)=>{t/=255,e/=255,n/=255;const r=Math.max(t,e,n),o=Math.min(t,e,n),s=(r+o)/2;if(i==="l")return s*100;if(r===o)return 0;const l=r-o,a=s>.5?l/(2-r-o):l/(r+o);if(i==="s")return a*100;switch(r){case t:return((e-n)/l+(ee>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},yH=gH,vH={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},xH=vH,CH={channel:mH,lang:yH,unit:xH},le=CH,fr={};for(let t=0;t<=255;t++)fr[t]=le.unit.dec2hex(t);const xt={ALL:0,RGB:1,HSL:2};class wH{constructor(){this.type=xt.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=xt.ALL}is(e){return this.type===e}}const bH=wH;class kH{constructor(e,n){this.color=n,this.changed=!1,this.data=e,this.type=new bH}set(e,n){return this.color=n,this.changed=!1,this.data=e,this.type.type=xt.ALL,this}_ensureHSL(){const e=this.data,{h:n,s:i,l:r}=e;n===void 0&&(e.h=le.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=le.channel.rgb2hsl(e,"s")),r===void 0&&(e.l=le.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:n,g:i,b:r}=e;n===void 0&&(e.r=le.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=le.channel.hsl2rgb(e,"g")),r===void 0&&(e.b=le.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,n=e.r;return!this.type.is(xt.HSL)&&n!==void 0?n:(this._ensureHSL(),le.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,n=e.g;return!this.type.is(xt.HSL)&&n!==void 0?n:(this._ensureHSL(),le.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,n=e.b;return!this.type.is(xt.HSL)&&n!==void 0?n:(this._ensureHSL(),le.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,n=e.h;return!this.type.is(xt.RGB)&&n!==void 0?n:(this._ensureRGB(),le.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,n=e.s;return!this.type.is(xt.RGB)&&n!==void 0?n:(this._ensureRGB(),le.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,n=e.l;return!this.type.is(xt.RGB)&&n!==void 0?n:(this._ensureRGB(),le.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(xt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(xt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(xt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(xt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(xt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(xt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const SH=kH,_H=new SH({r:0,g:0,b:0,a:0},"transparent"),Ed=_H,gM={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(gM.re);if(!e)return;const n=e[1],i=parseInt(n,16),r=n.length,o=r%4===0,s=r>4,l=s?1:17,a=s?8:4,c=o?0:-1,u=s?255:15;return Ed.set({r:(i>>a*(c+3)&u)*l,g:(i>>a*(c+2)&u)*l,b:(i>>a*(c+1)&u)*l,a:o?(i&u)*l/255:1},t)},stringify:t=>{const{r:e,g:n,b:i,a:r}=t;return r<1?`#${fr[Math.round(e)]}${fr[Math.round(n)]}${fr[Math.round(i)]}${fr[Math.round(r*255)]}`:`#${fr[Math.round(e)]}${fr[Math.round(n)]}${fr[Math.round(i)]}`}},va=gM,mh={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(mh.hueRe);if(e){const[,n,i]=e;switch(i){case"grad":return le.channel.clamp.h(parseFloat(n)*.9);case"rad":return le.channel.clamp.h(parseFloat(n)*180/Math.PI);case"turn":return le.channel.clamp.h(parseFloat(n)*360)}}return le.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const n=t.match(mh.re);if(!n)return;const[,i,r,o,s,l]=n;return Ed.set({h:mh._hue2deg(i),s:le.channel.clamp.s(parseFloat(r)),l:le.channel.clamp.l(parseFloat(o)),a:s?le.channel.clamp.a(l?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:n,l:i,a:r}=t;return r<1?`hsla(${le.lang.round(e)}, ${le.lang.round(n)}%, ${le.lang.round(i)}%, ${r})`:`hsl(${le.lang.round(e)}, ${le.lang.round(n)}%, ${le.lang.round(i)}%)`}},Bu=mh,gh={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=gh.colors[t];if(e)return va.parse(e)},stringify:t=>{const e=va.stringify(t);for(const n in gh.colors)if(gh.colors[n]===e)return n}},mb=gh,yM={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(e!==114&&e!==82)return;const n=t.match(yM.re);if(!n)return;const[,i,r,o,s,l,a,c,u]=n;return Ed.set({r:le.channel.clamp.r(r?parseFloat(i)*2.55:parseFloat(i)),g:le.channel.clamp.g(s?parseFloat(o)*2.55:parseFloat(o)),b:le.channel.clamp.b(a?parseFloat(l)*2.55:parseFloat(l)),a:c?le.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:n,b:i,a:r}=t;return r<1?`rgba(${le.lang.round(e)}, ${le.lang.round(n)}, ${le.lang.round(i)}, ${le.lang.round(r)})`:`rgb(${le.lang.round(e)}, ${le.lang.round(n)}, ${le.lang.round(i)})`}},Du=yM,TH={format:{keyword:mb,hex:va,rgb:Du,rgba:Du,hsl:Bu,hsla:Bu},parse:t=>{if(typeof t!="string")return t;const e=va.parse(t)||Du.parse(t)||Bu.parse(t)||mb.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(xt.HSL)||t.data.r===void 0?Bu.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Du.stringify(t):va.stringify(t)},Si=TH,EH=(t,e)=>{const n=Si.parse(t);for(const i in e)n[i]=le.channel.clamp[i](e[i]);return Si.stringify(n)},vM=EH,AH=(t,e,n=0,i=1)=>{if(typeof t!="number")return vM(t,{a:e});const r=Ed.set({r:le.channel.clamp.r(t),g:le.channel.clamp.g(e),b:le.channel.clamp.b(n),a:le.channel.clamp.a(i)});return Si.stringify(r)},xa=AH,MH=t=>{const{r:e,g:n,b:i}=Si.parse(t),r=.2126*le.channel.toLinear(e)+.7152*le.channel.toLinear(n)+.0722*le.channel.toLinear(i);return le.lang.round(r)},LH=MH,OH=t=>LH(t)>=.5,BH=OH,DH=t=>!BH(t),Dc=DH,RH=(t,e,n)=>{const i=Si.parse(t),r=i[e],o=le.channel.clamp[e](r+n);return r!==o&&(i[e]=o),Si.stringify(i)},xM=RH,FH=(t,e)=>xM(t,"l",e),ne=FH,NH=(t,e)=>xM(t,"l",-e),oe=NH,PH=(t,e)=>{const n=Si.parse(t),i={};for(const r in e)e[r]&&(i[r]=n[r]+e[r]);return vM(t,i)},E=PH,IH=(t,e,n=50)=>{const{r:i,g:r,b:o,a:s}=Si.parse(t),{r:l,g:a,b:c,a:u}=Si.parse(e),h=n/100,f=h*2-1,d=s-u,y=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,v=1-y,g=i*y+l*v,m=r*y+a*v,x=o*y+c*v,C=s*h+u*(1-h);return xa(g,m,x,C)},$H=IH,zH=(t,e=100)=>{const n=Si.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,$H(n,t,e)},U=zH;var jH=typeof global=="object"&&global&&global.Object===Object&&global;const CM=jH;var HH=typeof self=="object"&&self&&self.Object===Object&&self,WH=CM||HH||Function("return this")();const Li=WH;var VH=Li.Symbol;const Mf=VH;var wM=Object.prototype,qH=wM.hasOwnProperty,UH=wM.toString,zl=Mf?Mf.toStringTag:void 0;function KH(t){var e=qH.call(t,zl),n=t[zl];try{t[zl]=void 0;var i=!0}catch{}var r=UH.call(t);return i&&(e?t[zl]=n:delete t[zl]),r}var YH=Object.prototype,GH=YH.toString;function XH(t){return GH.call(t)}var QH="[object Null]",JH="[object Undefined]",gb=Mf?Mf.toStringTag:void 0;function dl(t){return t==null?t===void 0?JH:QH:gb&&gb in Object(t)?KH(t):XH(t)}function qo(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ZH="[object AsyncFunction]",eW="[object Function]",tW="[object GeneratorFunction]",nW="[object Proxy]";function Dv(t){if(!qo(t))return!1;var e=dl(t);return e==eW||e==tW||e==ZH||e==nW}var iW=Li["__core-js_shared__"];const rm=iW;var yb=function(){var t=/[^.]+$/.exec(rm&&rm.keys&&rm.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function rW(t){return!!yb&&yb in t}var oW=Function.prototype,sW=oW.toString;function Uo(t){if(t!=null){try{return sW.call(t)}catch{}try{return t+""}catch{}}return""}var lW=/[\\^$.*+?()[\]{}|]/g,aW=/^\[object .+?Constructor\]$/,cW=Function.prototype,uW=Object.prototype,hW=cW.toString,fW=uW.hasOwnProperty,dW=RegExp("^"+hW.call(fW).replace(lW,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pW(t){if(!qo(t)||rW(t))return!1;var e=Dv(t)?dW:aW;return e.test(Uo(t))}function mW(t,e){return t==null?void 0:t[e]}function Ko(t,e){var n=mW(t,e);return pW(n)?n:void 0}var gW=Ko(Object,"create");const uc=gW;function yW(){this.__data__=uc?uc(null):{},this.size=0}function vW(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var xW="__lodash_hash_undefined__",CW=Object.prototype,wW=CW.hasOwnProperty;function bW(t){var e=this.__data__;if(uc){var n=e[t];return n===xW?void 0:n}return wW.call(e,t)?e[t]:void 0}var kW=Object.prototype,SW=kW.hasOwnProperty;function _W(t){var e=this.__data__;return uc?e[t]!==void 0:SW.call(e,t)}var TW="__lodash_hash_undefined__";function EW(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=uc&&e===void 0?TW:e,this}function zo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}function RW(t,e){var n=this.__data__,i=Md(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function ur(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=m7}function Bd(t){return t!=null&&TM(t.length)&&!Dv(t)}function g7(t){return Fc(t)&&Bd(t)}function y7(){return!1}var EM=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sb=EM&&typeof module=="object"&&module&&!module.nodeType&&module,v7=Sb&&Sb.exports===EM,_b=v7?Li.Buffer:void 0,x7=_b?_b.isBuffer:void 0,C7=x7||y7;const Fv=C7;var w7="[object Object]",b7=Function.prototype,k7=Object.prototype,AM=b7.toString,S7=k7.hasOwnProperty,_7=AM.call(Object);function T7(t){if(!Fc(t)||dl(t)!=w7)return!1;var e=SM(t);if(e===null)return!0;var n=S7.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&AM.call(n)==_7}var E7="[object Arguments]",A7="[object Array]",M7="[object Boolean]",L7="[object Date]",O7="[object Error]",B7="[object Function]",D7="[object Map]",R7="[object Number]",F7="[object Object]",N7="[object RegExp]",P7="[object Set]",I7="[object String]",$7="[object WeakMap]",z7="[object ArrayBuffer]",j7="[object DataView]",H7="[object Float32Array]",W7="[object Float64Array]",V7="[object Int8Array]",q7="[object Int16Array]",U7="[object Int32Array]",K7="[object Uint8Array]",Y7="[object Uint8ClampedArray]",G7="[object Uint16Array]",X7="[object Uint32Array]",Me={};Me[H7]=Me[W7]=Me[V7]=Me[q7]=Me[U7]=Me[K7]=Me[Y7]=Me[G7]=Me[X7]=!0;Me[E7]=Me[A7]=Me[z7]=Me[M7]=Me[j7]=Me[L7]=Me[O7]=Me[B7]=Me[D7]=Me[R7]=Me[F7]=Me[N7]=Me[P7]=Me[I7]=Me[$7]=!1;function Q7(t){return Fc(t)&&TM(t.length)&&!!Me[dl(t)]}function J7(t){return function(e){return t(e)}}var MM=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ca=MM&&typeof module=="object"&&module&&!module.nodeType&&module,Z7=Ca&&Ca.exports===MM,om=Z7&&CM.process,eV=function(){try{var t=Ca&&Ca.require&&Ca.require("util").types;return t||om&&om.binding&&om.binding("util")}catch{}}();const Tb=eV;var Eb=Tb&&Tb.isTypedArray,tV=Eb?J7(Eb):Q7;const Nv=tV;function k0(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var nV=Object.prototype,iV=nV.hasOwnProperty;function rV(t,e,n){var i=t[e];(!(iV.call(t,e)&&Ad(i,n))||n===void 0&&!(e in t))&&Rv(t,e,n)}function oV(t,e,n,i){var r=!n;n||(n={});for(var o=-1,s=e.length;++o-1&&t%1==0&&t0){if(++e>=kV)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var EV=TV(bV);const AV=EV;function MV(t,e){return AV(xV(t,e,DM),t+"")}function LV(t,e,n){if(!qo(n))return!1;var i=typeof e;return(i=="number"?Bd(n)&&LM(e,n.length):i=="string"&&e in n)?Ad(n[e],t):!1}function OV(t){return MV(function(e,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(r--,o):void 0,s&&LV(n[0],n[1],s)&&(o=r<3?void 0:o,r=1),e=Object(e);++i0?fc(ml,--In):0,el--,Ke===10&&(el=1,Dd--),Ke}function Gn(){return Ke=In2||S0(Ke)>3?"":" "}function qV(t,e){for(;--e&&Gn()&&!(Ke<48||Ke>102||Ke>57&&Ke<65||Ke>70&&Ke<97););return Rd(t,vh()+(e<6&&Eo()==32&&Gn()==32))}function _0(t){for(;Gn();)switch(Ke){case t:return In;case 34:case 39:t!==34&&t!==39&&_0(Ke);break;case 40:t===41&&_0(t);break;case 92:Gn();break}return In}function UV(t,e){for(;Gn()&&t+Ke!==47+10;)if(t+Ke===42+42&&Eo()===47)break;return"/*"+Rd(e,In-1)+"*"+Pv(t===47?t:Gn())}function KV(t){for(;!S0(Eo());)Gn();return Rd(t,In)}function YV(t){return WV(xh("",null,null,null,[""],t=HV(t),0,[0],t))}function xh(t,e,n,i,r,o,s,l,a){for(var c=0,u=0,h=s,f=0,d=0,p=0,y=1,v=1,g=1,m=0,x="",C=r,w=o,b=i,S=x;v;)switch(p=m,m=Gn()){case 40:if(p!=108&&fc(S,h-1)==58){IV(S+=yh(sm(m),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:S+=sm(m);break;case 9:case 10:case 13:case 32:S+=VV(p);break;case 92:S+=qV(vh()-1,7);continue;case 47:switch(Eo()){case 42:case 47:Ru(GV(UV(Gn(),vh()),e,n,a),a);break;default:S+="/"}break;case 123*y:l[c++]=ji(S)*g;case 125*y:case 59:case 0:switch(m){case 0:case 125:v=0;case 59+u:g==-1&&(S=yh(S,/\f/g,"")),d>0&&ji(S)-h&&Ru(d>32?Lb(S+";",i,n,h-1,a):Lb(yh(S," ","")+";",i,n,h-2,a),a);break;case 59:S+=";";default:if(Ru(b=Mb(S,e,n,c,u,r,l,x,C=[],w=[],h,o),o),m===123)if(u===0)xh(S,e,b,b,C,o,h,l,w);else switch(f===99&&fc(S,3)===110?100:f){case 100:case 108:case 109:case 115:xh(t,b,b,i&&Ru(Mb(t,b,b,0,0,r,l,x,r,C=[],h,w),w),r,w,h,l,i?C:w);break;default:xh(S,b,b,b,[""],w,0,l,w)}}c=u=d=0,y=g=1,x=S="",h=s;break;case 58:h=1+ji(S),d=p;default:if(y<1){if(m==123)--y;else if(m==125&&y++==0&&jV()==125)continue}switch(S+=Pv(m),m*y){case 38:g=u>0?1:(S+="\f",-1);break;case 44:l[c++]=(ji(S)-1)*g,g=1;break;case 64:Eo()===45&&(S+=sm(Gn())),f=Eo(),u=h=ji(x=S+=KV(vh())),m++;break;case 45:p===45&&ji(S)==2&&(y=0)}}return o}function Mb(t,e,n,i,r,o,s,l,a,c,u,h){for(var f=r-1,d=r===0?o:[""],p=$V(d),y=0,v=0,g=0;y0?d[m]+" "+x:yh(x,/&\f/g,d[m])))&&(a[g++]=C);return Iv(t,e,n,r===0?FM:l,a,c,u,h)}function GV(t,e,n,i){return Iv(t,e,n,RM,Pv(zV()),dc(t,2,-2),0,i)}function Lb(t,e,n,i,r){return Iv(t,e,n,NM,dc(t,0,i),dc(t,i+1,-1),i,r)}function T0(t,e){for(var n="",i=0;i{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},$v=function(t="fatal"){let e=Pi.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Pi&&(e=Pi[t])):typeof t=="number"&&(e=t),re.trace=()=>{},re.debug=()=>{},re.info=()=>{},re.warn=()=>{},re.error=()=>{},re.fatal=()=>{},e<=Pi.fatal&&(re.fatal=console.error?console.error.bind(console,wn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",wn("FATAL"))),e<=Pi.error&&(re.error=console.error?console.error.bind(console,wn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",wn("ERROR"))),e<=Pi.warn&&(re.warn=console.warn?console.warn.bind(console,wn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",wn("WARN"))),e<=Pi.info&&(re.info=console.info?console.info.bind(console,wn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",wn("INFO"))),e<=Pi.debug&&(re.debug=console.debug?console.debug.bind(console,wn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",wn("DEBUG"))),e<=Pi.trace&&(re.trace=console.debug?console.debug.bind(console,wn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",wn("TRACE")))},wn=t=>`%c${y8().format("ss.SSS")} : ${t} : `,Fd=//gi,yq=t=>t?zM(t).replace(/\\n/g,"#br#").split("#br#"):[""],$M=t=>Af.sanitize(t),Nb=(t,e)=>{var n;if(((n=e.flowchart)==null?void 0:n.htmlLabels)!==!1){const i=e.securityLevel;i==="antiscript"||i==="strict"?t=$M(t):i!=="loose"&&(t=zM(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=wq(t))}return t},pc=(t,e)=>t&&(e.dompurifyConfig?t=Af.sanitize(Nb(t,e),e.dompurifyConfig).toString():t=Af.sanitize(Nb(t,e),{FORBID_TAGS:["style"]}).toString(),t),vq=(t,e)=>typeof t=="string"?pc(t,e):t.flat().map(n=>pc(n,e)),xq=t=>Fd.test(t),Cq=t=>t.split(Fd),wq=t=>t.replace(/#br#/g,"
"),zM=t=>t.replace(Fd,"#br#"),bq=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},jM=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),kq=function(...t){const e=t.filter(n=>!isNaN(n));return Math.max(...e)},Sq=function(...t){const e=t.filter(n=>!isNaN(n));return Math.min(...e)},fJ=function(t){const e=t.split(/(,)/),n=[];for(let i=0;i0&&i+1Math.max(0,t.split(e).length-1),_q=(t,e)=>{const n=O0(t,"~"),i=O0(e,"~");return n===1&&i===1},Tq=t=>{const e=O0(t,"~");let n=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),n=!0);const i=[...t];let r=i.indexOf("~"),o=i.lastIndexOf("~");for(;r!==-1&&o!==-1&&r!==o;)i[r]="<",i[o]=">",r=i.indexOf("~"),o=i.lastIndexOf("~");return n&&i.unshift("~"),i.join("")},zv={getRows:yq,sanitizeText:pc,sanitizeTextOrArray:vq,hasBreaks:xq,splitBreaks:Cq,lineBreakRegex:Fd,removeScript:$M,getUrl:bq,evaluate:jM,getMax:kq,getMin:Sq},Ft=(t,e)=>e?E(t,{s:-40,l:10}):E(t,{s:-40,l:-10}),Nd="#ffffff",Pd="#f2f2f2";let Eq=class{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(){var e,n,i,r,o,s,l,a,c,u,h;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||U(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||U(this.tertiaryColor),this.lineColor=this.lineColor||U(this.background),this.arrowheadColor=this.arrowheadColor||U(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?oe(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||"grey",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||oe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||U(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||ne(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.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||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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d{this[i]=e[i]}),this.updateColors(),n.forEach(i=>{this[i]=e[i]})}};const Aq=t=>{const e=new Eq;return e.calculate(t),e};let Mq=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ne(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=U(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.lineColor=U(this.background),this.textColor=U(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ne(U("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=xa(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=oe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=oe(this.sectionBkgColor,10),this.taskBorderColor=xa(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=xa(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,n,i,r,o,s,l,a,c,u,h;this.secondBkg=ne(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=ne(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,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=ne(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.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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330});for(let f=0;f{this[i]=e[i]}),this.updateColors(),n.forEach(i=>{this[i]=e[i]})}};const Lq=t=>{const e=new Mq;return e.calculate(t),e};let Oq=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=E(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.lineColor=U(this.background),this.textColor=U(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="#e8e8e8",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="grey",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.sectionBkgColor=xa(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var e,n,i,r,o,s,l,a,c,u,h;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||oe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||oe(this.tertiaryColor,40);for(let f=0;f{this[i]=e[i]}),this.updateColors(),n.forEach(i=>{this[i]=e[i]})}};const Bq=t=>{const e=new Oq;return e.calculate(t),e};let Dq=class{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=ne("#cde498",10),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.primaryColor),this.lineColor=U(this.background),this.textColor=U(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="grey",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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,n,i,r,o,s,l,a,c,u,h;this.actorBorder=oe(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.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||oe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||oe(this.tertiaryColor,40);for(let f=0;f{this[i]=e[i]}),this.updateColors(),n.forEach(i=>{this[i]=e[i]})}};const Rq=t=>{const e=new Dq;return e.calculate(t),e};class Fq{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=ne(this.contrast,55),this.background="#ffffff",this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.lineColor=U(this.background),this.textColor=U(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="calculated",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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,n,i,r,o,s,l,a,c,u,h;this.secondBkg=ne(this.contrast,55),this.border2=this.contrast,this.actorBorder=ne(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,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 f=0;f{this[i]=e[i]}),this.updateColors(),n.forEach(i=>{this[i]=e[i]})}}const Nq=t=>{const e=new Fq;return e.calculate(t),e},Gi={base:{getThemeVariables:Aq},dark:{getThemeVariables:Lq},default:{getThemeVariables:Bq},forest:{getThemeVariables:Rq},neutral:{getThemeVariables:Nq}},Ii={flowchart:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},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,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"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!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,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,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},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,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:""},theme:"default",maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,fontSize:16},HM={...Ii,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:Gi.default.getThemeVariables(),sequence:{...Ii.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...Ii.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ii.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...Ii.pie,useWidth:984},xyChart:{...Ii.xyChart,useWidth:void 0},requirement:{...Ii.requirement,useWidth:void 0},gitGraph:{...Ii.gitGraph,useMaxWidth:!1},sankey:{...Ii.sankey,useMaxWidth:!1}},WM=(t,e="")=>Object.keys(t).reduce((n,i)=>Array.isArray(t[i])?n:typeof t[i]=="object"&&t[i]!==null?[...n,e+i,...WM(t[i],"")]:[...n,e+i],[]),Pq=new Set(WM(HM,"")),Iq=HM,Df=t=>{if(re.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Df(e));return}for(const e of Object.keys(t)){if(re.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Pq.has(e)||t[e]==null){re.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){re.debug("sanitizing object",e),Df(t[e]);continue}const n=["themeCSS","fontFamily","altFontFamily"];for(const i of n)e.includes(i)&&(re.debug("sanitizing css option",e),t[e]=$q(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const n=t.themeVariables[e];n!=null&&n.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}re.debug("After sanitization",t)}},$q=t=>{let e=0,n=0;for(const i of t){if(e{for(const{id:e,detector:n,loader:i}of t)KM(e,n,i)},KM=(t,e,n)=>{tl[t]?re.error(`Detector with key ${t} already exists`):tl[t]={detector:e,loader:n},re.debug(`Detector with key ${t} added${n?" with loader":""}`)},jq=t=>tl[t].loader,B0=(t,e,{depth:n=2,clobber:i=!1}={})=>{const r={depth:n,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(o=>B0(t,o,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(o=>{t.includes(o)||t.push(o)}),t):t===void 0||n<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&(t[o]===void 0||typeof t[o]=="object")?(t[o]===void 0&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=B0(t[o],e[o],{depth:n-1,clobber:i})):(i||typeof t[o]!="object"&&typeof e[o]!="object")&&(t[o]=e[o])}),t)},St=B0,Hq="​",Wq={curveBasis:Fj,curveBasisClosed:Nj,curveBasisOpen:Pj,curveBumpX:Dj,curveBumpY:Rj,curveBundle:Ij,curveCardinalClosed:zj,curveCardinalOpen:jj,curveCardinal:$j,curveCatmullRomClosed:Wj,curveCatmullRomOpen:Vj,curveCatmullRom:Hj,curveLinear:Bj,curveLinearClosed:qj,curveMonotoneX:Uj,curveMonotoneY:Kj,curveNatural:Yj,curveStep:Gj,curveStepAfter:Qj,curveStepBefore:Xj},Vq=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,qq=function(t,e){const n=YM(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(n)){const s=n.map(l=>l.args);Df(s),i=St(i,[...s])}else i=n.args;if(!i)return;let r=Id(t,e);const o="config";return i[o]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),i[r]=i[o],delete i[o]),i},YM=function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${Vq.source})(?=[}][%]{2}).* -`,"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),re.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i;const r=[];for(;(i=wa.exec(t))!==null;)if(i.index===wa.lastIndex&&wa.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){const o=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;r.push({type:o,args:s})}return r.length===0?{type:t,args:null}:r.length===1?r[0]:r}catch(n){return re.error(`ERROR: ${n.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},Uq=function(t){return t.replace(wa,"")},Kq=function(t,e){for(const[n,i]of e.entries())if(i.match(t))return n;return-1};function Yq(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Wq[n]??e}function Gq(t,e){const n=t.trim();if(n)return e.securityLevel!=="loose"?_2.sanitizeUrl(n):n}const Xq=(t,...e)=>{const n=t.split("."),i=n.length-1,r=n[i];let o=window;for(let s=0;s{n+=GM(r,e),e=r});const i=n/2;return jv(t,i)}function Jq(t){return t.length===1?t[0]:Qq(t)}const Pb=(t,e=2)=>{const n=Math.pow(10,e);return Math.round(t*n)/n},jv=(t,e)=>{let n,i=e;for(const r of t){if(n){const o=GM(r,n);if(o=1)return{x:r.x,y:r.y};if(s>0&&s<1)return{x:Pb((1-s)*n.x+s*r.x,5),y:Pb((1-s)*n.y+s*r.y,5)}}}n=r}throw new Error("Could not find a suitable point for the given distance")},Zq=(t,e,n)=>{re.info(`our points ${JSON.stringify(e)}`),e[0]!==n&&(e=e.reverse());const r=jv(e,25),o=t?10:5,s=Math.atan2(e[0].y-r.y,e[0].x-r.x),l={x:0,y:0};return l.x=Math.sin(s)*o+(e[0].x+r.x)/2,l.y=-Math.cos(s)*o+(e[0].y+r.y)/2,l};function eU(t,e,n){const i=structuredClone(n);re.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();const r=25+t,o=jv(i,r),s=10+t*.5,l=Math.atan2(i[0].y-o.y,i[0].x-o.x),a={x:0,y:0};return e==="start_left"?(a.x=Math.sin(l+Math.PI)*s+(i[0].x+o.x)/2,a.y=-Math.cos(l+Math.PI)*s+(i[0].y+o.y)/2):e==="end_right"?(a.x=Math.sin(l-Math.PI)*s+(i[0].x+o.x)/2-5,a.y=-Math.cos(l-Math.PI)*s+(i[0].y+o.y)/2-5):e==="end_left"?(a.x=Math.sin(l)*s+(i[0].x+o.x)/2-5,a.y=-Math.cos(l)*s+(i[0].y+o.y)/2-5):(a.x=Math.sin(l)*s+(i[0].x+o.x)/2,a.y=-Math.cos(l)*s+(i[0].y+o.y)/2),a}function tU(t){let e="",n="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?n=n+i+";":e=e+i+";");return{style:e,labelStyle:n}}let Ib=0;const nU=()=>(Ib++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ib);function iU(t){let e="";const n="0123456789abcdef",i=n.length;for(let r=0;riU(t.length),oU=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:""}},sU=function(t,e){const n=e.text.replace(zv.lineBreakRegex," "),[,i]=Wv(e.fontSize),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",i),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),e.class!==void 0&&r.attr("class",e.class);const o=r.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(n),r},lU=Rc((t,e,n)=>{if(!t||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},n),zv.lineBreakRegex.test(t)))return t;const i=t.split(" "),r=[];let o="";return i.forEach((s,l)=>{const a=Rf(`${s} `,n),c=Rf(o,n);if(a>e){const{hyphenatedStrings:f,remainingWord:d}=aU(s,e,"-",n);r.push(o,...f),o=d}else c+a>=e?(r.push(o),o=s):o=[o,s].filter(Boolean).join(" ");l+1===i.length&&r.push(o)}),r.filter(s=>s!=="").join(n.joinWith)},(t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),aU=Rc((t,e,n="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const r=[...t],o=[];let s="";return r.forEach((l,a)=>{const c=`${s}${l}`;if(Rf(c,i)>=e){const h=a+1,f=r.length===h,d=`${c}${n}`;o.push(f?c:d),s=""}else s=c}),{hyphenatedStrings:o,remainingWord:s}},(t,e,n="-",i)=>`${t}${e}${n}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function cU(t,e){return Hv(t,e).height}function Rf(t,e){return Hv(t,e).width}const Hv=Rc((t,e)=>{const{fontSize:n=12,fontFamily:i="Arial",fontWeight:r=400}=e;if(!t)return{width:0,height:0};const[,o]=Wv(n),s=["sans-serif",i],l=t.split(zv.lineBreakRegex),a=[],c=bn("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const u=c.append("svg");for(const f of s){let d=0;const p={width:0,height:0,lineHeight:0};for(const y of l){const v=oU();v.text=y||Hq;const g=sU(u,v).style("font-size",o).style("font-weight",r).style("font-family",f),m=(g._groups||g)[0][0].getBBox();if(m.width===0&&m.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,m.width)),d=Math.round(m.height),p.height+=d,p.lineHeight=Math.round(Math.max(p.lineHeight,d))}a.push(p)}u.remove();const h=isNaN(a[1].height)||isNaN(a[1].width)||isNaN(a[1].lineHeight)||a[0].height>a[1].height&&a[0].width>a[1].width&&a[0].lineHeight>a[1].lineHeight?0:1;return a[h]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`);class uU{constructor(e=!1,n){this.count=0,this.count=n?n.length:0,this.next=e?()=>this.count++:()=>Date.now()}}let Fu;const hU=function(t){return Fu=Fu||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Fu.innerHTML=t,unescape(Fu.textContent)};function XM(t){return"str"in t}const fU=(t,e,n,i)=>{var r;if(!i)return;const o=(r=t.node())==null?void 0:r.getBBox();o&&t.append("text").text(i).attr("x",o.x+o.width/2).attr("y",-n).attr("class",e)},Wv=t=>{if(typeof t=="number")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]};function QM(t,e){return DV({},t,e)}const ba={assignWithDepth:St,wrapLabel:lU,calculateTextHeight:cU,calculateTextWidth:Rf,calculateTextDimensions:Hv,cleanAndMerge:QM,detectInit:qq,detectDirective:YM,isSubstringInArray:Kq,interpolateToCurve:Yq,calcLabelPosition:Jq,calcCardinalityPosition:Zq,calcTerminalLabelPosition:eU,formatUrl:Gq,getStylesFromArray:tU,generateId:nU,random:rU,runFunc:Xq,entityDecode:hU,insertTitle:fU,parseFontSize:Wv,InitIDGenerator:uU},$b="10.6.0",nl=Object.freeze(Iq);let Kt=St({},nl),JM,il=[],ka=St({},nl);const $d=(t,e)=>{let n=St({},t),i={};for(const r of e)tL(r),i=St(i,r);if(n=St(n,i),i.theme&&i.theme in Gi){const r=St({},JM),o=St(r.themeVariables||{},i.themeVariables);n.theme&&n.theme in Gi&&(n.themeVariables=Gi[n.theme].getThemeVariables(o))}return ka=n,nL(ka),ka},dU=t=>(Kt=St({},nl),Kt=St(Kt,t),t.theme&&Gi[t.theme]&&(Kt.themeVariables=Gi[t.theme].getThemeVariables(t.themeVariables)),$d(Kt,il),Kt),pU=t=>{JM=St({},t)},mU=t=>(Kt=St(Kt,t),$d(Kt,il),Kt),ZM=()=>St({},Kt),eL=t=>(nL(t),St(ka,t),_i()),_i=()=>St({},ka),tL=t=>{t&&(["secure",...Kt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(re.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=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&tL(t[e])}))},gU=t=>{Df(t),t.fontFamily&&(!t.themeVariables||!t.themeVariables.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),il.push(t),$d(Kt,il)},Ff=(t=Kt)=>{il=[],$d(t,il)},yU={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},zb={},vU=t=>{zb[t]||(re.warn(yU[t]),zb[t]=!0)},nL=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&vU("LAZY_LOAD_DEPRECATED")},iL="c4",xU=t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),CU=async()=>{const{diagram:t}=await Ue(()=>import("./c4Diagram-d0fbc5ce-88c6de03.js"),["assets/c4Diagram-d0fbc5ce-88c6de03.js","assets/svgDrawCommon-4835440b-3fa5d101.js"]);return{id:iL,diagram:t}},wU={id:iL,detector:xU,loader:CU},bU=wU,rL="flowchart",kU=(t,e)=>{var n,i;return((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},SU=async()=>{const{diagram:t}=await Ue(()=>import("./flowDiagram-7ea5b25a-2ec2ff72.js"),["assets/flowDiagram-7ea5b25a-2ec2ff72.js","assets/flowDb-1972c806-1899fd0a.js","assets/layout-fa84e821.js","assets/styles-080da4f6-2a42e0c3.js","assets/index-2c4b9a3b-7c73707d.js","assets/edges-f2ad444c-795ea1c8.js","assets/createText-62fc7601-6b649b67.js","assets/line-63c0ea4d.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:rL,diagram:t}},_U={id:rL,detector:kU,loader:SU},TU=_U,oL="flowchart-v2",EU=(t,e)=>{var n,i,r;return((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-d3"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)},AU=async()=>{const{diagram:t}=await Ue(()=>import("./flowDiagram-v2-855bc5b3-908b141e.js"),["assets/flowDiagram-v2-855bc5b3-908b141e.js","assets/flowDb-1972c806-1899fd0a.js","assets/styles-080da4f6-2a42e0c3.js","assets/layout-fa84e821.js","assets/index-2c4b9a3b-7c73707d.js","assets/edges-f2ad444c-795ea1c8.js","assets/createText-62fc7601-6b649b67.js","assets/line-63c0ea4d.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:oL,diagram:t}},MU={id:oL,detector:EU,loader:AU},LU=MU,sL="er",OU=t=>/^\s*erDiagram/.test(t),BU=async()=>{const{diagram:t}=await Ue(()=>import("./erDiagram-9d236eb7-e170ceb2.js"),["assets/erDiagram-9d236eb7-e170ceb2.js","assets/layout-fa84e821.js","assets/line-63c0ea4d.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:sL,diagram:t}},DU={id:sL,detector:OU,loader:BU},RU=DU,lL="gitGraph",FU=t=>/^\s*gitGraph/.test(t),NU=async()=>{const{diagram:t}=await Ue(()=>import("./gitGraphDiagram-99d0ae7c-54d7e10a.js"),[]);return{id:lL,diagram:t}},PU={id:lL,detector:FU,loader:NU},IU=PU,aL="gantt",$U=t=>/^\s*gantt/.test(t),zU=async()=>{const{diagram:t}=await Ue(()=>import("./ganttDiagram-9b5ea136-8ba8104e.js"),["assets/ganttDiagram-9b5ea136-8ba8104e.js","assets/linear-ccca5fef.js","assets/init-77b53fdd.js"]);return{id:aL,diagram:t}},jU={id:aL,detector:$U,loader:zU},HU=jU,cL="info",WU=t=>/^\s*info/.test(t),VU=async()=>{const{diagram:t}=await Ue(()=>import("./infoDiagram-736b4530-81b7efec.js"),[]);return{id:cL,diagram:t}},qU={id:cL,detector:WU,loader:VU},uL="pie",UU=t=>/^\s*pie/.test(t),KU=async()=>{const{diagram:t}=await Ue(()=>import("./pieDiagram-dbbf0591-d4cca141.js"),["assets/pieDiagram-dbbf0591-d4cca141.js","assets/arc-f4b03a28.js","assets/path-53f90ab3.js","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js","assets/array-9f3ba611.js"]);return{id:uL,diagram:t}},YU={id:uL,detector:UU,loader:KU},hL="quadrantChart",GU=t=>/^\s*quadrantChart/.test(t),XU=async()=>{const{diagram:t}=await Ue(()=>import("./quadrantDiagram-4d7f4fd6-b5f47b25.js"),["assets/quadrantDiagram-4d7f4fd6-b5f47b25.js","assets/linear-ccca5fef.js","assets/init-77b53fdd.js"]);return{id:hL,diagram:t}},QU={id:hL,detector:GU,loader:XU},JU=QU,fL="xychart",ZU=t=>/^\s*xychart-beta/.test(t),eK=async()=>{const{diagram:t}=await Ue(()=>import("./xychartDiagram-2b33534f-9913587a.js"),["assets/xychartDiagram-2b33534f-9913587a.js","assets/createText-62fc7601-6b649b67.js","assets/init-77b53fdd.js","assets/ordinal-ba9b4969.js","assets/linear-ccca5fef.js","assets/line-63c0ea4d.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:fL,diagram:t}},tK={id:fL,detector:ZU,loader:eK},nK=tK,dL="requirement",iK=t=>/^\s*requirement(Diagram)?/.test(t),rK=async()=>{const{diagram:t}=await Ue(()=>import("./requirementDiagram-6fc4c22a-65ae7e79.js"),["assets/requirementDiagram-6fc4c22a-65ae7e79.js","assets/layout-fa84e821.js","assets/line-63c0ea4d.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:dL,diagram:t}},oK={id:dL,detector:iK,loader:rK},sK=oK,pL="sequence",lK=t=>/^\s*sequenceDiagram/.test(t),aK=async()=>{const{diagram:t}=await Ue(()=>import("./sequenceDiagram-b655622a-838eb6c2.js"),["assets/sequenceDiagram-b655622a-838eb6c2.js","assets/svgDrawCommon-4835440b-3fa5d101.js"]);return{id:pL,diagram:t}},cK={id:pL,detector:lK,loader:aK},uK=cK,mL="class",hK=(t,e)=>{var n;return((n=e==null?void 0:e.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},fK=async()=>{const{diagram:t}=await Ue(()=>import("./classDiagram-936ed81e-f8506dd6.js"),["assets/classDiagram-936ed81e-f8506dd6.js","assets/styles-3dcbcfbf-02afae50.js","assets/layout-fa84e821.js","assets/line-63c0ea4d.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:mL,diagram:t}},dK={id:mL,detector:hK,loader:fK},pK=dK,gL="classDiagram",mK=(t,e)=>{var n;return/^\s*classDiagram/.test(t)&&((n=e==null?void 0:e.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},gK=async()=>{const{diagram:t}=await Ue(()=>import("./classDiagram-v2-c3cb15f1-bb733d7d.js"),["assets/classDiagram-v2-c3cb15f1-bb733d7d.js","assets/styles-3dcbcfbf-02afae50.js","assets/layout-fa84e821.js","assets/index-2c4b9a3b-7c73707d.js","assets/edges-f2ad444c-795ea1c8.js","assets/createText-62fc7601-6b649b67.js","assets/line-63c0ea4d.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:gL,diagram:t}},yK={id:gL,detector:mK,loader:gK},vK=yK,yL="state",xK=(t,e)=>{var n;return((n=e==null?void 0:e.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},CK=async()=>{const{diagram:t}=await Ue(()=>import("./stateDiagram-59f0c015-3ba775a8.js"),["assets/stateDiagram-59f0c015-3ba775a8.js","assets/styles-9c745c82-7bbab345.js","assets/layout-fa84e821.js","assets/line-63c0ea4d.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:yL,diagram:t}},wK={id:yL,detector:xK,loader:CK},bK=wK,vL="stateDiagram",kK=(t,e)=>{var n;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((n=e==null?void 0:e.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper")},SK=async()=>{const{diagram:t}=await Ue(()=>import("./stateDiagram-v2-2b26beab-78fc96ed.js"),["assets/stateDiagram-v2-2b26beab-78fc96ed.js","assets/styles-9c745c82-7bbab345.js","assets/layout-fa84e821.js","assets/index-2c4b9a3b-7c73707d.js","assets/edges-f2ad444c-795ea1c8.js","assets/createText-62fc7601-6b649b67.js","assets/line-63c0ea4d.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:vL,diagram:t}},_K={id:vL,detector:kK,loader:SK},TK=_K,xL="journey",EK=t=>/^\s*journey/.test(t),AK=async()=>{const{diagram:t}=await Ue(()=>import("./journeyDiagram-df861f2b-ba484b2a.js"),["assets/journeyDiagram-df861f2b-ba484b2a.js","assets/svgDrawCommon-4835440b-3fa5d101.js","assets/arc-f4b03a28.js","assets/path-53f90ab3.js"]);return{id:xL,diagram:t}},MK={id:xL,detector:EK,loader:AK},LK=MK,OK=function(t,e){for(let n of e)t.attr(n[0],n[1])},BK=function(t,e,n){let i=new Map;return n?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},CL=function(t,e,n,i){const r=BK(e,n,i);OK(t,r)},DK=function(t,e,n,i){const r=e.node().getBBox(),o=r.width,s=r.height;re.info(`SVG bounds: ${o}x${s}`,r);let l=0,a=0;re.info(`Graph bounds: ${l}x${a}`,t),l=o+n*2,a=s+n*2,re.info(`Calculated bounds: ${l}x${a}`),CL(e,a,l,i);const c=`${r.x-n} ${r.y-n} ${r.width+2*n} ${r.height+2*n}`;e.attr("viewBox",c)},Ch={},RK=(t,e,n)=>{let i="";return t in Ch&&Ch[t]?i=Ch[t](n):re.warn(`No theme found for ${t}`),` & { +`)),s+=h+i[a+1]}),s}const a8="modulepreload",c8=function(t){return"/monocle/"+t},Iw={},Ue=function(e,n,i){if(!n||n.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=c8(o),o in Iw)return;Iw[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!i)for(let u=r.length-1;u>=0;u--){const h=r[u];if(h.href===o&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":a8,s||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),s)return new Promise((u,h)=>{c.addEventListener("load",u),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};var v2={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Cr,function(){var n=1e3,i=6e4,r=36e5,o="millisecond",s="second",l="minute",a="hour",c="day",u="week",h="month",f="quarter",d="year",p="date",y="Invalid Date",v=/^(\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,m={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(z){var F=["th","st","nd","rd"],B=z%100;return"["+z+(F[(B-20)%10]||F[B]||F[0])+"]"}},x=function(z,F,B){var $=String(z);return!$||$.length>=F?z:""+Array(F+1-$.length).join(B)+z},C={s:x,z:function(z){var F=-z.utcOffset(),B=Math.abs(F),$=Math.floor(B/60),_=B%60;return(F<=0?"+":"-")+x($,2,"0")+":"+x(_,2,"0")},m:function z(F,B){if(F.date()1)return z(R[0])}else{var H=F.name;b[H]=F,_=H}return!$&&_&&(w=_),_||!$&&w},O=function(z,F){if(M(z))return z.clone();var B=typeof F=="object"?F:{};return B.date=z,B.args=arguments,new V(B)},D=C;D.l=N,D.i=M,D.w=function(z,F){return O(z,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var V=function(){function z(B){this.$L=N(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[S]=!0}var F=z.prototype;return F.parse=function(B){this.$d=function($){var _=$.date,L=$.utc;if(_===null)return new Date(NaN);if(D.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var R=_.match(v);if(R){var H=R[2]-1||0,J=(R[7]||"0").substring(0,3);return L?new Date(Date.UTC(R[1],H,R[3]||1,R[4]||0,R[5]||0,R[6]||0,J)):new Date(R[1],H,R[3]||1,R[4]||0,R[5]||0,R[6]||0,J)}}return new Date(_)}(B),this.init()},F.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},F.$utils=function(){return D},F.isValid=function(){return this.$d.toString()!==y},F.isSame=function(B,$){var _=O(B);return this.startOf($)<=_&&_<=this.endOf($)},F.isAfter=function(B,$){return O(B)-1}function a(u){var h=u.replace(r,"");return h.replace(n,function(f,d){return String.fromCharCode(d)})}function c(u){if(!u)return t.BLANK_URL;var h=a(u).replace(i,"").replace(r,"").trim();if(!h)return t.BLANK_URL;if(l(h))return h;var f=h.match(o);if(!f)return h;var d=f[0];return e.test(d)?t.BLANK_URL:h}t.sanitizeUrl=c})(x2);var f8={value:()=>{}};function C2(){for(var t=0,e=arguments.length,n={},i;t=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}uh.prototype=C2.prototype={constructor:uh,on:function(t,e){var n=this._,i=d8(t+"",n),r,o=-1,s=i.length;if(arguments.length<2){for(;++o0)for(var n=new Array(r),i=0,r,o;i=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),zw.hasOwnProperty(e)?{space:zw[e],local:t}:t}function m8(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===d0&&e.documentElement.namespaceURI===d0?e.createElement(t):e.createElementNS(n,t)}}function g8(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function w2(t){var e=bd(t);return(e.local?g8:m8)(e)}function y8(){}function wv(t){return t==null?y8:function(){return this.querySelector(t)}}function v8(t){typeof t!="function"&&(t=wv(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r=x&&(x=m+1);!(w=v[x])&&++x=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function W8(t){t||(t=V8);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,i=n.length,r=new Array(i),o=0;oe?1:t>=e?0:NaN}function q8(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function U8(){return Array.from(this)}function K8(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?rz:typeof e=="function"?sz:oz)(t,e,n??"")):Js(this.node(),t)}function Js(t,e){return t.style.getPropertyValue(e)||T2(t).getComputedStyle(t,null).getPropertyValue(e)}function az(t){return function(){delete this[t]}}function cz(t,e){return function(){this[t]=e}}function uz(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function hz(t,e){return arguments.length>1?this.each((e==null?az:typeof e=="function"?uz:cz)(t,e)):this.node()[t]}function E2(t){return t.trim().split(/^|\s+/)}function bv(t){return t.classList||new A2(t)}function A2(t){this._node=t,this._names=E2(t.getAttribute("class")||"")}A2.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function M2(t,e){for(var n=bv(t),i=-1,r=e.length;++i=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function $z(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Tu(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Tu(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Yz.exec(t))?new Xt(e[1],e[2],e[3],1):(e=Gz.exec(t))?new Xt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Xz.exec(t))?Tu(e[1],e[2],e[3],e[4]):(e=Qz.exec(t))?Tu(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Jz.exec(t))?Kw(e[1],e[2]/100,e[3]/100,1):(e=Zz.exec(t))?Kw(e[1],e[2]/100,e[3]/100,e[4]):jw.hasOwnProperty(t)?Vw(jw[t]):t==="transparent"?new Xt(NaN,NaN,NaN,0):null}function Vw(t){return new Xt(t>>16&255,t>>8&255,t&255,1)}function Tu(t,e,n,i){return i<=0&&(t=e=n=NaN),new Xt(t,e,n,i)}function n9(t){return t instanceof Bc||(t=ac(t)),t?(t=t.rgb(),new Xt(t.r,t.g,t.b,t.opacity)):new Xt}function p0(t,e,n,i){return arguments.length===1?n9(t):new Xt(t,e,n,i??1)}function Xt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}kv(Xt,p0,D2(Bc,{brighter(t){return t=t==null?Cf:Math.pow(Cf,t),new Xt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?sc:Math.pow(sc,t),new Xt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Xt(To(this.r),To(this.g),To(this.b),wf(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:qw,formatHex:qw,formatHex8:i9,formatRgb:Uw,toString:Uw}));function qw(){return`#${wo(this.r)}${wo(this.g)}${wo(this.b)}`}function i9(){return`#${wo(this.r)}${wo(this.g)}${wo(this.b)}${wo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Uw(){const t=wf(this.opacity);return`${t===1?"rgb(":"rgba("}${To(this.r)}, ${To(this.g)}, ${To(this.b)}${t===1?")":`, ${t})`}`}function wf(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function To(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function wo(t){return t=To(t),(t<16?"0":"")+t.toString(16)}function Kw(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new qn(t,e,n,i)}function R2(t){if(t instanceof qn)return new qn(t.h,t.s,t.l,t.opacity);if(t instanceof Bc||(t=ac(t)),!t)return new qn;if(t instanceof qn)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,l=o-r,a=(o+r)/2;return l?(e===o?s=(n-i)/l+(n0&&a<1?0:s,new qn(s,l,a,t.opacity)}function r9(t,e,n,i){return arguments.length===1?R2(t):new qn(t,e,n,i??1)}function qn(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}kv(qn,r9,D2(Bc,{brighter(t){return t=t==null?Cf:Math.pow(Cf,t),new qn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?sc:Math.pow(sc,t),new qn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Xt(Xp(t>=240?t-240:t+120,r,i),Xp(t,r,i),Xp(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new qn(Yw(this.h),Eu(this.s),Eu(this.l),wf(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=wf(this.opacity);return`${t===1?"hsl(":"hsla("}${Yw(this.h)}, ${Eu(this.s)*100}%, ${Eu(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Yw(t){return t=(t||0)%360,t<0?t+360:t}function Eu(t){return Math.max(0,Math.min(1,t||0))}function Xp(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Sv=t=>()=>t;function F2(t,e){return function(n){return t+n*e}}function o9(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function nJ(t,e){var n=e-t;return n?F2(t,n>180||n<-180?n-360*Math.round(n/360):n):Sv(isNaN(t)?e:t)}function s9(t){return(t=+t)==1?N2:function(e,n){return n-e?o9(e,n,t):Sv(isNaN(e)?n:e)}}function N2(t,e){var n=e-t;return n?F2(t,n):Sv(isNaN(t)?e:t)}const Gw=function t(e){var n=s9(e);function i(r,o){var s=n((r=p0(r)).r,(o=p0(o)).r),l=n(r.g,o.g),a=n(r.b,o.b),c=N2(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=l(u),r.b=a(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function xr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var m0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qp=new RegExp(m0.source,"g");function l9(t){return function(){return t}}function a9(t){return function(e){return t(e)+""}}function c9(t,e){var n=m0.lastIndex=Qp.lastIndex=0,i,r,o,s=-1,l=[],a=[];for(t=t+"",e=e+"";(i=m0.exec(t))&&(r=Qp.exec(e));)(o=r.index)>n&&(o=e.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(i=i[0])===(r=r[0])?l[s]?l[s]+=r:l[++s]=r:(l[++s]=null,a.push({i:s,x:xr(i,r)})),n=Qp.lastIndex;return n180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(r(h)+"rotate(",null,i)-2,x:xr(c,u)})):u&&h.push(r(h)+"rotate("+u+i)}function l(c,u,h,f){c!==u?f.push({i:h.push(r(h)+"skewX(",null,i)-2,x:xr(c,u)}):u&&h.push(r(h)+"skewX("+u+i)}function a(c,u,h,f,d,p){if(c!==h||u!==f){var y=d.push(r(d)+"scale(",null,",",null,")");p.push({i:y-4,x:xr(c,h)},{i:y-2,x:xr(u,f)})}else(h!==1||f!==1)&&d.push(r(d)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=t(c),u=t(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),s(c.rotate,u.rotate,h,f),l(c.skewX,u.skewX,h,f),a(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(d){for(var p=-1,y=f.length,v;++p=0&&t._call.call(void 0,e),t=t._next;--Zs}function Qw(){$o=(kf=cc.now())+kd,Zs=Jl=0;try{m9()}finally{Zs=0,y9(),$o=0}}function g9(){var t=cc.now(),e=t-kf;e>$2&&(kd-=e,kf=t)}function y9(){for(var t,e=bf,n,i=1/0;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:bf=n);Zl=t,y0(i)}function y0(t){if(!Zs){Jl&&(Jl=clearTimeout(Jl));var e=t-$o;e>24?(t<1/0&&(Jl=setTimeout(Qw,t-cc.now()-kd)),Nl&&(Nl=clearInterval(Nl))):(Nl||(kf=cc.now(),Nl=setInterval(g9,$2)),Zs=1,z2(Qw))}}function Jw(t,e,n){var i=new Sf;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var v9=C2("start","end","cancel","interrupt"),x9=[],H2=0,Zw=1,v0=2,hh=3,eb=4,x0=5,fh=6;function Sd(t,e,n,i,r,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;C9(t,n,{name:e,index:i,group:r,on:v9,tween:x9,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:H2})}function Tv(t,e){var n=ei(t,e);if(n.state>H2)throw new Error("too late; already scheduled");return n}function Mi(t,e){var n=ei(t,e);if(n.state>hh)throw new Error("too late; already running");return n}function ei(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function C9(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=j2(o,0,n.time);function o(c){n.state=Zw,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var u,h,f,d;if(n.state!==Zw)return a();for(u in i)if(d=i[u],d.name===n.name){if(d.state===hh)return Jw(s);d.state===eb?(d.state=fh,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[u]):+uv0&&i.state=0&&(e=e.slice(0,n)),!e||e==="start"})}function Q9(t,e,n){var i,r,o=X9(e)?Tv:Mi;return function(){var s=o(this,t),l=s.on;l!==i&&(r=(i=l).copy()).on(e,n),s.on=r}}function J9(t,e){var n=this._id;return arguments.length<2?ei(this.node(),n).on.on(t):this.each(Q9(n,t,e))}function Z9(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function ej(){return this.on("end.remove",Z9(this._id))}function tj(t){var e=this._name,n=this._id;typeof t!="function"&&(t=wv(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s1?0:t<-1?Av:Math.acos(t)}function fJ(t){return t>=1?nb:t<=-1?-nb:Math.asin(t)}function U2(t){this._context=t}U2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function Tj(t){return new U2(t)}class K2{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}function Ej(t){return new K2(t,!0)}function Aj(t){return new K2(t,!1)}function Xr(){}function _f(t,e,n){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+n)/6)}function _d(t){this._context=t}_d.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:_f(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Mj(t){return new _d(t)}function Y2(t){this._context=t}Y2.prototype={areaStart:Xr,areaEnd:Xr,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);break}}},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:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Lj(t){return new Y2(t)}function G2(t){this._context=t}G2.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||this._line!==0&&this._point===3)&&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 n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Oj(t){return new G2(t)}function X2(t,e){this._basis=new _d(t),this._beta=e}X2.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i=t[0],r=e[0],o=t[n]-i,s=e[n]-r,l=-1,a;++l<=n;)a=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+a*o),this._beta*e[l]+(1-this._beta)*(r+a*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Bj=function t(e){function n(i){return e===1?new _d(i):new X2(i,e)}return n.beta=function(i){return t(+i)},n}(.85);function Tf(t,e,n){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-n),t._x2,t._y2)}function Mv(t,e){this._context=t,this._k=(1-e)/6}Mv.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:Tf(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:Tf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Dj=function t(e){function n(i){return new Mv(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Lv(t,e){this._context=t,this._k=(1-e)/6}Lv.prototype={areaStart:Xr,areaEnd:Xr,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);break}}},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:Tf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Rj=function t(e){function n(i){return new Lv(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Ov(t,e){this._context=t,this._k=(1-e)/6}Ov.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||this._line!==0&&this._point===3)&&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:Tf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Fj=function t(e){function n(i){return new Ov(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Bv(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>tb){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,r=(r*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>tb){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function Q2(t,e){this._context=t,this._alpha=e}Q2.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:Bv(this,t,e);break}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 Nj=function t(e){function n(i){return e?new Q2(i,e):new Mv(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function J2(t,e){this._context=t,this._alpha=e}J2.prototype={areaStart:Xr,areaEnd:Xr,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);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:Bv(this,t,e);break}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 Pj=function t(e){function n(i){return e?new J2(i,e):new Lv(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Z2(t,e){this._context=t,this._alpha=e}Z2.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:Bv(this,t,e);break}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 Ij=function t(e){function n(i){return e?new Z2(i,e):new Ov(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function eM(t){this._context=t}eM.prototype={areaStart:Xr,areaEnd:Xr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function $j(t){return new eM(t)}function ib(t){return t<0?-1:1}function rb(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),l=(o*r+s*i)/(i+r);return(ib(o)+ib(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(l))||0}function ob(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Jp(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,l=(o-i)/3;t._context.bezierCurveTo(i+l,r+l*e,o-l,s-l*n,o,s)}function Ef(t){this._context=t}Ef.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Jp(this,this._t0,ob(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){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,Jp(this,ob(this,n=rb(this,t,e)),n);break;default:Jp(this,this._t0,n=rb(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function tM(t){this._context=new nM(t)}(tM.prototype=Object.create(Ef.prototype)).point=function(t,e){Ef.prototype.point.call(this,e,t)};function nM(t){this._context=t}nM.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}};function zj(t){return new Ef(t)}function jj(t){return new tM(t)}function iM(t){this._context=t}iM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=sb(t),r=sb(e),o=0,s=1;s=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[n-1]=(t[n]+r[n-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 n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function Wj(t){return new Td(t,.5)}function Vj(t){return new Td(t,0)}function qj(t){return new Td(t,1)}function ea(t,e,n){this.k=t,this.x=e,this.y=n}ea.prototype={constructor:ea,scale:function(t){return t===1?this:new ea(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ea(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+")"}};ea.prototype;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:rM,setPrototypeOf:lb,isFrozen:Uj,getPrototypeOf:Kj,getOwnPropertyDescriptor:oM}=Object;let{freeze:$t,seal:Jn,create:sM}=Object,{apply:C0,construct:w0}=typeof Reflect<"u"&&Reflect;$t||($t=function(e){return e});Jn||(Jn=function(e){return e});C0||(C0=function(e,n,i){return e.apply(n,i)});w0||(w0=function(e,n){return new e(...n)});const Mu=Pn(Array.prototype.forEach),ab=Pn(Array.prototype.pop),Pl=Pn(Array.prototype.push),dh=Pn(String.prototype.toLowerCase),Zp=Pn(String.prototype.toString),Yj=Pn(String.prototype.match),Il=Pn(String.prototype.replace),Gj=Pn(String.prototype.indexOf),Xj=Pn(String.prototype.trim),ln=Pn(RegExp.prototype.test),$l=Qj(TypeError);function Pn(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:dh;lb&&lb(t,null);let i=e.length;for(;i--;){let r=e[i];if(typeof r=="string"){const o=n(r);o!==r&&(Uj(e)||(e[i]=o),r=o)}t[r]=!0}return t}function ns(t){const e=sM(null);for(const[n,i]of rM(t))oM(t,n)!==void 0&&(e[n]=i);return e}function Lu(t,e){for(;t!==null;){const i=oM(t,e);if(i){if(i.get)return Pn(i.get);if(typeof i.value=="function")return Pn(i.value)}t=Kj(t)}function n(i){return console.warn("fallback value for",i),null}return n}const cb=$t(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),em=$t(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tm=$t(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Jj=$t(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),nm=$t(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Zj=$t(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ub=$t(["#text"]),hb=$t(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),im=$t(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fb=$t(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ou=$t(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),eH=Jn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tH=Jn(/<%[\w\W]*|[\w\W]*%>/gm),nH=Jn(/\${[\w\W]*}/gm),iH=Jn(/^data-[\-\w.\u00B7-\uFFFF]/),rH=Jn(/^aria-[\-\w]+$/),lM=Jn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),oH=Jn(/^(?:\w+script|data):/i),sH=Jn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),aM=Jn(/^html$/i);var db=Object.freeze({__proto__:null,MUSTACHE_EXPR:eH,ERB_EXPR:tH,TMPLIT_EXPR:nH,DATA_ATTR:iH,ARIA_ATTR:rH,IS_ALLOWED_URI:lM,IS_SCRIPT_OR_DATA:oH,ATTR_WHITESPACE:sH,DOCTYPE_NAME:aM});const lH=function(){return typeof window>"u"?null:window},aH=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(i=n.getAttribute(r));const o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function cM(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lH();const e=te=>cM(te);if(e.version="3.0.6",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const i=n,r=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:a,NodeFilter:c,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:d}=t,p=a.prototype,y=Lu(p,"cloneNode"),v=Lu(p,"nextSibling"),g=Lu(p,"childNodes"),m=Lu(p,"parentNode");if(typeof s=="function"){const te=n.createElement("template");te.content&&te.content.ownerDocument&&(n=te.content.ownerDocument)}let x,C="";const{implementation:w,createNodeIterator:b,createDocumentFragment:S,getElementsByTagName:M}=n,{importNode:N}=i;let O={};e.isSupported=typeof rM=="function"&&typeof m=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:D,ERB_EXPR:V,TMPLIT_EXPR:K,DATA_ATTR:z,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:$}=db;let{IS_ALLOWED_URI:_}=db,L=null;const R=ue({},[...cb,...em,...tm,...nm,...ub]);let H=null;const J=ue({},[...hb,...im,...fb,...Ou]);let X=Object.seal(sM(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}})),ae=null,ce=null,Ce=!0,Fe=!0,nt=!1,it=!0,ke=!1,je=!1,Ht=!1,Ot=!1,on=!1,be=!1,ti=!1,Oi=!0,Pc=!1;const Hd="user-content-";let zn=!0,ni=!1,Bi={},Di=null;const Yo=ue({},["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 gl=null;const yl=ue({},["audio","video","img","source","image","track"]);let Go=null;const vl=ue({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ic="http://www.w3.org/1998/Math/MathML",$c="http://www.w3.org/2000/svg",Ri="http://www.w3.org/1999/xhtml";let Xo=Ri,Wd=!1,Vd=null;const CO=ue({},[Ic,$c,Ri],Zp);let oo=null;const wO=["application/xhtml+xml","text/html"],bO="text/html";let rt=null,Qo=null;const kO=n.createElement("form"),n1=function(T){return T instanceof RegExp||T instanceof Function},qd=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Qo&&Qo===T)){if((!T||typeof T!="object")&&(T={}),T=ns(T),oo=wO.indexOf(T.PARSER_MEDIA_TYPE)===-1?oo=bO:oo=T.PARSER_MEDIA_TYPE,rt=oo==="application/xhtml+xml"?Zp:dh,L="ALLOWED_TAGS"in T?ue({},T.ALLOWED_TAGS,rt):R,H="ALLOWED_ATTR"in T?ue({},T.ALLOWED_ATTR,rt):J,Vd="ALLOWED_NAMESPACES"in T?ue({},T.ALLOWED_NAMESPACES,Zp):CO,Go="ADD_URI_SAFE_ATTR"in T?ue(ns(vl),T.ADD_URI_SAFE_ATTR,rt):vl,gl="ADD_DATA_URI_TAGS"in T?ue(ns(yl),T.ADD_DATA_URI_TAGS,rt):yl,Di="FORBID_CONTENTS"in T?ue({},T.FORBID_CONTENTS,rt):Yo,ae="FORBID_TAGS"in T?ue({},T.FORBID_TAGS,rt):{},ce="FORBID_ATTR"in T?ue({},T.FORBID_ATTR,rt):{},Bi="USE_PROFILES"in T?T.USE_PROFILES:!1,Ce=T.ALLOW_ARIA_ATTR!==!1,Fe=T.ALLOW_DATA_ATTR!==!1,nt=T.ALLOW_UNKNOWN_PROTOCOLS||!1,it=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ke=T.SAFE_FOR_TEMPLATES||!1,je=T.WHOLE_DOCUMENT||!1,on=T.RETURN_DOM||!1,be=T.RETURN_DOM_FRAGMENT||!1,ti=T.RETURN_TRUSTED_TYPE||!1,Ot=T.FORCE_BODY||!1,Oi=T.SANITIZE_DOM!==!1,Pc=T.SANITIZE_NAMED_PROPS||!1,zn=T.KEEP_CONTENT!==!1,ni=T.IN_PLACE||!1,_=T.ALLOWED_URI_REGEXP||lM,Xo=T.NAMESPACE||Ri,X=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&n1(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(X.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&n1(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(X.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(X.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(Fe=!1),be&&(on=!0),Bi&&(L=ue({},[...ub]),H=[],Bi.html===!0&&(ue(L,cb),ue(H,hb)),Bi.svg===!0&&(ue(L,em),ue(H,im),ue(H,Ou)),Bi.svgFilters===!0&&(ue(L,tm),ue(H,im),ue(H,Ou)),Bi.mathMl===!0&&(ue(L,nm),ue(H,fb),ue(H,Ou))),T.ADD_TAGS&&(L===R&&(L=ns(L)),ue(L,T.ADD_TAGS,rt)),T.ADD_ATTR&&(H===J&&(H=ns(H)),ue(H,T.ADD_ATTR,rt)),T.ADD_URI_SAFE_ATTR&&ue(Go,T.ADD_URI_SAFE_ATTR,rt),T.FORBID_CONTENTS&&(Di===Yo&&(Di=ns(Di)),ue(Di,T.FORBID_CONTENTS,rt)),zn&&(L["#text"]=!0),je&&ue(L,["html","head","body"]),L.table&&(ue(L,["tbody"]),delete ae.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw $l('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $l('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=T.TRUSTED_TYPES_POLICY,C=x.createHTML("")}else x===void 0&&(x=aH(d,r)),x!==null&&typeof C=="string"&&(C=x.createHTML(""));$t&&$t(T),Qo=T}},i1=ue({},["mi","mo","mn","ms","mtext"]),r1=ue({},["foreignobject","desc","title","annotation-xml"]),SO=ue({},["title","style","font","a","script"]),zc=ue({},em);ue(zc,tm),ue(zc,Jj);const Ud=ue({},nm);ue(Ud,Zj);const _O=function(T){let W=m(T);(!W||!W.tagName)&&(W={namespaceURI:Xo,tagName:"template"});const ee=dh(T.tagName),_e=dh(W.tagName);return Vd[T.namespaceURI]?T.namespaceURI===$c?W.namespaceURI===Ri?ee==="svg":W.namespaceURI===Ic?ee==="svg"&&(_e==="annotation-xml"||i1[_e]):!!zc[ee]:T.namespaceURI===Ic?W.namespaceURI===Ri?ee==="math":W.namespaceURI===$c?ee==="math"&&r1[_e]:!!Ud[ee]:T.namespaceURI===Ri?W.namespaceURI===$c&&!r1[_e]||W.namespaceURI===Ic&&!i1[_e]?!1:!Ud[ee]&&(SO[ee]||!zc[ee]):!!(oo==="application/xhtml+xml"&&Vd[T.namespaceURI]):!1},so=function(T){Pl(e.removed,{element:T});try{T.parentNode.removeChild(T)}catch{T.remove()}},Kd=function(T,W){try{Pl(e.removed,{attribute:W.getAttributeNode(T),from:W})}catch{Pl(e.removed,{attribute:null,from:W})}if(W.removeAttribute(T),T==="is"&&!H[T])if(on||be)try{so(W)}catch{}else try{W.setAttribute(T,"")}catch{}},o1=function(T){let W=null,ee=null;if(Ot)T=""+T;else{const gt=Yj(T,/^[\r\n\t ]+/);ee=gt&>[0]}oo==="application/xhtml+xml"&&Xo===Ri&&(T=''+T+"");const _e=x?x.createHTML(T):T;if(Xo===Ri)try{W=new f().parseFromString(_e,oo)}catch{}if(!W||!W.documentElement){W=w.createDocument(Xo,"template",null);try{W.documentElement.innerHTML=Wd?C:_e}catch{}}const mt=W.body||W.documentElement;return T&&ee&&mt.insertBefore(n.createTextNode(ee),mt.childNodes[0]||null),Xo===Ri?M.call(W,je?"html":"body")[0]:je?W.documentElement:mt},s1=function(T){return b.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null)},TO=function(T){return T instanceof h&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof u)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},l1=function(T){return typeof l=="function"&&T instanceof l},Fi=function(T,W,ee){O[T]&&Mu(O[T],_e=>{_e.call(e,W,ee,Qo)})},a1=function(T){let W=null;if(Fi("beforeSanitizeElements",T,null),TO(T))return so(T),!0;const ee=rt(T.nodeName);if(Fi("uponSanitizeElement",T,{tagName:ee,allowedTags:L}),T.hasChildNodes()&&!l1(T.firstElementChild)&&ln(/<[/\w]/g,T.innerHTML)&&ln(/<[/\w]/g,T.textContent))return so(T),!0;if(!L[ee]||ae[ee]){if(!ae[ee]&&u1(ee)&&(X.tagNameCheck instanceof RegExp&&ln(X.tagNameCheck,ee)||X.tagNameCheck instanceof Function&&X.tagNameCheck(ee)))return!1;if(zn&&!Di[ee]){const _e=m(T)||T.parentNode,mt=g(T)||T.childNodes;if(mt&&_e){const gt=mt.length;for(let Wt=gt-1;Wt>=0;--Wt)_e.insertBefore(y(mt[Wt],!0),v(T))}}return so(T),!0}return T instanceof a&&!_O(T)||(ee==="noscript"||ee==="noembed"||ee==="noframes")&&ln(/<\/no(script|embed|frames)/i,T.innerHTML)?(so(T),!0):(ke&&T.nodeType===3&&(W=T.textContent,Mu([D,V,K],_e=>{W=Il(W,_e," ")}),T.textContent!==W&&(Pl(e.removed,{element:T.cloneNode()}),T.textContent=W)),Fi("afterSanitizeElements",T,null),!1)},c1=function(T,W,ee){if(Oi&&(W==="id"||W==="name")&&(ee in n||ee in kO))return!1;if(!(Fe&&!ce[W]&&ln(z,W))){if(!(Ce&&ln(F,W))){if(!H[W]||ce[W]){if(!(u1(T)&&(X.tagNameCheck instanceof RegExp&&ln(X.tagNameCheck,T)||X.tagNameCheck instanceof Function&&X.tagNameCheck(T))&&(X.attributeNameCheck instanceof RegExp&&ln(X.attributeNameCheck,W)||X.attributeNameCheck instanceof Function&&X.attributeNameCheck(W))||W==="is"&&X.allowCustomizedBuiltInElements&&(X.tagNameCheck instanceof RegExp&&ln(X.tagNameCheck,ee)||X.tagNameCheck instanceof Function&&X.tagNameCheck(ee))))return!1}else if(!Go[W]){if(!ln(_,Il(ee,$,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&T!=="script"&&Gj(ee,"data:")===0&&gl[T])){if(!(nt&&!ln(B,Il(ee,$,"")))){if(ee)return!1}}}}}}return!0},u1=function(T){return T.indexOf("-")>0},h1=function(T){Fi("beforeSanitizeAttributes",T,null);const{attributes:W}=T;if(!W)return;const ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};let _e=W.length;for(;_e--;){const mt=W[_e],{name:gt,namespaceURI:Wt,value:lo}=mt,xl=rt(gt);let Vt=gt==="value"?lo:Xj(lo);if(ee.attrName=xl,ee.attrValue=Vt,ee.keepAttr=!0,ee.forceKeepAttr=void 0,Fi("uponSanitizeAttribute",T,ee),Vt=ee.attrValue,ee.forceKeepAttr||(Kd(gt,T),!ee.keepAttr))continue;if(!it&&ln(/\/>/i,Vt)){Kd(gt,T);continue}ke&&Mu([D,V,K],d1=>{Vt=Il(Vt,d1," ")});const f1=rt(T.nodeName);if(c1(f1,xl,Vt)){if(Pc&&(xl==="id"||xl==="name")&&(Kd(gt,T),Vt=Hd+Vt),x&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Wt)switch(d.getAttributeType(f1,xl)){case"TrustedHTML":{Vt=x.createHTML(Vt);break}case"TrustedScriptURL":{Vt=x.createScriptURL(Vt);break}}try{Wt?T.setAttributeNS(Wt,gt,Vt):T.setAttribute(gt,Vt),ab(e.removed)}catch{}}}Fi("afterSanitizeAttributes",T,null)},EO=function te(T){let W=null;const ee=s1(T);for(Fi("beforeSanitizeShadowDOM",T,null);W=ee.nextNode();)Fi("uponSanitizeShadowNode",W,null),!a1(W)&&(W.content instanceof o&&te(W.content),h1(W));Fi("afterSanitizeShadowDOM",T,null)};return e.sanitize=function(te){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,ee=null,_e=null,mt=null;if(Wd=!te,Wd&&(te=""),typeof te!="string"&&!l1(te))if(typeof te.toString=="function"){if(te=te.toString(),typeof te!="string")throw $l("dirty is not a string, aborting")}else throw $l("toString is not a function");if(!e.isSupported)return te;if(Ht||qd(T),e.removed=[],typeof te=="string"&&(ni=!1),ni){if(te.nodeName){const lo=rt(te.nodeName);if(!L[lo]||ae[lo])throw $l("root node is forbidden and cannot be sanitized in-place")}}else if(te instanceof l)W=o1(""),ee=W.ownerDocument.importNode(te,!0),ee.nodeType===1&&ee.nodeName==="BODY"||ee.nodeName==="HTML"?W=ee:W.appendChild(ee);else{if(!on&&!ke&&!je&&te.indexOf("<")===-1)return x&&ti?x.createHTML(te):te;if(W=o1(te),!W)return on?null:ti?C:""}W&&Ot&&so(W.firstChild);const gt=s1(ni?te:W);for(;_e=gt.nextNode();)a1(_e)||(_e.content instanceof o&&EO(_e.content),h1(_e));if(ni)return te;if(on){if(be)for(mt=S.call(W.ownerDocument);W.firstChild;)mt.appendChild(W.firstChild);else mt=W;return(H.shadowroot||H.shadowrootmode)&&(mt=N.call(i,mt,!0)),mt}let Wt=je?W.outerHTML:W.innerHTML;return je&&L["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&ln(aM,W.ownerDocument.doctype.name)&&(Wt=" +`+Wt),ke&&Mu([D,V,K],lo=>{Wt=Il(Wt,lo," ")}),x&&ti?x.createHTML(Wt):Wt},e.setConfig=function(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qd(te),Ht=!0},e.clearConfig=function(){Qo=null,Ht=!1},e.isValidAttribute=function(te,T,W){Qo||qd({});const ee=rt(te),_e=rt(T);return c1(ee,_e,W)},e.addHook=function(te,T){typeof T=="function"&&(O[te]=O[te]||[],Pl(O[te],T))},e.removeHook=function(te){if(O[te])return ab(O[te])},e.removeHooks=function(te){O[te]&&(O[te]=[])},e.removeAllHooks=function(){O={}},e}var Af=cM();const ph={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,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},i)=>{if(!e)return n*2.55;t/=360,e/=100,n/=100;const r=n<.5?n*(1+e):n+e-n*e,o=2*n-r;switch(i){case"r":return ph.hue2rgb(o,r,t+1/3)*255;case"g":return ph.hue2rgb(o,r,t)*255;case"b":return ph.hue2rgb(o,r,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:n},i)=>{t/=255,e/=255,n/=255;const r=Math.max(t,e,n),o=Math.min(t,e,n),s=(r+o)/2;if(i==="l")return s*100;if(r===o)return 0;const l=r-o,a=s>.5?l/(2-r-o):l/(r+o);if(i==="s")return a*100;switch(r){case t:return((e-n)/l+(ee>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},hH=uH,fH={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},dH=fH,pH={channel:cH,lang:hH,unit:dH},le=pH,fr={};for(let t=0;t<=255;t++)fr[t]=le.unit.dec2hex(t);const xt={ALL:0,RGB:1,HSL:2};class mH{constructor(){this.type=xt.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=xt.ALL}is(e){return this.type===e}}const gH=mH;class yH{constructor(e,n){this.color=n,this.changed=!1,this.data=e,this.type=new gH}set(e,n){return this.color=n,this.changed=!1,this.data=e,this.type.type=xt.ALL,this}_ensureHSL(){const e=this.data,{h:n,s:i,l:r}=e;n===void 0&&(e.h=le.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=le.channel.rgb2hsl(e,"s")),r===void 0&&(e.l=le.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:n,g:i,b:r}=e;n===void 0&&(e.r=le.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=le.channel.hsl2rgb(e,"g")),r===void 0&&(e.b=le.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,n=e.r;return!this.type.is(xt.HSL)&&n!==void 0?n:(this._ensureHSL(),le.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,n=e.g;return!this.type.is(xt.HSL)&&n!==void 0?n:(this._ensureHSL(),le.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,n=e.b;return!this.type.is(xt.HSL)&&n!==void 0?n:(this._ensureHSL(),le.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,n=e.h;return!this.type.is(xt.RGB)&&n!==void 0?n:(this._ensureRGB(),le.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,n=e.s;return!this.type.is(xt.RGB)&&n!==void 0?n:(this._ensureRGB(),le.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,n=e.l;return!this.type.is(xt.RGB)&&n!==void 0?n:(this._ensureRGB(),le.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(xt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(xt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(xt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(xt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(xt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(xt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const vH=yH,xH=new vH({r:0,g:0,b:0,a:0},"transparent"),Ed=xH,uM={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(uM.re);if(!e)return;const n=e[1],i=parseInt(n,16),r=n.length,o=r%4===0,s=r>4,l=s?1:17,a=s?8:4,c=o?0:-1,u=s?255:15;return Ed.set({r:(i>>a*(c+3)&u)*l,g:(i>>a*(c+2)&u)*l,b:(i>>a*(c+1)&u)*l,a:o?(i&u)*l/255:1},t)},stringify:t=>{const{r:e,g:n,b:i,a:r}=t;return r<1?`#${fr[Math.round(e)]}${fr[Math.round(n)]}${fr[Math.round(i)]}${fr[Math.round(r*255)]}`:`#${fr[Math.round(e)]}${fr[Math.round(n)]}${fr[Math.round(i)]}`}},va=uM,mh={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(mh.hueRe);if(e){const[,n,i]=e;switch(i){case"grad":return le.channel.clamp.h(parseFloat(n)*.9);case"rad":return le.channel.clamp.h(parseFloat(n)*180/Math.PI);case"turn":return le.channel.clamp.h(parseFloat(n)*360)}}return le.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const n=t.match(mh.re);if(!n)return;const[,i,r,o,s,l]=n;return Ed.set({h:mh._hue2deg(i),s:le.channel.clamp.s(parseFloat(r)),l:le.channel.clamp.l(parseFloat(o)),a:s?le.channel.clamp.a(l?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:n,l:i,a:r}=t;return r<1?`hsla(${le.lang.round(e)}, ${le.lang.round(n)}%, ${le.lang.round(i)}%, ${r})`:`hsl(${le.lang.round(e)}, ${le.lang.round(n)}%, ${le.lang.round(i)}%)`}},Bu=mh,gh={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=gh.colors[t];if(e)return va.parse(e)},stringify:t=>{const e=va.stringify(t);for(const n in gh.colors)if(gh.colors[n]===e)return n}},pb=gh,hM={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(e!==114&&e!==82)return;const n=t.match(hM.re);if(!n)return;const[,i,r,o,s,l,a,c,u]=n;return Ed.set({r:le.channel.clamp.r(r?parseFloat(i)*2.55:parseFloat(i)),g:le.channel.clamp.g(s?parseFloat(o)*2.55:parseFloat(o)),b:le.channel.clamp.b(a?parseFloat(l)*2.55:parseFloat(l)),a:c?le.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:n,b:i,a:r}=t;return r<1?`rgba(${le.lang.round(e)}, ${le.lang.round(n)}, ${le.lang.round(i)}, ${le.lang.round(r)})`:`rgb(${le.lang.round(e)}, ${le.lang.round(n)}, ${le.lang.round(i)})`}},Du=hM,CH={format:{keyword:pb,hex:va,rgb:Du,rgba:Du,hsl:Bu,hsla:Bu},parse:t=>{if(typeof t!="string")return t;const e=va.parse(t)||Du.parse(t)||Bu.parse(t)||pb.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(xt.HSL)||t.data.r===void 0?Bu.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Du.stringify(t):va.stringify(t)},Si=CH,wH=(t,e)=>{const n=Si.parse(t);for(const i in e)n[i]=le.channel.clamp[i](e[i]);return Si.stringify(n)},fM=wH,bH=(t,e,n=0,i=1)=>{if(typeof t!="number")return fM(t,{a:e});const r=Ed.set({r:le.channel.clamp.r(t),g:le.channel.clamp.g(e),b:le.channel.clamp.b(n),a:le.channel.clamp.a(i)});return Si.stringify(r)},xa=bH,kH=t=>{const{r:e,g:n,b:i}=Si.parse(t),r=.2126*le.channel.toLinear(e)+.7152*le.channel.toLinear(n)+.0722*le.channel.toLinear(i);return le.lang.round(r)},SH=kH,_H=t=>SH(t)>=.5,TH=_H,EH=t=>!TH(t),Dc=EH,AH=(t,e,n)=>{const i=Si.parse(t),r=i[e],o=le.channel.clamp[e](r+n);return r!==o&&(i[e]=o),Si.stringify(i)},dM=AH,MH=(t,e)=>dM(t,"l",e),ne=MH,LH=(t,e)=>dM(t,"l",-e),oe=LH,OH=(t,e)=>{const n=Si.parse(t),i={};for(const r in e)e[r]&&(i[r]=n[r]+e[r]);return fM(t,i)},E=OH,BH=(t,e,n=50)=>{const{r:i,g:r,b:o,a:s}=Si.parse(t),{r:l,g:a,b:c,a:u}=Si.parse(e),h=n/100,f=h*2-1,d=s-u,y=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,v=1-y,g=i*y+l*v,m=r*y+a*v,x=o*y+c*v,C=s*h+u*(1-h);return xa(g,m,x,C)},DH=BH,RH=(t,e=100)=>{const n=Si.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,DH(n,t,e)},U=RH;var FH=typeof global=="object"&&global&&global.Object===Object&&global;const pM=FH;var NH=typeof self=="object"&&self&&self.Object===Object&&self,PH=pM||NH||Function("return this")();const Li=PH;var IH=Li.Symbol;const Mf=IH;var mM=Object.prototype,$H=mM.hasOwnProperty,zH=mM.toString,zl=Mf?Mf.toStringTag:void 0;function jH(t){var e=$H.call(t,zl),n=t[zl];try{t[zl]=void 0;var i=!0}catch{}var r=zH.call(t);return i&&(e?t[zl]=n:delete t[zl]),r}var HH=Object.prototype,WH=HH.toString;function VH(t){return WH.call(t)}var qH="[object Null]",UH="[object Undefined]",mb=Mf?Mf.toStringTag:void 0;function dl(t){return t==null?t===void 0?UH:qH:mb&&mb in Object(t)?jH(t):VH(t)}function qo(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var KH="[object AsyncFunction]",YH="[object Function]",GH="[object GeneratorFunction]",XH="[object Proxy]";function Dv(t){if(!qo(t))return!1;var e=dl(t);return e==YH||e==GH||e==KH||e==XH}var QH=Li["__core-js_shared__"];const rm=QH;var gb=function(){var t=/[^.]+$/.exec(rm&&rm.keys&&rm.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function JH(t){return!!gb&&gb in t}var ZH=Function.prototype,eW=ZH.toString;function Uo(t){if(t!=null){try{return eW.call(t)}catch{}try{return t+""}catch{}}return""}var tW=/[\\^$.*+?()[\]{}|]/g,nW=/^\[object .+?Constructor\]$/,iW=Function.prototype,rW=Object.prototype,oW=iW.toString,sW=rW.hasOwnProperty,lW=RegExp("^"+oW.call(sW).replace(tW,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function aW(t){if(!qo(t)||JH(t))return!1;var e=Dv(t)?lW:nW;return e.test(Uo(t))}function cW(t,e){return t==null?void 0:t[e]}function Ko(t,e){var n=cW(t,e);return aW(n)?n:void 0}var uW=Ko(Object,"create");const uc=uW;function hW(){this.__data__=uc?uc(null):{},this.size=0}function fW(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var dW="__lodash_hash_undefined__",pW=Object.prototype,mW=pW.hasOwnProperty;function gW(t){var e=this.__data__;if(uc){var n=e[t];return n===dW?void 0:n}return mW.call(e,t)?e[t]:void 0}var yW=Object.prototype,vW=yW.hasOwnProperty;function xW(t){var e=this.__data__;return uc?e[t]!==void 0:vW.call(e,t)}var CW="__lodash_hash_undefined__";function wW(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=uc&&e===void 0?CW:e,this}function zo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}function AW(t,e){var n=this.__data__,i=Md(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function ur(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=c7}function Bd(t){return t!=null&&CM(t.length)&&!Dv(t)}function u7(t){return Fc(t)&&Bd(t)}function h7(){return!1}var wM=typeof exports=="object"&&exports&&!exports.nodeType&&exports,kb=wM&&typeof module=="object"&&module&&!module.nodeType&&module,f7=kb&&kb.exports===wM,Sb=f7?Li.Buffer:void 0,d7=Sb?Sb.isBuffer:void 0,p7=d7||h7;const Fv=p7;var m7="[object Object]",g7=Function.prototype,y7=Object.prototype,bM=g7.toString,v7=y7.hasOwnProperty,x7=bM.call(Object);function C7(t){if(!Fc(t)||dl(t)!=m7)return!1;var e=vM(t);if(e===null)return!0;var n=v7.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&bM.call(n)==x7}var w7="[object Arguments]",b7="[object Array]",k7="[object Boolean]",S7="[object Date]",_7="[object Error]",T7="[object Function]",E7="[object Map]",A7="[object Number]",M7="[object Object]",L7="[object RegExp]",O7="[object Set]",B7="[object String]",D7="[object WeakMap]",R7="[object ArrayBuffer]",F7="[object DataView]",N7="[object Float32Array]",P7="[object Float64Array]",I7="[object Int8Array]",$7="[object Int16Array]",z7="[object Int32Array]",j7="[object Uint8Array]",H7="[object Uint8ClampedArray]",W7="[object Uint16Array]",V7="[object Uint32Array]",Me={};Me[N7]=Me[P7]=Me[I7]=Me[$7]=Me[z7]=Me[j7]=Me[H7]=Me[W7]=Me[V7]=!0;Me[w7]=Me[b7]=Me[R7]=Me[k7]=Me[F7]=Me[S7]=Me[_7]=Me[T7]=Me[E7]=Me[A7]=Me[M7]=Me[L7]=Me[O7]=Me[B7]=Me[D7]=!1;function q7(t){return Fc(t)&&CM(t.length)&&!!Me[dl(t)]}function U7(t){return function(e){return t(e)}}var kM=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ca=kM&&typeof module=="object"&&module&&!module.nodeType&&module,K7=Ca&&Ca.exports===kM,om=K7&&pM.process,Y7=function(){try{var t=Ca&&Ca.require&&Ca.require("util").types;return t||om&&om.binding&&om.binding("util")}catch{}}();const _b=Y7;var Tb=_b&&_b.isTypedArray,G7=Tb?U7(Tb):q7;const Nv=G7;function k0(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var X7=Object.prototype,Q7=X7.hasOwnProperty;function J7(t,e,n){var i=t[e];(!(Q7.call(t,e)&&Ad(i,n))||n===void 0&&!(e in t))&&Rv(t,e,n)}function Z7(t,e,n,i){var r=!n;n||(n={});for(var o=-1,s=e.length;++o-1&&t%1==0&&t0){if(++e>=yV)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var wV=CV(gV);const bV=wV;function kV(t,e){return bV(dV(t,e,EM),t+"")}function SV(t,e,n){if(!qo(n))return!1;var i=typeof e;return(i=="number"?Bd(n)&&SM(e,n.length):i=="string"&&e in n)?Ad(n[e],t):!1}function _V(t){return kV(function(e,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(r--,o):void 0,s&&SV(n[0],n[1],s)&&(o=r<3?void 0:o,r=1),e=Object(e);++i0?fc(ml,--In):0,el--,Ke===10&&(el=1,Dd--),Ke}function Gn(){return Ke=In2||S0(Ke)>3?"":" "}function $V(t,e){for(;--e&&Gn()&&!(Ke<48||Ke>102||Ke>57&&Ke<65||Ke>70&&Ke<97););return Rd(t,vh()+(e<6&&Eo()==32&&Gn()==32))}function _0(t){for(;Gn();)switch(Ke){case t:return In;case 34:case 39:t!==34&&t!==39&&_0(Ke);break;case 40:t===41&&_0(t);break;case 92:Gn();break}return In}function zV(t,e){for(;Gn()&&t+Ke!==47+10;)if(t+Ke===42+42&&Eo()===47)break;return"/*"+Rd(e,In-1)+"*"+Pv(t===47?t:Gn())}function jV(t){for(;!S0(Eo());)Gn();return Rd(t,In)}function HV(t){return PV(xh("",null,null,null,[""],t=NV(t),0,[0],t))}function xh(t,e,n,i,r,o,s,l,a){for(var c=0,u=0,h=s,f=0,d=0,p=0,y=1,v=1,g=1,m=0,x="",C=r,w=o,b=i,S=x;v;)switch(p=m,m=Gn()){case 40:if(p!=108&&fc(S,h-1)==58){BV(S+=yh(sm(m),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:S+=sm(m);break;case 9:case 10:case 13:case 32:S+=IV(p);break;case 92:S+=$V(vh()-1,7);continue;case 47:switch(Eo()){case 42:case 47:Ru(WV(zV(Gn(),vh()),e,n,a),a);break;default:S+="/"}break;case 123*y:l[c++]=ji(S)*g;case 125*y:case 59:case 0:switch(m){case 0:case 125:v=0;case 59+u:g==-1&&(S=yh(S,/\f/g,"")),d>0&&ji(S)-h&&Ru(d>32?Mb(S+";",i,n,h-1,a):Mb(yh(S," ","")+";",i,n,h-2,a),a);break;case 59:S+=";";default:if(Ru(b=Ab(S,e,n,c,u,r,l,x,C=[],w=[],h,o),o),m===123)if(u===0)xh(S,e,b,b,C,o,h,l,w);else switch(f===99&&fc(S,3)===110?100:f){case 100:case 108:case 109:case 115:xh(t,b,b,i&&Ru(Ab(t,b,b,0,0,r,l,x,r,C=[],h,w),w),r,w,h,l,i?C:w);break;default:xh(S,b,b,b,[""],w,0,l,w)}}c=u=d=0,y=g=1,x=S="",h=s;break;case 58:h=1+ji(S),d=p;default:if(y<1){if(m==123)--y;else if(m==125&&y++==0&&FV()==125)continue}switch(S+=Pv(m),m*y){case 38:g=u>0?1:(S+="\f",-1);break;case 44:l[c++]=(ji(S)-1)*g,g=1;break;case 64:Eo()===45&&(S+=sm(Gn())),f=Eo(),u=h=ji(x=S+=jV(vh())),m++;break;case 45:p===45&&ji(S)==2&&(y=0)}}return o}function Ab(t,e,n,i,r,o,s,l,a,c,u,h){for(var f=r-1,d=r===0?o:[""],p=DV(d),y=0,v=0,g=0;y0?d[m]+" "+x:yh(x,/&\f/g,d[m])))&&(a[g++]=C);return Iv(t,e,n,r===0?MM:l,a,c,u,h)}function WV(t,e,n,i){return Iv(t,e,n,AM,Pv(RV()),dc(t,2,-2),0,i)}function Mb(t,e,n,i,r){return Iv(t,e,n,LM,dc(t,0,i),dc(t,i+1,-1),i,r)}function T0(t,e){for(var n="",i=0;i{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},$v=function(t="fatal"){let e=Pi.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Pi&&(e=Pi[t])):typeof t=="number"&&(e=t),re.trace=()=>{},re.debug=()=>{},re.info=()=>{},re.warn=()=>{},re.error=()=>{},re.fatal=()=>{},e<=Pi.fatal&&(re.fatal=console.error?console.error.bind(console,wn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",wn("FATAL"))),e<=Pi.error&&(re.error=console.error?console.error.bind(console,wn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",wn("ERROR"))),e<=Pi.warn&&(re.warn=console.warn?console.warn.bind(console,wn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",wn("WARN"))),e<=Pi.info&&(re.info=console.info?console.info.bind(console,wn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",wn("INFO"))),e<=Pi.debug&&(re.debug=console.debug?console.debug.bind(console,wn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",wn("DEBUG"))),e<=Pi.trace&&(re.trace=console.debug?console.debug.bind(console,wn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",wn("TRACE")))},wn=t=>`%c${h8().format("ss.SSS")} : ${t} : `,Fd=//gi,hq=t=>t?RM(t).replace(/\\n/g,"#br#").split("#br#"):[""],DM=t=>Af.sanitize(t),Fb=(t,e)=>{var n;if(((n=e.flowchart)==null?void 0:n.htmlLabels)!==!1){const i=e.securityLevel;i==="antiscript"||i==="strict"?t=DM(t):i!=="loose"&&(t=RM(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=mq(t))}return t},pc=(t,e)=>t&&(e.dompurifyConfig?t=Af.sanitize(Fb(t,e),e.dompurifyConfig).toString():t=Af.sanitize(Fb(t,e),{FORBID_TAGS:["style"]}).toString(),t),fq=(t,e)=>typeof t=="string"?pc(t,e):t.flat().map(n=>pc(n,e)),dq=t=>Fd.test(t),pq=t=>t.split(Fd),mq=t=>t.replace(/#br#/g,"
"),RM=t=>t.replace(Fd,"#br#"),gq=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},FM=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),yq=function(...t){const e=t.filter(n=>!isNaN(n));return Math.max(...e)},vq=function(...t){const e=t.filter(n=>!isNaN(n));return Math.min(...e)},dJ=function(t){const e=t.split(/(,)/),n=[];for(let i=0;i0&&i+1Math.max(0,t.split(e).length-1),xq=(t,e)=>{const n=O0(t,"~"),i=O0(e,"~");return n===1&&i===1},Cq=t=>{const e=O0(t,"~");let n=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),n=!0);const i=[...t];let r=i.indexOf("~"),o=i.lastIndexOf("~");for(;r!==-1&&o!==-1&&r!==o;)i[r]="<",i[o]=">",r=i.indexOf("~"),o=i.lastIndexOf("~");return n&&i.unshift("~"),i.join("")},zv={getRows:hq,sanitizeText:pc,sanitizeTextOrArray:fq,hasBreaks:dq,splitBreaks:pq,lineBreakRegex:Fd,removeScript:DM,getUrl:gq,evaluate:FM,getMax:yq,getMin:vq},Ft=(t,e)=>e?E(t,{s:-40,l:10}):E(t,{s:-40,l:-10}),Nd="#ffffff",Pd="#f2f2f2";let wq=class{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(){var e,n,i,r,o,s,l,a,c,u,h;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||U(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||U(this.tertiaryColor),this.lineColor=this.lineColor||U(this.background),this.arrowheadColor=this.arrowheadColor||U(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?oe(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||"grey",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||oe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||U(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||ne(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.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||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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d{this[i]=e[i]}),this.updateColors(),n.forEach(i=>{this[i]=e[i]})}};const bq=t=>{const e=new wq;return e.calculate(t),e};let kq=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ne(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=U(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.lineColor=U(this.background),this.textColor=U(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ne(U("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=xa(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=oe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=oe(this.sectionBkgColor,10),this.taskBorderColor=xa(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=xa(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,n,i,r,o,s,l,a,c,u,h;this.secondBkg=ne(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=ne(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,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=ne(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.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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330});for(let f=0;f{this[i]=e[i]}),this.updateColors(),n.forEach(i=>{this[i]=e[i]})}};const Sq=t=>{const e=new kq;return e.calculate(t),e};let _q=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=E(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.lineColor=U(this.background),this.textColor=U(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="#e8e8e8",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="grey",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.sectionBkgColor=xa(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var e,n,i,r,o,s,l,a,c,u,h;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||oe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||oe(this.tertiaryColor,40);for(let f=0;f{this[i]=e[i]}),this.updateColors(),n.forEach(i=>{this[i]=e[i]})}};const Tq=t=>{const e=new _q;return e.calculate(t),e};let Eq=class{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=ne("#cde498",10),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.primaryColor),this.lineColor=U(this.background),this.textColor=U(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="grey",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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,n,i,r,o,s,l,a,c,u,h;this.actorBorder=oe(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.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||oe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||oe(this.tertiaryColor,40);for(let f=0;f{this[i]=e[i]}),this.updateColors(),n.forEach(i=>{this[i]=e[i]})}};const Aq=t=>{const e=new Eq;return e.calculate(t),e};class Mq{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=ne(this.contrast,55),this.background="#ffffff",this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.lineColor=U(this.background),this.textColor=U(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="calculated",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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,n,i,r,o,s,l,a,c,u,h;this.secondBkg=ne(this.contrast,55),this.border2=this.contrast,this.actorBorder=ne(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,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 f=0;f{this[i]=e[i]}),this.updateColors(),n.forEach(i=>{this[i]=e[i]})}}const Lq=t=>{const e=new Mq;return e.calculate(t),e},Gi={base:{getThemeVariables:bq},dark:{getThemeVariables:Sq},default:{getThemeVariables:Tq},forest:{getThemeVariables:Aq},neutral:{getThemeVariables:Lq}},Ii={flowchart:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},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,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"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!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,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,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},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,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:""},theme:"default",maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,fontSize:16},NM={...Ii,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:Gi.default.getThemeVariables(),sequence:{...Ii.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...Ii.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ii.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...Ii.pie,useWidth:984},xyChart:{...Ii.xyChart,useWidth:void 0},requirement:{...Ii.requirement,useWidth:void 0},gitGraph:{...Ii.gitGraph,useMaxWidth:!1},sankey:{...Ii.sankey,useMaxWidth:!1}},PM=(t,e="")=>Object.keys(t).reduce((n,i)=>Array.isArray(t[i])?n:typeof t[i]=="object"&&t[i]!==null?[...n,e+i,...PM(t[i],"")]:[...n,e+i],[]),Oq=new Set(PM(NM,"")),Bq=NM,Df=t=>{if(re.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Df(e));return}for(const e of Object.keys(t)){if(re.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Oq.has(e)||t[e]==null){re.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){re.debug("sanitizing object",e),Df(t[e]);continue}const n=["themeCSS","fontFamily","altFontFamily"];for(const i of n)e.includes(i)&&(re.debug("sanitizing css option",e),t[e]=Dq(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const n=t.themeVariables[e];n!=null&&n.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}re.debug("After sanitization",t)}},Dq=t=>{let e=0,n=0;for(const i of t){if(e{for(const{id:e,detector:n,loader:i}of t)jM(e,n,i)},jM=(t,e,n)=>{tl[t]?re.error(`Detector with key ${t} already exists`):tl[t]={detector:e,loader:n},re.debug(`Detector with key ${t} added${n?" with loader":""}`)},Fq=t=>tl[t].loader,B0=(t,e,{depth:n=2,clobber:i=!1}={})=>{const r={depth:n,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(o=>B0(t,o,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(o=>{t.includes(o)||t.push(o)}),t):t===void 0||n<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&(t[o]===void 0||typeof t[o]=="object")?(t[o]===void 0&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=B0(t[o],e[o],{depth:n-1,clobber:i})):(i||typeof t[o]!="object"&&typeof e[o]!="object")&&(t[o]=e[o])}),t)},St=B0,Nq="​",Pq={curveBasis:Mj,curveBasisClosed:Lj,curveBasisOpen:Oj,curveBumpX:Ej,curveBumpY:Aj,curveBundle:Bj,curveCardinalClosed:Rj,curveCardinalOpen:Fj,curveCardinal:Dj,curveCatmullRomClosed:Pj,curveCatmullRomOpen:Ij,curveCatmullRom:Nj,curveLinear:Tj,curveLinearClosed:$j,curveMonotoneX:zj,curveMonotoneY:jj,curveNatural:Hj,curveStep:Wj,curveStepAfter:qj,curveStepBefore:Vj},Iq=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,$q=function(t,e){const n=HM(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(n)){const s=n.map(l=>l.args);Df(s),i=St(i,[...s])}else i=n.args;if(!i)return;let r=Id(t,e);const o="config";return i[o]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),i[r]=i[o],delete i[o]),i},HM=function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${Iq.source})(?=[}][%]{2}).* +`,"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),re.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i;const r=[];for(;(i=wa.exec(t))!==null;)if(i.index===wa.lastIndex&&wa.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){const o=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;r.push({type:o,args:s})}return r.length===0?{type:t,args:null}:r.length===1?r[0]:r}catch(n){return re.error(`ERROR: ${n.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},zq=function(t){return t.replace(wa,"")},jq=function(t,e){for(const[n,i]of e.entries())if(i.match(t))return n;return-1};function Hq(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Pq[n]??e}function Wq(t,e){const n=t.trim();if(n)return e.securityLevel!=="loose"?x2.sanitizeUrl(n):n}const Vq=(t,...e)=>{const n=t.split("."),i=n.length-1,r=n[i];let o=window;for(let s=0;s{n+=WM(r,e),e=r});const i=n/2;return jv(t,i)}function Uq(t){return t.length===1?t[0]:qq(t)}const Nb=(t,e=2)=>{const n=Math.pow(10,e);return Math.round(t*n)/n},jv=(t,e)=>{let n,i=e;for(const r of t){if(n){const o=WM(r,n);if(o=1)return{x:r.x,y:r.y};if(s>0&&s<1)return{x:Nb((1-s)*n.x+s*r.x,5),y:Nb((1-s)*n.y+s*r.y,5)}}}n=r}throw new Error("Could not find a suitable point for the given distance")},Kq=(t,e,n)=>{re.info(`our points ${JSON.stringify(e)}`),e[0]!==n&&(e=e.reverse());const r=jv(e,25),o=t?10:5,s=Math.atan2(e[0].y-r.y,e[0].x-r.x),l={x:0,y:0};return l.x=Math.sin(s)*o+(e[0].x+r.x)/2,l.y=-Math.cos(s)*o+(e[0].y+r.y)/2,l};function Yq(t,e,n){const i=structuredClone(n);re.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();const r=25+t,o=jv(i,r),s=10+t*.5,l=Math.atan2(i[0].y-o.y,i[0].x-o.x),a={x:0,y:0};return e==="start_left"?(a.x=Math.sin(l+Math.PI)*s+(i[0].x+o.x)/2,a.y=-Math.cos(l+Math.PI)*s+(i[0].y+o.y)/2):e==="end_right"?(a.x=Math.sin(l-Math.PI)*s+(i[0].x+o.x)/2-5,a.y=-Math.cos(l-Math.PI)*s+(i[0].y+o.y)/2-5):e==="end_left"?(a.x=Math.sin(l)*s+(i[0].x+o.x)/2-5,a.y=-Math.cos(l)*s+(i[0].y+o.y)/2-5):(a.x=Math.sin(l)*s+(i[0].x+o.x)/2,a.y=-Math.cos(l)*s+(i[0].y+o.y)/2),a}function Gq(t){let e="",n="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?n=n+i+";":e=e+i+";");return{style:e,labelStyle:n}}let Pb=0;const Xq=()=>(Pb++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Pb);function Qq(t){let e="";const n="0123456789abcdef",i=n.length;for(let r=0;rQq(t.length),Zq=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:""}},eU=function(t,e){const n=e.text.replace(zv.lineBreakRegex," "),[,i]=Wv(e.fontSize),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",i),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),e.class!==void 0&&r.attr("class",e.class);const o=r.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(n),r},tU=Rc((t,e,n)=>{if(!t||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},n),zv.lineBreakRegex.test(t)))return t;const i=t.split(" "),r=[];let o="";return i.forEach((s,l)=>{const a=Rf(`${s} `,n),c=Rf(o,n);if(a>e){const{hyphenatedStrings:f,remainingWord:d}=nU(s,e,"-",n);r.push(o,...f),o=d}else c+a>=e?(r.push(o),o=s):o=[o,s].filter(Boolean).join(" ");l+1===i.length&&r.push(o)}),r.filter(s=>s!=="").join(n.joinWith)},(t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),nU=Rc((t,e,n="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const r=[...t],o=[];let s="";return r.forEach((l,a)=>{const c=`${s}${l}`;if(Rf(c,i)>=e){const h=a+1,f=r.length===h,d=`${c}${n}`;o.push(f?c:d),s=""}else s=c}),{hyphenatedStrings:o,remainingWord:s}},(t,e,n="-",i)=>`${t}${e}${n}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function iU(t,e){return Hv(t,e).height}function Rf(t,e){return Hv(t,e).width}const Hv=Rc((t,e)=>{const{fontSize:n=12,fontFamily:i="Arial",fontWeight:r=400}=e;if(!t)return{width:0,height:0};const[,o]=Wv(n),s=["sans-serif",i],l=t.split(zv.lineBreakRegex),a=[],c=bn("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const u=c.append("svg");for(const f of s){let d=0;const p={width:0,height:0,lineHeight:0};for(const y of l){const v=Zq();v.text=y||Nq;const g=eU(u,v).style("font-size",o).style("font-weight",r).style("font-family",f),m=(g._groups||g)[0][0].getBBox();if(m.width===0&&m.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,m.width)),d=Math.round(m.height),p.height+=d,p.lineHeight=Math.round(Math.max(p.lineHeight,d))}a.push(p)}u.remove();const h=isNaN(a[1].height)||isNaN(a[1].width)||isNaN(a[1].lineHeight)||a[0].height>a[1].height&&a[0].width>a[1].width&&a[0].lineHeight>a[1].lineHeight?0:1;return a[h]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`);class rU{constructor(e=!1,n){this.count=0,this.count=n?n.length:0,this.next=e?()=>this.count++:()=>Date.now()}}let Fu;const oU=function(t){return Fu=Fu||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Fu.innerHTML=t,unescape(Fu.textContent)};function VM(t){return"str"in t}const sU=(t,e,n,i)=>{var r;if(!i)return;const o=(r=t.node())==null?void 0:r.getBBox();o&&t.append("text").text(i).attr("x",o.x+o.width/2).attr("y",-n).attr("class",e)},Wv=t=>{if(typeof t=="number")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]};function qM(t,e){return EV({},t,e)}const ba={assignWithDepth:St,wrapLabel:tU,calculateTextHeight:iU,calculateTextWidth:Rf,calculateTextDimensions:Hv,cleanAndMerge:qM,detectInit:$q,detectDirective:HM,isSubstringInArray:jq,interpolateToCurve:Hq,calcLabelPosition:Uq,calcCardinalityPosition:Kq,calcTerminalLabelPosition:Yq,formatUrl:Wq,getStylesFromArray:Gq,generateId:Xq,random:Jq,runFunc:Vq,entityDecode:oU,insertTitle:sU,parseFontSize:Wv,InitIDGenerator:rU},Ib="10.6.0",nl=Object.freeze(Bq);let Kt=St({},nl),UM,il=[],ka=St({},nl);const $d=(t,e)=>{let n=St({},t),i={};for(const r of e)GM(r),i=St(i,r);if(n=St(n,i),i.theme&&i.theme in Gi){const r=St({},UM),o=St(r.themeVariables||{},i.themeVariables);n.theme&&n.theme in Gi&&(n.themeVariables=Gi[n.theme].getThemeVariables(o))}return ka=n,XM(ka),ka},lU=t=>(Kt=St({},nl),Kt=St(Kt,t),t.theme&&Gi[t.theme]&&(Kt.themeVariables=Gi[t.theme].getThemeVariables(t.themeVariables)),$d(Kt,il),Kt),aU=t=>{UM=St({},t)},cU=t=>(Kt=St(Kt,t),$d(Kt,il),Kt),KM=()=>St({},Kt),YM=t=>(XM(t),St(ka,t),_i()),_i=()=>St({},ka),GM=t=>{t&&(["secure",...Kt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(re.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=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&GM(t[e])}))},uU=t=>{Df(t),t.fontFamily&&(!t.themeVariables||!t.themeVariables.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),il.push(t),$d(Kt,il)},Ff=(t=Kt)=>{il=[],$d(t,il)},hU={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},$b={},fU=t=>{$b[t]||(re.warn(hU[t]),$b[t]=!0)},XM=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&fU("LAZY_LOAD_DEPRECATED")},QM="c4",dU=t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),pU=async()=>{const{diagram:t}=await Ue(()=>import("./c4Diagram-d0fbc5ce-6576756d.js"),["assets/c4Diagram-d0fbc5ce-6576756d.js","assets/svgDrawCommon-4835440b-b3589b66.js"]);return{id:QM,diagram:t}},mU={id:QM,detector:dU,loader:pU},gU=mU,JM="flowchart",yU=(t,e)=>{var n,i;return((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},vU=async()=>{const{diagram:t}=await Ue(()=>import("./flowDiagram-7ea5b25a-802bdd2f.js"),["assets/flowDiagram-7ea5b25a-802bdd2f.js","assets/flowDb-1972c806-d31c77fd.js","assets/layout-608b290b.js","assets/styles-080da4f6-3483b67d.js","assets/index-2c4b9a3b-bbd91aa2.js","assets/edges-f2ad444c-7df4797c.js","assets/createText-62fc7601-0312dc07.js","assets/line-434e5c73.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:JM,diagram:t}},xU={id:JM,detector:yU,loader:vU},CU=xU,ZM="flowchart-v2",wU=(t,e)=>{var n,i,r;return((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-d3"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)},bU=async()=>{const{diagram:t}=await Ue(()=>import("./flowDiagram-v2-855bc5b3-3d40ebb1.js"),["assets/flowDiagram-v2-855bc5b3-3d40ebb1.js","assets/flowDb-1972c806-d31c77fd.js","assets/styles-080da4f6-3483b67d.js","assets/layout-608b290b.js","assets/index-2c4b9a3b-bbd91aa2.js","assets/edges-f2ad444c-7df4797c.js","assets/createText-62fc7601-0312dc07.js","assets/line-434e5c73.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:ZM,diagram:t}},kU={id:ZM,detector:wU,loader:bU},SU=kU,eL="er",_U=t=>/^\s*erDiagram/.test(t),TU=async()=>{const{diagram:t}=await Ue(()=>import("./erDiagram-9d236eb7-5f4da687.js"),["assets/erDiagram-9d236eb7-5f4da687.js","assets/layout-608b290b.js","assets/line-434e5c73.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:eL,diagram:t}},EU={id:eL,detector:_U,loader:TU},AU=EU,tL="gitGraph",MU=t=>/^\s*gitGraph/.test(t),LU=async()=>{const{diagram:t}=await Ue(()=>import("./gitGraphDiagram-99d0ae7c-9ea9e35b.js"),[]);return{id:tL,diagram:t}},OU={id:tL,detector:MU,loader:LU},BU=OU,nL="gantt",DU=t=>/^\s*gantt/.test(t),RU=async()=>{const{diagram:t}=await Ue(()=>import("./ganttDiagram-9b5ea136-f59873c3.js"),["assets/ganttDiagram-9b5ea136-f59873c3.js","assets/linear-3615363e.js","assets/init-77b53fdd.js"]);return{id:nL,diagram:t}},FU={id:nL,detector:DU,loader:RU},NU=FU,iL="info",PU=t=>/^\s*info/.test(t),IU=async()=>{const{diagram:t}=await Ue(()=>import("./infoDiagram-736b4530-7edd3494.js"),[]);return{id:iL,diagram:t}},$U={id:iL,detector:PU,loader:IU},rL="pie",zU=t=>/^\s*pie/.test(t),jU=async()=>{const{diagram:t}=await Ue(()=>import("./pieDiagram-dbbf0591-44bd3b4a.js"),["assets/pieDiagram-dbbf0591-44bd3b4a.js","assets/arc-1761d8ed.js","assets/path-53f90ab3.js","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js","assets/array-9f3ba611.js"]);return{id:rL,diagram:t}},HU={id:rL,detector:zU,loader:jU},oL="quadrantChart",WU=t=>/^\s*quadrantChart/.test(t),VU=async()=>{const{diagram:t}=await Ue(()=>import("./quadrantDiagram-4d7f4fd6-5d0384f4.js"),["assets/quadrantDiagram-4d7f4fd6-5d0384f4.js","assets/linear-3615363e.js","assets/init-77b53fdd.js"]);return{id:oL,diagram:t}},qU={id:oL,detector:WU,loader:VU},UU=qU,sL="xychart",KU=t=>/^\s*xychart-beta/.test(t),YU=async()=>{const{diagram:t}=await Ue(()=>import("./xychartDiagram-2b33534f-91f0354e.js"),["assets/xychartDiagram-2b33534f-91f0354e.js","assets/createText-62fc7601-0312dc07.js","assets/init-77b53fdd.js","assets/ordinal-ba9b4969.js","assets/linear-3615363e.js","assets/line-434e5c73.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:sL,diagram:t}},GU={id:sL,detector:KU,loader:YU},XU=GU,lL="requirement",QU=t=>/^\s*requirement(Diagram)?/.test(t),JU=async()=>{const{diagram:t}=await Ue(()=>import("./requirementDiagram-6fc4c22a-2b6b8c39.js"),["assets/requirementDiagram-6fc4c22a-2b6b8c39.js","assets/layout-608b290b.js","assets/line-434e5c73.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:lL,diagram:t}},ZU={id:lL,detector:QU,loader:JU},eK=ZU,aL="sequence",tK=t=>/^\s*sequenceDiagram/.test(t),nK=async()=>{const{diagram:t}=await Ue(()=>import("./sequenceDiagram-b655622a-698172bb.js"),["assets/sequenceDiagram-b655622a-698172bb.js","assets/svgDrawCommon-4835440b-b3589b66.js"]);return{id:aL,diagram:t}},iK={id:aL,detector:tK,loader:nK},rK=iK,cL="class",oK=(t,e)=>{var n;return((n=e==null?void 0:e.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},sK=async()=>{const{diagram:t}=await Ue(()=>import("./classDiagram-936ed81e-8c2c2b2f.js"),["assets/classDiagram-936ed81e-8c2c2b2f.js","assets/styles-3dcbcfbf-c6ba177b.js","assets/layout-608b290b.js","assets/line-434e5c73.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:cL,diagram:t}},lK={id:cL,detector:oK,loader:sK},aK=lK,uL="classDiagram",cK=(t,e)=>{var n;return/^\s*classDiagram/.test(t)&&((n=e==null?void 0:e.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},uK=async()=>{const{diagram:t}=await Ue(()=>import("./classDiagram-v2-c3cb15f1-527aa3a5.js"),["assets/classDiagram-v2-c3cb15f1-527aa3a5.js","assets/styles-3dcbcfbf-c6ba177b.js","assets/layout-608b290b.js","assets/index-2c4b9a3b-bbd91aa2.js","assets/edges-f2ad444c-7df4797c.js","assets/createText-62fc7601-0312dc07.js","assets/line-434e5c73.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:uL,diagram:t}},hK={id:uL,detector:cK,loader:uK},fK=hK,hL="state",dK=(t,e)=>{var n;return((n=e==null?void 0:e.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},pK=async()=>{const{diagram:t}=await Ue(()=>import("./stateDiagram-59f0c015-0ccbe740.js"),["assets/stateDiagram-59f0c015-0ccbe740.js","assets/styles-9c745c82-5d32dd25.js","assets/layout-608b290b.js","assets/line-434e5c73.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:hL,diagram:t}},mK={id:hL,detector:dK,loader:pK},gK=mK,fL="stateDiagram",yK=(t,e)=>{var n;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((n=e==null?void 0:e.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper")},vK=async()=>{const{diagram:t}=await Ue(()=>import("./stateDiagram-v2-2b26beab-4af09cbf.js"),["assets/stateDiagram-v2-2b26beab-4af09cbf.js","assets/styles-9c745c82-5d32dd25.js","assets/layout-608b290b.js","assets/index-2c4b9a3b-bbd91aa2.js","assets/edges-f2ad444c-7df4797c.js","assets/createText-62fc7601-0312dc07.js","assets/line-434e5c73.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:fL,diagram:t}},xK={id:fL,detector:yK,loader:vK},CK=xK,dL="journey",wK=t=>/^\s*journey/.test(t),bK=async()=>{const{diagram:t}=await Ue(()=>import("./journeyDiagram-df861f2b-03c13e5c.js"),["assets/journeyDiagram-df861f2b-03c13e5c.js","assets/svgDrawCommon-4835440b-b3589b66.js","assets/arc-1761d8ed.js","assets/path-53f90ab3.js"]);return{id:dL,diagram:t}},kK={id:dL,detector:wK,loader:bK},SK=kK,_K=function(t,e){for(let n of e)t.attr(n[0],n[1])},TK=function(t,e,n){let i=new Map;return n?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},pL=function(t,e,n,i){const r=TK(e,n,i);_K(t,r)},EK=function(t,e,n,i){const r=e.node().getBBox(),o=r.width,s=r.height;re.info(`SVG bounds: ${o}x${s}`,r);let l=0,a=0;re.info(`Graph bounds: ${l}x${a}`,t),l=o+n*2,a=s+n*2,re.info(`Calculated bounds: ${l}x${a}`),pL(e,a,l,i);const c=`${r.x-n} ${r.y-n} ${r.width+2*n} ${r.height+2*n}`;e.attr("viewBox",c)},Ch={},AK=(t,e,n)=>{let i="";return t in Ch&&Ch[t]?i=Ch[t](n):re.warn(`No theme found for ${t}`),` & { font-family: ${n.fontFamily}; font-size: ${n.fontSize}; fill: ${n.textColor} @@ -109,36 +109,36 @@ Error generating stack: `+o.message+` ${i} ${e} -`},FK=(t,e)=>{e!==void 0&&(Ch[t]=e)},NK=RK;let Vv="",qv="",Uv="";const Kv=t=>pc(t,_i()),PK=()=>{Vv="",Uv="",qv=""},IK=t=>{Vv=Kv(t).replace(/^\s+/g,"")},$K=()=>Vv,zK=t=>{Uv=Kv(t).replace(/\n\s+/g,` -`)},jK=()=>Uv,HK=t=>{qv=Kv(t)},WK=()=>qv,VK=Object.freeze(Object.defineProperty({__proto__:null,clear:PK,getAccDescription:jK,getAccTitle:$K,getDiagramTitle:WK,setAccDescription:zK,setAccTitle:IK,setDiagramTitle:HK},Symbol.toStringTag,{value:"Module"})),qK=re,UK=$v,Yv=_i,yJ=eL,vJ=nl,KK=t=>pc(t,Yv()),YK=DK,GK=()=>VK,Nf={},Pf=(t,e,n)=>{var i;if(Nf[t])throw new Error(`Diagram ${t} already registered.`);Nf[t]=e,n&&KM(t,n),FK(t,e.styles),(i=e.injectUtils)==null||i.call(e,qK,UK,Yv,KK,YK,GK(),()=>{})},Gv=t=>{if(t in Nf)return Nf[t];throw new XK(t)};class XK extends Error{constructor(e){super(`Diagram ${e} not found.`)}}const QK=t=>{var e;const{securityLevel:n}=Yv();let i=bn("body");if(n==="sandbox"){const s=((e=bn(`#i${t}`).node())==null?void 0:e.contentDocument)??document;i=bn(s.body)}return i.select(`#${t}`)},JK=(t,e,n)=>{re.debug(`renering svg for syntax error -`);const i=QK(e);i.attr("viewBox","0 0 2412 512"),CL(i,100,512,!0);const r=i.append("g");r.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"),r.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"),r.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"),r.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"),r.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"),r.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"),r.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"),r.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},wL={draw:JK},ZK=wL,eY={db:{},renderer:wL,parser:{parser:{yy:{}},parse:()=>{}}},tY=eY,bL="flowchart-elk",nY=(t,e)=>{var n;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk")},iY=async()=>{const{diagram:t}=await Ue(()=>import("./flowchart-elk-definition-abe16c3d-57c0d888.js"),["assets/flowchart-elk-definition-abe16c3d-57c0d888.js","assets/flowDb-1972c806-1899fd0a.js","assets/edges-f2ad444c-795ea1c8.js","assets/createText-62fc7601-6b649b67.js","assets/line-63c0ea4d.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:bL,diagram:t}},rY={id:bL,detector:nY,loader:iY},oY=rY,kL="timeline",sY=t=>/^\s*timeline/.test(t),lY=async()=>{const{diagram:t}=await Ue(()=>import("./timeline-definition-5b62e21b-2e009dcd.js"),["assets/timeline-definition-5b62e21b-2e009dcd.js","assets/arc-f4b03a28.js","assets/path-53f90ab3.js"]);return{id:kL,diagram:t}},aY={id:kL,detector:sY,loader:lY},cY=aY,SL="mindmap",uY=t=>/^\s*mindmap/.test(t),hY=async()=>{const{diagram:t}=await Ue(()=>import("./mindmap-definition-beec6740-4405b0e1.js"),["assets/mindmap-definition-beec6740-4405b0e1.js","assets/createText-62fc7601-6b649b67.js"]);return{id:SL,diagram:t}},fY={id:SL,detector:uY,loader:hY},dY=fY,_L="sankey",pY=t=>/^\s*sankey-beta/.test(t),mY=async()=>{const{diagram:t}=await Ue(()=>import("./sankeyDiagram-8f13d901-dc439297.js"),["assets/sankeyDiagram-8f13d901-dc439297.js","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js"]);return{id:_L,diagram:t}},gY={id:_L,detector:pY,loader:mY},yY=gY;let jb=!1;const Xv=()=>{jb||(jb=!0,Pf("error",tY,t=>t.toLowerCase().trim()==="error"),Pf("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{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")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),UM(bU,vK,pK,RU,HU,qU,YU,sK,uK,oY,LU,TU,dY,cY,IU,TK,bK,LK,JU,yY,nK))};let TL=class{constructor(e,n={}){this.text=e,this.metadata=n,this.type="graph",this.text+=` -`;const i=_i();try{this.type=Id(e,i)}catch(o){this.type="error",this.detectError=o}const r=Gv(this.type);re.debug("Type "+this.type),this.db=r.db,this.renderer=r.renderer,this.parser=r.parser,this.parser.parser.yy=this.db,this.init=r.init,this.parse()}parse(){var e,n,i,r,o;if(this.detectError)throw this.detectError;(n=(e=this.db).clear)==null||n.call(e);const s=_i();(i=this.init)==null||i.call(this,s),this.metadata.title&&((o=(r=this.db).setDiagramTitle)==null||o.call(r,this.metadata.title)),this.parser.parse(this.text)}async render(e,n){await this.renderer.draw(this.text,e,n,this)}getParser(){return this.parser}getType(){return this.type}};const Qv=async(t,e={})=>{const n=Id(t,_i());try{Gv(n)}catch{const r=jq(n);if(!r)throw new qM(`Diagram ${n} not found.`);const{id:o,diagram:s}=await r();Pf(o,s)}return new TL(t,e)};let D0=[];const CJ=t=>{D0.push(t)},vY=()=>{D0.forEach(t=>{t()}),D0=[]},xY="graphics-document document";function CY(t,e){t.attr("role",xY),e!==""&&t.attr("aria-roledescription",e)}function wY(t,e,n,i){if(t.insert!==void 0){if(n){const r=`chart-desc-${i}`;t.attr("aria-describedby",r),t.insert("desc",":first-child").attr("id",r).text(n)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}const bY=t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function EL(t){return typeof t>"u"||t===null}function kY(t){return typeof t=="object"&&t!==null}function SY(t){return Array.isArray(t)?t:EL(t)?[]:[t]}function _Y(t,e){var n,i,r,o;if(e)for(o=Object.keys(e),n=0,i=o.length;n{e!==void 0&&(Ch[t]=e)},LK=AK;let Vv="",qv="",Uv="";const Kv=t=>pc(t,_i()),OK=()=>{Vv="",Uv="",qv=""},BK=t=>{Vv=Kv(t).replace(/^\s+/g,"")},DK=()=>Vv,RK=t=>{Uv=Kv(t).replace(/\n\s+/g,` +`)},FK=()=>Uv,NK=t=>{qv=Kv(t)},PK=()=>qv,IK=Object.freeze(Object.defineProperty({__proto__:null,clear:OK,getAccDescription:FK,getAccTitle:DK,getDiagramTitle:PK,setAccDescription:RK,setAccTitle:BK,setDiagramTitle:NK},Symbol.toStringTag,{value:"Module"})),$K=re,zK=$v,Yv=_i,vJ=YM,xJ=nl,jK=t=>pc(t,Yv()),HK=EK,WK=()=>IK,Nf={},Pf=(t,e,n)=>{var i;if(Nf[t])throw new Error(`Diagram ${t} already registered.`);Nf[t]=e,n&&jM(t,n),MK(t,e.styles),(i=e.injectUtils)==null||i.call(e,$K,zK,Yv,jK,HK,WK(),()=>{})},Gv=t=>{if(t in Nf)return Nf[t];throw new VK(t)};class VK extends Error{constructor(e){super(`Diagram ${e} not found.`)}}const qK=t=>{var e;const{securityLevel:n}=Yv();let i=bn("body");if(n==="sandbox"){const s=((e=bn(`#i${t}`).node())==null?void 0:e.contentDocument)??document;i=bn(s.body)}return i.select(`#${t}`)},UK=(t,e,n)=>{re.debug(`renering svg for syntax error +`);const i=qK(e);i.attr("viewBox","0 0 2412 512"),pL(i,100,512,!0);const r=i.append("g");r.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"),r.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"),r.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"),r.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"),r.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"),r.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"),r.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"),r.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},mL={draw:UK},KK=mL,YK={db:{},renderer:mL,parser:{parser:{yy:{}},parse:()=>{}}},GK=YK,gL="flowchart-elk",XK=(t,e)=>{var n;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk")},QK=async()=>{const{diagram:t}=await Ue(()=>import("./flowchart-elk-definition-abe16c3d-82de085c.js"),["assets/flowchart-elk-definition-abe16c3d-82de085c.js","assets/flowDb-1972c806-d31c77fd.js","assets/edges-f2ad444c-7df4797c.js","assets/createText-62fc7601-0312dc07.js","assets/line-434e5c73.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js"]);return{id:gL,diagram:t}},JK={id:gL,detector:XK,loader:QK},ZK=JK,yL="timeline",eY=t=>/^\s*timeline/.test(t),tY=async()=>{const{diagram:t}=await Ue(()=>import("./timeline-definition-5b62e21b-fc0193a6.js"),["assets/timeline-definition-5b62e21b-fc0193a6.js","assets/arc-1761d8ed.js","assets/path-53f90ab3.js"]);return{id:yL,diagram:t}},nY={id:yL,detector:eY,loader:tY},iY=nY,vL="mindmap",rY=t=>/^\s*mindmap/.test(t),oY=async()=>{const{diagram:t}=await Ue(()=>import("./mindmap-definition-beec6740-13a55f61.js"),["assets/mindmap-definition-beec6740-13a55f61.js","assets/createText-62fc7601-0312dc07.js"]);return{id:vL,diagram:t}},sY={id:vL,detector:rY,loader:oY},lY=sY,xL="sankey",aY=t=>/^\s*sankey-beta/.test(t),cY=async()=>{const{diagram:t}=await Ue(()=>import("./sankeyDiagram-8f13d901-8196c28d.js"),["assets/sankeyDiagram-8f13d901-8196c28d.js","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js"]);return{id:xL,diagram:t}},uY={id:xL,detector:aY,loader:cY},hY=uY;let zb=!1;const Xv=()=>{zb||(zb=!0,Pf("error",GK,t=>t.toLowerCase().trim()==="error"),Pf("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{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")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),zM(gU,fK,aK,AU,NU,$U,HU,eK,rK,ZK,SU,CU,lY,iY,BU,CK,gK,SK,UU,hY,XU))};let CL=class{constructor(e,n={}){this.text=e,this.metadata=n,this.type="graph",this.text+=` +`;const i=_i();try{this.type=Id(e,i)}catch(o){this.type="error",this.detectError=o}const r=Gv(this.type);re.debug("Type "+this.type),this.db=r.db,this.renderer=r.renderer,this.parser=r.parser,this.parser.parser.yy=this.db,this.init=r.init,this.parse()}parse(){var e,n,i,r,o;if(this.detectError)throw this.detectError;(n=(e=this.db).clear)==null||n.call(e);const s=_i();(i=this.init)==null||i.call(this,s),this.metadata.title&&((o=(r=this.db).setDiagramTitle)==null||o.call(r,this.metadata.title)),this.parser.parse(this.text)}async render(e,n){await this.renderer.draw(this.text,e,n,this)}getParser(){return this.parser}getType(){return this.type}};const Qv=async(t,e={})=>{const n=Id(t,_i());try{Gv(n)}catch{const r=Fq(n);if(!r)throw new $M(`Diagram ${n} not found.`);const{id:o,diagram:s}=await r();Pf(o,s)}return new CL(t,e)};let D0=[];const wJ=t=>{D0.push(t)},fY=()=>{D0.forEach(t=>{t()}),D0=[]},dY="graphics-document document";function pY(t,e){t.attr("role",dY),e!==""&&t.attr("aria-roledescription",e)}function mY(t,e,n,i){if(t.insert!==void 0){if(n){const r=`chart-desc-${i}`;t.attr("aria-describedby",r),t.insert("desc",":first-child").attr("id",r).text(n)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}const gY=t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function wL(t){return typeof t>"u"||t===null}function yY(t){return typeof t=="object"&&t!==null}function vY(t){return Array.isArray(t)?t:wL(t)?[]:[t]}function xY(t,e){var n,i,r,o;if(e)for(o=Object.keys(e),n=0,i=o.length;nl&&(o=" ... ",e=i-l+o.length),n-i>l&&(s=" ...",n=i+l-s.length),{str:o+t.slice(e,n).replace(/\t/g,"→")+s,pos:i-e+o.length}}function cm(t,e){return Rt.repeat(" ",e-t.length)+t}function RY(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var n=/\r?\n|\r|\0/g,i=[0],r=[],o,s=-1;o=n.exec(t.buffer);)r.push(o.index),i.push(o.index+o[0].length),t.position<=o.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var l="",a,c,u=Math.min(t.line+e.linesAfter,r.length).toString().length,h=e.maxLength-(e.indent+u+3);for(a=1;a<=e.linesBefore&&!(s-a<0);a++)c=am(t.buffer,i[s-a],r[s-a],t.position-(i[s]-i[s-a]),h),l=Rt.repeat(" ",e.indent)+cm((t.line-a+1).toString(),u)+" | "+c.str+` +`+t.mark.snippet),i+" "+n):i}function mc(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=bL(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}mc.prototype=Object.create(Error.prototype);mc.prototype.constructor=mc;mc.prototype.toString=function(e){return this.name+": "+bL(this,e)};var Wi=mc;function am(t,e,n,i,r){var o="",s="",l=Math.floor(r/2)-1;return i-e>l&&(o=" ... ",e=i-l+o.length),n-i>l&&(s=" ...",n=i+l-s.length),{str:o+t.slice(e,n).replace(/\t/g,"→")+s,pos:i-e+o.length}}function cm(t,e){return Rt.repeat(" ",e-t.length)+t}function AY(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var n=/\r?\n|\r|\0/g,i=[0],r=[],o,s=-1;o=n.exec(t.buffer);)r.push(o.index),i.push(o.index+o[0].length),t.position<=o.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var l="",a,c,u=Math.min(t.line+e.linesAfter,r.length).toString().length,h=e.maxLength-(e.indent+u+3);for(a=1;a<=e.linesBefore&&!(s-a<0);a++)c=am(t.buffer,i[s-a],r[s-a],t.position-(i[s]-i[s-a]),h),l=Rt.repeat(" ",e.indent)+cm((t.line-a+1).toString(),u)+" | "+c.str+` `+l;for(c=am(t.buffer,i[s],r[s],t.position,h),l+=Rt.repeat(" ",e.indent)+cm((t.line+1).toString(),u)+" | "+c.str+` `,l+=Rt.repeat("-",e.indent+u+3+c.pos)+`^ `,a=1;a<=e.linesAfter&&!(s+a>=r.length);a++)c=am(t.buffer,i[s+a],r[s+a],t.position-(i[s]-i[s+a]),h),l+=Rt.repeat(" ",e.indent)+cm((t.line+a+1).toString(),u)+" | "+c.str+` -`;return l.replace(/\n$/,"")}var FY=RY,NY=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],PY=["scalar","sequence","mapping"];function IY(t){var e={};return t!==null&&Object.keys(t).forEach(function(n){t[n].forEach(function(i){e[String(i)]=n})}),e}function $Y(t,e){if(e=e||{},Object.keys(e).forEach(function(n){if(NY.indexOf(n)===-1)throw new Wi('Unknown option "'+n+'" 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(n){return n},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=IY(e.styleAliases||null),PY.indexOf(this.kind)===-1)throw new Wi('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Et=$Y;function Hb(t,e){var n=[];return t[e].forEach(function(i){var r=n.length;n.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(r=s)}),n[r]=i}),n}function zY(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,n;function i(r){r.multi?(t.multi[r.kind].push(r),t.multi.fallback.push(r)):t[r.kind][r.tag]=t.fallback[r.tag]=r}for(e=0,n=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),lG=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function aG(t){return!(t===null||!lG.test(t)||t[t.length-1]==="_")}function cG(t){var e,n;return e=t.replace(/_/g,"").toLowerCase(),n=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:n*parseFloat(e,10)}var uG=/^[-+]?[0-9]+e/;function hG(t,e){var n;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(Rt.isNegativeZero(t))return"-0.0";return n=t.toString(10),uG.test(n)?n.replace("e",".e"):n}function fG(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Rt.isNegativeZero(t))}var dG=new Et("tag:yaml.org,2002:float",{kind:"scalar",resolve:aG,construct:cG,predicate:fG,represent:hG,defaultStyle:"lowercase"}),ML=qY.extend({implicit:[GY,ZY,sG,dG]}),pG=ML,LL=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),OL=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 mG(t){return t===null?!1:LL.exec(t)!==null||OL.exec(t)!==null}function gG(t){var e,n,i,r,o,s,l,a=0,c=null,u,h,f;if(e=LL.exec(t),e===null&&(e=OL.exec(t)),e===null)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(o=+e[4],s=+e[5],l=+e[6],e[7]){for(a=e[7].slice(0,3);a.length<3;)a+="0";a=+a}return e[9]&&(u=+e[10],h=+(e[11]||0),c=(u*60+h)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(n,i,r,o,s,l,a)),c&&f.setTime(f.getTime()-c),f}function yG(t){return t.toISOString()}var vG=new Et("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:mG,construct:gG,instanceOf:Date,represent:yG});function xG(t){return t==="<<"||t===null}var CG=new Et("tag:yaml.org,2002:merge",{kind:"scalar",resolve:xG}),Jv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function wG(t){if(t===null)return!1;var e,n,i=0,r=t.length,o=Jv;for(n=0;n64)){if(e<0)return!1;i+=6}return i%8===0}function bG(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,o=Jv,s=0,l=[];for(e=0;e>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|o.indexOf(i.charAt(e));return n=r%4*6,n===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):n===18?(l.push(s>>10&255),l.push(s>>2&255)):n===12&&l.push(s>>4&255),new Uint8Array(l)}function kG(t){var e="",n=0,i,r,o=t.length,s=Jv;for(i=0;i>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]),n=(n<<8)+t[i];return r=o%3,r===0?(e+=s[n>>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]):r===2?(e+=s[n>>10&63],e+=s[n>>4&63],e+=s[n<<2&63],e+=s[64]):r===1&&(e+=s[n>>2&63],e+=s[n<<4&63],e+=s[64],e+=s[64]),e}function SG(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var _G=new Et("tag:yaml.org,2002:binary",{kind:"scalar",resolve:wG,construct:bG,predicate:SG,represent:kG}),TG=Object.prototype.hasOwnProperty,EG=Object.prototype.toString;function AG(t){if(t===null)return!0;var e=[],n,i,r,o,s,l=t;for(n=0,i=l.length;n>10)+55296,(t-65536&1023)+56320)}var NL=new Array(256),PL=new Array(256);for(var is=0;is<256;is++)NL[is]=qb(is)?1:0,PL[is]=qb(is);function YG(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||$G,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 IL(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=FY(n),new Wi(e,n)}function ie(t,e){throw IL(t,e)}function zf(t,e){t.onWarning&&t.onWarning.call(null,IL(t,e))}var Ub={YAML:function(e,n,i){var r,o,s;e.version!==null&&ie(e,"duplication of %YAML directive"),i.length!==1&&ie(e,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),r===null&&ie(e,"ill-formed argument of the YAML directive"),o=parseInt(r[1],10),s=parseInt(r[2],10),o!==1&&ie(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&zf(e,"unsupported YAML version of the document")},TAG:function(e,n,i){var r,o;i.length!==2&&ie(e,"TAG directive accepts exactly two arguments"),r=i[0],o=i[1],RL.test(r)||ie(e,"ill-formed tag handle (first argument) of the TAG directive"),Qr.call(e.tagMap,r)&&ie(e,'there is a previously declared suffix for "'+r+'" tag handle'),FL.test(o)||ie(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ie(e,"tag prefix is malformed: "+o)}e.tagMap[r]=o}};function jr(t,e,n,i){var r,o,s,l;if(e1&&(t.result+=Rt.repeat(` -`,e-1))}function GG(t,e,n){var i,r,o,s,l,a,c,u,h=t.kind,f=t.result,d;if(d=t.input.charCodeAt(t.position),Qt(d)||Cs(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(r=t.input.charCodeAt(t.position+1),Qt(r)||n&&Cs(r)))return!1;for(t.kind="scalar",t.result="",o=s=t.position,l=!1;d!==0;){if(d===58){if(r=t.input.charCodeAt(t.position+1),Qt(r)||n&&Cs(r))break}else if(d===35){if(i=t.input.charCodeAt(t.position-1),Qt(i))break}else{if(t.position===t.lineStart&&zd(t)||n&&Cs(d))break;if(bi(d))if(a=t.line,c=t.lineStart,u=t.lineIndent,Ge(t,!1,-1),t.lineIndent>=e){l=!0,d=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=a,t.lineStart=c,t.lineIndent=u;break}}l&&(jr(t,o,s,!1),e1(t,t.line-a),o=s=t.position,l=!1),Ao(d)||(s=t.position+1),d=t.input.charCodeAt(++t.position)}return jr(t,o,s,!1),t.result?!0:(t.kind=h,t.result=f,!1)}function XG(t,e){var n,i,r;if(n=t.input.charCodeAt(t.position),n!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=r=t.position;(n=t.input.charCodeAt(t.position))!==0;)if(n===39)if(jr(t,i,t.position,!0),n=t.input.charCodeAt(++t.position),n===39)i=t.position,t.position++,r=t.position;else return!0;else bi(n)?(jr(t,i,r,!0),e1(t,Ge(t,!1,e)),i=r=t.position):t.position===t.lineStart&&zd(t)?ie(t,"unexpected end of the document within a single quoted scalar"):(t.position++,r=t.position);ie(t,"unexpected end of the stream within a single quoted scalar")}function QG(t,e){var n,i,r,o,s,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return jr(t,n,t.position,!0),t.position++,!0;if(l===92){if(jr(t,n,t.position,!0),l=t.input.charCodeAt(++t.position),bi(l))Ge(t,!1,e);else if(l<256&&NL[l])t.result+=PL[l],t.position++;else if((s=qG(l))>0){for(r=s,o=0;r>0;r--)l=t.input.charCodeAt(++t.position),(s=VG(l))>=0?o=(o<<4)+s:ie(t,"expected hexadecimal character");t.result+=KG(o),t.position++}else ie(t,"unknown escape sequence");n=i=t.position}else bi(l)?(jr(t,n,i,!0),e1(t,Ge(t,!1,e)),n=i=t.position):t.position===t.lineStart&&zd(t)?ie(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}ie(t,"unexpected end of the stream within a double quoted scalar")}function JG(t,e){var n=!0,i,r,o,s=t.tag,l,a=t.anchor,c,u,h,f,d,p=Object.create(null),y,v,g,m;if(m=t.input.charCodeAt(t.position),m===91)u=93,d=!1,l=[];else if(m===123)u=125,d=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),m=t.input.charCodeAt(++t.position);m!==0;){if(Ge(t,!0,e),m=t.input.charCodeAt(t.position),m===u)return t.position++,t.tag=s,t.anchor=a,t.kind=d?"mapping":"sequence",t.result=l,!0;n?m===44&&ie(t,"expected the node content, but found ','"):ie(t,"missed comma between flow collection entries"),v=y=g=null,h=f=!1,m===63&&(c=t.input.charCodeAt(t.position+1),Qt(c)&&(h=f=!0,t.position++,Ge(t,!0,e))),i=t.line,r=t.lineStart,o=t.position,rl(t,e,If,!1,!0),v=t.tag,y=t.result,Ge(t,!0,e),m=t.input.charCodeAt(t.position),(f||t.line===i)&&m===58&&(h=!0,m=t.input.charCodeAt(++t.position),Ge(t,!0,e),rl(t,e,If,!1,!0),g=t.result),d?ws(t,l,p,v,y,g,i,r,o):h?l.push(ws(t,null,p,v,y,g,i,r,o)):l.push(y),Ge(t,!0,e),m=t.input.charCodeAt(t.position),m===44?(n=!0,m=t.input.charCodeAt(++t.position)):n=!1}ie(t,"unexpected end of the stream within a flow collection")}function ZG(t,e){var n,i,r=um,o=!1,s=!1,l=e,a=0,c=!1,u,h;if(h=t.input.charCodeAt(t.position),h===124)i=!1;else if(h===62)i=!0;else return!1;for(t.kind="scalar",t.result="";h!==0;)if(h=t.input.charCodeAt(++t.position),h===43||h===45)um===r?r=h===43?Wb:zG:ie(t,"repeat of a chomping mode identifier");else if((u=UG(h))>=0)u===0?ie(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?ie(t,"repeat of an indentation width identifier"):(l=e+u-1,s=!0);else break;if(Ao(h)){do h=t.input.charCodeAt(++t.position);while(Ao(h));if(h===35)do h=t.input.charCodeAt(++t.position);while(!bi(h)&&h!==0)}for(;h!==0;){for(Zv(t),t.lineIndent=0,h=t.input.charCodeAt(t.position);(!s||t.lineIndentl&&(l=t.lineIndent),bi(h)){a++;continue}if(t.lineIndent=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),tG=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function nG(t){return!(t===null||!tG.test(t)||t[t.length-1]==="_")}function iG(t){var e,n;return e=t.replace(/_/g,"").toLowerCase(),n=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:n*parseFloat(e,10)}var rG=/^[-+]?[0-9]+e/;function oG(t,e){var n;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(Rt.isNegativeZero(t))return"-0.0";return n=t.toString(10),rG.test(n)?n.replace("e",".e"):n}function sG(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Rt.isNegativeZero(t))}var lG=new Et("tag:yaml.org,2002:float",{kind:"scalar",resolve:nG,construct:iG,predicate:sG,represent:oG,defaultStyle:"lowercase"}),kL=$Y.extend({implicit:[WY,KY,eG,lG]}),aG=kL,SL=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),_L=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 cG(t){return t===null?!1:SL.exec(t)!==null||_L.exec(t)!==null}function uG(t){var e,n,i,r,o,s,l,a=0,c=null,u,h,f;if(e=SL.exec(t),e===null&&(e=_L.exec(t)),e===null)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(o=+e[4],s=+e[5],l=+e[6],e[7]){for(a=e[7].slice(0,3);a.length<3;)a+="0";a=+a}return e[9]&&(u=+e[10],h=+(e[11]||0),c=(u*60+h)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(n,i,r,o,s,l,a)),c&&f.setTime(f.getTime()-c),f}function hG(t){return t.toISOString()}var fG=new Et("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:cG,construct:uG,instanceOf:Date,represent:hG});function dG(t){return t==="<<"||t===null}var pG=new Et("tag:yaml.org,2002:merge",{kind:"scalar",resolve:dG}),Jv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function mG(t){if(t===null)return!1;var e,n,i=0,r=t.length,o=Jv;for(n=0;n64)){if(e<0)return!1;i+=6}return i%8===0}function gG(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,o=Jv,s=0,l=[];for(e=0;e>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|o.indexOf(i.charAt(e));return n=r%4*6,n===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):n===18?(l.push(s>>10&255),l.push(s>>2&255)):n===12&&l.push(s>>4&255),new Uint8Array(l)}function yG(t){var e="",n=0,i,r,o=t.length,s=Jv;for(i=0;i>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]),n=(n<<8)+t[i];return r=o%3,r===0?(e+=s[n>>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]):r===2?(e+=s[n>>10&63],e+=s[n>>4&63],e+=s[n<<2&63],e+=s[64]):r===1&&(e+=s[n>>2&63],e+=s[n<<4&63],e+=s[64],e+=s[64]),e}function vG(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var xG=new Et("tag:yaml.org,2002:binary",{kind:"scalar",resolve:mG,construct:gG,predicate:vG,represent:yG}),CG=Object.prototype.hasOwnProperty,wG=Object.prototype.toString;function bG(t){if(t===null)return!0;var e=[],n,i,r,o,s,l=t;for(n=0,i=l.length;n>10)+55296,(t-65536&1023)+56320)}var LL=new Array(256),OL=new Array(256);for(var is=0;is<256;is++)LL[is]=Vb(is)?1:0,OL[is]=Vb(is);function HG(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||DG,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 BL(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=MY(n),new Wi(e,n)}function ie(t,e){throw BL(t,e)}function zf(t,e){t.onWarning&&t.onWarning.call(null,BL(t,e))}var qb={YAML:function(e,n,i){var r,o,s;e.version!==null&&ie(e,"duplication of %YAML directive"),i.length!==1&&ie(e,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),r===null&&ie(e,"ill-formed argument of the YAML directive"),o=parseInt(r[1],10),s=parseInt(r[2],10),o!==1&&ie(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&zf(e,"unsupported YAML version of the document")},TAG:function(e,n,i){var r,o;i.length!==2&&ie(e,"TAG directive accepts exactly two arguments"),r=i[0],o=i[1],AL.test(r)||ie(e,"ill-formed tag handle (first argument) of the TAG directive"),Qr.call(e.tagMap,r)&&ie(e,'there is a previously declared suffix for "'+r+'" tag handle'),ML.test(o)||ie(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ie(e,"tag prefix is malformed: "+o)}e.tagMap[r]=o}};function jr(t,e,n,i){var r,o,s,l;if(e1&&(t.result+=Rt.repeat(` +`,e-1))}function WG(t,e,n){var i,r,o,s,l,a,c,u,h=t.kind,f=t.result,d;if(d=t.input.charCodeAt(t.position),Qt(d)||Cs(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(r=t.input.charCodeAt(t.position+1),Qt(r)||n&&Cs(r)))return!1;for(t.kind="scalar",t.result="",o=s=t.position,l=!1;d!==0;){if(d===58){if(r=t.input.charCodeAt(t.position+1),Qt(r)||n&&Cs(r))break}else if(d===35){if(i=t.input.charCodeAt(t.position-1),Qt(i))break}else{if(t.position===t.lineStart&&zd(t)||n&&Cs(d))break;if(bi(d))if(a=t.line,c=t.lineStart,u=t.lineIndent,Ge(t,!1,-1),t.lineIndent>=e){l=!0,d=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=a,t.lineStart=c,t.lineIndent=u;break}}l&&(jr(t,o,s,!1),e1(t,t.line-a),o=s=t.position,l=!1),Ao(d)||(s=t.position+1),d=t.input.charCodeAt(++t.position)}return jr(t,o,s,!1),t.result?!0:(t.kind=h,t.result=f,!1)}function VG(t,e){var n,i,r;if(n=t.input.charCodeAt(t.position),n!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=r=t.position;(n=t.input.charCodeAt(t.position))!==0;)if(n===39)if(jr(t,i,t.position,!0),n=t.input.charCodeAt(++t.position),n===39)i=t.position,t.position++,r=t.position;else return!0;else bi(n)?(jr(t,i,r,!0),e1(t,Ge(t,!1,e)),i=r=t.position):t.position===t.lineStart&&zd(t)?ie(t,"unexpected end of the document within a single quoted scalar"):(t.position++,r=t.position);ie(t,"unexpected end of the stream within a single quoted scalar")}function qG(t,e){var n,i,r,o,s,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return jr(t,n,t.position,!0),t.position++,!0;if(l===92){if(jr(t,n,t.position,!0),l=t.input.charCodeAt(++t.position),bi(l))Ge(t,!1,e);else if(l<256&&LL[l])t.result+=OL[l],t.position++;else if((s=$G(l))>0){for(r=s,o=0;r>0;r--)l=t.input.charCodeAt(++t.position),(s=IG(l))>=0?o=(o<<4)+s:ie(t,"expected hexadecimal character");t.result+=jG(o),t.position++}else ie(t,"unknown escape sequence");n=i=t.position}else bi(l)?(jr(t,n,i,!0),e1(t,Ge(t,!1,e)),n=i=t.position):t.position===t.lineStart&&zd(t)?ie(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}ie(t,"unexpected end of the stream within a double quoted scalar")}function UG(t,e){var n=!0,i,r,o,s=t.tag,l,a=t.anchor,c,u,h,f,d,p=Object.create(null),y,v,g,m;if(m=t.input.charCodeAt(t.position),m===91)u=93,d=!1,l=[];else if(m===123)u=125,d=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),m=t.input.charCodeAt(++t.position);m!==0;){if(Ge(t,!0,e),m=t.input.charCodeAt(t.position),m===u)return t.position++,t.tag=s,t.anchor=a,t.kind=d?"mapping":"sequence",t.result=l,!0;n?m===44&&ie(t,"expected the node content, but found ','"):ie(t,"missed comma between flow collection entries"),v=y=g=null,h=f=!1,m===63&&(c=t.input.charCodeAt(t.position+1),Qt(c)&&(h=f=!0,t.position++,Ge(t,!0,e))),i=t.line,r=t.lineStart,o=t.position,rl(t,e,If,!1,!0),v=t.tag,y=t.result,Ge(t,!0,e),m=t.input.charCodeAt(t.position),(f||t.line===i)&&m===58&&(h=!0,m=t.input.charCodeAt(++t.position),Ge(t,!0,e),rl(t,e,If,!1,!0),g=t.result),d?ws(t,l,p,v,y,g,i,r,o):h?l.push(ws(t,null,p,v,y,g,i,r,o)):l.push(y),Ge(t,!0,e),m=t.input.charCodeAt(t.position),m===44?(n=!0,m=t.input.charCodeAt(++t.position)):n=!1}ie(t,"unexpected end of the stream within a flow collection")}function KG(t,e){var n,i,r=um,o=!1,s=!1,l=e,a=0,c=!1,u,h;if(h=t.input.charCodeAt(t.position),h===124)i=!1;else if(h===62)i=!0;else return!1;for(t.kind="scalar",t.result="";h!==0;)if(h=t.input.charCodeAt(++t.position),h===43||h===45)um===r?r=h===43?Hb:RG:ie(t,"repeat of a chomping mode identifier");else if((u=zG(h))>=0)u===0?ie(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?ie(t,"repeat of an indentation width identifier"):(l=e+u-1,s=!0);else break;if(Ao(h)){do h=t.input.charCodeAt(++t.position);while(Ao(h));if(h===35)do h=t.input.charCodeAt(++t.position);while(!bi(h)&&h!==0)}for(;h!==0;){for(Zv(t),t.lineIndent=0,h=t.input.charCodeAt(t.position);(!s||t.lineIndentl&&(l=t.lineIndent),bi(h)){a++;continue}if(t.lineIndente)&&a!==0)ie(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(v&&(s=t.line,l=t.lineStart,a=t.position),rl(t,e,$f,!0,r)&&(v?p=t.result:y=t.result),v||(ws(t,h,f,d,p,y,s,l,a),d=p=y=null),Ge(t,!0,-1),m=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&m!==0)ie(t,"bad indentation of a mapping entry");else if(t.lineIndente?a=1:t.lineIndent===e?a=0:t.lineIndente?a=1:t.lineIndent===e?a=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),h=0,f=t.implicitTypes.length;h"),t.result!==null&&p.kind!==t.kind&&ie(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result,t.tag)?(t.result=p.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ie(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function rX(t){var e=t.position,n,i,r,o=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Ge(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(o=!0,s=t.input.charCodeAt(++t.position),n=t.position;s!==0&&!Qt(s);)s=t.input.charCodeAt(++t.position);for(i=t.input.slice(n,t.position),r=[],i.length<1&&ie(t,"directive name must not be less than one character in length");s!==0;){for(;Ao(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!bi(s));break}if(bi(s))break;for(n=t.position;s!==0&&!Qt(s);)s=t.input.charCodeAt(++t.position);r.push(t.input.slice(n,t.position))}s!==0&&Zv(t),Qr.call(Ub,i)?Ub[i](t,i,r):zf(t,'unknown document directive "'+i+'"')}if(Ge(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Ge(t,!0,-1)):o&&ie(t,"directives end mark is expected"),rl(t,t.lineIndent-1,$f,!1,!0),Ge(t,!0,-1),t.checkLineBreaks&&HG.test(t.input.slice(e,t.position))&&zf(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&zd(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Ge(t,!0,-1));return}if(t.position"u"&&(n=e,e=null);var i=$L(t,n);if(typeof e!="function")return i;for(var r=0,o=i.length;rt.replace(/\r\n?/g,` -`).replace(/<(\w+)([^>]*)>/g,(e,n,i)=>"<"+n+i.replace(/="([^"]*)"/g,"='$1'")+">"),pX=t=>{const{text:e,metadata:n}=fX(t),{displayMode:i,title:r,config:o={}}=n;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:r,config:o,text:e}},mX=t=>{const e=ba.detectInit(t)??{},n=ba.detectDirective(t,"wrap");return Array.isArray(n)?e.wrap=n.some(({type:i})=>{}):(n==null?void 0:n.type)==="wrap"&&(e.wrap=!0),{text:Uq(t),directive:e}};function gX(t){const e=dX(t),n=pX(e),i=mX(n.text),r=QM(n.config,i.directive);return t=bY(i.text),{code:t,title:n.title,config:r}}const yX=5e4,vX="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",xX="sandbox",CX="loose",wX="http://www.w3.org/2000/svg",bX="http://www.w3.org/1999/xlink",kX="http://www.w3.org/1999/xhtml",SX="100%",_X="100%",TX="border:0;margin:0;",EX="margin:0",AX="allow-top-navigation-by-user-activation allow-popups",MX='The "iframe" tag is not supported by your browser.',LX=["foreignobject"],OX=["dominant-baseline"];function zL(t){const e=gX(t);return Ff(),gU(e.config??{}),e}async function BX(t,e){Xv(),t=zL(t).code;try{await Qv(t)}catch(n){if(e!=null&&e.suppressErrors)return!1;throw n}return!0}const DX=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),e=e.replace(/#\w+;/g,function(n){const i=n.substring(1,n.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},RX=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},Gb=(t,e,n=[])=>` -.${t} ${e} { ${n.join(" !important; ")} !important; }`,FX=(t,e={})=>{var n;let i="";if(t.themeCSS!==void 0&&(i+=` +`,o?1+a:a),o=!0,s=!0,a=0,n=t.position;!bi(h)&&h!==0;)h=t.input.charCodeAt(++t.position);jr(t,n,t.position,!1)}return!0}function Kb(t,e){var n,i=t.tag,r=t.anchor,o=[],s,l=!1,a;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),a=t.input.charCodeAt(t.position);a!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ie(t,"tab characters must not be used in indentation")),!(a!==45||(s=t.input.charCodeAt(t.position+1),!Qt(s))));){if(l=!0,t.position++,Ge(t,!0,-1)&&t.lineIndent<=e){o.push(null),a=t.input.charCodeAt(t.position);continue}if(n=t.line,rl(t,e,EL,!1,!0),o.push(t.result),Ge(t,!0,-1),a=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&a!==0)ie(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(v&&(s=t.line,l=t.lineStart,a=t.position),rl(t,e,$f,!0,r)&&(v?p=t.result:y=t.result),v||(ws(t,h,f,d,p,y,s,l,a),d=p=y=null),Ge(t,!0,-1),m=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&m!==0)ie(t,"bad indentation of a mapping entry");else if(t.lineIndente?a=1:t.lineIndent===e?a=0:t.lineIndente?a=1:t.lineIndent===e?a=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),h=0,f=t.implicitTypes.length;h"),t.result!==null&&p.kind!==t.kind&&ie(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result,t.tag)?(t.result=p.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ie(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function JG(t){var e=t.position,n,i,r,o=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Ge(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(o=!0,s=t.input.charCodeAt(++t.position),n=t.position;s!==0&&!Qt(s);)s=t.input.charCodeAt(++t.position);for(i=t.input.slice(n,t.position),r=[],i.length<1&&ie(t,"directive name must not be less than one character in length");s!==0;){for(;Ao(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!bi(s));break}if(bi(s))break;for(n=t.position;s!==0&&!Qt(s);)s=t.input.charCodeAt(++t.position);r.push(t.input.slice(n,t.position))}s!==0&&Zv(t),Qr.call(qb,i)?qb[i](t,i,r):zf(t,'unknown document directive "'+i+'"')}if(Ge(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Ge(t,!0,-1)):o&&ie(t,"directives end mark is expected"),rl(t,t.lineIndent-1,$f,!1,!0),Ge(t,!0,-1),t.checkLineBreaks&&NG.test(t.input.slice(e,t.position))&&zf(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&zd(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Ge(t,!0,-1));return}if(t.position"u"&&(n=e,e=null);var i=DL(t,n);if(typeof e!="function")return i;for(var r=0,o=i.length;rt.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(e,n,i)=>"<"+n+i.replace(/="([^"]*)"/g,"='$1'")+">"),aX=t=>{const{text:e,metadata:n}=sX(t),{displayMode:i,title:r,config:o={}}=n;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:r,config:o,text:e}},cX=t=>{const e=ba.detectInit(t)??{},n=ba.detectDirective(t,"wrap");return Array.isArray(n)?e.wrap=n.some(({type:i})=>{}):(n==null?void 0:n.type)==="wrap"&&(e.wrap=!0),{text:zq(t),directive:e}};function uX(t){const e=lX(t),n=aX(e),i=cX(n.text),r=qM(n.config,i.directive);return t=gY(i.text),{code:t,title:n.title,config:r}}const hX=5e4,fX="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",dX="sandbox",pX="loose",mX="http://www.w3.org/2000/svg",gX="http://www.w3.org/1999/xlink",yX="http://www.w3.org/1999/xhtml",vX="100%",xX="100%",CX="border:0;margin:0;",wX="margin:0",bX="allow-top-navigation-by-user-activation allow-popups",kX='The "iframe" tag is not supported by your browser.',SX=["foreignobject"],_X=["dominant-baseline"];function RL(t){const e=uX(t);return Ff(),uU(e.config??{}),e}async function TX(t,e){Xv(),t=RL(t).code;try{await Qv(t)}catch(n){if(e!=null&&e.suppressErrors)return!1;throw n}return!0}const EX=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),e=e.replace(/#\w+;/g,function(n){const i=n.substring(1,n.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},AX=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},Yb=(t,e,n=[])=>` +.${t} ${e} { ${n.join(" !important; ")} !important; }`,MX=(t,e={})=>{var n;let i="";if(t.themeCSS!==void 0&&(i+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(i+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(i+=` -:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!lm(e)){const l=t.htmlLabels||((n=t.flowchart)==null?void 0:n.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const a in e){const c=e[a];lm(c.styles)||l.forEach(u=>{i+=Gb(c.id,u,c.styles)}),lm(c.textStyles)||(i+=Gb(c.id,"tspan",c.textStyles))}}return i},NX=(t,e,n,i)=>{const r=FX(t,n),o=NK(e,r,t.themeVariables);return T0(YV(`${i}{${o}}`),XV)},PX=(t="",e,n)=>{let i=t;return!n&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=RX(i),i=i.replace(/
/g,"
"),i},IX=(t="",e)=>{var n,i;const r=(i=(n=e==null?void 0:e.viewBox)==null?void 0:n.baseVal)!=null&&i.height?e.viewBox.baseVal.height+"px":_X,o=btoa(''+t+"");return``},Xb=(t,e,n,i,r)=>{const o=t.append("div");o.attr("id",n),i&&o.attr("style",i);const s=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",wX);return r&&s.attr("xmlns:xlink",r),s.append("g"),t};function Qb(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const $X=(t,e,n,i)=>{var r,o,s;(r=t.getElementById(e))==null||r.remove(),(o=t.getElementById(n))==null||o.remove(),(s=t.getElementById(i))==null||s.remove()},zX=async function(t,e,n){var i,r,o,s,l,a;Xv();const c=zL(e);e=c.code;const u=_i();re.debug(u),e.length>((u==null?void 0:u.maxTextSize)??yX)&&(e=vX);const h="#"+t,f="i"+t,d="#"+f,p="d"+t,y="#"+p;let v=bn("body");const g=u.securityLevel===xX,m=u.securityLevel===CX,x=u.fontFamily;if(n!==void 0){if(n&&(n.innerHTML=""),g){const L=Qb(bn(n),f);v=bn(L.nodes()[0].contentDocument.body),v.node().style.margin=0}else v=bn(n);Xb(v,t,p,`font-family: ${x}`,bX)}else{if($X(document,t,p,f),g){const L=Qb(bn("body"),f);v=bn(L.nodes()[0].contentDocument.body),v.node().style.margin=0}else v=bn("body");Xb(v,t,p)}e=DX(e);let C,w;try{C=await Qv(e,{title:c.title})}catch(L){C=new TL("error"),w=L}const b=v.select(y).node(),S=C.type,M=b.firstChild,N=M.firstChild,O=(r=(i=C.renderer).getClasses)==null?void 0:r.call(i,e,C),D=NX(u,S,O,h),V=document.createElement("style");V.innerHTML=D,M.insertBefore(V,N);try{await C.renderer.draw(e,t,$b,C)}catch(L){throw ZK.draw(e,t,$b),L}const K=v.select(`${y} svg`),z=(s=(o=C.db).getAccTitle)==null?void 0:s.call(o),F=(a=(l=C.db).getAccDescription)==null?void 0:a.call(l);HX(S,K,z,F),v.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",kX);let B=v.select(y).node().innerHTML;if(re.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),B=PX(B,g,jM(u.arrowMarkerAbsolute)),g){const L=v.select(y+" svg").node();B=IX(B,L)}else m||(B=Af.sanitize(B,{ADD_TAGS:LX,ADD_ATTR:OX}));if(vY(),w)throw w;const _=bn(g?d:y).node();return _&&"remove"in _&&_.remove(),{svg:B,bindFunctions:C.db.bindFunctions}};function jX(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),pU(t),t!=null&&t.theme&&t.theme in Gi?t.themeVariables=Gi[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Gi.default.getThemeVariables(t.themeVariables));const n=typeof t=="object"?dU(t):ZM();$v(n.logLevel),Xv()}function HX(t,e,n,i){CY(e,t),wY(e,n,i,e.attr("id"))}const jo=Object.freeze({render:zX,parse:BX,getDiagramFromText:Qv,initialize:jX,getConfig:_i,setConfig:eL,getSiteConfig:ZM,updateSiteConfig:mU,reset:()=>{Ff()},globalReset:()=>{Ff(nl)},defaultConfig:nl});$v(_i().logLevel);Ff(_i());const WX=async()=>{re.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(tl).map(async([n,{detector:i,loader:r}])=>{if(r)try{Gv(n)}catch{try{const{diagram:s,id:l}=await r();Pf(l,s,i)}catch(s){throw re.error(`Failed to load external diagram with key ${n}. Removing from detectors.`),delete tl[n],s}}}))).filter(n=>n.status==="rejected");if(e.length>0){re.error(`Failed to load ${e.length} external diagrams`);for(const n of e)re.error(n);throw new Error(`Failed to load ${e.length} external diagrams`)}},VX=(t,e,n)=>{re.warn(t),XM(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},jL=async function(t={querySelector:".mermaid"}){try{await qX(t)}catch(e){if(XM(e)&&re.error(e.str),Jt.parseError&&Jt.parseError(e),!t.suppressErrors)throw re.error("Use the suppressErrors option to suppress these errors"),e}},qX=async function({postRenderCallback:t,querySelector:e,nodes:n}={querySelector:".mermaid"}){const i=jo.getConfig();re.debug(`${t?"":"No "}Callback function found`);let r;if(n)r=n;else if(e)r=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");re.debug(`Found ${r.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(re.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),jo.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new ba.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const l=[];for(const a of Array.from(r)){re.info("Rendering diagram: "+a.id);/*! Check if previously processed */if(a.getAttribute("data-processed"))continue;a.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;s=a.innerHTML,s=d8(ba.entityDecode(s)).trim().replace(//gi,"
");const u=ba.detectInit(s);u&&re.debug("Detected early reinit: ",u);try{const{svg:h,bindFunctions:f}=await qL(c,s,a);a.innerHTML=h,t&&await t(c),f&&f(a)}catch(h){VX(h,l,Jt.parseError)}}if(l.length>0)throw l[0]},HL=function(t){jo.initialize(t)},UX=async function(t,e,n){re.warn("mermaid.init is deprecated. Please use run instead."),t&&HL(t);const i={postRenderCallback:n,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await jL(i)},KX=async(t,{lazyLoad:e=!0}={})=>{UM(...t),e===!1&&await WX()},WL=function(){if(Jt.startOnLoad){const{startOnLoad:t}=jo.getConfig();t&&Jt.run().catch(e=>re.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*! +:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!lm(e)){const l=t.htmlLabels||((n=t.flowchart)==null?void 0:n.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const a in e){const c=e[a];lm(c.styles)||l.forEach(u=>{i+=Yb(c.id,u,c.styles)}),lm(c.textStyles)||(i+=Yb(c.id,"tspan",c.textStyles))}}return i},LX=(t,e,n,i)=>{const r=MX(t,n),o=LK(e,r,t.themeVariables);return T0(HV(`${i}{${o}}`),VV)},OX=(t="",e,n)=>{let i=t;return!n&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=AX(i),i=i.replace(/
/g,"
"),i},BX=(t="",e)=>{var n,i;const r=(i=(n=e==null?void 0:e.viewBox)==null?void 0:n.baseVal)!=null&&i.height?e.viewBox.baseVal.height+"px":xX,o=btoa(''+t+"");return``},Gb=(t,e,n,i,r)=>{const o=t.append("div");o.attr("id",n),i&&o.attr("style",i);const s=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",mX);return r&&s.attr("xmlns:xlink",r),s.append("g"),t};function Xb(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const DX=(t,e,n,i)=>{var r,o,s;(r=t.getElementById(e))==null||r.remove(),(o=t.getElementById(n))==null||o.remove(),(s=t.getElementById(i))==null||s.remove()},RX=async function(t,e,n){var i,r,o,s,l,a;Xv();const c=RL(e);e=c.code;const u=_i();re.debug(u),e.length>((u==null?void 0:u.maxTextSize)??hX)&&(e=fX);const h="#"+t,f="i"+t,d="#"+f,p="d"+t,y="#"+p;let v=bn("body");const g=u.securityLevel===dX,m=u.securityLevel===pX,x=u.fontFamily;if(n!==void 0){if(n&&(n.innerHTML=""),g){const L=Xb(bn(n),f);v=bn(L.nodes()[0].contentDocument.body),v.node().style.margin=0}else v=bn(n);Gb(v,t,p,`font-family: ${x}`,gX)}else{if(DX(document,t,p,f),g){const L=Xb(bn("body"),f);v=bn(L.nodes()[0].contentDocument.body),v.node().style.margin=0}else v=bn("body");Gb(v,t,p)}e=EX(e);let C,w;try{C=await Qv(e,{title:c.title})}catch(L){C=new CL("error"),w=L}const b=v.select(y).node(),S=C.type,M=b.firstChild,N=M.firstChild,O=(r=(i=C.renderer).getClasses)==null?void 0:r.call(i,e,C),D=LX(u,S,O,h),V=document.createElement("style");V.innerHTML=D,M.insertBefore(V,N);try{await C.renderer.draw(e,t,Ib,C)}catch(L){throw KK.draw(e,t,Ib),L}const K=v.select(`${y} svg`),z=(s=(o=C.db).getAccTitle)==null?void 0:s.call(o),F=(a=(l=C.db).getAccDescription)==null?void 0:a.call(l);NX(S,K,z,F),v.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",yX);let B=v.select(y).node().innerHTML;if(re.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),B=OX(B,g,FM(u.arrowMarkerAbsolute)),g){const L=v.select(y+" svg").node();B=BX(B,L)}else m||(B=Af.sanitize(B,{ADD_TAGS:SX,ADD_ATTR:_X}));if(fY(),w)throw w;const _=bn(g?d:y).node();return _&&"remove"in _&&_.remove(),{svg:B,bindFunctions:C.db.bindFunctions}};function FX(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),aU(t),t!=null&&t.theme&&t.theme in Gi?t.themeVariables=Gi[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Gi.default.getThemeVariables(t.themeVariables));const n=typeof t=="object"?lU(t):KM();$v(n.logLevel),Xv()}function NX(t,e,n,i){pY(e,t),mY(e,n,i,e.attr("id"))}const jo=Object.freeze({render:RX,parse:TX,getDiagramFromText:Qv,initialize:FX,getConfig:_i,setConfig:YM,getSiteConfig:KM,updateSiteConfig:cU,reset:()=>{Ff()},globalReset:()=>{Ff(nl)},defaultConfig:nl});$v(_i().logLevel);Ff(_i());const PX=async()=>{re.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(tl).map(async([n,{detector:i,loader:r}])=>{if(r)try{Gv(n)}catch{try{const{diagram:s,id:l}=await r();Pf(l,s,i)}catch(s){throw re.error(`Failed to load external diagram with key ${n}. Removing from detectors.`),delete tl[n],s}}}))).filter(n=>n.status==="rejected");if(e.length>0){re.error(`Failed to load ${e.length} external diagrams`);for(const n of e)re.error(n);throw new Error(`Failed to load ${e.length} external diagrams`)}},IX=(t,e,n)=>{re.warn(t),VM(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},FL=async function(t={querySelector:".mermaid"}){try{await $X(t)}catch(e){if(VM(e)&&re.error(e.str),Jt.parseError&&Jt.parseError(e),!t.suppressErrors)throw re.error("Use the suppressErrors option to suppress these errors"),e}},$X=async function({postRenderCallback:t,querySelector:e,nodes:n}={querySelector:".mermaid"}){const i=jo.getConfig();re.debug(`${t?"":"No "}Callback function found`);let r;if(n)r=n;else if(e)r=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");re.debug(`Found ${r.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(re.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),jo.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new ba.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const l=[];for(const a of Array.from(r)){re.info("Rendering diagram: "+a.id);/*! Check if previously processed */if(a.getAttribute("data-processed"))continue;a.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;s=a.innerHTML,s=l8(ba.entityDecode(s)).trim().replace(//gi,"
");const u=ba.detectInit(s);u&&re.debug("Detected early reinit: ",u);try{const{svg:h,bindFunctions:f}=await $L(c,s,a);a.innerHTML=h,t&&await t(c),f&&f(a)}catch(h){IX(h,l,Jt.parseError)}}if(l.length>0)throw l[0]},NL=function(t){jo.initialize(t)},zX=async function(t,e,n){re.warn("mermaid.init is deprecated. Please use run instead."),t&&NL(t);const i={postRenderCallback:n,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await FL(i)},jX=async(t,{lazyLoad:e=!0}={})=>{zM(...t),e===!1&&await PX()},PL=function(){if(Jt.startOnLoad){const{startOnLoad:t}=jo.getConfig();t&&Jt.run().catch(e=>re.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*! * Wait for document loaded before starting the execution - */window.addEventListener("load",WL,!1)}const YX=function(t){Jt.parseError=t},jf=[];let hm=!1;const VL=async()=>{if(!hm){for(hm=!0;jf.length>0;){const t=jf.shift();if(t)try{await t()}catch(e){re.error("Error executing queue",e)}}hm=!1}},GX=async(t,e)=>new Promise((n,i)=>{const r=()=>new Promise((o,s)=>{jo.parse(t,e).then(l=>{o(l),n(l)},l=>{var a;re.error("Error parsing",l),(a=Jt.parseError)==null||a.call(Jt,l),s(l),i(l)})});jf.push(r),VL().catch(i)}),qL=(t,e,n)=>new Promise((i,r)=>{const o=()=>new Promise((s,l)=>{jo.render(t,e,n).then(a=>{s(a),i(a)},a=>{var c;re.error("Error parsing",a),(c=Jt.parseError)==null||c.call(Jt,a),l(a),r(a)})});jf.push(o),VL().catch(r)}),Jt={startOnLoad:!0,mermaidAPI:jo,parse:GX,render:qL,init:UX,run:jL,registerExternalDiagrams:KX,initialize:HL,parseError:void 0,contentLoaded:WL,setParseErrorHandler:YX,detectType:Id},XX="dark",QX="default",JX="dark",Nu="light",ZX="data-theme";function eQ(t,e){var r,o;let n=t.getAttribute(ZX)??Nu;n===Nu||n===JX||(n=Nu);const i=n===Nu?QX:XX;return((r=e==null?void 0:e.theme)==null?void 0:r[n])??((o=e==null?void 0:e.mermaid)==null?void 0:o.theme)??i}const tQ=({chart:t,config:e})=>{if(typeof window>"u")return Ze.createElement("div",{className:"mermaid","data-mermaid-src":t},t);const n=k.useMemo(()=>typeof e=="string"?JSON.parse(e):e,[e]),i=document.querySelector("html"),[r,o]=k.useState(!1),s=k.useMemo(()=>eQ(i,n),[n,r]);return k.useEffect(()=>{const l=new MutationObserver(a=>{for(const c of a)if(!(c.type!=="attributes"||c.attributeName!=="data-theme")){o(u=>!u);break}});return l.observe(i,{attributes:!0}),()=>{try{l.disconnect()}catch{}}},[]),k.useEffect(()=>{n&&(n.mermaid?Jt.initialize({startOnLoad:!0,...n.mermaid,theme:s}):Jt.initialize({startOnLoad:!0,theme:s}),document.querySelectorAll('div.mermaid[data-processed="true"]').forEach(l=>{l.removeAttribute("data-processed"),l.innerHTML=l.getAttribute("data-mermaid-src")}),Jt.contentLoaded())},[n,s]),k.useEffect(()=>{setTimeout(Jt.contentLoaded,0)},[t]),Ze.createElement("div",{className:"mermaid","data-mermaid-src":t},t)};var UL={exports:{}};(function(t,e){(function(n,i){i()})(Cr,function(){function n(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function i(c,u,h){var f=new XMLHttpRequest;f.open("GET",c),f.responseType="blob",f.onload=function(){a(f.response,u,h)},f.onerror=function(){console.error("could not download file")},f.send()}function r(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function o(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Cr=="object"&&Cr.global===Cr?Cr:void 0,l=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(c,u,h){var f=s.URL||s.webkitURL,d=document.createElement("a");u=u||c.name||"download",d.download=u,d.rel="noopener",typeof c=="string"?(d.href=c,d.origin===location.origin?o(d):r(d.href)?i(c,u,h):o(d,d.target="_blank")):(d.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(d.href)},4e4),setTimeout(function(){o(d)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,h){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(n(c,h),u);else if(r(c))i(c,u,h);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){o(f)})}}:function(c,u,h,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof c=="string")return i(c,u,h);var d=c.type==="application/octet-stream",p=/constructor/i.test(s.HTMLElement)||s.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||d&&p||l)&&typeof FileReader<"u"){var v=new FileReader;v.onloadend=function(){var x=v.result;x=y?x:x.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=x:location=x,f=null},v.readAsDataURL(c)}else{var g=s.URL||s.webkitURL,m=g.createObjectURL(c);f?f.location=m:location.href=m,f=null,setTimeout(function(){g.revokeObjectURL(m)},4e4)}});s.saveAs=a.saveAs=a,t.exports=a})})(UL);var nQ=UL.exports,iQ=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],i=0;i"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=Jb[e.format]||Jb.default;window.clipboardData.setData(h,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(l),o.selectNodeContents(l),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");a=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),a=!0}catch(h){n&&console.error("unable to copy using clipboardData: ",h),n&&console.error("falling back to prompt"),i=sQ("message"in e?e.message:oQ),window.prompt(i,t)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),l&&document.body.removeChild(l),r()}return a}var aQ=lQ;const cQ=sr(aQ),KL=k.forwardRef(({bsPrefix:t,size:e,vertical:n=!1,className:i,role:r="group",as:o="div",...s},l)=>{const a=me(t,"btn-group");let c=a;return n&&(c=`${a}-vertical`),A.jsx(o,{...s,ref:l,role:r,className:fe(i,c,e&&`${a}-${e}`)})});KL.displayName="ButtonGroup";const uQ=KL;function hQ(t,e,n){const i=k.useRef(t!==void 0),[r,o]=k.useState(e),s=t!==void 0,l=i.current;return i.current=s,!s&&l&&r!==e&&o(e),[s?t:r,k.useCallback((...a)=>{const[c,...u]=a;let h=n==null?void 0:n(c,...u);return o(c),h},[n])]}function fQ(){const[,t]=k.useReducer(e=>!e,!1);return t}const dQ=k.createContext(null),jd=dQ,pQ=["children"];function mQ(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o=0)&&(n[r]=t[r]);return n}const gQ=()=>{};function YL(t={}){const e=k.useContext(jd),[n,i]=mg(),r=k.useRef(!1),{flip:o,offset:s,rootCloseEvent:l,fixed:a=!1,placement:c,popperConfig:u={},enableEventListeners:h=!0,usePopper:f=!!e}=t,d=(e==null?void 0:e.show)==null?!!t.show:e.show;d&&!r.current&&(r.current=!0);const p=b=>{e==null||e.toggle(!1,b)},{placement:y,setMenu:v,menuElement:g,toggleElement:m}=e||{},x=f2(m,g,p2({placement:c||y||"bottom-start",enabled:f,enableEvents:h??d,offset:s,flip:o,fixed:a,arrowElement:n,popperConfig:u})),C=Object.assign({ref:v||gQ,"aria-labelledby":m==null?void 0:m.id},x.attributes.popper,{style:x.styles.popper}),w={show:d,placement:y,hasShown:r.current,toggle:e==null?void 0:e.toggle,popper:f?x:null,arrowProps:f?Object.assign({ref:i},x.attributes.arrow,{style:x.styles.arrow}):{}};return d2(g,p,{clickTrigger:l,disabled:!d}),[C,w]}const yQ={usePopper:!0};function t1(t){let{children:e}=t,n=mQ(t,pQ);const[i,r]=YL(n);return A.jsx(A.Fragment,{children:e(i,r)})}t1.displayName="DropdownMenu";t1.defaultProps=yQ;const Hf={prefix:String(Math.round(Math.random()*1e10)),current:0},GL=Ze.createContext(Hf),vQ=Ze.createContext(!1);let xQ=!!(typeof window<"u"&&window.document&&window.document.createElement),fm=new WeakMap;function CQ(t=!1){let e=k.useContext(GL),n=k.useRef(null);if(n.current===null&&!t){var i,r;let o=(i=Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let s=fm.get(o);s==null?fm.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==s.state&&(e.current=s.id,fm.delete(o))}n.current=++e.current}return n.current}function wQ(t){let e=k.useContext(GL);e===Hf&&!xQ&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=CQ(!!t),i=`react-aria${e.prefix}`;return t||`${i}-${n}`}function bQ(t){let e=Ze.useId(),[n]=k.useState(EQ()),i=n?"react-aria":`react-aria${Hf.prefix}`;return t||`${i}-${e}`}const kQ=typeof Ze.useId=="function"?bQ:wQ;function SQ(){return!1}function _Q(){return!0}function TQ(t){return()=>{}}function EQ(){return typeof Ze.useSyncExternalStore=="function"?Ze.useSyncExternalStore(TQ,SQ,_Q):k.useContext(vQ)}const XL=t=>{var e;return((e=t.getAttribute("role"))==null?void 0:e.toLowerCase())==="menu"},Zb=()=>{};function QL(){const t=kQ(),{show:e=!1,toggle:n=Zb,setToggle:i,menuElement:r}=k.useContext(jd)||{},o=k.useCallback(l=>{n(!e,l)},[e,n]),s={id:t,ref:i||Zb,onClick:o,"aria-expanded":!!e};return r&&XL(r)&&(s["aria-haspopup"]=!0),[s,{show:e,toggle:n}]}function JL({children:t}){const[e,n]=QL();return A.jsx(A.Fragment,{children:t(e,n)})}JL.displayName="DropdownToggle";const ZL=k.createContext(null);ZL.displayName="NavContext";const AQ=ZL,MQ=["eventKey","disabled","onClick","active","as"];function LQ(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o=0)&&(n[r]=t[r]);return n}function eO({key:t,href:e,active:n,disabled:i,onClick:r}){const o=k.useContext(qh),s=k.useContext(AQ),{activeKey:l}=s||{},a=Tx(t,e),c=n==null&&t!=null?Tx(l)===a:n;return[{onClick:Pe(h=>{i||(r==null||r(h),o&&!h.isPropagationStopped()&&o(a,h))}),"aria-disabled":i||void 0,"aria-selected":c,[Fy("dropdown-item")]:""},{isActive:c}]}const tO=k.forwardRef((t,e)=>{let{eventKey:n,disabled:i,onClick:r,active:o,as:s=tT}=t,l=LQ(t,MQ);const[a]=eO({key:n,href:l.href,disabled:i,onClick:r,active:o});return A.jsx(s,Object.assign({},l,{ref:e},a))});tO.displayName="DropdownItem";function ek(){const t=fQ(),e=k.useRef(null),n=k.useCallback(i=>{e.current=i,t()},[t]);return[e,n]}function Nc({defaultShow:t,show:e,onSelect:n,onToggle:i,itemSelector:r=`* [${Fy("dropdown-item")}]`,focusFirstItemOnShow:o,placement:s="bottom-start",children:l}){const a=sd(),[c,u]=hQ(e,t,i),[h,f]=ek(),d=h.current,[p,y]=ek(),v=p.current,g=F_(c),m=k.useRef(null),x=k.useRef(!1),C=k.useContext(qh),w=k.useCallback((D,V,K=V==null?void 0:V.type)=>{u(D,{originalEvent:V,source:K})},[u]),b=Pe((D,V)=>{n==null||n(D,V),w(!1,V,"select"),V.isPropagationStopped()||C==null||C(D,V)}),S=k.useMemo(()=>({toggle:w,placement:s,show:c,menuElement:d,toggleElement:v,setMenu:f,setToggle:y}),[w,s,c,d,v,f,y]);d&&g&&!c&&(x.current=d.contains(d.ownerDocument.activeElement));const M=Pe(()=>{v&&v.focus&&v.focus()}),N=Pe(()=>{const D=m.current;let V=o;if(V==null&&(V=h.current&&XL(h.current)?"keyboard":!1),V===!1||V==="keyboard"&&!/^key.+$/.test(D))return;const K=gr(h.current,r)[0];K&&K.focus&&K.focus()});k.useEffect(()=>{c?N():x.current&&(x.current=!1,M())},[c,x,M,N]),k.useEffect(()=>{m.current=null});const O=(D,V)=>{if(!h.current)return null;const K=gr(h.current,r);let z=K.indexOf(D)+V;return z=Math.max(0,Math.min(z,K.length)),K[z]};return OF(k.useCallback(()=>a.document,[a]),"keydown",D=>{var V,K;const{key:z}=D,F=D.target,B=(V=h.current)==null?void 0:V.contains(F),$=(K=p.current)==null?void 0:K.contains(F);if(/input|textarea/i.test(F.tagName)&&(z===" "||z!=="Escape"&&B||z==="Escape"&&F.type==="search")||!B&&!$||z==="Tab"&&(!h.current||!c))return;m.current=D.type;const L={originalEvent:D,source:D.type};switch(z){case"ArrowUp":{const R=O(F,-1);R&&R.focus&&R.focus(),D.preventDefault();return}case"ArrowDown":if(D.preventDefault(),!c)u(!0,L);else{const R=O(F,1);R&&R.focus&&R.focus()}return;case"Tab":M_(F.ownerDocument,"keyup",R=>{var H;(R.key==="Tab"&&!R.target||!((H=h.current)!=null&&H.contains(R.target)))&&u(!1,L)},{once:!0});break;case"Escape":z==="Escape"&&(D.preventDefault(),D.stopPropagation()),u(!1,L);break}}),A.jsx(qh.Provider,{value:b,children:A.jsx(jd.Provider,{value:S,children:l})})}Nc.displayName="Dropdown";Nc.Menu=t1;Nc.Toggle=JL;Nc.Item=tO;const nO=k.createContext({});nO.displayName="DropdownContext";const iO=nO,rO=k.forwardRef(({className:t,bsPrefix:e,as:n="hr",role:i="separator",...r},o)=>(e=me(e,"dropdown-divider"),A.jsx(n,{ref:o,className:fe(t,e),role:i,...r})));rO.displayName="DropdownDivider";const OQ=rO,oO=k.forwardRef(({className:t,bsPrefix:e,as:n="div",role:i="heading",...r},o)=>(e=me(e,"dropdown-header"),A.jsx(n,{ref:o,className:fe(t,e),role:i,...r})));oO.displayName="DropdownHeader";const BQ=oO,sO=k.forwardRef(({bsPrefix:t,className:e,eventKey:n,disabled:i=!1,onClick:r,active:o,as:s=iT,...l},a)=>{const c=me(t,"dropdown-item"),[u,h]=eO({key:n,href:l.href,disabled:i,onClick:r,active:o});return A.jsx(s,{...l,...u,ref:a,className:fe(e,c,h.isActive&&"active",i&&"disabled")})});sO.displayName="DropdownItem";const DQ=sO,lO=k.forwardRef(({className:t,bsPrefix:e,as:n="span",...i},r)=>(e=me(e,"dropdown-item-text"),A.jsx(n,{ref:r,className:fe(t,e),...i})));lO.displayName="DropdownItemText";const RQ=lO,aO=k.createContext(null);aO.displayName="InputGroupContext";const cO=aO;function uO(t,e){return t}function hO(t,e,n){const i=n?"top-end":"top-start",r=n?"top-start":"top-end",o=n?"bottom-end":"bottom-start",s=n?"bottom-start":"bottom-end",l=n?"right-start":"left-start",a=n?"right-end":"left-end",c=n?"left-start":"right-start",u=n?"left-end":"right-end";let h=t?s:o;return e==="up"?h=t?r:i:e==="end"?h=t?u:c:e==="start"?h=t?a:l:e==="down-centered"?h="bottom":e==="up-centered"&&(h="top"),h}const fO=k.forwardRef(({bsPrefix:t,className:e,align:n,rootCloseEvent:i,flip:r=!0,show:o,renderOnMount:s,as:l="div",popperConfig:a,variant:c,...u},h)=>{let f=!1;const d=k.useContext(al),p=me(t,"dropdown-menu"),{align:y,drop:v,isRTL:g}=k.useContext(iO);n=n||y;const m=k.useContext(cO),x=[];if(n)if(typeof n=="object"){const D=Object.keys(n);if(D.length){const V=D[0],K=n[V];f=K==="start",x.push(`${p}-${V}-${K}`)}}else n==="end"&&(f=!0);const C=hO(f,v,g),[w,{hasShown:b,popper:S,show:M,toggle:N}]=YL({flip:r,rootCloseEvent:i,show:o,usePopper:!d&&x.length===0,offset:[0,2],popperConfig:a,placement:C});if(w.ref=to(uO(h),w.ref),Ha(()=>{M&&(S==null||S.update())},[M]),!b&&!s&&!m)return null;typeof l!="string"&&(w.show=M,w.close=()=>N==null?void 0:N(!1),w.align=n);let O=u.style;return S!=null&&S.placement&&(O={...u.style,...w.style},u["x-placement"]=S.placement),A.jsx(l,{...u,...w,style:O,...(x.length||d)&&{"data-bs-popper":"static"},className:fe(e,p,M&&"show",f&&`${p}-end`,c&&`${p}-${c}`,...x)})});fO.displayName="DropdownMenu";const FQ=fO,dO=k.forwardRef(({bsPrefix:t,split:e,className:n,childBsPrefix:i,as:r=Ro,...o},s)=>{const l=me(t,"dropdown-toggle"),a=k.useContext(jd);i!==void 0&&(o.bsPrefix=i);const[c]=QL();return c.ref=to(c.ref,uO(s)),A.jsx(r,{className:fe(n,l,e&&`${l}-split`,(a==null?void 0:a.show)&&"show"),...c,...o})});dO.displayName="DropdownToggle";const NQ=dO,pO=k.forwardRef((t,e)=>{const{bsPrefix:n,drop:i="down",show:r,className:o,align:s="start",onSelect:l,onToggle:a,focusFirstItemOnShow:c,as:u="div",navbar:h,autoClose:f=!0,...d}=Oy(t,{show:"onToggle"}),p=k.useContext(cO),y=me(n,"dropdown"),v=My(),g=S=>f===!1?S==="click":f==="inside"?S!=="rootClose":f==="outside"?S!=="select":!0,m=Pe((S,M)=>{M.originalEvent.currentTarget===document&&(M.source!=="keydown"||M.originalEvent.key==="Escape")&&(M.source="rootClose"),g(M.source)&&(a==null||a(S,M))}),C=hO(s==="end",i,v),w=k.useMemo(()=>({align:s,drop:i,isRTL:v}),[s,i,v]),b={down:y,"down-centered":`${y}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return A.jsx(iO.Provider,{value:w,children:A.jsx(Nc,{placement:C,show:r,onSelect:l,onToggle:m,focusFirstItemOnShow:c,itemSelector:`.${y}-item:not(.disabled):not(:disabled)`,children:p?d.children:A.jsx(u,{...d,ref:e,className:fe(o,r&&"show",b[i])})})})});pO.displayName="Dropdown";const Pu=Object.assign(pO,{Toggle:NQ,Menu:FQ,Item:DQ,ItemText:RQ,Divider:OQ,Header:BQ});var ta;typeof window<"u"?ta=window:typeof Cr<"u"?ta=Cr:typeof self<"u"?ta=self:ta={};var PQ=ta,Iu=PQ.navigator,IQ=typeof Iu<"u"&&(/iPad|iPhone|iPod/.test(Iu.userAgent||"")||Iu.platform==="MacIntel"&&Iu.maxTouchPoints>1);const $Q=sr(IQ),zQ=({theme:t=dn.Light,isStale:e,mermaidCode:n,onMermaidCodeCopied:i})=>{const r=k.useRef(null),o=n.trim().length===0,s=()=>{if(r.current!==null){const f=r.current.getElementsByTagName("svg")[0].outerHTML,d=t===dn.Dark?"diagram-dark.svg":"diagram.svg",p=new File([f],d,{type:x_.SVG+";charset=utf-8"}),y={files:[p]};$Q&&typeof navigator.share=="function"&&typeof navigator.canShare=="function"&&navigator.canShare(y)?navigator.share(y).then(()=>{console.log("Shared successfully.")}).catch(v=>{console.error("Failed to share SVG file.",v)}):nQ.saveAs(p)}},l=()=>{cQ(n),typeof i=="function"&&i()},a=t===dn.Dark?"#282c34":"#ffffff",c=!(e||o);return A.jsxs(A.Fragment,{children:[A.jsx("h2",{children:"Diagram"}),A.jsx("div",{ref:r,style:{filter:e?"blur(4px)":void 0,backgroundColor:a,padding:24},children:o?A.jsx("div",{}):A.jsx(tQ,{chart:n,config:{mermaid:{theme:t}}})}),A.jsx("div",{className:"mt-3 d-flex justify-content-between",children:A.jsxs(Pu,{as:uQ,drop:"down",align:"end",children:[A.jsxs(Ro,{onClick:s,disabled:!c,children:[A.jsx("i",{className:"bi bi-arrow-down-circle me-2"}),A.jsx("span",{children:"Download SVG"})]}),A.jsx(Pu.Toggle,{title:"Show menu",disabled:!c,style:{marginLeft:0}}),A.jsx(Pu.Menu,{children:A.jsx(k2,{delay:{show:1e3,hide:0},overlay:A.jsx(Cv,{children:"Copy the diagram in Mermaid format to your clipboard"}),children:A.jsxs(Pu.Item,{onClick:l,disabled:!c,as:Ro,children:[A.jsx("i",{className:"bi bi-copy me-2"}),A.jsx("span",{children:"Copy Mermaid"})]})})})]})})]})},jQ={[_n]:"showing",[js]:"showing show"},mO=k.forwardRef((t,e)=>A.jsx(Hs,{...t,ref:e,transitionClasses:jQ}));mO.displayName="ToastFade";const HQ=mO,WQ=k.createContext({onClose(){}}),gO=WQ,yO=k.forwardRef(({bsPrefix:t,closeLabel:e="Close",closeVariant:n,closeButton:i=!0,className:r,children:o,...s},l)=>{t=me(t,"toast-header");const a=k.useContext(gO),c=Pe(u=>{a==null||a.onClose==null||a.onClose(u)});return A.jsxs("div",{ref:l,...s,className:fe(t,r),children:[o,i&&A.jsx(Iy,{"aria-label":e,variant:n,onClick:c,"data-dismiss":"toast"})]})});yO.displayName="ToastHeader";const VQ=yO,vO=k.forwardRef(({className:t,bsPrefix:e,as:n="div",...i},r)=>(e=me(e,"toast-body"),A.jsx(n,{ref:r,className:fe(t,e),...i})));vO.displayName="ToastBody";const qQ=vO,xO=k.forwardRef(({bsPrefix:t,className:e,transition:n=HQ,show:i=!0,animation:r=!0,delay:o=5e3,autohide:s=!1,onClose:l,onEntered:a,onExit:c,onExiting:u,onEnter:h,onEntering:f,onExited:d,bg:p,...y},v)=>{t=me(t,"toast");const g=k.useRef(o),m=k.useRef(l);k.useEffect(()=>{g.current=o,m.current=l},[o,l]);const x=n2(),C=!!(s&&i),w=k.useCallback(()=>{C&&(m.current==null||m.current())},[C]);k.useEffect(()=>{x.set(w,g.current)},[x,w]);const b=k.useMemo(()=>({onClose:l}),[l]),S=!!(n&&r),M=A.jsx("div",{...y,ref:v,className:fe(t,e,p&&`bg-${p}`,!S&&(i?"show":"hide")),role:"alert","aria-live":"assertive","aria-atomic":"true"});return A.jsx(gO.Provider,{value:b,children:S&&n?A.jsx(n,{in:i,onEnter:h,onEntering:f,onEntered:a,onExit:c,onExiting:u,onExited:d,unmountOnExit:!0,children:M}):M})});xO.displayName="Toast";const dm=Object.assign(xO,{Body:qQ,Header:VQ}),UQ="/monocle/",tk=({onClose:t,isVisible:e,title:n="Monocle",body:i,variant:r})=>A.jsxs(dm,{onClose:t,show:e,autohide:!0,bg:r,children:[A.jsxs(dm.Header,{children:[A.jsx("img",{src:`${UQ}/logo-512x512.png`,className:"rounded me-2",style:{height:16,width:16},alt:"Monocle logo"}),A.jsx("strong",{className:"me-auto",children:n}),A.jsx("small",{children:"Just now"})]}),A.jsx(dm.Body,{children:i})]}),nk=t=>Object.values(dn).includes(t),KQ=t=>localStorage.setItem(ja.THEME,t),YQ=()=>localStorage.getItem(ja.THEME),GQ=()=>{const t="(prefers-color-scheme: dark)",e="(prefers-color-scheme: light)",n=window.matchMedia(t),i=window.matchMedia(e);return n?dn.Dark:i?dn.Light:null},XQ=()=>{let t=null;const e=GQ();nk(e)&&(t=e);const n=YQ();return nk(n)&&(t=n),t===null&&(t=dn.Dark),t},QQ=({onSelect:t,theme:e})=>{const n=()=>{e===dn.Dark?t(dn.Light):t(dn.Dark)},i=e===dn.Dark?"bi-moon-stars-fill":"bi bi-sun-fill";return A.jsx(Ro,{variant:"link",className:"text-muted",onClick:n,title:"Toggle theme",children:A.jsx("i",{className:`bi ${i}`})})};function JQ(){const[t,e]=k.useState(!1),n=()=>e(!0),i=()=>e(!1),[r,o]=k.useState(!1),s=()=>o(!1),[l,a]=k.useState(localStorage.getItem(ja.HAS_DISMISSED_WELCOME_MESSAGE)!==lg.TRUE),c=()=>a(!0),u=()=>{localStorage.setItem(ja.HAS_DISMISSED_WELCOME_MESSAGE,lg.TRUE),a(!1)},[h,f]=k.useState(`# Paste or drop your Makefile here + */window.addEventListener("load",PL,!1)}const HX=function(t){Jt.parseError=t},jf=[];let hm=!1;const IL=async()=>{if(!hm){for(hm=!0;jf.length>0;){const t=jf.shift();if(t)try{await t()}catch(e){re.error("Error executing queue",e)}}hm=!1}},WX=async(t,e)=>new Promise((n,i)=>{const r=()=>new Promise((o,s)=>{jo.parse(t,e).then(l=>{o(l),n(l)},l=>{var a;re.error("Error parsing",l),(a=Jt.parseError)==null||a.call(Jt,l),s(l),i(l)})});jf.push(r),IL().catch(i)}),$L=(t,e,n)=>new Promise((i,r)=>{const o=()=>new Promise((s,l)=>{jo.render(t,e,n).then(a=>{s(a),i(a)},a=>{var c;re.error("Error parsing",a),(c=Jt.parseError)==null||c.call(Jt,a),l(a),r(a)})});jf.push(o),IL().catch(r)}),Jt={startOnLoad:!0,mermaidAPI:jo,parse:WX,render:$L,init:zX,run:FL,registerExternalDiagrams:jX,initialize:NL,parseError:void 0,contentLoaded:PL,setParseErrorHandler:HX,detectType:Id},VX="dark",qX="default",UX="dark",Nu="light",KX="data-theme";function YX(t,e){var r,o;let n=t.getAttribute(KX)??Nu;n===Nu||n===UX||(n=Nu);const i=n===Nu?qX:VX;return((r=e==null?void 0:e.theme)==null?void 0:r[n])??((o=e==null?void 0:e.mermaid)==null?void 0:o.theme)??i}const GX=({chart:t,config:e})=>{if(typeof window>"u")return Ze.createElement("div",{className:"mermaid","data-mermaid-src":t},t);const n=k.useMemo(()=>typeof e=="string"?JSON.parse(e):e,[e]),i=document.querySelector("html"),[r,o]=k.useState(!1),s=k.useMemo(()=>YX(i,n),[n,r]);return k.useEffect(()=>{const l=new MutationObserver(a=>{for(const c of a)if(!(c.type!=="attributes"||c.attributeName!=="data-theme")){o(u=>!u);break}});return l.observe(i,{attributes:!0}),()=>{try{l.disconnect()}catch{}}},[]),k.useEffect(()=>{n&&(n.mermaid?Jt.initialize({startOnLoad:!0,...n.mermaid,theme:s}):Jt.initialize({startOnLoad:!0,theme:s}),document.querySelectorAll('div.mermaid[data-processed="true"]').forEach(l=>{l.removeAttribute("data-processed"),l.innerHTML=l.getAttribute("data-mermaid-src")}),Jt.contentLoaded())},[n,s]),k.useEffect(()=>{setTimeout(Jt.contentLoaded,0)},[t]),Ze.createElement("div",{className:"mermaid","data-mermaid-src":t},t)};var zL={exports:{}};(function(t,e){(function(n,i){i()})(Cr,function(){function n(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function i(c,u,h){var f=new XMLHttpRequest;f.open("GET",c),f.responseType="blob",f.onload=function(){a(f.response,u,h)},f.onerror=function(){console.error("could not download file")},f.send()}function r(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function o(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Cr=="object"&&Cr.global===Cr?Cr:void 0,l=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(c,u,h){var f=s.URL||s.webkitURL,d=document.createElement("a");u=u||c.name||"download",d.download=u,d.rel="noopener",typeof c=="string"?(d.href=c,d.origin===location.origin?o(d):r(d.href)?i(c,u,h):o(d,d.target="_blank")):(d.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(d.href)},4e4),setTimeout(function(){o(d)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,h){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(n(c,h),u);else if(r(c))i(c,u,h);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){o(f)})}}:function(c,u,h,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof c=="string")return i(c,u,h);var d=c.type==="application/octet-stream",p=/constructor/i.test(s.HTMLElement)||s.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||d&&p||l)&&typeof FileReader<"u"){var v=new FileReader;v.onloadend=function(){var x=v.result;x=y?x:x.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=x:location=x,f=null},v.readAsDataURL(c)}else{var g=s.URL||s.webkitURL,m=g.createObjectURL(c);f?f.location=m:location.href=m,f=null,setTimeout(function(){g.revokeObjectURL(m)},4e4)}});s.saveAs=a.saveAs=a,t.exports=a})})(zL);var XX=zL.exports,QX=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],i=0;i"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=Qb[e.format]||Qb.default;window.clipboardData.setData(h,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(l),o.selectNodeContents(l),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");a=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),a=!0}catch(h){n&&console.error("unable to copy using clipboardData: ",h),n&&console.error("falling back to prompt"),i=eQ("message"in e?e.message:ZX),window.prompt(i,t)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),l&&document.body.removeChild(l),r()}return a}var nQ=tQ;const iQ=sr(nQ),jL=k.forwardRef(({bsPrefix:t,size:e,vertical:n=!1,className:i,role:r="group",as:o="div",...s},l)=>{const a=me(t,"btn-group");let c=a;return n&&(c=`${a}-vertical`),A.jsx(o,{...s,ref:l,role:r,className:fe(i,c,e&&`${a}-${e}`)})});jL.displayName="ButtonGroup";const rQ=jL;function oQ(t,e,n){const i=k.useRef(t!==void 0),[r,o]=k.useState(e),s=t!==void 0,l=i.current;return i.current=s,!s&&l&&r!==e&&o(e),[s?t:r,k.useCallback((...a)=>{const[c,...u]=a;let h=n==null?void 0:n(c,...u);return o(c),h},[n])]}function sQ(){const[,t]=k.useReducer(e=>!e,!1);return t}function lQ(t,e,n,i=!1){const r=Pe(n);k.useEffect(()=>{const o=typeof t=="function"?t():t;return o.addEventListener(e,r,i),()=>o.removeEventListener(e,r,i)},[t])}const aQ=k.createContext(null),jd=aQ,cQ=["children"];function uQ(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o=0)&&(n[r]=t[r]);return n}const hQ=()=>{};function HL(t={}){const e=k.useContext(jd),[n,i]=u0(),r=k.useRef(!1),{flip:o,offset:s,rootCloseEvent:l,fixed:a=!1,placement:c,popperConfig:u={},enableEventListeners:h=!0,usePopper:f=!!e}=t,d=(e==null?void 0:e.show)==null?!!t.show:e.show;d&&!r.current&&(r.current=!0);const p=b=>{e==null||e.toggle(!1,b)},{placement:y,setMenu:v,menuElement:g,toggleElement:m}=e||{},x=s2(m,g,a2({placement:c||y||"bottom-start",enabled:f,enableEvents:h??d,offset:s,flip:o,fixed:a,arrowElement:n,popperConfig:u})),C=Object.assign({ref:v||hQ,"aria-labelledby":m==null?void 0:m.id},x.attributes.popper,{style:x.styles.popper}),w={show:d,placement:y,hasShown:r.current,toggle:e==null?void 0:e.toggle,popper:f?x:null,arrowProps:f?Object.assign({ref:i},x.attributes.arrow,{style:x.styles.arrow}):{}};return l2(g,p,{clickTrigger:l,disabled:!d}),[C,w]}const fQ={usePopper:!0};function t1(t){let{children:e}=t,n=uQ(t,cQ);const[i,r]=HL(n);return A.jsx(A.Fragment,{children:e(i,r)})}t1.displayName="DropdownMenu";t1.defaultProps=fQ;const Hf={prefix:String(Math.round(Math.random()*1e10)),current:0},WL=Ze.createContext(Hf),dQ=Ze.createContext(!1);let pQ=!!(typeof window<"u"&&window.document&&window.document.createElement),fm=new WeakMap;function mQ(t=!1){let e=k.useContext(WL),n=k.useRef(null);if(n.current===null&&!t){var i,r;let o=(i=Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let s=fm.get(o);s==null?fm.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==s.state&&(e.current=s.id,fm.delete(o))}n.current=++e.current}return n.current}function gQ(t){let e=k.useContext(WL);e===Hf&&!pQ&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=mQ(!!t),i=`react-aria${e.prefix}`;return t||`${i}-${n}`}function yQ(t){let e=Ze.useId(),[n]=k.useState(bQ()),i=n?"react-aria":`react-aria${Hf.prefix}`;return t||`${i}-${e}`}const vQ=typeof Ze.useId=="function"?yQ:gQ;function xQ(){return!1}function CQ(){return!0}function wQ(t){return()=>{}}function bQ(){return typeof Ze.useSyncExternalStore=="function"?Ze.useSyncExternalStore(wQ,xQ,CQ):k.useContext(dQ)}const VL=t=>{var e;return((e=t.getAttribute("role"))==null?void 0:e.toLowerCase())==="menu"},Jb=()=>{};function qL(){const t=vQ(),{show:e=!1,toggle:n=Jb,setToggle:i,menuElement:r}=k.useContext(jd)||{},o=k.useCallback(l=>{n(!e,l)},[e,n]),s={id:t,ref:i||Jb,onClick:o,"aria-expanded":!!e};return r&&VL(r)&&(s["aria-haspopup"]=!0),[s,{show:e,toggle:n}]}function UL({children:t}){const[e,n]=qL();return A.jsx(A.Fragment,{children:t(e,n)})}UL.displayName="DropdownToggle";const KL=k.createContext(null);KL.displayName="NavContext";const kQ=KL,SQ=["eventKey","disabled","onClick","active","as"];function _Q(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o=0)&&(n[r]=t[r]);return n}function YL({key:t,href:e,active:n,disabled:i,onClick:r}){const o=k.useContext(qh),s=k.useContext(kQ),{activeKey:l}=s||{},a=Tx(t,e),c=n==null&&t!=null?Tx(l)===a:n;return[{onClick:Pe(h=>{i||(r==null||r(h),o&&!h.isPropagationStopped()&&o(a,h))}),"aria-disabled":i||void 0,"aria-selected":c,[Fy("dropdown-item")]:""},{isActive:c}]}const GL=k.forwardRef((t,e)=>{let{eventKey:n,disabled:i,onClick:r,active:o,as:s=Z_}=t,l=_Q(t,SQ);const[a]=YL({key:n,href:l.href,disabled:i,onClick:r,active:o});return A.jsx(s,Object.assign({},l,{ref:e},a))});GL.displayName="DropdownItem";function Zb(){const t=sQ(),e=k.useRef(null),n=k.useCallback(i=>{e.current=i,t()},[t]);return[e,n]}function Nc({defaultShow:t,show:e,onSelect:n,onToggle:i,itemSelector:r=`* [${Fy("dropdown-item")}]`,focusFirstItemOnShow:o,placement:s="bottom-start",children:l}){const a=sd(),[c,u]=oQ(e,t,i),[h,f]=Zb(),d=h.current,[p,y]=Zb(),v=p.current,g=F_(c),m=k.useRef(null),x=k.useRef(!1),C=k.useContext(qh),w=k.useCallback((D,V,K=V==null?void 0:V.type)=>{u(D,{originalEvent:V,source:K})},[u]),b=Pe((D,V)=>{n==null||n(D,V),w(!1,V,"select"),V.isPropagationStopped()||C==null||C(D,V)}),S=k.useMemo(()=>({toggle:w,placement:s,show:c,menuElement:d,toggleElement:v,setMenu:f,setToggle:y}),[w,s,c,d,v,f,y]);d&&g&&!c&&(x.current=d.contains(d.ownerDocument.activeElement));const M=Pe(()=>{v&&v.focus&&v.focus()}),N=Pe(()=>{const D=m.current;let V=o;if(V==null&&(V=h.current&&VL(h.current)?"keyboard":!1),V===!1||V==="keyboard"&&!/^key.+$/.test(D))return;const K=gr(h.current,r)[0];K&&K.focus&&K.focus()});k.useEffect(()=>{c?N():x.current&&(x.current=!1,M())},[c,x,M,N]),k.useEffect(()=>{m.current=null});const O=(D,V)=>{if(!h.current)return null;const K=gr(h.current,r);let z=K.indexOf(D)+V;return z=Math.max(0,Math.min(z,K.length)),K[z]};return lQ(k.useCallback(()=>a.document,[a]),"keydown",D=>{var V,K;const{key:z}=D,F=D.target,B=(V=h.current)==null?void 0:V.contains(F),$=(K=p.current)==null?void 0:K.contains(F);if(/input|textarea/i.test(F.tagName)&&(z===" "||z!=="Escape"&&B||z==="Escape"&&F.type==="search")||!B&&!$||z==="Tab"&&(!h.current||!c))return;m.current=D.type;const L={originalEvent:D,source:D.type};switch(z){case"ArrowUp":{const R=O(F,-1);R&&R.focus&&R.focus(),D.preventDefault();return}case"ArrowDown":if(D.preventDefault(),!c)u(!0,L);else{const R=O(F,1);R&&R.focus&&R.focus()}return;case"Tab":M_(F.ownerDocument,"keyup",R=>{var H;(R.key==="Tab"&&!R.target||!((H=h.current)!=null&&H.contains(R.target)))&&u(!1,L)},{once:!0});break;case"Escape":z==="Escape"&&(D.preventDefault(),D.stopPropagation()),u(!1,L);break}}),A.jsx(qh.Provider,{value:b,children:A.jsx(jd.Provider,{value:S,children:l})})}Nc.displayName="Dropdown";Nc.Menu=t1;Nc.Toggle=UL;Nc.Item=GL;const XL=k.createContext({});XL.displayName="DropdownContext";const QL=XL,JL=k.forwardRef(({className:t,bsPrefix:e,as:n="hr",role:i="separator",...r},o)=>(e=me(e,"dropdown-divider"),A.jsx(n,{ref:o,className:fe(t,e),role:i,...r})));JL.displayName="DropdownDivider";const TQ=JL,ZL=k.forwardRef(({className:t,bsPrefix:e,as:n="div",role:i="heading",...r},o)=>(e=me(e,"dropdown-header"),A.jsx(n,{ref:o,className:fe(t,e),role:i,...r})));ZL.displayName="DropdownHeader";const EQ=ZL,AQ=["onKeyDown"];function MQ(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o=0)&&(n[r]=t[r]);return n}function LQ(t){return!t||t.trim()==="#"}const eO=k.forwardRef((t,e)=>{let{onKeyDown:n}=t,i=MQ(t,AQ);const[r]=$y(Object.assign({tagName:"a"},i)),o=Pe(s=>{r.onKeyDown(s),n==null||n(s)});return LQ(i.href)||i.role==="button"?A.jsx("a",Object.assign({ref:e},i,r,{onKeyDown:o})):A.jsx("a",Object.assign({ref:e},i,{onKeyDown:n}))});eO.displayName="Anchor";const tO=eO,nO=k.forwardRef(({bsPrefix:t,className:e,eventKey:n,disabled:i=!1,onClick:r,active:o,as:s=tO,...l},a)=>{const c=me(t,"dropdown-item"),[u,h]=YL({key:n,href:l.href,disabled:i,onClick:r,active:o});return A.jsx(s,{...l,...u,ref:a,className:fe(e,c,h.isActive&&"active",i&&"disabled")})});nO.displayName="DropdownItem";const OQ=nO,iO=k.forwardRef(({className:t,bsPrefix:e,as:n="span",...i},r)=>(e=me(e,"dropdown-item-text"),A.jsx(n,{ref:r,className:fe(t,e),...i})));iO.displayName="DropdownItemText";const BQ=iO,rO=k.createContext(null);rO.displayName="InputGroupContext";const oO=rO;function sO(t,e){return t}function lO(t,e,n){const i=n?"top-end":"top-start",r=n?"top-start":"top-end",o=n?"bottom-end":"bottom-start",s=n?"bottom-start":"bottom-end",l=n?"right-start":"left-start",a=n?"right-end":"left-end",c=n?"left-start":"right-start",u=n?"left-end":"right-end";let h=t?s:o;return e==="up"?h=t?r:i:e==="end"?h=t?u:c:e==="start"?h=t?a:l:e==="down-centered"?h="bottom":e==="up-centered"&&(h="top"),h}const aO=k.forwardRef(({bsPrefix:t,className:e,align:n,rootCloseEvent:i,flip:r=!0,show:o,renderOnMount:s,as:l="div",popperConfig:a,variant:c,...u},h)=>{let f=!1;const d=k.useContext(al),p=me(t,"dropdown-menu"),{align:y,drop:v,isRTL:g}=k.useContext(QL);n=n||y;const m=k.useContext(oO),x=[];if(n)if(typeof n=="object"){const D=Object.keys(n);if(D.length){const V=D[0],K=n[V];f=K==="start",x.push(`${p}-${V}-${K}`)}}else n==="end"&&(f=!0);const C=lO(f,v,g),[w,{hasShown:b,popper:S,show:M,toggle:N}]=HL({flip:r,rootCloseEvent:i,show:o,usePopper:!d&&x.length===0,offset:[0,2],popperConfig:a,placement:C});if(w.ref=to(sO(h),w.ref),Ha(()=>{M&&(S==null||S.update())},[M]),!b&&!s&&!m)return null;typeof l!="string"&&(w.show=M,w.close=()=>N==null?void 0:N(!1),w.align=n);let O=u.style;return S!=null&&S.placement&&(O={...u.style,...w.style},u["x-placement"]=S.placement),A.jsx(l,{...u,...w,style:O,...(x.length||d)&&{"data-bs-popper":"static"},className:fe(e,p,M&&"show",f&&`${p}-end`,c&&`${p}-${c}`,...x)})});aO.displayName="DropdownMenu";const DQ=aO,cO=k.forwardRef(({bsPrefix:t,split:e,className:n,childBsPrefix:i,as:r=Ro,...o},s)=>{const l=me(t,"dropdown-toggle"),a=k.useContext(jd);i!==void 0&&(o.bsPrefix=i);const[c]=qL();return c.ref=to(c.ref,sO(s)),A.jsx(r,{className:fe(n,l,e&&`${l}-split`,(a==null?void 0:a.show)&&"show"),...c,...o})});cO.displayName="DropdownToggle";const RQ=cO,uO=k.forwardRef((t,e)=>{const{bsPrefix:n,drop:i="down",show:r,className:o,align:s="start",onSelect:l,onToggle:a,focusFirstItemOnShow:c,as:u="div",navbar:h,autoClose:f=!0,...d}=Oy(t,{show:"onToggle"}),p=k.useContext(oO),y=me(n,"dropdown"),v=My(),g=S=>f===!1?S==="click":f==="inside"?S!=="rootClose":f==="outside"?S!=="select":!0,m=Pe((S,M)=>{M.originalEvent.currentTarget===document&&(M.source!=="keydown"||M.originalEvent.key==="Escape")&&(M.source="rootClose"),g(M.source)&&(a==null||a(S,M))}),C=lO(s==="end",i,v),w=k.useMemo(()=>({align:s,drop:i,isRTL:v}),[s,i,v]),b={down:y,"down-centered":`${y}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return A.jsx(QL.Provider,{value:w,children:A.jsx(Nc,{placement:C,show:r,onSelect:l,onToggle:m,focusFirstItemOnShow:c,itemSelector:`.${y}-item:not(.disabled):not(:disabled)`,children:p?d.children:A.jsx(u,{...d,ref:e,className:fe(o,r&&"show",b[i])})})})});uO.displayName="Dropdown";const Pu=Object.assign(uO,{Toggle:RQ,Menu:DQ,Item:OQ,ItemText:BQ,Divider:TQ,Header:EQ});var ta;typeof window<"u"?ta=window:typeof Cr<"u"?ta=Cr:typeof self<"u"?ta=self:ta={};var FQ=ta,Iu=FQ.navigator,NQ=typeof Iu<"u"&&(/iPad|iPhone|iPod/.test(Iu.userAgent||"")||Iu.platform==="MacIntel"&&Iu.maxTouchPoints>1);const PQ=sr(NQ),IQ=({theme:t=dn.Light,isStale:e,mermaidCode:n,onMermaidCodeCopied:i})=>{const r=k.useRef(null),o=n.trim().length===0,s=()=>{if(r.current!==null){const f=r.current.getElementsByTagName("svg")[0].outerHTML,d=t===dn.Dark?"diagram-dark.svg":"diagram.svg",p=new File([f],d,{type:x_.SVG+";charset=utf-8"}),y={files:[p]};PQ&&typeof navigator.share=="function"&&typeof navigator.canShare=="function"&&navigator.canShare(y)?navigator.share(y).then(()=>{console.log("Shared successfully.")}).catch(v=>{console.error("Failed to share SVG file.",v)}):XX.saveAs(p)}},l=()=>{iQ(n),typeof i=="function"&&i()},a=t===dn.Dark?"#282c34":"#ffffff",c=!(e||o);return A.jsxs(A.Fragment,{children:[A.jsx("h2",{children:"Diagram"}),A.jsx("div",{ref:r,style:{filter:e?"blur(4px)":void 0,backgroundColor:a,padding:24},children:o?A.jsx("div",{}):A.jsx(GX,{chart:n,config:{mermaid:{theme:t}}})}),A.jsx("div",{className:"mt-3 d-flex justify-content-between",children:A.jsxs(Pu,{as:rQ,drop:"down",align:"end",children:[A.jsxs(Ro,{onClick:s,disabled:!c,children:[A.jsx("i",{className:"bi bi-arrow-down-circle me-2"}),A.jsx("span",{children:"Download SVG"})]}),A.jsx(Pu.Toggle,{title:"Show menu",disabled:!c,style:{marginLeft:0}}),A.jsx(Pu.Menu,{children:A.jsx(y2,{delay:{show:1e3,hide:0},overlay:A.jsx(Cv,{children:"Copy the diagram in Mermaid format to your clipboard"}),children:A.jsxs(Pu.Item,{onClick:l,disabled:!c,as:Ro,children:[A.jsx("i",{className:"bi bi-copy me-2"}),A.jsx("span",{children:"Copy Mermaid"})]})})})]})})]})},$Q={[_n]:"showing",[js]:"showing show"},hO=k.forwardRef((t,e)=>A.jsx(Hs,{...t,ref:e,transitionClasses:$Q}));hO.displayName="ToastFade";const zQ=hO,jQ=k.createContext({onClose(){}}),fO=jQ,dO=k.forwardRef(({bsPrefix:t,closeLabel:e="Close",closeVariant:n,closeButton:i=!0,className:r,children:o,...s},l)=>{t=me(t,"toast-header");const a=k.useContext(fO),c=Pe(u=>{a==null||a.onClose==null||a.onClose(u)});return A.jsxs("div",{ref:l,...s,className:fe(t,r),children:[o,i&&A.jsx(Iy,{"aria-label":e,variant:n,onClick:c,"data-dismiss":"toast"})]})});dO.displayName="ToastHeader";const HQ=dO,pO=k.forwardRef(({className:t,bsPrefix:e,as:n="div",...i},r)=>(e=me(e,"toast-body"),A.jsx(n,{ref:r,className:fe(t,e),...i})));pO.displayName="ToastBody";const WQ=pO,mO=k.forwardRef(({bsPrefix:t,className:e,transition:n=zQ,show:i=!0,animation:r=!0,delay:o=5e3,autohide:s=!1,onClose:l,onEntered:a,onExit:c,onExiting:u,onEnter:h,onEntering:f,onExited:d,bg:p,...y},v)=>{t=me(t,"toast");const g=k.useRef(o),m=k.useRef(l);k.useEffect(()=>{g.current=o,m.current=l},[o,l]);const x=XA(),C=!!(s&&i),w=k.useCallback(()=>{C&&(m.current==null||m.current())},[C]);k.useEffect(()=>{x.set(w,g.current)},[x,w]);const b=k.useMemo(()=>({onClose:l}),[l]),S=!!(n&&r),M=A.jsx("div",{...y,ref:v,className:fe(t,e,p&&`bg-${p}`,!S&&(i?"show":"hide")),role:"alert","aria-live":"assertive","aria-atomic":"true"});return A.jsx(fO.Provider,{value:b,children:S&&n?A.jsx(n,{in:i,onEnter:h,onEntering:f,onEntered:a,onExit:c,onExiting:u,onExited:d,unmountOnExit:!0,children:M}):M})});mO.displayName="Toast";const dm=Object.assign(mO,{Body:WQ,Header:HQ}),VQ="/monocle/",ek=({onClose:t,isVisible:e,title:n="Monocle",body:i,variant:r})=>A.jsxs(dm,{onClose:t,show:e,autohide:!0,bg:r,children:[A.jsxs(dm.Header,{children:[A.jsx("img",{src:`${VQ}/logo-512x512.png`,className:"rounded me-2",style:{height:16,width:16},alt:"Monocle logo"}),A.jsx("strong",{className:"me-auto",children:n}),A.jsx("small",{children:"Just now"})]}),A.jsx(dm.Body,{children:i})]}),gO=V_("h4");gO.displayName="DivStyledAsH4";const yO=k.forwardRef(({className:t,bsPrefix:e,as:n=gO,...i},r)=>(e=me(e,"alert-heading"),A.jsx(n,{ref:r,className:fe(t,e),...i})));yO.displayName="AlertHeading";const qQ=yO,vO=k.forwardRef(({className:t,bsPrefix:e,as:n=tO,...i},r)=>(e=me(e,"alert-link"),A.jsx(n,{ref:r,className:fe(t,e),...i})));vO.displayName="AlertLink";const UQ=vO,xO=k.forwardRef((t,e)=>{const{bsPrefix:n,show:i=!0,closeLabel:r="Close alert",closeVariant:o,className:s,children:l,variant:a="primary",onClose:c,dismissible:u,transition:h=Hs,...f}=Oy(t,{show:"onClose"}),d=me(n,"alert"),p=Pe(g=>{c&&c(!1,g)}),y=h===!0?Hs:h,v=A.jsxs("div",{role:"alert",...y?void 0:f,ref:e,className:fe(s,d,a&&`${d}-${a}`,u&&`${d}-dismissible`),children:[u&&A.jsx(Iy,{onClick:p,"aria-label":r,variant:o}),l]});return y?A.jsx(y,{unmountOnExit:!0,...f,ref:void 0,in:i,children:v}):i?v:null});xO.displayName="Alert";const tk=Object.assign(xO,{Link:UQ,Heading:qQ}),KQ=({isVisible:t,onDismiss:e,...n})=>A.jsxs(tk,{variant:"info",show:t,onClose:e,dismissible:!0,...n,children:[A.jsx(tk.Heading,{children:"Welcome to Monocle"}),A.jsx("p",{children:"Monocle is a Makefile visualizer for the web. You can use it to generate a diagram of a Makefile's targets and their dependencies."}),A.jsx("hr",{}),A.jsx("p",{children:`To get started, you can drop a Makefile into the editor below. When you press the "Update diagram" button, Monocle will generate a diagram of the Makefile's targets and their dependencies.`})]}),nk=t=>Object.values(dn).includes(t),YQ=t=>localStorage.setItem(ja.THEME,t),GQ=()=>localStorage.getItem(ja.THEME),XQ=()=>{const t="(prefers-color-scheme: dark)",e="(prefers-color-scheme: light)",n=window.matchMedia(t),i=window.matchMedia(e);return n?dn.Dark:i?dn.Light:null},QQ=()=>{let t=null;const e=XQ();nk(e)&&(t=e);const n=GQ();return nk(n)&&(t=n),t===null&&(t=dn.Dark),t},JQ=({onSelect:t,theme:e})=>{const n=()=>{e===dn.Dark?t(dn.Light):t(dn.Dark)},i=e===dn.Dark?"bi-moon-stars-fill":"bi bi-sun-fill";return A.jsx(Ro,{variant:"link",className:"text-muted",onClick:n,title:"Toggle theme",children:A.jsx("i",{className:`bi ${i}`})})};function ZQ(){const[t,e]=k.useState(!1),n=()=>e(!0),i=()=>e(!1),[r,o]=k.useState(!1),s=()=>o(!1),[l,a]=k.useState(localStorage.getItem(ja.HAS_DISMISSED_WELCOME_MESSAGE)!==lg.TRUE),c=()=>a(!0),u=()=>{localStorage.setItem(ja.HAS_DISMISSED_WELCOME_MESSAGE,lg.TRUE),a(!1)},[h,f]=k.useState(`# Paste or drop your Makefile here target: dep1 dep2 dep1: dep3 -`),[d,p]=k.useState(!1),[y,v]=k.useState(Sx(h)),g=b=>{const S=Sx(b);v(S)},[m,x]=k.useState(XQ());k.useLayoutEffect(()=>{document.documentElement.setAttribute("data-bs-theme",m),KQ(m)},[m]);const[C,w]=k.useState(!1);return k.useEffect(()=>{(async()=>{const S=rR(window.location.search);if(typeof S=="string"){w(!0),console.info("Fetching Makefile from URL: ",S);const M=await iR(S);typeof M=="string"?(f(M),g(M),o(!0)):console.warn("No content was available at the specified URL.")}w(!1)})()},[]),A.jsxs(A.Fragment,{children:[A.jsx(Rx,{className:"bg-body-tertiary","data-bs-theme":m,children:A.jsxs(_x,{children:[A.jsx(Rx.Brand,{className:"d-flex align-items-center",children:A.jsx("span",{children:"Monocle"})}),A.jsxs("span",{children:[A.jsx(QQ,{theme:m,onSelect:x}),A.jsx(Ro,{variant:"link",className:"text-muted",onClick:c,title:"Show welcome message",disabled:l,children:A.jsx("i",{className:"bi bi-question-circle-fill"})})]})]})}),A.jsxs(_x,{className:"py-4 py-sm-5",children:[A.jsxs(Fx,{variant:"info",show:l,onClose:u,dismissible:!0,className:"mb-4 mb-sm-5",children:[A.jsx(Fx.Heading,{children:"Welcome to Monocle"}),A.jsx("p",{children:"Monocle is a Makefile visualizer for the web. You can use it to generate a diagram of a Makefile's targets and their dependencies."}),A.jsx("hr",{}),A.jsx("p",{children:`To get started, you can drop a Makefile into the editor below. When you press the "Update diagram" button, Monocle will generate a diagram of the Makefile's targets and their dependencies.`})]}),C?A.jsx("div",{className:"d-flex justify-content-center",children:A.jsx(EF,{animation:"grow",role:"status",children:A.jsx("span",{className:"visually-hidden",children:"Loading..."})})}):A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"mb-4 mb-sm-5",children:A.jsx(f8,{theme:m,initialValue:h,onChangeStaleness:p,onSubmit:g})}),A.jsx("div",{children:A.jsx(zQ,{isStale:d,mermaidCode:y,theme:m,onMermaidCodeCopied:n})})]})]}),A.jsxs(MF,{className:"p-3",position:"top-center",style:{zIndex:1},children:[A.jsx(tk,{onClose:i,isVisible:t,body:"Mermaid code has been copied to your clipboard."}),A.jsx(tk,{onClose:s,isVisible:r,body:"Makefile content has been loaded from URL."})]})]})}console.info("🚀 Monocle version:","1.0.5");pm.createRoot(document.getElementById("root")).render(A.jsx(Ze.StrictMode,{children:A.jsx(JQ,{})}));export{_i as $,xa as A,HK as B,Si as C,WK as D,PK as E,Fj as F,fJ as G,YK as H,rU as I,kv as J,$2 as K,Bc as L,a9 as M,H2 as N,tJ as O,Cr as P,sr as Q,Xt as R,vn as S,y8 as T,QK as U,cJ as V,Iq as W,QM as X,Wv as Y,Bq as Z,le as _,jK as a,aJ as a$,Sv as a0,xr as a1,ac as a2,Xw as a3,m9 as a4,CJ as a5,Hq as a6,nU as a7,Fc as a8,dl as a9,wb as aA,Nv as aB,TM as aC,LM as aD,DM as aE,JW as aF,Li as aG,MV as aH,LV as aI,Rv as aJ,M0 as aK,g7 as aL,CV as aM,lm as aN,DV as aO,Fd as aP,vJ as aQ,RX as aR,VK as aS,Dc as aT,ne as aU,oe as aV,Av as aW,rJ as aX,lJ as aY,ib as aZ,nb as a_,Mf as aa,Bf as ab,qo as ac,Bd as ad,hV as ae,tq as af,Rc as ag,Of as ah,AV as ai,xV as aj,oV as ak,OM as al,SM as am,n7 as an,i7 as ao,fq as ap,Tb as aq,J7 as ar,r7 as as,Fv as at,e7 as au,c7 as av,pl as aw,rV as ax,ro as ay,Ad as az,zK as b,sJ as b0,nJ as b1,iJ as b2,hJ as b3,uJ as b4,oJ as b5,d8 as b6,Yv as c,pc as d,St as e,Rf as f,$K as g,bn as h,CL as i,zv as j,cU as k,re as l,_2 as m,Bj as n,tU as o,jM as p,Yq as q,DK as r,IK as s,yJ as t,I2 as u,_8 as v,lU as w,T7 as x,Dv as y,ba as z}; +`),[d,p]=k.useState(!1),[y,v]=k.useState(Sx(h)),g=b=>{const S=Sx(b);v(S)},[m,x]=k.useState(QQ());k.useLayoutEffect(()=>{document.documentElement.setAttribute("data-bs-theme",m),YQ(m)},[m]);const[C,w]=k.useState(!1);return k.useEffect(()=>{(async()=>{const S=rR(window.location.search);if(typeof S=="string"){w(!0),console.info("Fetching Makefile from URL: ",S);const M=await iR(S);typeof M=="string"?(f(M),g(M),o(!0)):console.warn("No content was available at the specified URL.")}w(!1)})()},[]),A.jsxs(A.Fragment,{children:[A.jsx(Rx,{className:"bg-body-tertiary","data-bs-theme":m,children:A.jsxs(_x,{children:[A.jsx(Rx.Brand,{className:"d-flex align-items-center",children:A.jsx("span",{children:"Monocle"})}),A.jsxs("span",{children:[A.jsx(JQ,{theme:m,onSelect:x}),A.jsx(Ro,{variant:"link",className:"text-muted",onClick:c,title:"Show welcome message",disabled:l,children:A.jsx("i",{className:"bi bi-question-circle-fill"})})]})]})}),A.jsxs(_x,{className:"py-4 py-sm-5",children:[A.jsx(KQ,{className:"mb-4 mb-sm-5",isVisible:l,onDismiss:u}),C?A.jsx("div",{className:"d-flex justify-content-center",children:A.jsx(EF,{animation:"grow",role:"status",children:A.jsx("span",{className:"visually-hidden",children:"Loading..."})})}):A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"mb-4 mb-sm-5",children:A.jsx(s8,{theme:m,initialValue:h,onChangeStaleness:p,onSubmit:g})}),A.jsx("div",{children:A.jsx(IQ,{isStale:d,mermaidCode:y,theme:m,onMermaidCodeCopied:n})})]})]}),A.jsxs(MF,{className:"p-3",position:"top-center",style:{zIndex:1},children:[A.jsx(ek,{onClose:i,isVisible:t,body:"Mermaid code has been copied to your clipboard."}),A.jsx(ek,{onClose:s,isVisible:r,body:"Makefile content has been loaded from URL."})]})]})}console.info("🚀 Monocle version:","1.0.6");pm.createRoot(document.getElementById("root")).render(A.jsx(Ze.StrictMode,{children:A.jsx(ZQ,{})}));export{_i as $,xa as A,NK as B,Si as C,PK as D,OK as E,Mj as F,dJ as G,HK as H,Jq as I,kv as J,D2 as K,Bc as L,n9 as M,N2 as N,nJ as O,Cr as P,sr as Q,Xt as R,vn as S,h8 as T,qK as U,uJ as V,Bq as W,qM as X,Wv as Y,Tq as Z,le as _,FK as a,cJ as a$,Sv as a0,xr as a1,ac as a2,Gw as a3,c9 as a4,wJ as a5,Nq as a6,Xq as a7,Fc as a8,dl as a9,Cb as aA,Nv as aB,CM as aC,SM as aD,EM as aE,UW as aF,Li as aG,kV as aH,SV as aI,Rv as aJ,M0 as aK,u7 as aL,pV as aM,lm as aN,EV as aO,Fd as aP,xJ as aQ,AX as aR,IK as aS,Dc as aT,ne as aU,oe as aV,Av as aW,oJ as aX,aJ as aY,nb as aZ,tb as a_,Mf as aa,Bf as ab,qo as ac,Bd as ad,oV as ae,GV as af,Rc as ag,Of as ah,bV as ai,dV as aj,Z7 as ak,_M as al,vM as am,XW as an,QW as ao,sq as ap,_b as aq,U7 as ar,JW as as,Fv as at,YW as au,i7 as av,pl as aw,J7 as ax,ro as ay,Ad as az,RK as b,lJ as b0,iJ as b1,rJ as b2,fJ as b3,hJ as b4,sJ as b5,l8 as b6,Yv as c,pc as d,St as e,Rf as f,DK as g,bn as h,pL as i,zv as j,iU as k,re as l,x2 as m,Tj as n,Gq as o,FM as p,Hq as q,EK as r,BK as s,vJ as t,B2 as u,x8 as v,tU as w,C7 as x,Dv as y,ba as z}; diff --git a/assets/infoDiagram-736b4530-81b7efec.js b/assets/infoDiagram-736b4530-7edd3494.js similarity index 99% rename from assets/infoDiagram-736b4530-81b7efec.js rename to assets/infoDiagram-736b4530-7edd3494.js index 69eb535..82c316e 100644 --- a/assets/infoDiagram-736b4530-81b7efec.js +++ b/assets/infoDiagram-736b4530-7edd3494.js @@ -1,4 +1,4 @@ -import{l as Y,U as D,i as M}from"./index-b371ab76.js";var O=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`: +import{l as Y,U as D,i as M}from"./index-e0ff10fa.js";var O=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`: `+o.showPosition()+` Expecting `+S.join(", ")+", got '"+(this.terminals_[l]||l)+"'":A="Parse error on line "+(v+1)+": Unexpected "+(l==T?"end of input":"'"+(this.terminals_[l]||l)+"'"),this.parseError(A,{text:o.match,token:this.terminals_[l]||l,line:o.yylineno,loc:I,expected:S})}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+l);switch(h[0]){case 1:n.push(l),r.push(o.yytext),i.push(o.yylloc),n.push(h[1]),l=null,L=o.yyleng,P=o.yytext,v=o.yylineno,I=o.yylloc;break;case 2:if(c=this.productions_[h[1]][1],_.$=r[r.length-c],_._$={first_line:i[i.length-(c||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(c||1)].first_column,last_column:i[i.length-1].last_column},z&&(_._$.range=[i[i.length-(c||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(_,[P,L,v,p.yy,h[1],r,i].concat(R)),typeof w<"u")return w;c&&(n=n.slice(0,-1*c*2),r=r.slice(0,-1*c),i=i.slice(0,-1*c)),n.push(this.productions_[h[1]][0]),r.push(_.$),i.push(_._$),F=d[n[n.length-2]][n[n.length-1]],n.push(F);break;case 3:return!0}}return!0}},k=function(){var u={EOF:1,parseError:function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},setInput: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},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput: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 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===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=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` diff --git a/assets/journeyDiagram-df861f2b-ba484b2a.js b/assets/journeyDiagram-df861f2b-03c13e5c.js similarity index 99% rename from assets/journeyDiagram-df861f2b-ba484b2a.js rename to assets/journeyDiagram-df861f2b-03c13e5c.js index 852a774..3a6c979 100644 --- a/assets/journeyDiagram-df861f2b-ba484b2a.js +++ b/assets/journeyDiagram-df861f2b-03c13e5c.js @@ -1,4 +1,4 @@ -import{c as I,B as yt,D as ft,s as dt,g as pt,b as gt,a as mt,E as xt,h as W,i as kt}from"./index-b371ab76.js";import{d as _t,f as bt,a as vt,g as it}from"./svgDrawCommon-4835440b-3fa5d101.js";import{a as Q}from"./arc-f4b03a28.js";import"./path-53f90ab3.js";var G=function(){var t=function(p,s,r,a){for(r=r||{},a=p.length;a--;r[p[a]]=s);return r},e=[6,8,10,11,12,14,16,17,18],i=[1,9],l=[1,10],n=[1,11],h=[1,12],c=[1,13],f=[1,14],y={trace:function(){},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:function(s,r,a,u,d,o,w){var k=o.length-1;switch(d){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},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:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:l,14:n,16:h,17:c,18:f},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:function(s,r){if(r.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=r,a}},parse:function(s){var r=this,a=[0],u=[],d=[null],o=[],w=this.table,k="",R=0,Z=0,lt=2,J=1,ct=o.slice.call(arguments,1),x=Object.create(this.lexer),S={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(S.yy[z]=this.yy[z]);x.setInput(s,S.yy),S.yy.lexer=x,S.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var Y=x.yylloc;o.push(Y);var ht=x.options&&x.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(){var T;return T=u.pop()||x.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=r.symbols_[T]||T),T}for(var _,E,b,O,A={},N,$,K,B;;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:((_===null||typeof _>"u")&&(_=ut()),b=w[E]&&w[E][_]),typeof b>"u"||!b.length||!b[0]){var q="";B=[];for(N in w[E])this.terminals_[N]&&N>lt&&B.push("'"+this.terminals_[N]+"'");x.showPosition?q="Parse error on line "+(R+1)+`: +import{c as I,B as yt,D as ft,s as dt,g as pt,b as gt,a as mt,E as xt,h as W,i as kt}from"./index-e0ff10fa.js";import{d as _t,f as bt,a as vt,g as it}from"./svgDrawCommon-4835440b-b3589b66.js";import{a as Q}from"./arc-1761d8ed.js";import"./path-53f90ab3.js";var G=function(){var t=function(p,s,r,a){for(r=r||{},a=p.length;a--;r[p[a]]=s);return r},e=[6,8,10,11,12,14,16,17,18],i=[1,9],l=[1,10],n=[1,11],h=[1,12],c=[1,13],f=[1,14],y={trace:function(){},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:function(s,r,a,u,d,o,w){var k=o.length-1;switch(d){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},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:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:l,14:n,16:h,17:c,18:f},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:function(s,r){if(r.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=r,a}},parse:function(s){var r=this,a=[0],u=[],d=[null],o=[],w=this.table,k="",R=0,Z=0,lt=2,J=1,ct=o.slice.call(arguments,1),x=Object.create(this.lexer),S={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(S.yy[z]=this.yy[z]);x.setInput(s,S.yy),S.yy.lexer=x,S.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var Y=x.yylloc;o.push(Y);var ht=x.options&&x.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(){var T;return T=u.pop()||x.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=r.symbols_[T]||T),T}for(var _,E,b,O,A={},N,$,K,B;;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:((_===null||typeof _>"u")&&(_=ut()),b=w[E]&&w[E][_]),typeof b>"u"||!b.length||!b[0]){var q="";B=[];for(N in w[E])this.terminals_[N]&&N>lt&&B.push("'"+this.terminals_[N]+"'");x.showPosition?q="Parse error on line "+(R+1)+`: `+x.showPosition()+` Expecting `+B.join(", ")+", got '"+(this.terminals_[_]||_)+"'":q="Parse error on line "+(R+1)+": Unexpected "+(_==J?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(q,{text:x.match,token:this.terminals_[_]||_,line:x.yylineno,loc:Y,expected:B})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(b[0]){case 1:a.push(_),d.push(x.yytext),o.push(x.yylloc),a.push(b[1]),_=null,Z=x.yyleng,k=x.yytext,R=x.yylineno,Y=x.yylloc;break;case 2:if($=this.productions_[b[1]][1],A.$=d[d.length-$],A._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},ht&&(A._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),O=this.performAction.apply(A,[k,Z,R,S.yy,b[1],d,o].concat(ct)),typeof O<"u")return O;$&&(a=a.slice(0,-1*$*2),d=d.slice(0,-1*$),o=o.slice(0,-1*$)),a.push(this.productions_[b[1]][0]),d.push(A.$),o.push(A._$),K=w[a[a.length-2]][a[a.length-1]],a.push(K);break;case 3:return!0}}return!0}},m=function(){var p={EOF:1,parseError:function(r,a){if(this.yy.parser)this.yy.parser.parseError(r,a);else throw new Error(r)},setInput:function(s,r){return this.yy=r||this.yy||{},this._input=s,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},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var r=s.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var r=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var u=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 d=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===u.length?this.yylloc.first_column:0)+u[u.length-a.length].length-a[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),r=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/assets/layout-fa84e821.js b/assets/layout-608b290b.js similarity index 99% rename from assets/layout-fa84e821.js rename to assets/layout-608b290b.js index 6f5ca3d..2ebebaf 100644 --- a/assets/layout-fa84e821.js +++ b/assets/layout-608b290b.js @@ -1 +1 @@ -import{a8 as q,a9 as fr,aa as O,ab as x,ac as F,ad as fn,ae as dr,af as cr,ag as hr,ah as Te,ai as lr,aj as vr,ak as dn,al as X,am as gr,an as Le,ao as pr,ap as H,aq as an,ar as Cn,as as br,at as Ln,au as wr,av as mr,aw as U,ax as In,ay as _r,az as Ae,aA as Kn,aB as Er,aC as yr,aD as Ne,aE as V,aF as Oe,aG as xr,aH as Pn,aI as on,aJ as Tr,aK as bn,aL as Lr,aM as B,y as Xn,aN as Vn,aO as An}from"./index-b371ab76.js";var Ar="[object Symbol]";function $(n){return typeof n=="symbol"||q(n)&&fr(n)==Ar}function R(n,e){for(var r=-1,t=n==null?0:n.length,i=Array(t);++r-1}function T(n){return fn(n)?dr(n):cr(n)}var Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jr=/^\w*$/;function $n(n,e){if(x(n))return!1;var r=typeof n;return r=="number"||r=="symbol"||r=="boolean"||n==null||$(n)?!0:jr.test(n)||!Hr.test(n)||e!=null&&n in Object(e)}var Wr=500;function Kr(n){var e=hr(n,function(t){return r.size===Wr&&r.clear(),t}),r=e.cache;return e}var Xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vr=/\\(\\)?/g,Zr=Kr(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Xr,function(r,t,i,a){e.push(i?a.replace(Vr,"$1"):t||r)}),e});const Jr=Zr;function $e(n){return n==null?"":Ce(n)}function cn(n,e){return x(n)?n:$n(n,e)?[n]:Jr($e(n))}var Qr=1/0;function Z(n){if(typeof n=="string"||$(n))return n;var e=n+"";return e=="0"&&1/n==-Qr?"-0":e}function hn(n,e){e=cn(e,n);for(var r=0,t=e.length;n!=null&&r0&&r(s)?e>1?ln(s,e-1,r,t,i):Sn(i,s):t||(i[i.length]=s)}return i}function k(n){var e=n==null?0:n.length;return e?ln(n,1):[]}function et(n){return lr(vr(n,void 0,k),n+"")}function rt(n,e,r,t){var i=-1,a=n==null?0:n.length;for(t&&a&&(r=n[++i]);++is))return!1;var f=a.get(n),d=a.get(e);if(f&&d)return f==e&&d==n;var h=-1,l=!0,g=r&Oi?new j:void 0;for(a.set(n,e),a.set(e,n);++h2?e[2]:void 0;for(i&&on(e[0],e[1],i)&&(t=1);++r-1?i[a?e[o]:o]:void 0}}var wa=Math.max;function ma(n,e,r){var t=n==null?0:n.length;if(!t)return-1;var i=r==null?0:kr(r);return i<0&&(i=wa(t+i,0)),Pe(n,C(e),i)}var _a=ba(ma);const Gn=_a;function Ke(n,e){var r=-1,t=fn(n)?Array(n.length):[];return vn(n,function(i,a,o){t[++r]=e(i,a,o)}),t}function E(n,e){var r=x(n)?R:Ke;return r(n,C(e))}function Ea(n,e){return n==null?n:Oe(n,kn(e),X)}function ya(n,e){return n&&Dn(n,kn(e))}function xa(n,e){return n>e}var Ta=Object.prototype,La=Ta.hasOwnProperty;function Aa(n,e){return n!=null&&La.call(n,e)}function b(n,e){return n!=null&&He(n,e,Aa)}function Na(n,e){return R(e,function(r){return n[r]})}function N(n){return n==null?[]:Na(n,T(n))}function y(n){return n===void 0}function Xe(n,e){return ne||a&&o&&u&&!s&&!f||t&&o&&u||!r&&u||!i)return 1;if(!t&&!a&&!f&&n=s)return u;var f=r[t];return u*(f=="desc"?-1:1)}}return n.index-e.index}function Sa(n,e,r){e.length?e=R(e,function(a){return x(a)?function(o){return hn(o,a.length===1?a[0]:a)}:a}):e=[V];var t=-1;e=R(e,Cn(C));var i=Ke(n,function(a,o,s){var u=R(e,function(f){return f(a)});return{criteria:u,index:++t,value:a}});return Ia(i,function(a,o){return $a(a,o,r)})}function Ma(n,e){return Ca(n,e,function(r,t){return je(n,t)})}var Ra=et(function(n,e){return n==null?{}:Ma(n,e)});const un=Ra;var Fa=Math.ceil,Da=Math.max;function ka(n,e,r,t){for(var i=-1,a=Da(Fa((e-n)/(r||1)),0),o=Array(a);a--;)o[t?a:++i]=n,n+=r;return o}function Ga(n){return function(e,r,t){return t&&typeof t!="number"&&on(e,r,t)&&(r=t=void 0),e=rn(e),r===void 0?(r=e,e=0):r=rn(r),t=t===void 0?e1&&on(n,e[0],e[1])?e=[]:r>2&&on(e[0],e[1],e[2])&&(e=[e[0]]),Sa(n,ln(e,1),[])});const Q=Ua;var qa=1/0,Ha=bn&&1/Rn(new bn([,-0]))[1]==qa?function(n){return new bn(n)}:Gr;const ja=Ha;var Wa=200;function Ka(n,e,r){var t=-1,i=qr,a=n.length,o=!0,s=[],u=s;if(r)o=!1,i=ga;else if(a>=Wa){var f=e?null:ja(n);if(f)return Rn(f);o=!1,i=Be,u=new j}else u=e?[]:s;n:for(;++t1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return b(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=P,this._children[e]={},this._children[P][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 b(this._nodes,e)}removeNode(e){var r=this;if(b(this._nodes,e)){var t=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),c(T(this._in[e]),t),delete this._in[e],delete this._preds[e],c(T(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(y(r))r=P;else{r+="";for(var t=r;!y(t);t=this.parent(t))if(t===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==P)return r}}children(e){if(y(e)&&(e=P),this._isCompound){var r=this._children[e];if(r)return T(r)}else{if(e===P)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return T(r)}successors(e){var r=this._sucs[e];if(r)return T(r)}neighbors(e){var r=this.predecessors(e);if(r)return Va(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var t=this;c(this._nodes,function(o,s){e(s)&&r.setNode(s,o)}),c(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,t.edge(o))});var i={};function a(o){var s=t.parent(o);return s===void 0||r.hasNode(s)?(i[o]=s,s):s in i?i[s]:a(s)}return this._isCompound&&c(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(e){return Xn(e)||(e=B(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return N(this._edgeObjs)}setPath(e,r){var t=this,i=arguments;return J(e,function(a,o){return i.length>1?t.setEdge(a,o,r):t.setEdge(a,o),o}),this}setEdge(){var e,r,t,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,r=o.w,t=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,r=arguments[1],t=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,y(t)||(t=""+t);var s=Y(this._isDirected,e,r,t);if(b(this._edgeLabels,s))return a&&(this._edgeLabels[s]=i),this;if(!y(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[s]=a?i:this._defaultEdgeLabelFn(e,r,t);var u=no(this._isDirected,e,r,t);return e=u.v,r=u.w,Object.freeze(u),this._edgeObjs[s]=u,he(this._preds[r],e),he(this._sucs[e],r),this._in[r][s]=u,this._out[e][s]=u,this._edgeCount++,this}edge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t);return this._edgeLabels[i]}hasEdge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t);return b(this._edgeLabels,i)}removeEdge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],le(this._preds[r],e),le(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var t=this._in[e];if(t){var i=N(t);return r?A(i,function(a){return a.v===r}):i}}outEdges(e,r){var t=this._out[e];if(t){var i=N(t);return r?A(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var t=this.inEdges(e,r);if(t)return t.concat(this.outEdges(e,r))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function he(n,e){n[e]?n[e]++:n[e]=1}function le(n,e){--n[e]||delete n[e]}function Y(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}return i+ce+a+ce+(y(t)?za:t)}function no(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return t&&(s.name=t),s}function mn(n,e){return Y(n,e.v,e.w,e.name)}class eo{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return ve(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&ve(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,t=r._prev;t!==r;)e.push(JSON.stringify(t,ro)),t=t._prev;return"["+e.join(", ")+"]"}}function ve(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function ro(n,e){if(n!=="_next"&&n!=="_prev")return e}var to=B(1);function io(n,e){if(n.nodeCount()<=1)return[];var r=oo(n,e||to),t=ao(r.graph,r.buckets,r.zeroIdx);return k(E(t,function(i){return n.outEdges(i.v,i.w)}))}function ao(n,e,r){for(var t=[],i=e[e.length-1],a=e[0],o;n.nodeCount();){for(;o=a.dequeue();)_n(n,e,r,o);for(;o=i.dequeue();)_n(n,e,r,o);if(n.nodeCount()){for(var s=e.length-2;s>0;--s)if(o=e[s].dequeue(),o){t=t.concat(_n(n,e,r,o,!0));break}}}return t}function _n(n,e,r,t,i){var a=i?[]:void 0;return c(n.inEdges(t.v),function(o){var s=n.edge(o),u=n.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=s,On(e,r,u)}),c(n.outEdges(t.v),function(o){var s=n.edge(o),u=o.w,f=n.node(u);f.in-=s,On(e,r,f)}),n.removeNode(t.v),a}function oo(n,e){var r=new L,t=0,i=0;c(n.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),c(n.edges(),function(s){var u=r.edge(s.v,s.w)||0,f=e(s),d=u+f;r.setEdge(s.v,s.w,d),i=Math.max(i,r.node(s.v).out+=f),t=Math.max(t,r.node(s.w).in+=f)});var a=D(i+t+3).map(function(){return new eo}),o=t+1;return c(r.nodes(),function(s){On(a,o,r.node(s))}),{graph:r,buckets:a,zeroIdx:o}}function On(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function so(n){var e=n.graph().acyclicer==="greedy"?io(n,r(n)):uo(n);c(e,function(t){var i=n.edge(t);n.removeEdge(t),i.forwardName=t.name,i.reversed=!0,n.setEdge(t.w,t.v,i,Un("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function uo(n){var e=[],r={},t={};function i(a){b(t,a)||(t[a]=!0,r[a]=!0,c(n.outEdges(a),function(o){b(r,o.w)?e.push(o):i(o.w)}),delete r[a])}return c(n.nodes(),i),e}function fo(n){c(n.edges(),function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var t=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t)}})}function G(n,e,r,t){var i;do i=Un(t);while(n.hasNode(i));return r.dummy=e,n.setNode(i,r),i}function co(n){var e=new L().setGraph(n.graph());return c(n.nodes(),function(r){e.setNode(r,n.node(r))}),c(n.edges(),function(r){var t=e.edge(r.v,r.w)||{weight:0,minlen:1},i=n.edge(r);e.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),e}function Ve(n){var e=new L({multigraph:n.isMultigraph()}).setGraph(n.graph());return c(n.nodes(),function(r){n.children(r).length||e.setNode(r,n.node(r))}),c(n.edges(),function(r){e.setEdge(r,n.edge(r))}),e}function ge(n,e){var r=n.x,t=n.y,i=e.x-r,a=e.y-t,o=n.width/2,s=n.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,f;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),u=s*i/a,f=s):(i<0&&(o=-o),u=o,f=o*a/i),{x:r+u,y:t+f}}function pn(n){var e=E(D(Ze(n)+1),function(){return[]});return c(n.nodes(),function(r){var t=n.node(r),i=t.rank;y(i)||(e[i][t.order]=r)}),e}function ho(n){var e=W(E(n.nodes(),function(r){return n.node(r).rank}));c(n.nodes(),function(r){var t=n.node(r);b(t,"rank")&&(t.rank-=e)})}function lo(n){var e=W(E(n.nodes(),function(a){return n.node(a).rank})),r=[];c(n.nodes(),function(a){var o=n.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var t=0,i=n.graph().nodeRankFactor;c(r,function(a,o){y(a)&&o%i!==0?--t:t&&c(a,function(s){n.node(s).rank+=t})})}function pe(n,e,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),G(n,"border",i,e)}function Ze(n){return S(E(n.nodes(),function(e){var r=n.node(e).rank;if(!y(r))return r}))}function vo(n,e){var r={lhs:[],rhs:[]};return c(n,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r}function go(n,e){var r=de();try{return e()}finally{console.log(n+" time: "+(de()-r)+"ms")}}function po(n,e){return e()}function bo(n){function e(r){var t=n.children(r),i=n.node(r);if(t.length&&c(t,e),b(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;ao.lim&&(s=o,u=!0);var f=A(e.edges(),function(d){return u===me(n,n.node(d.v),s)&&u!==me(n,n.node(d.w),s)});return Yn(f,function(d){return K(e,d)})}function ar(n,e,r,t){var i=r.v,a=r.w;n.removeEdge(i,a),n.setEdge(t.v,t.w,{}),jn(n),Hn(n,e),$o(n,e)}function $o(n,e){var r=Gn(n.nodes(),function(i){return!e.node(i).parent}),t=Io(n,r);t=t.slice(1),c(t,function(i){var a=n.node(i).parent,o=e.edge(i,a),s=!1;o||(o=e.edge(a,i),s=!0),e.node(i).rank=e.node(a).rank+(s?o.minlen:-o.minlen)})}function So(n,e,r){return n.hasEdge(e,r)}function me(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function Mo(n){switch(n.graph().ranker){case"network-simplex":_e(n);break;case"tight-tree":Fo(n);break;case"longest-path":Ro(n);break;default:_e(n)}}var Ro=qn;function Fo(n){qn(n),Qe(n)}function _e(n){M(n)}function Do(n){var e=G(n,"root",{},"_root"),r=ko(n),t=S(N(r))-1,i=2*t+1;n.graph().nestingRoot=e,c(n.edges(),function(o){n.edge(o).minlen*=i});var a=Go(n)+1;c(n.children(),function(o){or(n,e,i,a,t,r,o)}),n.graph().nodeRankFactor=i}function or(n,e,r,t,i,a,o){var s=n.children(o);if(!s.length){o!==e&&n.setEdge(e,o,{weight:0,minlen:r});return}var u=pe(n,"_bt"),f=pe(n,"_bb"),d=n.node(o);n.setParent(u,o),d.borderTop=u,n.setParent(f,o),d.borderBottom=f,c(s,function(h){or(n,e,r,t,i,a,h);var l=n.node(h),g=l.borderTop?l.borderTop:h,v=l.borderBottom?l.borderBottom:h,p=l.borderTop?t:2*t,m=g!==v?1:i-a[o]+1;n.setEdge(u,g,{weight:p,minlen:m,nestingEdge:!0}),n.setEdge(v,f,{weight:p,minlen:m,nestingEdge:!0})}),n.parent(o)||n.setEdge(e,u,{weight:0,minlen:i+a[o]})}function ko(n){var e={};function r(t,i){var a=n.children(t);a&&a.length&&c(a,function(o){r(o,i+1)}),e[t]=i}return c(n.children(),function(t){r(t,1)}),e}function Go(n){return J(n.edges(),function(e,r){return e+n.edge(r).weight},0)}function Bo(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,c(n.edges(),function(r){var t=n.edge(r);t.nestingEdge&&n.removeEdge(r)})}function Yo(n,e,r){var t={},i;c(r,function(a){for(var o=n.parent(a),s,u;o;){if(s=n.parent(o),s?(u=t[s],t[s]=o):(u=i,i=o),u&&u!==o){e.setEdge(u,o);return}o=s}})}function Uo(n,e,r){var t=qo(n),i=new L({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return n.node(a)});return c(n.nodes(),function(a){var o=n.node(a),s=n.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||t),c(n[r](a),function(u){var f=u.v===a?u.w:u.v,d=i.edge(f,a),h=y(d)?0:d.weight;i.setEdge(f,a,{weight:n.edge(u).weight+h})}),b(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),i}function qo(n){for(var e;n.hasNode(e=Un("_root")););return e}function Ho(n,e){for(var r=0,t=1;t0;)d%2&&(h+=s[d+1]),d=d-1>>1,s[d]+=f.weight;u+=f.weight*h})),u}function Wo(n){var e={},r=A(n.nodes(),function(s){return!n.children(s).length}),t=S(E(r,function(s){return n.node(s).rank})),i=E(D(t+1),function(){return[]});function a(s){if(!b(e,s)){e[s]=!0;var u=n.node(s);i[u.rank].push(s),c(n.successors(s),a)}}var o=Q(r,function(s){return n.node(s).rank});return c(o,a),i}function Ko(n,e){return E(e,function(r){var t=n.inEdges(r);if(t.length){var i=J(t,function(a,o){var s=n.edge(o),u=n.node(o.v);return{sum:a.sum+s.weight*u.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Xo(n,e){var r={};c(n,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};y(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),c(e.edges(),function(i){var a=r[i.v],o=r[i.w];!y(a)&&!y(o)&&(o.indegree++,a.out.push(r[i.w]))});var t=A(r,function(i){return!i.indegree});return Vo(t)}function Vo(n){var e=[];function r(a){return function(o){o.merged||(y(o.barycenter)||y(a.barycenter)||o.barycenter>=a.barycenter)&&Zo(a,o)}}function t(a){return function(o){o.in.push(a),--o.indegree===0&&n.push(o)}}for(;n.length;){var i=n.pop();e.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return E(A(e,function(a){return!a.merged}),function(a){return un(a,["vs","i","barycenter","weight"])})}function Zo(n,e){var r=0,t=0;n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/t,n.weight=t,n.i=Math.min(e.i,n.i),e.merged=!0}function Jo(n,e){var r=vo(n,function(d){return b(d,"barycenter")}),t=r.lhs,i=Q(r.rhs,function(d){return-d.i}),a=[],o=0,s=0,u=0;t.sort(Qo(!!e)),u=Ee(a,i,u),c(t,function(d){u+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,s+=d.weight,u=Ee(a,i,u)});var f={vs:k(a)};return s&&(f.barycenter=o/s,f.weight=s),f}function Ee(n,e,r){for(var t;e.length&&(t=sn(e)).i<=r;)e.pop(),n.push(t.vs),r++;return r}function Qo(n){return function(e,r){return e.barycenterr.barycenter?1:n?r.i-e.i:e.i-r.i}}function sr(n,e,r,t){var i=n.children(e),a=n.node(e),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,u={};o&&(i=A(i,function(v){return v!==o&&v!==s}));var f=Ko(n,i);c(f,function(v){if(n.children(v.v).length){var p=sr(n,v.v,r,t);u[v.v]=p,b(p,"barycenter")&&ns(v,p)}});var d=Xo(f,r);zo(d,u);var h=Jo(d,t);if(o&&(h.vs=k([o,h.vs,s]),n.predecessors(o).length)){var l=n.node(n.predecessors(o)[0]),g=n.node(n.predecessors(s)[0]);b(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+g.order)/(h.weight+2),h.weight+=2}return h}function zo(n,e){c(n,function(r){r.vs=k(r.vs.map(function(t){return e[t]?e[t].vs:t}))})}function ns(n,e){y(n.barycenter)?(n.barycenter=e.barycenter,n.weight=e.weight):(n.barycenter=(n.barycenter*n.weight+e.barycenter*e.weight)/(n.weight+e.weight),n.weight+=e.weight)}function es(n){var e=Ze(n),r=ye(n,D(1,e+1),"inEdges"),t=ye(n,D(e-1,-1,-1),"outEdges"),i=Wo(n);xe(n,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,u=0;u<4;++s,++u){rs(s%2?r:t,s%4>=2),i=pn(n);var f=Ho(n,i);fo||s>e[u].lim));for(f=u,u=t;(u=n.parent(u))!==f;)a.push(u);return{path:i.concat(a.reverse()),lca:f}}function as(n){var e={},r=0;function t(i){var a=r;c(n.children(i),t),e[i]={low:a,lim:r++}}return c(n.children(),t),e}function os(n,e){var r={};function t(i,a){var o=0,s=0,u=i.length,f=sn(a);return c(a,function(d,h){var l=us(n,d),g=l?n.node(l).order:u;(l||d===f)&&(c(a.slice(s,h+1),function(v){c(n.predecessors(v),function(p){var m=n.node(p),_=m.order;(_f)&&ur(r,l,d)})})}function i(a,o){var s=-1,u,f=0;return c(o,function(d,h){if(n.node(d).dummy==="border"){var l=n.predecessors(d);l.length&&(u=n.node(l[0]).order,t(o,f,h,s,u),f=h,s=u)}t(o,f,o.length,u,a.length)}),o}return J(e,i),r}function us(n,e){if(n.node(e).dummy)return Gn(n.predecessors(e),function(r){return n.node(r).dummy})}function ur(n,e,r){if(e>r){var t=e;e=r,r=t}var i=n[e];i||(n[e]=i={}),i[r]=!0}function fs(n,e,r){if(e>r){var t=e;e=r,r=t}return b(n[e],r)}function ds(n,e,r,t){var i={},a={},o={};return c(e,function(s){c(s,function(u,f){i[u]=u,a[u]=u,o[u]=f})}),c(e,function(s){var u=-1;c(s,function(f){var d=t(f);if(d.length){d=Q(d,function(p){return o[p]});for(var h=(d.length-1)/2,l=Math.floor(h),g=Math.ceil(h);l<=g;++l){var v=d[l];a[f]===f&&u-1}function T(n){return fn(n)?dr(n):cr(n)}var Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jr=/^\w*$/;function $n(n,e){if(x(n))return!1;var r=typeof n;return r=="number"||r=="symbol"||r=="boolean"||n==null||$(n)?!0:jr.test(n)||!Hr.test(n)||e!=null&&n in Object(e)}var Wr=500;function Kr(n){var e=hr(n,function(t){return r.size===Wr&&r.clear(),t}),r=e.cache;return e}var Xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vr=/\\(\\)?/g,Zr=Kr(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Xr,function(r,t,i,a){e.push(i?a.replace(Vr,"$1"):t||r)}),e});const Jr=Zr;function $e(n){return n==null?"":Ce(n)}function cn(n,e){return x(n)?n:$n(n,e)?[n]:Jr($e(n))}var Qr=1/0;function Z(n){if(typeof n=="string"||$(n))return n;var e=n+"";return e=="0"&&1/n==-Qr?"-0":e}function hn(n,e){e=cn(e,n);for(var r=0,t=e.length;n!=null&&r0&&r(s)?e>1?ln(s,e-1,r,t,i):Sn(i,s):t||(i[i.length]=s)}return i}function k(n){var e=n==null?0:n.length;return e?ln(n,1):[]}function et(n){return lr(vr(n,void 0,k),n+"")}function rt(n,e,r,t){var i=-1,a=n==null?0:n.length;for(t&&a&&(r=n[++i]);++is))return!1;var f=a.get(n),d=a.get(e);if(f&&d)return f==e&&d==n;var h=-1,l=!0,g=r&Oi?new j:void 0;for(a.set(n,e),a.set(e,n);++h2?e[2]:void 0;for(i&&on(e[0],e[1],i)&&(t=1);++r-1?i[a?e[o]:o]:void 0}}var wa=Math.max;function ma(n,e,r){var t=n==null?0:n.length;if(!t)return-1;var i=r==null?0:kr(r);return i<0&&(i=wa(t+i,0)),Pe(n,C(e),i)}var _a=ba(ma);const Gn=_a;function Ke(n,e){var r=-1,t=fn(n)?Array(n.length):[];return vn(n,function(i,a,o){t[++r]=e(i,a,o)}),t}function E(n,e){var r=x(n)?R:Ke;return r(n,C(e))}function Ea(n,e){return n==null?n:Oe(n,kn(e),X)}function ya(n,e){return n&&Dn(n,kn(e))}function xa(n,e){return n>e}var Ta=Object.prototype,La=Ta.hasOwnProperty;function Aa(n,e){return n!=null&&La.call(n,e)}function b(n,e){return n!=null&&He(n,e,Aa)}function Na(n,e){return R(e,function(r){return n[r]})}function N(n){return n==null?[]:Na(n,T(n))}function y(n){return n===void 0}function Xe(n,e){return ne||a&&o&&u&&!s&&!f||t&&o&&u||!r&&u||!i)return 1;if(!t&&!a&&!f&&n=s)return u;var f=r[t];return u*(f=="desc"?-1:1)}}return n.index-e.index}function Sa(n,e,r){e.length?e=R(e,function(a){return x(a)?function(o){return hn(o,a.length===1?a[0]:a)}:a}):e=[V];var t=-1;e=R(e,Cn(C));var i=Ke(n,function(a,o,s){var u=R(e,function(f){return f(a)});return{criteria:u,index:++t,value:a}});return Ia(i,function(a,o){return $a(a,o,r)})}function Ma(n,e){return Ca(n,e,function(r,t){return je(n,t)})}var Ra=et(function(n,e){return n==null?{}:Ma(n,e)});const un=Ra;var Fa=Math.ceil,Da=Math.max;function ka(n,e,r,t){for(var i=-1,a=Da(Fa((e-n)/(r||1)),0),o=Array(a);a--;)o[t?a:++i]=n,n+=r;return o}function Ga(n){return function(e,r,t){return t&&typeof t!="number"&&on(e,r,t)&&(r=t=void 0),e=rn(e),r===void 0?(r=e,e=0):r=rn(r),t=t===void 0?e1&&on(n,e[0],e[1])?e=[]:r>2&&on(e[0],e[1],e[2])&&(e=[e[0]]),Sa(n,ln(e,1),[])});const Q=Ua;var qa=1/0,Ha=bn&&1/Rn(new bn([,-0]))[1]==qa?function(n){return new bn(n)}:Gr;const ja=Ha;var Wa=200;function Ka(n,e,r){var t=-1,i=qr,a=n.length,o=!0,s=[],u=s;if(r)o=!1,i=ga;else if(a>=Wa){var f=e?null:ja(n);if(f)return Rn(f);o=!1,i=Be,u=new j}else u=e?[]:s;n:for(;++t1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return b(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=P,this._children[e]={},this._children[P][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 b(this._nodes,e)}removeNode(e){var r=this;if(b(this._nodes,e)){var t=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),c(T(this._in[e]),t),delete this._in[e],delete this._preds[e],c(T(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(y(r))r=P;else{r+="";for(var t=r;!y(t);t=this.parent(t))if(t===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==P)return r}}children(e){if(y(e)&&(e=P),this._isCompound){var r=this._children[e];if(r)return T(r)}else{if(e===P)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return T(r)}successors(e){var r=this._sucs[e];if(r)return T(r)}neighbors(e){var r=this.predecessors(e);if(r)return Va(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var t=this;c(this._nodes,function(o,s){e(s)&&r.setNode(s,o)}),c(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,t.edge(o))});var i={};function a(o){var s=t.parent(o);return s===void 0||r.hasNode(s)?(i[o]=s,s):s in i?i[s]:a(s)}return this._isCompound&&c(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(e){return Xn(e)||(e=B(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return N(this._edgeObjs)}setPath(e,r){var t=this,i=arguments;return J(e,function(a,o){return i.length>1?t.setEdge(a,o,r):t.setEdge(a,o),o}),this}setEdge(){var e,r,t,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,r=o.w,t=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,r=arguments[1],t=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,y(t)||(t=""+t);var s=Y(this._isDirected,e,r,t);if(b(this._edgeLabels,s))return a&&(this._edgeLabels[s]=i),this;if(!y(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[s]=a?i:this._defaultEdgeLabelFn(e,r,t);var u=no(this._isDirected,e,r,t);return e=u.v,r=u.w,Object.freeze(u),this._edgeObjs[s]=u,he(this._preds[r],e),he(this._sucs[e],r),this._in[r][s]=u,this._out[e][s]=u,this._edgeCount++,this}edge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t);return this._edgeLabels[i]}hasEdge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t);return b(this._edgeLabels,i)}removeEdge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],le(this._preds[r],e),le(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var t=this._in[e];if(t){var i=N(t);return r?A(i,function(a){return a.v===r}):i}}outEdges(e,r){var t=this._out[e];if(t){var i=N(t);return r?A(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var t=this.inEdges(e,r);if(t)return t.concat(this.outEdges(e,r))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function he(n,e){n[e]?n[e]++:n[e]=1}function le(n,e){--n[e]||delete n[e]}function Y(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}return i+ce+a+ce+(y(t)?za:t)}function no(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return t&&(s.name=t),s}function mn(n,e){return Y(n,e.v,e.w,e.name)}class eo{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return ve(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&ve(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,t=r._prev;t!==r;)e.push(JSON.stringify(t,ro)),t=t._prev;return"["+e.join(", ")+"]"}}function ve(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function ro(n,e){if(n!=="_next"&&n!=="_prev")return e}var to=B(1);function io(n,e){if(n.nodeCount()<=1)return[];var r=oo(n,e||to),t=ao(r.graph,r.buckets,r.zeroIdx);return k(E(t,function(i){return n.outEdges(i.v,i.w)}))}function ao(n,e,r){for(var t=[],i=e[e.length-1],a=e[0],o;n.nodeCount();){for(;o=a.dequeue();)_n(n,e,r,o);for(;o=i.dequeue();)_n(n,e,r,o);if(n.nodeCount()){for(var s=e.length-2;s>0;--s)if(o=e[s].dequeue(),o){t=t.concat(_n(n,e,r,o,!0));break}}}return t}function _n(n,e,r,t,i){var a=i?[]:void 0;return c(n.inEdges(t.v),function(o){var s=n.edge(o),u=n.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=s,On(e,r,u)}),c(n.outEdges(t.v),function(o){var s=n.edge(o),u=o.w,f=n.node(u);f.in-=s,On(e,r,f)}),n.removeNode(t.v),a}function oo(n,e){var r=new L,t=0,i=0;c(n.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),c(n.edges(),function(s){var u=r.edge(s.v,s.w)||0,f=e(s),d=u+f;r.setEdge(s.v,s.w,d),i=Math.max(i,r.node(s.v).out+=f),t=Math.max(t,r.node(s.w).in+=f)});var a=D(i+t+3).map(function(){return new eo}),o=t+1;return c(r.nodes(),function(s){On(a,o,r.node(s))}),{graph:r,buckets:a,zeroIdx:o}}function On(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function so(n){var e=n.graph().acyclicer==="greedy"?io(n,r(n)):uo(n);c(e,function(t){var i=n.edge(t);n.removeEdge(t),i.forwardName=t.name,i.reversed=!0,n.setEdge(t.w,t.v,i,Un("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function uo(n){var e=[],r={},t={};function i(a){b(t,a)||(t[a]=!0,r[a]=!0,c(n.outEdges(a),function(o){b(r,o.w)?e.push(o):i(o.w)}),delete r[a])}return c(n.nodes(),i),e}function fo(n){c(n.edges(),function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var t=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t)}})}function G(n,e,r,t){var i;do i=Un(t);while(n.hasNode(i));return r.dummy=e,n.setNode(i,r),i}function co(n){var e=new L().setGraph(n.graph());return c(n.nodes(),function(r){e.setNode(r,n.node(r))}),c(n.edges(),function(r){var t=e.edge(r.v,r.w)||{weight:0,minlen:1},i=n.edge(r);e.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),e}function Ve(n){var e=new L({multigraph:n.isMultigraph()}).setGraph(n.graph());return c(n.nodes(),function(r){n.children(r).length||e.setNode(r,n.node(r))}),c(n.edges(),function(r){e.setEdge(r,n.edge(r))}),e}function ge(n,e){var r=n.x,t=n.y,i=e.x-r,a=e.y-t,o=n.width/2,s=n.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,f;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),u=s*i/a,f=s):(i<0&&(o=-o),u=o,f=o*a/i),{x:r+u,y:t+f}}function pn(n){var e=E(D(Ze(n)+1),function(){return[]});return c(n.nodes(),function(r){var t=n.node(r),i=t.rank;y(i)||(e[i][t.order]=r)}),e}function ho(n){var e=W(E(n.nodes(),function(r){return n.node(r).rank}));c(n.nodes(),function(r){var t=n.node(r);b(t,"rank")&&(t.rank-=e)})}function lo(n){var e=W(E(n.nodes(),function(a){return n.node(a).rank})),r=[];c(n.nodes(),function(a){var o=n.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var t=0,i=n.graph().nodeRankFactor;c(r,function(a,o){y(a)&&o%i!==0?--t:t&&c(a,function(s){n.node(s).rank+=t})})}function pe(n,e,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),G(n,"border",i,e)}function Ze(n){return S(E(n.nodes(),function(e){var r=n.node(e).rank;if(!y(r))return r}))}function vo(n,e){var r={lhs:[],rhs:[]};return c(n,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r}function go(n,e){var r=de();try{return e()}finally{console.log(n+" time: "+(de()-r)+"ms")}}function po(n,e){return e()}function bo(n){function e(r){var t=n.children(r),i=n.node(r);if(t.length&&c(t,e),b(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;ao.lim&&(s=o,u=!0);var f=A(e.edges(),function(d){return u===me(n,n.node(d.v),s)&&u!==me(n,n.node(d.w),s)});return Yn(f,function(d){return K(e,d)})}function ar(n,e,r,t){var i=r.v,a=r.w;n.removeEdge(i,a),n.setEdge(t.v,t.w,{}),jn(n),Hn(n,e),$o(n,e)}function $o(n,e){var r=Gn(n.nodes(),function(i){return!e.node(i).parent}),t=Io(n,r);t=t.slice(1),c(t,function(i){var a=n.node(i).parent,o=e.edge(i,a),s=!1;o||(o=e.edge(a,i),s=!0),e.node(i).rank=e.node(a).rank+(s?o.minlen:-o.minlen)})}function So(n,e,r){return n.hasEdge(e,r)}function me(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function Mo(n){switch(n.graph().ranker){case"network-simplex":_e(n);break;case"tight-tree":Fo(n);break;case"longest-path":Ro(n);break;default:_e(n)}}var Ro=qn;function Fo(n){qn(n),Qe(n)}function _e(n){M(n)}function Do(n){var e=G(n,"root",{},"_root"),r=ko(n),t=S(N(r))-1,i=2*t+1;n.graph().nestingRoot=e,c(n.edges(),function(o){n.edge(o).minlen*=i});var a=Go(n)+1;c(n.children(),function(o){or(n,e,i,a,t,r,o)}),n.graph().nodeRankFactor=i}function or(n,e,r,t,i,a,o){var s=n.children(o);if(!s.length){o!==e&&n.setEdge(e,o,{weight:0,minlen:r});return}var u=pe(n,"_bt"),f=pe(n,"_bb"),d=n.node(o);n.setParent(u,o),d.borderTop=u,n.setParent(f,o),d.borderBottom=f,c(s,function(h){or(n,e,r,t,i,a,h);var l=n.node(h),g=l.borderTop?l.borderTop:h,v=l.borderBottom?l.borderBottom:h,p=l.borderTop?t:2*t,m=g!==v?1:i-a[o]+1;n.setEdge(u,g,{weight:p,minlen:m,nestingEdge:!0}),n.setEdge(v,f,{weight:p,minlen:m,nestingEdge:!0})}),n.parent(o)||n.setEdge(e,u,{weight:0,minlen:i+a[o]})}function ko(n){var e={};function r(t,i){var a=n.children(t);a&&a.length&&c(a,function(o){r(o,i+1)}),e[t]=i}return c(n.children(),function(t){r(t,1)}),e}function Go(n){return J(n.edges(),function(e,r){return e+n.edge(r).weight},0)}function Bo(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,c(n.edges(),function(r){var t=n.edge(r);t.nestingEdge&&n.removeEdge(r)})}function Yo(n,e,r){var t={},i;c(r,function(a){for(var o=n.parent(a),s,u;o;){if(s=n.parent(o),s?(u=t[s],t[s]=o):(u=i,i=o),u&&u!==o){e.setEdge(u,o);return}o=s}})}function Uo(n,e,r){var t=qo(n),i=new L({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return n.node(a)});return c(n.nodes(),function(a){var o=n.node(a),s=n.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||t),c(n[r](a),function(u){var f=u.v===a?u.w:u.v,d=i.edge(f,a),h=y(d)?0:d.weight;i.setEdge(f,a,{weight:n.edge(u).weight+h})}),b(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),i}function qo(n){for(var e;n.hasNode(e=Un("_root")););return e}function Ho(n,e){for(var r=0,t=1;t0;)d%2&&(h+=s[d+1]),d=d-1>>1,s[d]+=f.weight;u+=f.weight*h})),u}function Wo(n){var e={},r=A(n.nodes(),function(s){return!n.children(s).length}),t=S(E(r,function(s){return n.node(s).rank})),i=E(D(t+1),function(){return[]});function a(s){if(!b(e,s)){e[s]=!0;var u=n.node(s);i[u.rank].push(s),c(n.successors(s),a)}}var o=Q(r,function(s){return n.node(s).rank});return c(o,a),i}function Ko(n,e){return E(e,function(r){var t=n.inEdges(r);if(t.length){var i=J(t,function(a,o){var s=n.edge(o),u=n.node(o.v);return{sum:a.sum+s.weight*u.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Xo(n,e){var r={};c(n,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};y(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),c(e.edges(),function(i){var a=r[i.v],o=r[i.w];!y(a)&&!y(o)&&(o.indegree++,a.out.push(r[i.w]))});var t=A(r,function(i){return!i.indegree});return Vo(t)}function Vo(n){var e=[];function r(a){return function(o){o.merged||(y(o.barycenter)||y(a.barycenter)||o.barycenter>=a.barycenter)&&Zo(a,o)}}function t(a){return function(o){o.in.push(a),--o.indegree===0&&n.push(o)}}for(;n.length;){var i=n.pop();e.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return E(A(e,function(a){return!a.merged}),function(a){return un(a,["vs","i","barycenter","weight"])})}function Zo(n,e){var r=0,t=0;n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/t,n.weight=t,n.i=Math.min(e.i,n.i),e.merged=!0}function Jo(n,e){var r=vo(n,function(d){return b(d,"barycenter")}),t=r.lhs,i=Q(r.rhs,function(d){return-d.i}),a=[],o=0,s=0,u=0;t.sort(Qo(!!e)),u=Ee(a,i,u),c(t,function(d){u+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,s+=d.weight,u=Ee(a,i,u)});var f={vs:k(a)};return s&&(f.barycenter=o/s,f.weight=s),f}function Ee(n,e,r){for(var t;e.length&&(t=sn(e)).i<=r;)e.pop(),n.push(t.vs),r++;return r}function Qo(n){return function(e,r){return e.barycenterr.barycenter?1:n?r.i-e.i:e.i-r.i}}function sr(n,e,r,t){var i=n.children(e),a=n.node(e),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,u={};o&&(i=A(i,function(v){return v!==o&&v!==s}));var f=Ko(n,i);c(f,function(v){if(n.children(v.v).length){var p=sr(n,v.v,r,t);u[v.v]=p,b(p,"barycenter")&&ns(v,p)}});var d=Xo(f,r);zo(d,u);var h=Jo(d,t);if(o&&(h.vs=k([o,h.vs,s]),n.predecessors(o).length)){var l=n.node(n.predecessors(o)[0]),g=n.node(n.predecessors(s)[0]);b(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+g.order)/(h.weight+2),h.weight+=2}return h}function zo(n,e){c(n,function(r){r.vs=k(r.vs.map(function(t){return e[t]?e[t].vs:t}))})}function ns(n,e){y(n.barycenter)?(n.barycenter=e.barycenter,n.weight=e.weight):(n.barycenter=(n.barycenter*n.weight+e.barycenter*e.weight)/(n.weight+e.weight),n.weight+=e.weight)}function es(n){var e=Ze(n),r=ye(n,D(1,e+1),"inEdges"),t=ye(n,D(e-1,-1,-1),"outEdges"),i=Wo(n);xe(n,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,u=0;u<4;++s,++u){rs(s%2?r:t,s%4>=2),i=pn(n);var f=Ho(n,i);fo||s>e[u].lim));for(f=u,u=t;(u=n.parent(u))!==f;)a.push(u);return{path:i.concat(a.reverse()),lca:f}}function as(n){var e={},r=0;function t(i){var a=r;c(n.children(i),t),e[i]={low:a,lim:r++}}return c(n.children(),t),e}function os(n,e){var r={};function t(i,a){var o=0,s=0,u=i.length,f=sn(a);return c(a,function(d,h){var l=us(n,d),g=l?n.node(l).order:u;(l||d===f)&&(c(a.slice(s,h+1),function(v){c(n.predecessors(v),function(p){var m=n.node(p),_=m.order;(_f)&&ur(r,l,d)})})}function i(a,o){var s=-1,u,f=0;return c(o,function(d,h){if(n.node(d).dummy==="border"){var l=n.predecessors(d);l.length&&(u=n.node(l[0]).order,t(o,f,h,s,u),f=h,s=u)}t(o,f,o.length,u,a.length)}),o}return J(e,i),r}function us(n,e){if(n.node(e).dummy)return Gn(n.predecessors(e),function(r){return n.node(r).dummy})}function ur(n,e,r){if(e>r){var t=e;e=r,r=t}var i=n[e];i||(n[e]=i={}),i[r]=!0}function fs(n,e,r){if(e>r){var t=e;e=r,r=t}return b(n[e],r)}function ds(n,e,r,t){var i={},a={},o={};return c(e,function(s){c(s,function(u,f){i[u]=u,a[u]=u,o[u]=f})}),c(e,function(s){var u=-1;c(s,function(f){var d=t(f);if(d.length){d=Q(d,function(p){return o[p]});for(var h=(d.length-1)/2,l=Math.floor(h),g=Math.ceil(h);l<=g;++l){var v=d[l];a[f]===f&&ut?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:tn?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,l=u.length){if(o>>1;e(u[h],c)<0?o=h+1:l=h}while(o>>1;e(u[h],c)<=0?o=h+1:l=h}while(oo&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function sn(n){return n===null?NaN:+n}const ln=_(F),dn=ln.right;_(sn).center;const gn=dn,yn=Math.sqrt(50),Mn=Math.sqrt(10),pn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=yn?10:f>=Mn?5:f>=pn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/ot&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*ot&&--c),c0))return[];if(n===t)return[n];const r=t=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function Pn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function zn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var $n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=$n.exec(n)))throw new Error("invalid format: "+n);var t;return new B({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=B.prototype;function B(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}B.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Fn(n){n:for(var t=n.length,e=1,r=-1,i;e0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Rn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function Z(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:jn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Z(n*100,t),r:Z,s:Rn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function En(n){var t=n.grouping===void 0||n.thousands===void 0?J:Pn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?J:zn(K.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var s=h.fill,p=h.align,y=h.sign,S=h.symbol,k=h.zero,b=h.width,T=h.comma,w=h.precision,G=h.trim,d=h.type;d==="n"?(T=!0,d="g"):H[d]||(w===void 0&&(w=12),G=!0,d="g"),(k||s==="0"&&p==="=")&&(k=!0,s="0",p="=");var en=S==="$"?e:S==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=S==="$"?r:/[%p]/.test(d)?a:"",O=H[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(m){var N=en,g=on,x,X,j;if(d==="c")g=O(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:O(Math.abs(m),w),G&&(m=Fn(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?Q[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,X=m.length;++xj||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return V.toString=function(){return h+""},V}function l(h,s){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(s)/3)))*3,S=Math.pow(10,-y),k=Q[8+y/3];return function(b){return p(S*b)+k}}return{format:o,formatPrefix:l}}var $,tn,rn;Dn({thousands:",",grouping:[3],currency:["$",""]});function Dn(n){return $=En(n),tn=$.format,rn=$.formatPrefix,$}function Tn(n){return Math.max(0,-v(Math.abs(n)))}function In(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function Ln(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function qn(n){return function(){return n}}function Cn(n){return+n}var W=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:qn(isNaN(t)?NaN:.5)}function Bn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Gn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i2?On:Gn,c=o=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=u(n.map(r),t,e)))(r(a(s)))}return h.invert=function(s){return a(i((o||(o=u(t,n.map(r),I)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,Cn),l()):n.slice()},h.range=function(s){return arguments.length?(t=Array.from(s),l()):t.slice()},h.rangeRound=function(s){return t=Array.from(s),e=bn,l()},h.clamp=function(s){return arguments.length?(a=s?!0:A,l()):a!==A},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return r=s,i=p,l()}}function Un(){return Xn()(A,A)}function Yn(n,t,e,r){var i=Nn(n,t,e),f;switch(r=D(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=In(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=Ln(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Tn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Zn(n){var t=n.domain;return n.ticks=function(e){var r=t();return wn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Yn(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,l=10;for(u0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Hn(){var n=Un();return n.copy=function(){return Vn(n,Hn())},cn.apply(n,arguments),Zn(n)}export{Vn as a,_ as b,Un as c,Hn as l,Nn as t}; +import{a0 as un,a1 as I,a2 as U,a3 as Y,a4 as fn}from"./index-e0ff10fa.js";import{i as cn}from"./init-77b53fdd.js";function F(n,t){return n==null||t==null?NaN:nt?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:tn?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,l=u.length){if(o>>1;e(u[h],c)<0?o=h+1:l=h}while(o>>1;e(u[h],c)<=0?o=h+1:l=h}while(oo&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function sn(n){return n===null?NaN:+n}const ln=_(F),dn=ln.right;_(sn).center;const gn=dn,yn=Math.sqrt(50),Mn=Math.sqrt(10),pn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=yn?10:f>=Mn?5:f>=pn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/ot&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*ot&&--c),c0))return[];if(n===t)return[n];const r=t=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function Pn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function zn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var $n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=$n.exec(n)))throw new Error("invalid format: "+n);var t;return new B({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=B.prototype;function B(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}B.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Fn(n){n:for(var t=n.length,e=1,r=-1,i;e0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Rn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function Z(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:jn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Z(n*100,t),r:Z,s:Rn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function En(n){var t=n.grouping===void 0||n.thousands===void 0?J:Pn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?J:zn(K.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var s=h.fill,p=h.align,y=h.sign,S=h.symbol,k=h.zero,b=h.width,T=h.comma,w=h.precision,G=h.trim,d=h.type;d==="n"?(T=!0,d="g"):H[d]||(w===void 0&&(w=12),G=!0,d="g"),(k||s==="0"&&p==="=")&&(k=!0,s="0",p="=");var en=S==="$"?e:S==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=S==="$"?r:/[%p]/.test(d)?a:"",O=H[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(m){var N=en,g=on,x,X,j;if(d==="c")g=O(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:O(Math.abs(m),w),G&&(m=Fn(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?Q[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,X=m.length;++xj||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return V.toString=function(){return h+""},V}function l(h,s){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(s)/3)))*3,S=Math.pow(10,-y),k=Q[8+y/3];return function(b){return p(S*b)+k}}return{format:o,formatPrefix:l}}var $,tn,rn;Dn({thousands:",",grouping:[3],currency:["$",""]});function Dn(n){return $=En(n),tn=$.format,rn=$.formatPrefix,$}function Tn(n){return Math.max(0,-v(Math.abs(n)))}function In(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function Ln(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function qn(n){return function(){return n}}function Cn(n){return+n}var W=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:qn(isNaN(t)?NaN:.5)}function Bn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Gn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i2?On:Gn,c=o=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=u(n.map(r),t,e)))(r(a(s)))}return h.invert=function(s){return a(i((o||(o=u(t,n.map(r),I)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,Cn),l()):n.slice()},h.range=function(s){return arguments.length?(t=Array.from(s),l()):t.slice()},h.rangeRound=function(s){return t=Array.from(s),e=bn,l()},h.clamp=function(s){return arguments.length?(a=s?!0:A,l()):a!==A},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return r=s,i=p,l()}}function Un(){return Xn()(A,A)}function Yn(n,t,e,r){var i=Nn(n,t,e),f;switch(r=D(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=In(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=Ln(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Tn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Zn(n){var t=n.domain;return n.ticks=function(e){var r=t();return wn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Yn(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,l=10;for(u0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Hn(){var n=Un();return n.copy=function(){return Vn(n,Hn())},cn.apply(n,arguments),Zn(n)}export{Vn as a,_ as b,Un as c,Hn as l,Nn as t}; diff --git a/assets/mindmap-definition-beec6740-4405b0e1.js b/assets/mindmap-definition-beec6740-13a55f61.js similarity index 99% rename from assets/mindmap-definition-beec6740-4405b0e1.js rename to assets/mindmap-definition-beec6740-13a55f61.js index 681fdcf..2596ae8 100644 --- a/assets/mindmap-definition-beec6740-4405b0e1.js +++ b/assets/mindmap-definition-beec6740-13a55f61.js @@ -1,4 +1,4 @@ -import{P as Da,Q as _u,d as Ep,c as sn,l as qr,h as ti,r as wp,aT as xp,aU as Tp,aV as Cp}from"./index-b371ab76.js";import{a as Dp}from"./createText-62fc7601-6b649b67.js";var Uu={exports:{}};(function(pe,le){(function(ee,ce){pe.exports=ce()})(Da,function(){function ee(t){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(t)}function ce(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,a=new Array(e);rt.length)&&(e=t.length);for(var r=0,a=new Array(e);r"u"?null:window,V=D?D.navigator:null;D&&D.document;var _=ee(""),Q=ee({}),ne=ee(function(){}),oe=typeof HTMLElement>"u"?"undefined":ee(HTMLElement),J=function(e){return e&&e.instanceString&&Y(e.instanceString)?e.instanceString():null},j=function(e){return e!=null&&ee(e)==_},Y=function(e){return e!=null&&ee(e)===ne},te=function(e){return!de(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},L=function(e){return e!=null&&ee(e)===Q&&!te(e)&&e.constructor===Object},$=function(e){return e!=null&&ee(e)===Q},R=function(e){return e!=null&&ee(e)===ee(1)&&!isNaN(e)},W=function(e){return R(e)&&Math.floor(e)===e},fe=function(e){if(oe!=="undefined")return e!=null&&e instanceof HTMLElement},de=function(e){return Ae(e)||Ne(e)},Ae=function(e){return J(e)==="collection"&&e._private.single},Ne=function(e){return J(e)==="collection"&&!e._private.single},_e=function(e){return J(e)==="core"},tt=function(e){return J(e)==="stylesheet"},vt=function(e){return J(e)==="event"},Pe=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},$e=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Xe=function(e){return L(e)&&R(e.x1)&&R(e.x2)&&R(e.y1)&&R(e.y2)},rt=function(e){return $(e)&&Y(e.then)},lt=function(){return V&&V.userAgent.match(/msie|trident|edge/i)},at=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;sr?1:0},ju=function(e,r){return-1*ji(e,r)},Ue=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(y-=1),y<1/6?v+(p-v)*6*y:y<1/2?p:y<2/3?v+(p-v)*(2/3-y)*6:v}var h=new RegExp("^"+un+"$").exec(e);if(h){if(a=parseInt(h[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(h[2]),n<0||n>100||(n=n/100,i=parseFloat(h[3]),i<0||i>100)||(i=i/100,s=h[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,d=2*i-c;o=Math.round(255*f(d,c,a+1/3)),l=Math.round(255*f(d,c,a)),u=Math.round(255*f(d,c,a-1/3))}r=[o,l,u,s]}return r},rl=function(e){var r,a=new RegExp("^"+dr+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},al=function(e){return il[e.toLowerCase()]},nl=function(e){return(te(e)?e:null)||al(e)||el(e)||rl(e)||tl(e)},il={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]},es=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i=e||x<0||h&&I>=i}function g(){var A=ri();if(y(A))return m(A);o=setTimeout(g,p(A))}function m(A){return o=void 0,c&&a?d(A):(a=n=void 0,s)}function b(){o!==void 0&&clearTimeout(o),u=0,a=l=n=o=void 0}function E(){return o===void 0?s:m(ri())}function N(){var A=ri(),x=y(A);if(a=arguments,n=this,l=A,x){if(o===void 0)return v(l);if(h)return clearTimeout(o),o=setTimeout(g,e),d(l)}return o===void 0&&(o=setTimeout(g,e)),s}return N.cancel=b,N.flush=E,N}var fn=Ul,ai=D?D.performance:null,os=ai&&ai.now?function(){return ai.now()}:function(){return Date.now()},Yl=function(){if(D){if(D.requestAnimationFrame)return function(t){D.requestAnimationFrame(t)};if(D.mozRequestAnimationFrame)return function(t){D.mozRequestAnimationFrame(t)};if(D.webkitRequestAnimationFrame)return function(t){D.webkitRequestAnimationFrame(t)};if(D.msRequestAnimationFrame)return function(t){D.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(os())},1e3/60)}}(),hn=function(e){return Yl(e)},gr=os,Jr=9261,us=65599,Na=5381,ls=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jr,a=r,n;n=e.next(),!n.done;)a=a*us+n.value|0;return a},Ma=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jr;return r*us+e|0},Ia=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Na;return(r<<5)+r+e|0},Hl=function(e,r){return e*2097152+r},wr=function(e){return e[0]*2097152+e[1]},cn=function(e,r){return[Ma(e[0],r[0]),Ia(e[1],r[1])]},Xl=function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n=0&&!(e[n]===r&&(e.splice(n,1),a));n--);},si=function(e){e.splice(0,e.length)},jl=function(e,r){for(var a=0;a"u"?"undefined":ee(Set))!==tf?Set:rf,dn=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!_e(e)){Tt("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){Tt("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new jr,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.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(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];te(r.classes)?u=r.classes:j(r.classes)&&(u=r.classes.split(/\s+/));for(var f=0,h=u.length;fm?1:0},f=function(g,m,b,E,N){var A;if(b==null&&(b=0),N==null&&(N=a),b<0)throw new Error("lo must be non-negative");for(E==null&&(E=g.length);bF;0<=F?C++:C--)I.push(C);return I}).apply(this).reverse(),x=[],E=0,N=A.length;Ez;0<=z?++I:--I)M.push(s(g,b));return M},p=function(g,m,b,E){var N,A,x;for(E==null&&(E=a),N=g[b];b>m;){if(x=b-1>>1,A=g[x],E(N,A)<0){g[b]=A,b=x;continue}break}return g[b]=N},y=function(g,m,b){var E,N,A,x,I;for(b==null&&(b=a),N=g.length,I=m,A=g[m],E=2*m+1;E0;){var A=m.pop(),x=y(A),I=A.id();if(c[I]=x,x!==1/0)for(var C=A.neighborhood().intersect(v),F=0;F0)for(ie.unshift(Z);h[ge];){var se=h[ge];ie.unshift(se.edge),ie.unshift(se.node),ue=se.node,ge=ue.id()}return o.spawn(ie)}}}},of={kruskal:function(e){e=e||function(b){return 1};for(var r=this.byGroup(),a=r.nodes,n=r.edges,i=a.length,s=new Array(i),o=a,l=function(E){for(var N=0;N0;){if(N(),x++,E===f){for(var I=[],C=i,F=f,z=g[F];I.unshift(C),z!=null&&I.unshift(z),C=y[F],C!=null;)F=C.id(),z=g[F];return{found:!0,distance:h[E],path:this.spawn(I),steps:x}}d[E]=!0;for(var M=b._private.edges,X=0;Xz&&(v[F]=z,m[F]=C,b[F]=N),!i){var M=C*f+I;!i&&v[M]>z&&(v[M]=z,m[M]=I,b[M]=N)}}}for(var X=0;X1&&arguments[1]!==void 0?arguments[1]:s,je=b(ke),Ze=[],Ye=je;;){if(Ye==null)return r.spawn();var ct=m(Ye),De=ct.edge,k=ct.pred;if(Ze.unshift(Ye[0]),Ye.same(ze)&&Ze.length>0)break;De!=null&&Ze.unshift(De),Ye=k}return l.spawn(Ze)},A=0;A=0;f--){var h=u[f],c=h[1],d=h[2];(r[c]===o&&r[d]===l||r[c]===l&&r[d]===o)&&u.splice(f,1)}for(var v=0;vn;){var i=Math.floor(Math.random()*r.length);r=gf(i,e,r),a--}return r},pf={kargerStein:function(){var e=this,r=this.byGroup(),a=r.nodes,n=r.edges;n.unmergeBy(function(ie){return ie.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/df);if(i<2){Tt("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],f=0;f1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(c,d){return c-d});var f=e.length,h=Math.floor(f/2);return f%2!==0?e[h+1+o]:(e[h-1+o]+e[h+o])/2},xf=function(e){return Math.PI*e/180},pn=function(e,r){return Math.atan2(r,e)-Math.PI/2},ui=Math.log2||function(t){return Math.log(t)/Math.log(2)},bs=function(e){return e>0?1:e<0?-1:0},Br=function(e,r){return Math.sqrt(Fr(e,r))},Fr=function(e,r){var a=r.x-e.x,n=r.y-e.y;return a*a+n*n},Tf=function(e){for(var r=e.length,a=0,n=0;n=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(e.w!=null&&e.h!=null&&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}}},Df=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},Sf=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},Lf=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},Af=function(e,r,a){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},yn=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},li=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(r.length===1)a=n=i=s=r[0];else if(r.length===2)a=i=r[0],s=n=r[1];else if(r.length===4){var o=w(r,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Es=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},fi=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},ra=function(e,r,a){return e.x1<=r&&r<=e.x2&&e.y1<=a&&a<=e.y2},Of=function(e,r){return ra(e,r.x,r.y)},ws=function(e,r){return ra(e,r.x1,r.y1)&&ra(e,r.x2,r.y2)},xs=function(e,r,a,n,i,s,o){var l=za(i,s),u=i/2,f=s/2,h;{var c=a-u+l-o,d=n-f-o,v=a+u-l+o,p=d;if(h=Cr(e,r,a,n,c,d,v,p,!1),h.length>0)return h}{var y=a+u+o,g=n-f+l-o,m=y,b=n+f-l+o;if(h=Cr(e,r,a,n,y,g,m,b,!1),h.length>0)return h}{var E=a-u+l-o,N=n+f+o,A=a+u-l+o,x=N;if(h=Cr(e,r,a,n,E,N,A,x,!1),h.length>0)return h}{var I=a-u-o,C=n-f+l-o,F=I,z=n+f-l+o;if(h=Cr(e,r,a,n,I,C,F,z,!1),h.length>0)return h}var M;{var X=a-u+l,B=n-f+l;if(M=Ba(e,r,a,n,X,B,l+o),M.length>0&&M[0]<=X&&M[1]<=B)return[M[0],M[1]]}{var re=a+u-l,q=n-f+l;if(M=Ba(e,r,a,n,re,q,l+o),M.length>0&&M[0]>=re&&M[1]<=q)return[M[0],M[1]]}{var Z=a+u-l,ie=n+f-l;if(M=Ba(e,r,a,n,Z,ie,l+o),M.length>0&&M[0]>=Z&&M[1]>=ie)return[M[0],M[1]]}{var ue=a-u+l,ge=n+f-l;if(M=Ba(e,r,a,n,ue,ge,l+o),M.length>0&&M[0]<=ue&&M[1]>=ge)return[M[0],M[1]]}return[]},Nf=function(e,r,a,n,i,s,o){var l=o,u=Math.min(a,i),f=Math.max(a,i),h=Math.min(n,s),c=Math.max(n,s);return u-l<=e&&e<=f+l&&h-l<=r&&r<=c+l},Mf=function(e,r,a,n,i,s,o,l,u){var f={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(ef.x2||rf.y2)},If=function(e,r,a,n){a-=n;var i=r*r-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},Rf=function(e,r,a,n,i){var s=1e-5;e===0&&(e=s),r/=e,a/=e,n/=e;var o,l,u,f,h,c,d,v;if(l=(3*a-r*r)/9,u=-(27*n)+r*(9*a-2*(r*r)),u/=54,o=l*l*l+u*u,i[1]=0,d=r/3,o>0){h=u+Math.sqrt(o),h=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),c=u-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-d+h+c,d+=(h+c)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-c+h)/2,i[3]=d,i[5]=-d;return}if(i[5]=i[3]=0,o===0){v=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-d+2*v,i[4]=i[2]=-(v+d);return}l=-l,f=l*l*l,f=Math.acos(u/Math.sqrt(f)),v=2*Math.sqrt(l),i[0]=-d+v*Math.cos(f/3),i[2]=-d+v*Math.cos((f+2*Math.PI)/3),i[4]=-d+v*Math.cos((f+4*Math.PI)/3)},kf=function(e,r,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,f=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,h=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*r+2*s*s+2*s*r-l*r,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*r-s*r,d=[];Rf(u,f,h,c,d);for(var v=1e-7,p=[],y=0;y<6;y+=2)Math.abs(d[y+1])=0&&d[y]<=1&&p.push(d[y]);p.push(1),p.push(0);for(var g=-1,m,b,E,N=0;N=0?Eu?(e-i)*(e-i)+(r-s)*(r-s):f-c},Ht=function(e,r,a){for(var n,i,s,o,l,u=0,f=0;f=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>r&&u++;else continue;return u%2!==0},pr=function(e,r,a,n,i,s,o,l,u){var f=new Array(a.length),h;l[0]!=null?(h=Math.atan(l[1]/l[0]),l[0]<0?h=h+Math.PI/2:h=-h-Math.PI/2):h=l;for(var c=Math.cos(-h),d=Math.sin(-h),v=0;v0){var y=Cs(f,-u);p=Ts(y)}else p=f;return Ht(e,r,p)},Bf=function(e,r,a,n,i,s,o){for(var l=new Array(a.length),u=s/2,f=o/2,h=vi(s,o),c=h*h,d=0;d=0&&y<=1&&m.push(y),g>=0&&g<=1&&m.push(g),m.length===0)return[];var b=m[0]*l[0]+e,E=m[0]*l[1]+r;if(m.length>1){if(m[0]==m[1])return[b,E];var N=m[1]*l[0]+e,A=m[1]*l[1]+r;return[b,E,N,A]}else return[b,E]},hi=function(e,r,a){return r<=e&&e<=a||a<=e&&e<=r?e:e<=r&&r<=a||a<=r&&r<=e?r:a},Cr=function(e,r,a,n,i,s,o,l,u){var f=e-i,h=a-e,c=o-i,d=r-s,v=n-r,p=l-s,y=c*d-p*f,g=h*d-v*f,m=p*h-c*v;if(m!==0){var b=y/m,E=g/m,N=.001,A=0-N,x=1+N;return A<=b&&b<=x&&A<=E&&E<=x?[e+b*h,r+b*v]:u?[e+b*h,r+b*v]:[]}else return y===0||g===0?hi(e,a,o)===o?[o,l]:hi(e,a,i)===i?[i,s]:hi(i,o,a)===a?[a,n]:[]:[]},Fa=function(e,r,a,n,i,s,o,l){var u=[],f,h=new Array(a.length),c=!0;s==null&&(c=!1);var d;if(c){for(var v=0;v0){var p=Cs(h,-l);d=Ts(p)}else d=h}else d=a;for(var y,g,m,b,E=0;E2){for(var q=[u[0],u[1]],Z=Math.pow(q[0]-e,2)+Math.pow(q[1]-r,2),ie=1;ief&&(f=E)},get:function(b){return u[b]}},c=0;c0?q=re.edgesTo(B)[0]:q=B.edgesTo(re)[0];var Z=n(q);B=B.id(),I[B]>I[M]+Z&&(I[B]=I[M]+Z,C.nodes.indexOf(B)<0?C.push(B):C.updateItem(B),x[B]=0,A[B]=[]),I[B]==I[M]+Z&&(x[B]=x[B]+x[M],A[B].push(M))}else for(var ie=0;ie0;){for(var ve=N.pop(),ye=0;ye0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},Jf=function(e,r){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:th,o=n,l,u,f=0;f=2?Ga(e,r,a,0,Rs,rh):Ga(e,r,a,0,Is)},squaredEuclidean:function(e,r,a){return Ga(e,r,a,0,Rs)},manhattan:function(e,r,a){return Ga(e,r,a,0,Is)},max:function(e,r,a){return Ga(e,r,a,-1/0,ah)}};ia["squared-euclidean"]=ia.squaredEuclidean,ia.squaredeuclidean=ia.squaredEuclidean;function bn(t,e,r,a,n,i){var s;return Y(t)?s=t:s=ia[t]||ia.euclidean,e===0&&Y(t)?s(n,i):s(e,r,a,n,i)}var nh=At({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),pi=function(e){return nh(e)},En=function(e,r,a,n,i){var s=i!=="kMedoids",o=s?function(h){return a[h]}:function(h){return n[h](a)},l=function(c){return n[c](r)},u=a,f=r;return bn(e,n.length,o,l,u,f)},yi=function(e,r,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(r),l=null,u=0;ua)return!1}return!0},oh=function(e,r,a){for(var n=0;no&&(o=r[u][f],l=f);i[l].push(e[u])}for(var h=0;h=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var v=r[s],p=r[n[s]],y;i.mode==="dendrogram"?y={left:v,right:p,key:v.key}:y={value:v.value.concat(p.value),key:v.key},e[v.index]=y,e.splice(p.index,1),r[v.key]=y;for(var g=0;ga[p.key][m.key]&&(l=a[p.key][m.key])):i.linkage==="max"?(l=a[v.key][m.key],a[v.key][m.key]0&&n.push(i);return n},Vs=function(e,r,a){for(var n=[],i=0;io&&(s=u,o=r[i*e+u])}s>0&&n.push(s)}for(var f=0;fu&&(l=f,u=h)}a[i]=s[l]}return n=Vs(e,r,a),n},_s=function(e){for(var r=this.cy(),a=this.nodes(),n=wh(e),i={},s=0;s=z?(M=z,z=B,X=re):B>M&&(M=B);for(var q=0;q0?1:0;x[C%n.minIterations*o+ve]=ye,se+=ye}if(se>0&&(C>=n.minIterations-1||C==n.maxIterations-1)){for(var Te=0,be=0;be1||A>1)&&(o=!0),h[b]=[],m.outgoers().forEach(function(I){I.isEdge()&&h[b].push(I.id())})}else c[b]=[void 0,m.target().id()]}):s.forEach(function(m){var b=m.id();if(m.isNode()){var E=m.degree(!0);E%2&&(l?u?o=!0:u=b:l=b),h[b]=[],m.connectedEdges().forEach(function(N){return h[b].push(N.id())})}else c[b]=[m.source().id(),m.target().id()]});var d={found:!1,trail:void 0};if(o)return d;if(u&&l)if(i){if(f&&u!=f)return d;f=u}else{if(f&&u!=f&&l!=f)return d;f||(f=u)}else f||(f=s[0].id());var v=function(b){for(var E=b,N=[b],A,x,I;h[E].length;)A=h[E].shift(),x=c[A][0],I=c[A][1],E!=I?(h[I]=h[I].filter(function(C){return C!=A}),E=I):!i&&E!=x&&(h[x]=h[x].filter(function(C){return C!=A}),E=x),N.unshift(A),N.unshift(E);return N},p=[],y=[];for(y=v(f);y.length!=1;)h[y[0]].length==0?(p.unshift(s.getElementById(y.shift())),p.unshift(s.getElementById(y.shift()))):y=v(y.shift()).concat(y);p.unshift(s.getElementById(y.shift()));for(var g in h)if(h[g].length)return d;return d.found=!0,d.trail=this.spawn(p,!0),d}},xn=function(){var e=this,r={},a=0,n=0,i=[],s=[],o={},l=function(c,d){for(var v=s.length-1,p=[],y=e.spawn();s[v].x!=c||s[v].y!=d;)p.push(s.pop().edge),v--;p.push(s.pop().edge),p.forEach(function(g){var m=g.connectedNodes().intersection(e);y.merge(g),m.forEach(function(b){var E=b.id(),N=b.connectedEdges().intersection(e);y.merge(b),r[E].cutVertex?y.merge(N.filter(function(A){return A.isLoop()})):y.merge(N)})}),i.push(y)},u=function h(c,d,v){c===v&&(n+=1),r[d]={id:a,low:a++,cutVertex:!1};var p=e.getElementById(d).connectedEdges().intersection(e);if(p.size()===0)i.push(e.spawn(e.getElementById(d)));else{var y,g,m,b;p.forEach(function(E){y=E.source().id(),g=E.target().id(),m=y===d?g:y,m!==v&&(b=E.id(),o[b]||(o[b]=!0,s.push({x:d,y:m,edge:E})),m in r?r[d].low=Math.min(r[d].low,r[m].id):(h(c,m,d),r[d].low=Math.min(r[d].low,r[m].low),r[d].id<=r[m].low&&(r[d].cutVertex=!0,l(d,m))))})}};e.forEach(function(h){if(h.isNode()){var c=h.id();c in r||(n=0,u(c,c),r[c].cutVertex=n>1)}});var f=Object.keys(r).filter(function(h){return r[h].cutVertex}).map(function(h){return e.getElementById(h)});return{cut:e.spawn(f),components:i}},Oh={hopcroftTarjanBiconnected:xn,htbc:xn,htb:xn,hopcroftTarjanBiconnectedComponents:xn},Tn=function(){var e=this,r={},a=0,n=[],i=[],s=e.spawn(e),o=function l(u){i.push(u),r[u]={index:a,low:a++,explored:!1};var f=e.getElementById(u).connectedEdges().intersection(e);if(f.forEach(function(p){var y=p.target().id();y!==u&&(y in r||l(y),r[y].explored||(r[u].low=Math.min(r[u].low,r[y].low)))}),r[u].index===r[u].low){for(var h=e.spawn();;){var c=i.pop();if(h.merge(e.getElementById(c)),r[c].low=r[u].index,r[c].explored=!0,c===u)break}var d=h.edgesWith(h),v=h.merge(d);n.push(v),s=s.difference(v)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:n}},Nh={tarjanStronglyConnected:Tn,tsc:Tn,tscc:Tn,tarjanStronglyConnectedComponents:Tn},Us={};[Ra,sf,of,lf,hf,vf,pf,Vf,aa,na,gi,eh,vh,bh,Sh,Ah,Oh,Nh].forEach(function(t){Ue(Us,t)});/*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) diff --git a/assets/pieDiagram-dbbf0591-d4cca141.js b/assets/pieDiagram-dbbf0591-44bd3b4a.js similarity index 99% rename from assets/pieDiagram-dbbf0591-d4cca141.js rename to assets/pieDiagram-dbbf0591-44bd3b4a.js index 2729f13..c00df18 100644 --- a/assets/pieDiagram-dbbf0591-d4cca141.js +++ b/assets/pieDiagram-dbbf0591-44bd3b4a.js @@ -1,4 +1,4 @@ -import{V as H,W as at,B as lt,D as ot,s as ct,g as ht,b as ut,a as yt,E as ft,d as pt,c as et,l as it,X as gt,U as dt,i as mt,Y as _t}from"./index-b371ab76.js";import{a as tt}from"./arc-f4b03a28.js";import{o as vt}from"./ordinal-ba9b4969.js";import{a as kt}from"./array-9f3ba611.js";import{c as F}from"./path-53f90ab3.js";import"./init-77b53fdd.js";function xt(e,u){return ue?1:u>=e?0:NaN}function bt(e){return e}function St(){var e=bt,u=xt,$=null,f=F(0),b=F(H),w=F(0);function c(r){var l,g=(r=kt(r)).length,S,A,O=0,m=new Array(g),x=new Array(g),_=+f.apply(this,arguments),h=Math.min(H,Math.max(-H,b.apply(this,arguments)-_)),T,I=Math.min(Math.abs(h)/g,w.apply(this,arguments)),p=I*(h<0?-1:1),t;for(l=0;l0&&(O+=t);for(u!=null?m.sort(function(i,n){return u(x[i],x[n])}):$!=null&&m.sort(function(i,n){return $(r[i],r[n])}),l=0,A=O?(h-g*p)/O:0;l0?t*A:0)+p,x[S]={data:r[S],index:l,value:t,startAngle:_,endAngle:T,padAngle:I};return x}return c.value=function(r){return arguments.length?(e=typeof r=="function"?r:F(+r),c):e},c.sortValues=function(r){return arguments.length?(u=r,$=null,c):u},c.sort=function(r){return arguments.length?($=r,u=null,c):$},c.startAngle=function(r){return arguments.length?(f=typeof r=="function"?r:F(+r),c):f},c.endAngle=function(r){return arguments.length?(b=typeof r=="function"?r:F(+r),c):b},c.padAngle=function(r){return arguments.length?(w=typeof r=="function"?r:F(+r),c):w},c}var J=function(){var e=function(p,t,i,n){for(i=i||{},n=p.length;n--;i[p[n]]=t);return i},u=[1,3],$=[1,4],f=[1,5],b=[1,6],w=[1,10,12,14,16,18,19,20,21,22],c=[2,4],r=[1,5,10,12,14,16,18,19,20,21,22],l=[20,21,22],g=[2,7],S=[1,12],A=[1,13],O=[1,14],m=[1,15],x=[1,16],_=[1,17],h={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,i,n,a,o,s,V){var v=s.length-1;switch(o){case 3:a.setShowData(!0);break;case 6:this.$=s[v-1];break;case 8:a.addSection(s[v-1],a.cleanupValue(s[v]));break;case 9:this.$=s[v].trim(),a.setDiagramTitle(this.$);break;case 10:this.$=s[v].trim(),a.setAccTitle(this.$);break;case 11:case 12:this.$=s[v].trim(),a.setAccDescription(this.$);break;case 13:a.addSection(s[v].substr(8)),this.$=s[v].substr(8);break}},table:[{3:1,4:2,5:u,20:$,21:f,22:b},{1:[3]},{3:7,4:2,5:u,20:$,21:f,22:b},e(w,c,{6:8,7:[1,9]}),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{1:[2,1]},e(l,g,{8:10,9:11,1:[2,2],10:S,12:A,14:O,16:m,18:x,19:_}),e(w,c,{6:18}),e(w,[2,5]),{4:19,20:$,21:f,22:b},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},e(l,[2,12]),e(l,[2,13]),e(l,g,{8:10,9:11,1:[2,3],10:S,12:A,14:O,16:m,18:x,19:_}),e(w,[2,6]),e(l,[2,8]),e(l,[2,9]),e(l,[2,10]),e(l,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,i){if(i.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=i,n}},parse:function(t){var i=this,n=[0],a=[],o=[null],s=[],V=this.table,v="",d=0,P=0,z=2,j=1,B=s.slice.call(arguments,1),y=Object.create(this.lexer),N={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(N.yy[Y]=this.yy[Y]);y.setInput(t,N.yy),N.yy.lexer=y,N.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var X=y.yylloc;s.push(X);var st=y.options&&y.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function rt(){var C;return C=a.pop()||y.lex()||j,typeof C!="number"&&(C instanceof Array&&(a=C,C=a.pop()),C=i.symbols_[C]||C),C}for(var k,L,E,Z,R={},M,D,Q,W;;){if(L=n[n.length-1],this.defaultActions[L]?E=this.defaultActions[L]:((k===null||typeof k>"u")&&(k=rt()),E=V[L]&&V[L][k]),typeof E>"u"||!E.length||!E[0]){var q="";W=[];for(M in V[L])this.terminals_[M]&&M>z&&W.push("'"+this.terminals_[M]+"'");y.showPosition?q="Parse error on line "+(d+1)+`: +import{V as H,W as at,B as lt,D as ot,s as ct,g as ht,b as ut,a as yt,E as ft,d as pt,c as et,l as it,X as gt,U as dt,i as mt,Y as _t}from"./index-e0ff10fa.js";import{a as tt}from"./arc-1761d8ed.js";import{o as vt}from"./ordinal-ba9b4969.js";import{a as kt}from"./array-9f3ba611.js";import{c as F}from"./path-53f90ab3.js";import"./init-77b53fdd.js";function xt(e,u){return ue?1:u>=e?0:NaN}function bt(e){return e}function St(){var e=bt,u=xt,$=null,f=F(0),b=F(H),w=F(0);function c(r){var l,g=(r=kt(r)).length,S,A,O=0,m=new Array(g),x=new Array(g),_=+f.apply(this,arguments),h=Math.min(H,Math.max(-H,b.apply(this,arguments)-_)),T,I=Math.min(Math.abs(h)/g,w.apply(this,arguments)),p=I*(h<0?-1:1),t;for(l=0;l0&&(O+=t);for(u!=null?m.sort(function(i,n){return u(x[i],x[n])}):$!=null&&m.sort(function(i,n){return $(r[i],r[n])}),l=0,A=O?(h-g*p)/O:0;l0?t*A:0)+p,x[S]={data:r[S],index:l,value:t,startAngle:_,endAngle:T,padAngle:I};return x}return c.value=function(r){return arguments.length?(e=typeof r=="function"?r:F(+r),c):e},c.sortValues=function(r){return arguments.length?(u=r,$=null,c):u},c.sort=function(r){return arguments.length?($=r,u=null,c):$},c.startAngle=function(r){return arguments.length?(f=typeof r=="function"?r:F(+r),c):f},c.endAngle=function(r){return arguments.length?(b=typeof r=="function"?r:F(+r),c):b},c.padAngle=function(r){return arguments.length?(w=typeof r=="function"?r:F(+r),c):w},c}var J=function(){var e=function(p,t,i,n){for(i=i||{},n=p.length;n--;i[p[n]]=t);return i},u=[1,3],$=[1,4],f=[1,5],b=[1,6],w=[1,10,12,14,16,18,19,20,21,22],c=[2,4],r=[1,5,10,12,14,16,18,19,20,21,22],l=[20,21,22],g=[2,7],S=[1,12],A=[1,13],O=[1,14],m=[1,15],x=[1,16],_=[1,17],h={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,i,n,a,o,s,V){var v=s.length-1;switch(o){case 3:a.setShowData(!0);break;case 6:this.$=s[v-1];break;case 8:a.addSection(s[v-1],a.cleanupValue(s[v]));break;case 9:this.$=s[v].trim(),a.setDiagramTitle(this.$);break;case 10:this.$=s[v].trim(),a.setAccTitle(this.$);break;case 11:case 12:this.$=s[v].trim(),a.setAccDescription(this.$);break;case 13:a.addSection(s[v].substr(8)),this.$=s[v].substr(8);break}},table:[{3:1,4:2,5:u,20:$,21:f,22:b},{1:[3]},{3:7,4:2,5:u,20:$,21:f,22:b},e(w,c,{6:8,7:[1,9]}),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{1:[2,1]},e(l,g,{8:10,9:11,1:[2,2],10:S,12:A,14:O,16:m,18:x,19:_}),e(w,c,{6:18}),e(w,[2,5]),{4:19,20:$,21:f,22:b},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},e(l,[2,12]),e(l,[2,13]),e(l,g,{8:10,9:11,1:[2,3],10:S,12:A,14:O,16:m,18:x,19:_}),e(w,[2,6]),e(l,[2,8]),e(l,[2,9]),e(l,[2,10]),e(l,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,i){if(i.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=i,n}},parse:function(t){var i=this,n=[0],a=[],o=[null],s=[],V=this.table,v="",d=0,P=0,z=2,j=1,B=s.slice.call(arguments,1),y=Object.create(this.lexer),N={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(N.yy[Y]=this.yy[Y]);y.setInput(t,N.yy),N.yy.lexer=y,N.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var X=y.yylloc;s.push(X);var st=y.options&&y.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function rt(){var C;return C=a.pop()||y.lex()||j,typeof C!="number"&&(C instanceof Array&&(a=C,C=a.pop()),C=i.symbols_[C]||C),C}for(var k,L,E,Z,R={},M,D,Q,W;;){if(L=n[n.length-1],this.defaultActions[L]?E=this.defaultActions[L]:((k===null||typeof k>"u")&&(k=rt()),E=V[L]&&V[L][k]),typeof E>"u"||!E.length||!E[0]){var q="";W=[];for(M in V[L])this.terminals_[M]&&M>z&&W.push("'"+this.terminals_[M]+"'");y.showPosition?q="Parse error on line "+(d+1)+`: `+y.showPosition()+` Expecting `+W.join(", ")+", got '"+(this.terminals_[k]||k)+"'":q="Parse error on line "+(d+1)+": Unexpected "+(k==j?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(q,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:X,expected:W})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+k);switch(E[0]){case 1:n.push(k),o.push(y.yytext),s.push(y.yylloc),n.push(E[1]),k=null,P=y.yyleng,v=y.yytext,d=y.yylineno,X=y.yylloc;break;case 2:if(D=this.productions_[E[1]][1],R.$=o[o.length-D],R._$={first_line:s[s.length-(D||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(D||1)].first_column,last_column:s[s.length-1].last_column},st&&(R._$.range=[s[s.length-(D||1)].range[0],s[s.length-1].range[1]]),Z=this.performAction.apply(R,[v,P,d,N.yy,E[1],o,s].concat(B)),typeof Z<"u")return Z;D&&(n=n.slice(0,-1*D*2),o=o.slice(0,-1*D),s=s.slice(0,-1*D)),n.push(this.productions_[E[1]][0]),o.push(R.$),s.push(R._$),Q=V[n[n.length-2]][n[n.length-1]],n.push(Q);break;case 3:return!0}}return!0}},T=function(){var p={EOF:1,parseError:function(i,n){if(this.yy.parser)this.yy.parser.parseError(i,n);else throw new Error(i)},setInput: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},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var i=t.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,n=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 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),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===a.length?this.yylloc.first_column:0)+a[a.length-n.length].length-n[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+` diff --git a/assets/quadrantDiagram-4d7f4fd6-b5f47b25.js b/assets/quadrantDiagram-4d7f4fd6-5d0384f4.js similarity index 99% rename from assets/quadrantDiagram-4d7f4fd6-b5f47b25.js rename to assets/quadrantDiagram-4d7f4fd6-5d0384f4.js index 94fde26..f98d0b5 100644 --- a/assets/quadrantDiagram-4d7f4fd6-b5f47b25.js +++ b/assets/quadrantDiagram-4d7f4fd6-5d0384f4.js @@ -1,4 +1,4 @@ -import{Z as vt,c as yt,W as D,l as ot,s as Lt,g as Ct,B as zt,D as bt,a as Et,b as Dt,E as It,h as gt,i as Bt,d as wt}from"./index-b371ab76.js";import{l as mt}from"./linear-ccca5fef.js";import"./init-77b53fdd.js";var pt=function(){var e=function(K,n,r,l){for(r=r||{},l=K.length;l--;r[K[l]]=n);return r},s=[1,3],h=[1,4],x=[1,5],f=[1,6],d=[1,7],c=[1,5,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],g=[1,5,6,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],i=[32,33,34],y=[2,7],p=[1,13],B=[1,17],N=[1,18],V=[1,19],I=[1,20],b=[1,21],M=[1,22],X=[1,23],C=[1,24],it=[1,25],at=[1,26],nt=[1,27],U=[1,30],Q=[1,31],T=[1,32],m=[1,33],_=[1,34],t=[1,35],A=[1,36],S=[1,37],k=[1,38],F=[1,39],P=[1,40],v=[1,41],L=[1,42],O=[1,57],Y=[1,58],z=[5,22,26,32,33,34,40,41,42,43,44,45,46,47,48,49,50,51],ht={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,SPACE:5,QUADRANT:6,document:7,line:8,statement:9,axisDetails:10,quadrantDetails:11,points:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,text:21,point_start:22,point_x:23,point_y:24,"X-AXIS":25,"AXIS-TEXT-DELIMITER":26,"Y-AXIS":27,QUADRANT_1:28,QUADRANT_2:29,QUADRANT_3:30,QUADRANT_4:31,NEWLINE:32,SEMI:33,EOF:34,alphaNumToken:35,textNoTagsToken:36,STR:37,MD_STR:38,alphaNum:39,PUNCTUATION:40,AMP:41,NUM:42,ALPHA:43,COMMA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,UNDERSCORE:50,MINUS:51,$accept:0,$end:1},terminals_:{2:"error",5:"SPACE",6:"QUADRANT",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",22:"point_start",23:"point_x",24:"point_y",25:"X-AXIS",26:"AXIS-TEXT-DELIMITER",27:"Y-AXIS",28:"QUADRANT_1",29:"QUADRANT_2",30:"QUADRANT_3",31:"QUADRANT_4",32:"NEWLINE",33:"SEMI",34:"EOF",37:"STR",38:"MD_STR",40:"PUNCTUATION",41:"AMP",42:"NUM",43:"ALPHA",44:"COMMA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"UNDERSCORE",51:"MINUS"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,1],[9,1],[9,1],[9,2],[9,2],[9,2],[9,1],[9,1],[12,4],[10,4],[10,3],[10,2],[10,4],[10,3],[10,2],[11,2],[11,2],[11,2],[11,2],[4,1],[4,1],[4,1],[21,1],[21,2],[21,1],[21,1],[39,1],[39,2],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[36,1],[36,1],[36,1]],performAction:function(n,r,l,o,q,a,et){var u=a.length-1;switch(q){case 12:this.$=a[u].trim(),o.setDiagramTitle(this.$);break;case 13:this.$=a[u].trim(),o.setAccTitle(this.$);break;case 14:case 15:this.$=a[u].trim(),o.setAccDescription(this.$);break;case 16:o.addSection(a[u].substr(8)),this.$=a[u].substr(8);break;case 17:o.addPoint(a[u-3],a[u-1],a[u]);break;case 18:o.setXAxisLeftText(a[u-2]),o.setXAxisRightText(a[u]);break;case 19:a[u-1].text+=" ⟶ ",o.setXAxisLeftText(a[u-1]);break;case 20:o.setXAxisLeftText(a[u]);break;case 21:o.setYAxisBottomText(a[u-2]),o.setYAxisTopText(a[u]);break;case 22:a[u-1].text+=" ⟶ ",o.setYAxisBottomText(a[u-1]);break;case 23:o.setYAxisBottomText(a[u]);break;case 24:o.setQuadrant1Text(a[u]);break;case 25:o.setQuadrant2Text(a[u]);break;case 26:o.setQuadrant3Text(a[u]);break;case 27:o.setQuadrant4Text(a[u]);break;case 31:this.$={text:a[u],type:"text"};break;case 32:this.$={text:a[u-1].text+""+a[u],type:a[u-1].type};break;case 33:this.$={text:a[u],type:"text"};break;case 34:this.$={text:a[u],type:"markdown"};break;case 35:this.$=a[u];break;case 36:this.$=a[u-1]+""+a[u];break}},table:[{3:1,4:2,5:s,6:h,32:x,33:f,34:d},{1:[3]},{3:8,4:2,5:s,6:h,32:x,33:f,34:d},{3:9,4:2,5:s,6:h,32:x,33:f,34:d},e(c,[2,4],{7:10}),e(g,[2,28]),e(g,[2,29]),e(g,[2,30]),{1:[2,1]},{1:[2,2]},e(i,y,{8:11,9:12,10:14,11:15,12:16,21:28,35:29,1:[2,3],5:p,13:B,15:N,17:V,19:I,20:b,25:M,27:X,28:C,29:it,30:at,31:nt,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L}),e(c,[2,5]),{4:43,32:x,33:f,34:d},e(i,y,{10:14,11:15,12:16,21:28,35:29,9:44,5:p,13:B,15:N,17:V,19:I,20:b,25:M,27:X,28:C,29:it,30:at,31:nt,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L}),e(i,[2,9]),e(i,[2,10]),e(i,[2,11]),{14:[1,45]},{16:[1,46]},{18:[1,47]},e(i,[2,15]),e(i,[2,16]),{21:48,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{21:49,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{21:50,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{21:51,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{21:52,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{21:53,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{5:O,22:[1,54],35:56,36:55,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y},e(z,[2,31]),e(z,[2,33]),e(z,[2,34]),e(z,[2,37]),e(z,[2,38]),e(z,[2,39]),e(z,[2,40]),e(z,[2,41]),e(z,[2,42]),e(z,[2,43]),e(z,[2,44]),e(z,[2,45]),e(z,[2,46]),e(z,[2,47]),e(c,[2,6]),e(i,[2,8]),e(i,[2,12]),e(i,[2,13]),e(i,[2,14]),e(i,[2,20],{36:55,35:56,5:O,26:[1,59],40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,23],{36:55,35:56,5:O,26:[1,60],40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,24],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,25],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,26],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,27],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),{23:[1,61]},e(z,[2,32]),e(z,[2,48]),e(z,[2,49]),e(z,[2,50]),e(i,[2,19],{35:29,21:62,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L}),e(i,[2,22],{35:29,21:63,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L}),{24:[1,64]},e(i,[2,18],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,21],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,17])],defaultActions:{8:[2,1],9:[2,2]},parseError:function(n,r){if(r.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=r,l}},parse:function(n){var r=this,l=[0],o=[],q=[null],a=[],et=this.table,u="",st=0,qt=0,St=2,Tt=1,kt=a.slice.call(arguments,1),E=Object.create(this.lexer),Z={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Z.yy[dt]=this.yy[dt]);E.setInput(n,Z.yy),Z.yy.lexer=E,Z.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var ut=E.yylloc;a.push(ut);var Ft=E.options&&E.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pt(){var j;return j=o.pop()||E.lex()||Tt,typeof j!="number"&&(j instanceof Array&&(o=j,j=o.pop()),j=r.symbols_[j]||j),j}for(var W,J,H,xt,tt={},rt,$,_t,lt;;){if(J=l[l.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((W===null||typeof W>"u")&&(W=Pt()),H=et[J]&&et[J][W]),typeof H>"u"||!H.length||!H[0]){var ft="";lt=[];for(rt in et[J])this.terminals_[rt]&&rt>St&<.push("'"+this.terminals_[rt]+"'");E.showPosition?ft="Parse error on line "+(st+1)+`: +import{Z as vt,c as yt,W as D,l as ot,s as Lt,g as Ct,B as zt,D as bt,a as Et,b as Dt,E as It,h as gt,i as Bt,d as wt}from"./index-e0ff10fa.js";import{l as mt}from"./linear-3615363e.js";import"./init-77b53fdd.js";var pt=function(){var e=function(K,n,r,l){for(r=r||{},l=K.length;l--;r[K[l]]=n);return r},s=[1,3],h=[1,4],x=[1,5],f=[1,6],d=[1,7],c=[1,5,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],g=[1,5,6,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],i=[32,33,34],y=[2,7],p=[1,13],B=[1,17],N=[1,18],V=[1,19],I=[1,20],b=[1,21],M=[1,22],X=[1,23],C=[1,24],it=[1,25],at=[1,26],nt=[1,27],U=[1,30],Q=[1,31],T=[1,32],m=[1,33],_=[1,34],t=[1,35],A=[1,36],S=[1,37],k=[1,38],F=[1,39],P=[1,40],v=[1,41],L=[1,42],O=[1,57],Y=[1,58],z=[5,22,26,32,33,34,40,41,42,43,44,45,46,47,48,49,50,51],ht={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,SPACE:5,QUADRANT:6,document:7,line:8,statement:9,axisDetails:10,quadrantDetails:11,points:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,text:21,point_start:22,point_x:23,point_y:24,"X-AXIS":25,"AXIS-TEXT-DELIMITER":26,"Y-AXIS":27,QUADRANT_1:28,QUADRANT_2:29,QUADRANT_3:30,QUADRANT_4:31,NEWLINE:32,SEMI:33,EOF:34,alphaNumToken:35,textNoTagsToken:36,STR:37,MD_STR:38,alphaNum:39,PUNCTUATION:40,AMP:41,NUM:42,ALPHA:43,COMMA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,UNDERSCORE:50,MINUS:51,$accept:0,$end:1},terminals_:{2:"error",5:"SPACE",6:"QUADRANT",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",22:"point_start",23:"point_x",24:"point_y",25:"X-AXIS",26:"AXIS-TEXT-DELIMITER",27:"Y-AXIS",28:"QUADRANT_1",29:"QUADRANT_2",30:"QUADRANT_3",31:"QUADRANT_4",32:"NEWLINE",33:"SEMI",34:"EOF",37:"STR",38:"MD_STR",40:"PUNCTUATION",41:"AMP",42:"NUM",43:"ALPHA",44:"COMMA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"UNDERSCORE",51:"MINUS"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,1],[9,1],[9,1],[9,2],[9,2],[9,2],[9,1],[9,1],[12,4],[10,4],[10,3],[10,2],[10,4],[10,3],[10,2],[11,2],[11,2],[11,2],[11,2],[4,1],[4,1],[4,1],[21,1],[21,2],[21,1],[21,1],[39,1],[39,2],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[36,1],[36,1],[36,1]],performAction:function(n,r,l,o,q,a,et){var u=a.length-1;switch(q){case 12:this.$=a[u].trim(),o.setDiagramTitle(this.$);break;case 13:this.$=a[u].trim(),o.setAccTitle(this.$);break;case 14:case 15:this.$=a[u].trim(),o.setAccDescription(this.$);break;case 16:o.addSection(a[u].substr(8)),this.$=a[u].substr(8);break;case 17:o.addPoint(a[u-3],a[u-1],a[u]);break;case 18:o.setXAxisLeftText(a[u-2]),o.setXAxisRightText(a[u]);break;case 19:a[u-1].text+=" ⟶ ",o.setXAxisLeftText(a[u-1]);break;case 20:o.setXAxisLeftText(a[u]);break;case 21:o.setYAxisBottomText(a[u-2]),o.setYAxisTopText(a[u]);break;case 22:a[u-1].text+=" ⟶ ",o.setYAxisBottomText(a[u-1]);break;case 23:o.setYAxisBottomText(a[u]);break;case 24:o.setQuadrant1Text(a[u]);break;case 25:o.setQuadrant2Text(a[u]);break;case 26:o.setQuadrant3Text(a[u]);break;case 27:o.setQuadrant4Text(a[u]);break;case 31:this.$={text:a[u],type:"text"};break;case 32:this.$={text:a[u-1].text+""+a[u],type:a[u-1].type};break;case 33:this.$={text:a[u],type:"text"};break;case 34:this.$={text:a[u],type:"markdown"};break;case 35:this.$=a[u];break;case 36:this.$=a[u-1]+""+a[u];break}},table:[{3:1,4:2,5:s,6:h,32:x,33:f,34:d},{1:[3]},{3:8,4:2,5:s,6:h,32:x,33:f,34:d},{3:9,4:2,5:s,6:h,32:x,33:f,34:d},e(c,[2,4],{7:10}),e(g,[2,28]),e(g,[2,29]),e(g,[2,30]),{1:[2,1]},{1:[2,2]},e(i,y,{8:11,9:12,10:14,11:15,12:16,21:28,35:29,1:[2,3],5:p,13:B,15:N,17:V,19:I,20:b,25:M,27:X,28:C,29:it,30:at,31:nt,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L}),e(c,[2,5]),{4:43,32:x,33:f,34:d},e(i,y,{10:14,11:15,12:16,21:28,35:29,9:44,5:p,13:B,15:N,17:V,19:I,20:b,25:M,27:X,28:C,29:it,30:at,31:nt,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L}),e(i,[2,9]),e(i,[2,10]),e(i,[2,11]),{14:[1,45]},{16:[1,46]},{18:[1,47]},e(i,[2,15]),e(i,[2,16]),{21:48,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{21:49,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{21:50,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{21:51,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{21:52,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{21:53,35:29,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L},{5:O,22:[1,54],35:56,36:55,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y},e(z,[2,31]),e(z,[2,33]),e(z,[2,34]),e(z,[2,37]),e(z,[2,38]),e(z,[2,39]),e(z,[2,40]),e(z,[2,41]),e(z,[2,42]),e(z,[2,43]),e(z,[2,44]),e(z,[2,45]),e(z,[2,46]),e(z,[2,47]),e(c,[2,6]),e(i,[2,8]),e(i,[2,12]),e(i,[2,13]),e(i,[2,14]),e(i,[2,20],{36:55,35:56,5:O,26:[1,59],40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,23],{36:55,35:56,5:O,26:[1,60],40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,24],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,25],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,26],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,27],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),{23:[1,61]},e(z,[2,32]),e(z,[2,48]),e(z,[2,49]),e(z,[2,50]),e(i,[2,19],{35:29,21:62,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L}),e(i,[2,22],{35:29,21:63,37:U,38:Q,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L}),{24:[1,64]},e(i,[2,18],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,21],{36:55,35:56,5:O,40:T,41:m,42:_,43:t,44:A,45:S,46:k,47:F,48:P,49:v,50:L,51:Y}),e(i,[2,17])],defaultActions:{8:[2,1],9:[2,2]},parseError:function(n,r){if(r.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=r,l}},parse:function(n){var r=this,l=[0],o=[],q=[null],a=[],et=this.table,u="",st=0,qt=0,St=2,Tt=1,kt=a.slice.call(arguments,1),E=Object.create(this.lexer),Z={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Z.yy[dt]=this.yy[dt]);E.setInput(n,Z.yy),Z.yy.lexer=E,Z.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var ut=E.yylloc;a.push(ut);var Ft=E.options&&E.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pt(){var j;return j=o.pop()||E.lex()||Tt,typeof j!="number"&&(j instanceof Array&&(o=j,j=o.pop()),j=r.symbols_[j]||j),j}for(var W,J,H,xt,tt={},rt,$,_t,lt;;){if(J=l[l.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((W===null||typeof W>"u")&&(W=Pt()),H=et[J]&&et[J][W]),typeof H>"u"||!H.length||!H[0]){var ft="";lt=[];for(rt in et[J])this.terminals_[rt]&&rt>St&<.push("'"+this.terminals_[rt]+"'");E.showPosition?ft="Parse error on line "+(st+1)+`: `+E.showPosition()+` Expecting `+lt.join(", ")+", got '"+(this.terminals_[W]||W)+"'":ft="Parse error on line "+(st+1)+": Unexpected "+(W==Tt?"end of input":"'"+(this.terminals_[W]||W)+"'"),this.parseError(ft,{text:E.match,token:this.terminals_[W]||W,line:E.yylineno,loc:ut,expected:lt})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+W);switch(H[0]){case 1:l.push(W),q.push(E.yytext),a.push(E.yylloc),l.push(H[1]),W=null,qt=E.yyleng,u=E.yytext,st=E.yylineno,ut=E.yylloc;break;case 2:if($=this.productions_[H[1]][1],tt.$=q[q.length-$],tt._$={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},Ft&&(tt._$.range=[a[a.length-($||1)].range[0],a[a.length-1].range[1]]),xt=this.performAction.apply(tt,[u,qt,st,Z.yy,H[1],q,a].concat(kt)),typeof xt<"u")return xt;$&&(l=l.slice(0,-1*$*2),q=q.slice(0,-1*$),a=a.slice(0,-1*$)),l.push(this.productions_[H[1]][0]),q.push(tt.$),a.push(tt._$),_t=et[l[l.length-2]][l[l.length-1]],l.push(_t);break;case 3:return!0}}return!0}},At=function(){var K={EOF:1,parseError:function(r,l){if(this.yy.parser)this.yy.parser.parseError(r,l);else throw new Error(r)},setInput:function(n,r){return this.yy=r||this.yy||{},this._input=n,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},input:function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var r=n.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},unput:function(n){var r=n.length,l=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var o=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),l.length-1&&(this.yylineno-=l.length-1);var q=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:l?(l.length===o.length?this.yylloc.first_column:0)+o[o.length-l.length].length-l[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[q[0],q[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var n=this.pastInput(),r=new Array(n.length+1).join("-");return n+this.upcomingInput()+` diff --git a/assets/requirementDiagram-6fc4c22a-65ae7e79.js b/assets/requirementDiagram-6fc4c22a-2b6b8c39.js similarity index 99% rename from assets/requirementDiagram-6fc4c22a-65ae7e79.js rename to assets/requirementDiagram-6fc4c22a-2b6b8c39.js index cd561ad..d358b7e 100644 --- a/assets/requirementDiagram-6fc4c22a-65ae7e79.js +++ b/assets/requirementDiagram-6fc4c22a-2b6b8c39.js @@ -1,4 +1,4 @@ -import{c as Te,s as Ce,g as Fe,b as Me,a as De,l as Ne,E as Pe,h as oe,i as Ye,j as ke}from"./index-b371ab76.js";import{G as Ue,l as Be}from"./layout-fa84e821.js";import{l as Qe}from"./line-63c0ea4d.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";var ce=function(){var e=function(V,i,r,a){for(r=r||{},a=V.length;a--;r[V[a]]=i);return r},t=[1,3],l=[1,4],c=[1,5],u=[1,6],d=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],p=[1,18],h=[2,7],o=[1,22],E=[1,23],R=[1,24],A=[1,25],T=[1,26],N=[1,27],v=[1,20],k=[1,28],x=[1,29],F=[62,63],de=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],pe=[1,47],fe=[1,48],ye=[1,49],_e=[1,50],Ee=[1,51],ge=[1,52],Re=[1,53],O=[53,54],M=[1,64],D=[1,60],P=[1,61],Y=[1,62],U=[1,63],B=[1,65],j=[1,69],z=[1,70],X=[1,67],J=[1,68],m=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],ie={trace:function(){},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,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$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",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"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],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:function(i,r,a,n,f,s,W){var _=s.length-1;switch(f){case 4:this.$=s[_].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[_].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[_-3],s[_-4]);break;case 14:n.setNewReqId(s[_-2]);break;case 15:n.setNewReqText(s[_-2]);break;case 16:n.setNewReqRisk(s[_-2]);break;case 17:n.setNewReqVerifyMethod(s[_-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[_-3]);break;case 34:n.setNewElementType(s[_-2]);break;case 35:n.setNewElementDocRef(s[_-2]);break;case 38:n.addRelationship(s[_-2],s[_],s[_-4]);break;case 39:n.addRelationship(s[_-2],s[_-4],s[_]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES;break}},table:[{3:1,4:2,6:t,9:l,11:c,13:u},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:l,11:c,13:u},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(d,[2,6]),{3:12,4:2,6:t,9:l,11:c,13:u},{1:[2,2]},{4:17,5:p,7:13,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},e(d,[2,4]),e(d,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:p,7:31,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},{4:17,5:p,7:32,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},{4:17,5:p,7:33,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},{4:17,5:p,7:34,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},{4:17,5:p,7:35,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(F,[2,20]),e(F,[2,21]),e(F,[2,22]),e(F,[2,23]),e(F,[2,24]),e(F,[2,25]),e(de,[2,49]),e(de,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:pe,56:fe,57:ye,58:_e,59:Ee,60:ge,61:Re},{52:54,55:pe,56:fe,57:ye,58:_e,59:Ee,60:ge,61:Re},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),{54:[1,58]},{5:M,20:59,21:D,24:P,26:Y,28:U,30:B},{5:j,30:z,46:66,47:X,49:J},{23:71,62:k,63:x},{23:72,62:k,63:x},e(m,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:M,20:77,21:D,24:P,26:Y,28:U,30:B},e(m,[2,19]),e(m,[2,33]),{22:[1,78]},{22:[1,79]},{5:j,30:z,46:80,47:X,49:J},e(m,[2,37]),e(m,[2,38]),e(m,[2,39]),{23:81,62:k,63:x},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(m,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(m,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:M,20:106,21:D,24:P,26:Y,28:U,30:B},{5:M,20:107,21:D,24:P,26:Y,28:U,30:B},{5:M,20:108,21:D,24:P,26:Y,28:U,30:B},{5:M,20:109,21:D,24:P,26:Y,28:U,30:B},{5:j,30:z,46:110,47:X,49:J},{5:j,30:z,46:111,47:X,49:J},e(m,[2,14]),e(m,[2,15]),e(m,[2,16]),e(m,[2,17]),e(m,[2,34]),e(m,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var a=new Error(i);throw a.hash=r,a}},parse:function(i){var r=this,a=[0],n=[],f=[null],s=[],W=this.table,_="",Z=0,me=0,Ve=2,Ie=1,qe=s.slice.call(arguments,1),g=Object.create(this.lexer),L={yy:{}};for(var re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,re)&&(L.yy[re]=this.yy[re]);g.setInput(i,L.yy),L.yy.lexer=g,L.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var se=g.yylloc;s.push(se);var Oe=g.options&&g.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(){var $;return $=n.pop()||g.lex()||Ie,typeof $!="number"&&($ instanceof Array&&(n=$,$=n.pop()),$=r.symbols_[$]||$),$}for(var I,C,S,ae,Q={},ee,w,be,te;;){if(C=a[a.length-1],this.defaultActions[C]?S=this.defaultActions[C]:((I===null||typeof I>"u")&&(I=Le()),S=W[C]&&W[C][I]),typeof S>"u"||!S.length||!S[0]){var le="";te=[];for(ee in W[C])this.terminals_[ee]&&ee>Ve&&te.push("'"+this.terminals_[ee]+"'");g.showPosition?le="Parse error on line "+(Z+1)+`: +import{c as Te,s as Ce,g as Fe,b as Me,a as De,l as Ne,E as Pe,h as oe,i as Ye,j as ke}from"./index-e0ff10fa.js";import{G as Ue,l as Be}from"./layout-608b290b.js";import{l as Qe}from"./line-434e5c73.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";var ce=function(){var e=function(V,i,r,a){for(r=r||{},a=V.length;a--;r[V[a]]=i);return r},t=[1,3],l=[1,4],c=[1,5],u=[1,6],d=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],p=[1,18],h=[2,7],o=[1,22],E=[1,23],R=[1,24],A=[1,25],T=[1,26],N=[1,27],v=[1,20],k=[1,28],x=[1,29],F=[62,63],de=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],pe=[1,47],fe=[1,48],ye=[1,49],_e=[1,50],Ee=[1,51],ge=[1,52],Re=[1,53],O=[53,54],M=[1,64],D=[1,60],P=[1,61],Y=[1,62],U=[1,63],B=[1,65],j=[1,69],z=[1,70],X=[1,67],J=[1,68],m=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],ie={trace:function(){},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,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$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",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"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],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:function(i,r,a,n,f,s,W){var _=s.length-1;switch(f){case 4:this.$=s[_].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[_].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[_-3],s[_-4]);break;case 14:n.setNewReqId(s[_-2]);break;case 15:n.setNewReqText(s[_-2]);break;case 16:n.setNewReqRisk(s[_-2]);break;case 17:n.setNewReqVerifyMethod(s[_-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[_-3]);break;case 34:n.setNewElementType(s[_-2]);break;case 35:n.setNewElementDocRef(s[_-2]);break;case 38:n.addRelationship(s[_-2],s[_],s[_-4]);break;case 39:n.addRelationship(s[_-2],s[_-4],s[_]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES;break}},table:[{3:1,4:2,6:t,9:l,11:c,13:u},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:l,11:c,13:u},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(d,[2,6]),{3:12,4:2,6:t,9:l,11:c,13:u},{1:[2,2]},{4:17,5:p,7:13,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},e(d,[2,4]),e(d,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:p,7:31,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},{4:17,5:p,7:32,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},{4:17,5:p,7:33,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},{4:17,5:p,7:34,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},{4:17,5:p,7:35,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:E,33:R,34:A,35:T,36:N,44:v,62:k,63:x},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(F,[2,20]),e(F,[2,21]),e(F,[2,22]),e(F,[2,23]),e(F,[2,24]),e(F,[2,25]),e(de,[2,49]),e(de,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:pe,56:fe,57:ye,58:_e,59:Ee,60:ge,61:Re},{52:54,55:pe,56:fe,57:ye,58:_e,59:Ee,60:ge,61:Re},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),{54:[1,58]},{5:M,20:59,21:D,24:P,26:Y,28:U,30:B},{5:j,30:z,46:66,47:X,49:J},{23:71,62:k,63:x},{23:72,62:k,63:x},e(m,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:M,20:77,21:D,24:P,26:Y,28:U,30:B},e(m,[2,19]),e(m,[2,33]),{22:[1,78]},{22:[1,79]},{5:j,30:z,46:80,47:X,49:J},e(m,[2,37]),e(m,[2,38]),e(m,[2,39]),{23:81,62:k,63:x},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(m,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(m,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:M,20:106,21:D,24:P,26:Y,28:U,30:B},{5:M,20:107,21:D,24:P,26:Y,28:U,30:B},{5:M,20:108,21:D,24:P,26:Y,28:U,30:B},{5:M,20:109,21:D,24:P,26:Y,28:U,30:B},{5:j,30:z,46:110,47:X,49:J},{5:j,30:z,46:111,47:X,49:J},e(m,[2,14]),e(m,[2,15]),e(m,[2,16]),e(m,[2,17]),e(m,[2,34]),e(m,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var a=new Error(i);throw a.hash=r,a}},parse:function(i){var r=this,a=[0],n=[],f=[null],s=[],W=this.table,_="",Z=0,me=0,Ve=2,Ie=1,qe=s.slice.call(arguments,1),g=Object.create(this.lexer),L={yy:{}};for(var re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,re)&&(L.yy[re]=this.yy[re]);g.setInput(i,L.yy),L.yy.lexer=g,L.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var se=g.yylloc;s.push(se);var Oe=g.options&&g.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(){var $;return $=n.pop()||g.lex()||Ie,typeof $!="number"&&($ instanceof Array&&(n=$,$=n.pop()),$=r.symbols_[$]||$),$}for(var I,C,S,ae,Q={},ee,w,be,te;;){if(C=a[a.length-1],this.defaultActions[C]?S=this.defaultActions[C]:((I===null||typeof I>"u")&&(I=Le()),S=W[C]&&W[C][I]),typeof S>"u"||!S.length||!S[0]){var le="";te=[];for(ee in W[C])this.terminals_[ee]&&ee>Ve&&te.push("'"+this.terminals_[ee]+"'");g.showPosition?le="Parse error on line "+(Z+1)+`: `+g.showPosition()+` Expecting `+te.join(", ")+", got '"+(this.terminals_[I]||I)+"'":le="Parse error on line "+(Z+1)+": Unexpected "+(I==Ie?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(le,{text:g.match,token:this.terminals_[I]||I,line:g.yylineno,loc:se,expected:te})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+I);switch(S[0]){case 1:a.push(I),f.push(g.yytext),s.push(g.yylloc),a.push(S[1]),I=null,me=g.yyleng,_=g.yytext,Z=g.yylineno,se=g.yylloc;break;case 2:if(w=this.productions_[S[1]][1],Q.$=f[f.length-w],Q._$={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},Oe&&(Q._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),ae=this.performAction.apply(Q,[_,me,Z,L.yy,S[1],f,s].concat(qe)),typeof ae<"u")return ae;w&&(a=a.slice(0,-1*w*2),f=f.slice(0,-1*w),s=s.slice(0,-1*w)),a.push(this.productions_[S[1]][0]),f.push(Q.$),s.push(Q._$),be=W[a[a.length-2]][a[a.length-1]],a.push(be);break;case 3:return!0}}return!0}},$e=function(){var V={EOF:1,parseError:function(r,a){if(this.yy.parser)this.yy.parser.parseError(r,a);else throw new Error(r)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,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},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;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 f=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-r},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/assets/sankeyDiagram-8f13d901-dc439297.js b/assets/sankeyDiagram-8f13d901-8196c28d.js similarity index 99% rename from assets/sankeyDiagram-8f13d901-dc439297.js rename to assets/sankeyDiagram-8f13d901-8196c28d.js index 4d9fdc0..142095a 100644 --- a/assets/sankeyDiagram-8f13d901-dc439297.js +++ b/assets/sankeyDiagram-8f13d901-8196c28d.js @@ -1,4 +1,4 @@ -import{c as rt,g as mt,s as _t,a as kt,b as xt,D as vt,B as bt,E as wt,j as St,aQ as Lt,h as Y,i as Et}from"./index-b371ab76.js";import{o as At}from"./ordinal-ba9b4969.js";import"./init-77b53fdd.js";function Tt(t){for(var n=t.length/6|0,i=new Array(n),l=0;l=l)&&(i=l);else{let l=-1;for(let u of t)(u=n(u,++l,t))!=null&&(i=u)&&(i=u)}return i}function yt(t,n){let i;if(n===void 0)for(const l of t)l!=null&&(i>l||i===void 0&&l>=l)&&(i=l);else{let l=-1;for(let u of t)(u=n(u,++l,t))!=null&&(i>u||i===void 0&&u>=u)&&(i=u)}return i}function Z(t,n){let i=0;if(n===void 0)for(let l of t)(l=+l)&&(i+=l);else{let l=-1;for(let u of t)(u=+n(u,++l,t))&&(i+=u)}return i}function Nt(t){return t.target.depth}function Pt(t){return t.depth}function Ct(t,n){return n-1-t.height}function dt(t,n){return t.sourceLinks.length?t.depth:n-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?yt(t.sourceLinks,Nt)-1:0}function G(t){return function(){return t}}function lt(t,n){return H(t.source,n.source)||t.index-n.index}function at(t,n){return H(t.target,n.target)||t.index-n.index}function H(t,n){return t.y0-n.y0}function J(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function zt(t){return t.links}function ct(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function ut({nodes:t}){for(const n of t){let i=n.y0,l=i;for(const u of n.sourceLinks)u.y0=i+u.width/2,i+=u.width;for(const u of n.targetLinks)u.y1=l+u.width/2,l+=u.width}}function jt(){let t=0,n=0,i=1,l=1,u=24,k=8,g,m=Ot,s=dt,o,c,p=$t,b=zt,y=6;function x(){const e={nodes:p.apply(null,arguments),links:b.apply(null,arguments)};return E(e),L(e),A(e),N(e),S(e),ut(e),e}x.update=function(e){return ut(e),e},x.nodeId=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.nodeAlign=function(e){return arguments.length?(s=typeof e=="function"?e:G(e),x):s},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(k=g=+e,x):k},x.nodes=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,i=+e[0],l=+e[1],x):[i-t,l-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],i=+e[1][0],n=+e[0][1],l=+e[1][1],x):[[t,n],[i,l]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function E({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const a=new Map(e.map((h,r)=>[m(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:_,target:v}=r;typeof _!="object"&&(_=r.source=ct(a,_)),typeof v!="object"&&(v=r.target=ct(a,v)),_.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function L({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function A({nodes:e}){const f=e.length;let a=new Set(e),h=new Set,r=0;for(;a.size;){for(const _ of a){_.depth=r;for(const{target:v}of _.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");a=h,h=new Set}}function N({nodes:e}){const f=e.length;let a=new Set(e),h=new Set,r=0;for(;a.size;){for(const _ of a){_.height=r;for(const{source:v}of _.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");a=h,h=new Set}}function P({nodes:e}){const f=ot(e,r=>r.depth)+1,a=(i-t-u)/(f-1),h=new Array(f);for(const r of e){const _=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=_,r.x0=t+_*a,r.x1=r.x0+u,h[_]?h[_].push(r):h[_]=[r]}if(o)for(const r of h)r.sort(o);return h}function z(e){const f=yt(e,a=>(l-n-(a.length-1)*g)/Z(a,J));for(const a of e){let h=n;for(const r of a){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const _ of r.sourceLinks)_.width=_.value*f}h=(l-h+g)/(a.length+1);for(let r=0;ra.length)-1)),z(f);for(let a=0;a0))continue;let V=(U/j-v.y0)*f;v.y0+=V,v.y1+=V,w(v)}o===void 0&&_.sort(H),C(_,a)}}function $(e,f,a){for(let h=e.length,r=h-2;r>=0;--r){const _=e[r];for(const v of _){let U=0,j=0;for(const{target:F,value:K}of v.sourceLinks){let W=K*(F.layer-v.layer);U+=R(v,F)*W,j+=W}if(!(j>0))continue;let V=(U/j-v.y0)*f;v.y0+=V,v.y1+=V,w(v)}o===void 0&&_.sort(H),C(_,a)}}function C(e,f){const a=e.length>>1,h=e[a];d(e,h.y0-g,a-1,f),I(e,h.y1+g,a+1,f),d(e,l,e.length-1,f),I(e,n,0,f)}function I(e,f,a,h){for(;a1e-6&&(r.y0+=_,r.y1+=_),f=r.y1+g}}function d(e,f,a,h){for(;a>=0;--a){const r=e[a],_=(r.y1-f)*h;_>1e-6&&(r.y0-=_,r.y1-=_),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:a}}of f)a.sort(at);for(const{target:{targetLinks:a}}of e)a.sort(lt)}}function O(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:a}of e)f.sort(at),a.sort(lt)}function T(e,f){let a=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;a+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;a-=r}return a}function R(e,f){let a=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;a+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;a-=r}return a}return x}var tt=Math.PI,et=2*tt,D=1e-6,Dt=et-D;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function gt(){return new nt}nt.prototype=gt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(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,i,l){this._+="Q"+ +t+","+ +n+","+(this._x1=+i)+","+(this._y1=+l)},bezierCurveTo:function(t,n,i,l,u,k){this._+="C"+ +t+","+ +n+","+ +i+","+ +l+","+(this._x1=+u)+","+(this._y1=+k)},arcTo:function(t,n,i,l,u){t=+t,n=+n,i=+i,l=+l,u=+u;var k=this._x1,g=this._y1,m=i-t,s=l-n,o=k-t,c=g-n,p=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(p>D)if(!(Math.abs(c*m-s*o)>D)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=i-k,y=l-g,x=m*m+s*s,E=b*b+y*y,L=Math.sqrt(x),A=Math.sqrt(p),N=u*Math.tan((tt-Math.acos((x+p-E)/(2*L*A)))/2),P=N/A,z=N/L;Math.abs(P-1)>D&&(this._+="L"+(t+P*o)+","+(n+P*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+z*m)+","+(this._y1=n+z*s)}},arc:function(t,n,i,l,u,k){t=+t,n=+n,i=+i,k=!!k;var g=i*Math.cos(l),m=i*Math.sin(l),s=t+g,o=n+m,c=1^k,p=k?l-u:u-l;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>D||Math.abs(this._y1-o)>D)&&(this._+="L"+s+","+o),i&&(p<0&&(p=p%et+et),p>Dt?this._+="A"+i+","+i+",0,1,"+c+","+(t-g)+","+(n-m)+"A"+i+","+i+",0,1,"+c+","+(this._x1=s)+","+(this._y1=o):p>D&&(this._+="A"+i+","+i+",0,"+ +(p>=tt)+","+c+","+(this._x1=t+i*Math.cos(u))+","+(this._y1=n+i*Math.sin(u))))},rect:function(t,n,i,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +i+"v"+ +l+"h"+-i+"Z"},toString:function(){return this._}};function ht(t){return function(){return t}}function Bt(t){return t[0]}function Rt(t){return t[1]}var Ut=Array.prototype.slice;function Vt(t){return t.source}function Ft(t){return t.target}function Wt(t){var n=Vt,i=Ft,l=Bt,u=Rt,k=null;function g(){var m,s=Ut.call(arguments),o=n.apply(this,s),c=i.apply(this,s);if(k||(k=m=gt()),t(k,+l.apply(this,(s[0]=o,s)),+u.apply(this,s),+l.apply(this,(s[0]=c,s)),+u.apply(this,s)),m)return k=null,m+""||null}return g.source=function(m){return arguments.length?(n=m,g):n},g.target=function(m){return arguments.length?(i=m,g):i},g.x=function(m){return arguments.length?(l=typeof m=="function"?m:ht(+m),g):l},g.y=function(m){return arguments.length?(u=typeof m=="function"?m:ht(+m),g):u},g.context=function(m){return arguments.length?(k=m??null,g):k},g}function Yt(t,n,i,l,u){t.moveTo(n,i),t.bezierCurveTo(n=(n+l)/2,i,n,u,l,u)}function Gt(){return Wt(Yt)}function Ht(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Xt(){return Gt().source(Ht).target(Qt)}var it=function(){var t=function(m,s,o,c){for(o=o||{},c=m.length;c--;o[m[c]]=s);return o},n=[1,9],i=[1,10],l=[1,5,10,12],u={trace:function(){},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:function(s,o,c,p,b,y,x){var E=y.length-1;switch(b){case 7:const L=p.findOrCreateNode(y[E-4].trim().replaceAll('""','"')),A=p.findOrCreateNode(y[E-2].trim().replaceAll('""','"')),N=parseFloat(y[E].trim());p.addLink(L,A,N);break;case 8:case 9:case 11:this.$=y[E];break;case 10:this.$=y[E-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:i},{15:18,16:7,17:8,18:n,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:n,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(s,o){if(o.recoverable)this.trace(s);else{var c=new Error(s);throw c.hash=o,c}},parse:function(s){var o=this,c=[0],p=[],b=[null],y=[],x=this.table,E="",L=0,A=0,N=2,P=1,z=y.slice.call(arguments,1),S=Object.create(this.lexer),M={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(M.yy[$]=this.yy[$]);S.setInput(s,M.yy),M.yy.lexer=S,M.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var C=S.yylloc;y.push(C);var I=S.options&&S.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=p.pop()||S.lex()||P,typeof v!="number"&&(v instanceof Array&&(p=v,v=p.pop()),v=o.symbols_[v]||v),v}for(var w,O,T,R,e={},f,a,h,r;;){if(O=c[c.length-1],this.defaultActions[O]?T=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=d()),T=x[O]&&x[O][w]),typeof T>"u"||!T.length||!T[0]){var _="";r=[];for(f in x[O])this.terminals_[f]&&f>N&&r.push("'"+this.terminals_[f]+"'");S.showPosition?_="Parse error on line "+(L+1)+`: +import{c as rt,g as mt,s as _t,a as kt,b as xt,D as vt,B as bt,E as wt,j as St,aQ as Lt,h as Y,i as Et}from"./index-e0ff10fa.js";import{o as At}from"./ordinal-ba9b4969.js";import"./init-77b53fdd.js";function Tt(t){for(var n=t.length/6|0,i=new Array(n),l=0;l=l)&&(i=l);else{let l=-1;for(let u of t)(u=n(u,++l,t))!=null&&(i=u)&&(i=u)}return i}function yt(t,n){let i;if(n===void 0)for(const l of t)l!=null&&(i>l||i===void 0&&l>=l)&&(i=l);else{let l=-1;for(let u of t)(u=n(u,++l,t))!=null&&(i>u||i===void 0&&u>=u)&&(i=u)}return i}function Z(t,n){let i=0;if(n===void 0)for(let l of t)(l=+l)&&(i+=l);else{let l=-1;for(let u of t)(u=+n(u,++l,t))&&(i+=u)}return i}function Nt(t){return t.target.depth}function Pt(t){return t.depth}function Ct(t,n){return n-1-t.height}function dt(t,n){return t.sourceLinks.length?t.depth:n-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?yt(t.sourceLinks,Nt)-1:0}function G(t){return function(){return t}}function lt(t,n){return H(t.source,n.source)||t.index-n.index}function at(t,n){return H(t.target,n.target)||t.index-n.index}function H(t,n){return t.y0-n.y0}function J(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function zt(t){return t.links}function ct(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function ut({nodes:t}){for(const n of t){let i=n.y0,l=i;for(const u of n.sourceLinks)u.y0=i+u.width/2,i+=u.width;for(const u of n.targetLinks)u.y1=l+u.width/2,l+=u.width}}function jt(){let t=0,n=0,i=1,l=1,u=24,k=8,g,m=Ot,s=dt,o,c,p=$t,b=zt,y=6;function x(){const e={nodes:p.apply(null,arguments),links:b.apply(null,arguments)};return E(e),L(e),A(e),N(e),S(e),ut(e),e}x.update=function(e){return ut(e),e},x.nodeId=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.nodeAlign=function(e){return arguments.length?(s=typeof e=="function"?e:G(e),x):s},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(k=g=+e,x):k},x.nodes=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,i=+e[0],l=+e[1],x):[i-t,l-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],i=+e[1][0],n=+e[0][1],l=+e[1][1],x):[[t,n],[i,l]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function E({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const a=new Map(e.map((h,r)=>[m(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:_,target:v}=r;typeof _!="object"&&(_=r.source=ct(a,_)),typeof v!="object"&&(v=r.target=ct(a,v)),_.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function L({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function A({nodes:e}){const f=e.length;let a=new Set(e),h=new Set,r=0;for(;a.size;){for(const _ of a){_.depth=r;for(const{target:v}of _.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");a=h,h=new Set}}function N({nodes:e}){const f=e.length;let a=new Set(e),h=new Set,r=0;for(;a.size;){for(const _ of a){_.height=r;for(const{source:v}of _.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");a=h,h=new Set}}function P({nodes:e}){const f=ot(e,r=>r.depth)+1,a=(i-t-u)/(f-1),h=new Array(f);for(const r of e){const _=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=_,r.x0=t+_*a,r.x1=r.x0+u,h[_]?h[_].push(r):h[_]=[r]}if(o)for(const r of h)r.sort(o);return h}function z(e){const f=yt(e,a=>(l-n-(a.length-1)*g)/Z(a,J));for(const a of e){let h=n;for(const r of a){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const _ of r.sourceLinks)_.width=_.value*f}h=(l-h+g)/(a.length+1);for(let r=0;ra.length)-1)),z(f);for(let a=0;a0))continue;let V=(U/j-v.y0)*f;v.y0+=V,v.y1+=V,w(v)}o===void 0&&_.sort(H),C(_,a)}}function $(e,f,a){for(let h=e.length,r=h-2;r>=0;--r){const _=e[r];for(const v of _){let U=0,j=0;for(const{target:F,value:K}of v.sourceLinks){let W=K*(F.layer-v.layer);U+=R(v,F)*W,j+=W}if(!(j>0))continue;let V=(U/j-v.y0)*f;v.y0+=V,v.y1+=V,w(v)}o===void 0&&_.sort(H),C(_,a)}}function C(e,f){const a=e.length>>1,h=e[a];d(e,h.y0-g,a-1,f),I(e,h.y1+g,a+1,f),d(e,l,e.length-1,f),I(e,n,0,f)}function I(e,f,a,h){for(;a1e-6&&(r.y0+=_,r.y1+=_),f=r.y1+g}}function d(e,f,a,h){for(;a>=0;--a){const r=e[a],_=(r.y1-f)*h;_>1e-6&&(r.y0-=_,r.y1-=_),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:a}}of f)a.sort(at);for(const{target:{targetLinks:a}}of e)a.sort(lt)}}function O(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:a}of e)f.sort(at),a.sort(lt)}function T(e,f){let a=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;a+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;a-=r}return a}function R(e,f){let a=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;a+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;a-=r}return a}return x}var tt=Math.PI,et=2*tt,D=1e-6,Dt=et-D;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function gt(){return new nt}nt.prototype=gt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(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,i,l){this._+="Q"+ +t+","+ +n+","+(this._x1=+i)+","+(this._y1=+l)},bezierCurveTo:function(t,n,i,l,u,k){this._+="C"+ +t+","+ +n+","+ +i+","+ +l+","+(this._x1=+u)+","+(this._y1=+k)},arcTo:function(t,n,i,l,u){t=+t,n=+n,i=+i,l=+l,u=+u;var k=this._x1,g=this._y1,m=i-t,s=l-n,o=k-t,c=g-n,p=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(p>D)if(!(Math.abs(c*m-s*o)>D)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=i-k,y=l-g,x=m*m+s*s,E=b*b+y*y,L=Math.sqrt(x),A=Math.sqrt(p),N=u*Math.tan((tt-Math.acos((x+p-E)/(2*L*A)))/2),P=N/A,z=N/L;Math.abs(P-1)>D&&(this._+="L"+(t+P*o)+","+(n+P*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+z*m)+","+(this._y1=n+z*s)}},arc:function(t,n,i,l,u,k){t=+t,n=+n,i=+i,k=!!k;var g=i*Math.cos(l),m=i*Math.sin(l),s=t+g,o=n+m,c=1^k,p=k?l-u:u-l;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>D||Math.abs(this._y1-o)>D)&&(this._+="L"+s+","+o),i&&(p<0&&(p=p%et+et),p>Dt?this._+="A"+i+","+i+",0,1,"+c+","+(t-g)+","+(n-m)+"A"+i+","+i+",0,1,"+c+","+(this._x1=s)+","+(this._y1=o):p>D&&(this._+="A"+i+","+i+",0,"+ +(p>=tt)+","+c+","+(this._x1=t+i*Math.cos(u))+","+(this._y1=n+i*Math.sin(u))))},rect:function(t,n,i,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +i+"v"+ +l+"h"+-i+"Z"},toString:function(){return this._}};function ht(t){return function(){return t}}function Bt(t){return t[0]}function Rt(t){return t[1]}var Ut=Array.prototype.slice;function Vt(t){return t.source}function Ft(t){return t.target}function Wt(t){var n=Vt,i=Ft,l=Bt,u=Rt,k=null;function g(){var m,s=Ut.call(arguments),o=n.apply(this,s),c=i.apply(this,s);if(k||(k=m=gt()),t(k,+l.apply(this,(s[0]=o,s)),+u.apply(this,s),+l.apply(this,(s[0]=c,s)),+u.apply(this,s)),m)return k=null,m+""||null}return g.source=function(m){return arguments.length?(n=m,g):n},g.target=function(m){return arguments.length?(i=m,g):i},g.x=function(m){return arguments.length?(l=typeof m=="function"?m:ht(+m),g):l},g.y=function(m){return arguments.length?(u=typeof m=="function"?m:ht(+m),g):u},g.context=function(m){return arguments.length?(k=m??null,g):k},g}function Yt(t,n,i,l,u){t.moveTo(n,i),t.bezierCurveTo(n=(n+l)/2,i,n,u,l,u)}function Gt(){return Wt(Yt)}function Ht(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Xt(){return Gt().source(Ht).target(Qt)}var it=function(){var t=function(m,s,o,c){for(o=o||{},c=m.length;c--;o[m[c]]=s);return o},n=[1,9],i=[1,10],l=[1,5,10,12],u={trace:function(){},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:function(s,o,c,p,b,y,x){var E=y.length-1;switch(b){case 7:const L=p.findOrCreateNode(y[E-4].trim().replaceAll('""','"')),A=p.findOrCreateNode(y[E-2].trim().replaceAll('""','"')),N=parseFloat(y[E].trim());p.addLink(L,A,N);break;case 8:case 9:case 11:this.$=y[E];break;case 10:this.$=y[E-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:i},{15:18,16:7,17:8,18:n,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:n,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(s,o){if(o.recoverable)this.trace(s);else{var c=new Error(s);throw c.hash=o,c}},parse:function(s){var o=this,c=[0],p=[],b=[null],y=[],x=this.table,E="",L=0,A=0,N=2,P=1,z=y.slice.call(arguments,1),S=Object.create(this.lexer),M={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(M.yy[$]=this.yy[$]);S.setInput(s,M.yy),M.yy.lexer=S,M.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var C=S.yylloc;y.push(C);var I=S.options&&S.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=p.pop()||S.lex()||P,typeof v!="number"&&(v instanceof Array&&(p=v,v=p.pop()),v=o.symbols_[v]||v),v}for(var w,O,T,R,e={},f,a,h,r;;){if(O=c[c.length-1],this.defaultActions[O]?T=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=d()),T=x[O]&&x[O][w]),typeof T>"u"||!T.length||!T[0]){var _="";r=[];for(f in x[O])this.terminals_[f]&&f>N&&r.push("'"+this.terminals_[f]+"'");S.showPosition?_="Parse error on line "+(L+1)+`: `+S.showPosition()+` Expecting `+r.join(", ")+", got '"+(this.terminals_[w]||w)+"'":_="Parse error on line "+(L+1)+": Unexpected "+(w==P?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(_,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:C,expected:r})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(T[0]){case 1:c.push(w),b.push(S.yytext),y.push(S.yylloc),c.push(T[1]),w=null,A=S.yyleng,E=S.yytext,L=S.yylineno,C=S.yylloc;break;case 2:if(a=this.productions_[T[1]][1],e.$=b[b.length-a],e._$={first_line:y[y.length-(a||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(a||1)].first_column,last_column:y[y.length-1].last_column},I&&(e._$.range=[y[y.length-(a||1)].range[0],y[y.length-1].range[1]]),R=this.performAction.apply(e,[E,A,L,M.yy,T[1],b,y].concat(z)),typeof R<"u")return R;a&&(c=c.slice(0,-1*a*2),b=b.slice(0,-1*a),y=y.slice(0,-1*a)),c.push(this.productions_[T[1]][0]),b.push(e.$),y.push(e._$),h=x[c[c.length-2]][c[c.length-1]],c.push(h);break;case 3:return!0}}return!0}},k=function(){var m={EOF:1,parseError:function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},setInput:function(s,o){return this.yy=o||this.yy||{},this._input=s,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},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var o=s.length,c=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var p=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),c.length-1&&(this.yylineno-=c.length-1);var b=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:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/assets/sequenceDiagram-b655622a-838eb6c2.js b/assets/sequenceDiagram-b655622a-698172bb.js similarity index 99% rename from assets/sequenceDiagram-b655622a-838eb6c2.js rename to assets/sequenceDiagram-b655622a-698172bb.js index de713fc..c99dd1b 100644 --- a/assets/sequenceDiagram-b655622a-838eb6c2.js +++ b/assets/sequenceDiagram-b655622a-698172bb.js @@ -1,4 +1,4 @@ -import{g as ke,D as Le,B as Ie,c as dt,s as ae,b as Ae,a as Ne,E as Se,l as U,d as Mt,j as w,e as Me,h as St,i as Re,z as O,m as re,Y as oe,a5 as De,a6 as Ve}from"./index-b371ab76.js";import{d as Ce,a as Oe,g as Rt,b as Be,c as Ye,e as Gt}from"./svgDrawCommon-4835440b-3fa5d101.js";var qt=function(){var t=function(ht,m,_,k){for(_=_||{},k=ht.length;k--;_[ht[k]]=m);return _},e=[1,2],o=[1,3],i=[1,4],s=[2,4],n=[1,9],c=[1,11],h=[1,13],p=[1,14],a=[1,16],x=[1,17],E=[1,18],u=[1,24],g=[1,25],b=[1,26],P=[1,27],I=[1,28],R=[1,29],N=[1,30],F=[1,31],S=[1,32],tt=[1,33],W=[1,34],K=[1,35],Z=[1,36],q=[1,37],Y=[1,38],C=[1,39],G=[1,41],z=[1,42],X=[1,43],Q=[1,44],j=[1,45],y=[1,46],v=[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,54,59,60,61,62,70],L=[4,5,16,50,52,53],pt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],et=[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,54,59,60,61,62,70],A=[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,54,59,60,61,62,70],$t=[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,54,59,60,61,62,70],lt=[68,69,70],nt=[1,120],Ct={trace:function(){},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,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,DOTTED_ARROW:74,SOLID_CROSS:75,DOTTED_CROSS:76,SOLID_POINT:77,DOTTED_POINT:78,TXT:79,$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",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"DOTTED_ARROW",75:"SOLID_CROSS",76:"DOTTED_CROSS",77:"SOLID_POINT",78:"DOTTED_POINT",79:"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],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:function(m,_,k,T,M,l,vt){var d=l.length-1;switch(M){case 3:return T.apply(l[d]),l[d];case 4:case 9:this.$=[];break;case 5:case 10:l[d-1].push(l[d]),this.$=l[d-1];break;case 6:case 7:case 11:case 12:this.$=l[d];break;case 8:case 13:this.$=[];break;case 15:l[d].type="createParticipant",this.$=l[d];break;case 16:l[d-1].unshift({type:"boxStart",boxData:T.parseBoxData(l[d-2])}),l[d-1].push({type:"boxEnd",boxText:l[d-2]}),this.$=l[d-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[d-2]),sequenceIndexStep:Number(l[d-1]),sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:T.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:T.LINETYPE.ACTIVE_START,actor:l[d-1]};break;case 23:this.$={type:"activeEnd",signalType:T.LINETYPE.ACTIVE_END,actor:l[d-1]};break;case 29:T.setDiagramTitle(l[d].substring(6)),this.$=l[d].substring(6);break;case 30:T.setDiagramTitle(l[d].substring(7)),this.$=l[d].substring(7);break;case 31:this.$=l[d].trim(),T.setAccTitle(this.$);break;case 32:case 33:this.$=l[d].trim(),T.setAccDescription(this.$);break;case 34:l[d-1].unshift({type:"loopStart",loopText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.LOOP_START}),l[d-1].push({type:"loopEnd",loopText:l[d-2],signalType:T.LINETYPE.LOOP_END}),this.$=l[d-1];break;case 35:l[d-1].unshift({type:"rectStart",color:T.parseMessage(l[d-2]),signalType:T.LINETYPE.RECT_START}),l[d-1].push({type:"rectEnd",color:T.parseMessage(l[d-2]),signalType:T.LINETYPE.RECT_END}),this.$=l[d-1];break;case 36:l[d-1].unshift({type:"optStart",optText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.OPT_START}),l[d-1].push({type:"optEnd",optText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.OPT_END}),this.$=l[d-1];break;case 37:l[d-1].unshift({type:"altStart",altText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.ALT_START}),l[d-1].push({type:"altEnd",signalType:T.LINETYPE.ALT_END}),this.$=l[d-1];break;case 38:l[d-1].unshift({type:"parStart",parText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.PAR_START}),l[d-1].push({type:"parEnd",signalType:T.LINETYPE.PAR_END}),this.$=l[d-1];break;case 39:l[d-1].unshift({type:"parStart",parText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.PAR_OVER_START}),l[d-1].push({type:"parEnd",signalType:T.LINETYPE.PAR_END}),this.$=l[d-1];break;case 40:l[d-1].unshift({type:"criticalStart",criticalText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.CRITICAL_START}),l[d-1].push({type:"criticalEnd",signalType:T.LINETYPE.CRITICAL_END}),this.$=l[d-1];break;case 41:l[d-1].unshift({type:"breakStart",breakText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.BREAK_START}),l[d-1].push({type:"breakEnd",optText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.BREAK_END}),this.$=l[d-1];break;case 43:this.$=l[d-3].concat([{type:"option",optionText:T.parseMessage(l[d-1]),signalType:T.LINETYPE.CRITICAL_OPTION},l[d]]);break;case 45:this.$=l[d-3].concat([{type:"and",parText:T.parseMessage(l[d-1]),signalType:T.LINETYPE.PAR_AND},l[d]]);break;case 47:this.$=l[d-3].concat([{type:"else",altText:T.parseMessage(l[d-1]),signalType:T.LINETYPE.ALT_ELSE},l[d]]);break;case 48:l[d-3].draw="participant",l[d-3].type="addParticipant",l[d-3].description=T.parseMessage(l[d-1]),this.$=l[d-3];break;case 49:l[d-1].draw="participant",l[d-1].type="addParticipant",this.$=l[d-1];break;case 50:l[d-3].draw="actor",l[d-3].type="addParticipant",l[d-3].description=T.parseMessage(l[d-1]),this.$=l[d-3];break;case 51:l[d-1].draw="actor",l[d-1].type="addParticipant",this.$=l[d-1];break;case 52:l[d-1].type="destroyParticipant",this.$=l[d-1];break;case 53:this.$=[l[d-1],{type:"addNote",placement:l[d-2],actor:l[d-1].actor,text:l[d]}];break;case 54:l[d-2]=[].concat(l[d-1],l[d-1]).slice(0,2),l[d-2][0]=l[d-2][0].actor,l[d-2][1]=l[d-2][1].actor,this.$=[l[d-1],{type:"addNote",placement:T.PLACEMENT.OVER,actor:l[d-2].slice(0,2),text:l[d]}];break;case 55:this.$=[l[d-1],{type:"addLinks",actor:l[d-1].actor,text:l[d]}];break;case 56:this.$=[l[d-1],{type:"addALink",actor:l[d-1].actor,text:l[d]}];break;case 57:this.$=[l[d-1],{type:"addProperties",actor:l[d-1].actor,text:l[d]}];break;case 58:this.$=[l[d-1],{type:"addDetails",actor:l[d-1].actor,text:l[d]}];break;case 61:this.$=[l[d-2],l[d]];break;case 62:this.$=l[d];break;case 63:this.$=T.PLACEMENT.LEFTOF;break;case 64:this.$=T.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[d-4],l[d-1],{type:"addMessage",from:l[d-4].actor,to:l[d-1].actor,signalType:l[d-3],msg:l[d],activate:!0},{type:"activeStart",signalType:T.LINETYPE.ACTIVE_START,actor:l[d-1]}];break;case 66:this.$=[l[d-4],l[d-1],{type:"addMessage",from:l[d-4].actor,to:l[d-1].actor,signalType:l[d-3],msg:l[d]},{type:"activeEnd",signalType:T.LINETYPE.ACTIVE_END,actor:l[d-4]}];break;case 67:this.$=[l[d-3],l[d-1],{type:"addMessage",from:l[d-3].actor,to:l[d-1].actor,signalType:l[d-2],msg:l[d]}];break;case 68:this.$={type:"addParticipant",actor:l[d]};break;case 69:this.$=T.LINETYPE.SOLID_OPEN;break;case 70:this.$=T.LINETYPE.DOTTED_OPEN;break;case 71:this.$=T.LINETYPE.SOLID;break;case 72:this.$=T.LINETYPE.DOTTED;break;case 73:this.$=T.LINETYPE.SOLID_CROSS;break;case 74:this.$=T.LINETYPE.DOTTED_CROSS;break;case 75:this.$=T.LINETYPE.SOLID_POINT;break;case 76:this.$=T.LINETYPE.DOTTED_POINT;break;case 77:this.$=T.parseMessage(l[d].trim().substring(1));break}},table:[{3:1,4:e,5:o,6:i},{1:[3]},{3:5,4:e,5:o,6:i},{3:6,4:e,5:o,6:i},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,54,59,60,61,62,70],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:c,8:8,9:10,12:12,13:h,14:p,17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},t(v,[2,5]),{9:47,12:12,13:h,14:p,17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},t(v,[2,7]),t(v,[2,8]),t(v,[2,14]),{12:48,50:q,52:Y,53:C},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:y},{22:55,70:y},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(v,[2,29]),t(v,[2,30]),{32:[1,61]},{34:[1,62]},t(v,[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,70:y},{22:72,70:y},{22:73,70:y},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82]},{55:83,57:[1,84],65:[1,85],66:[1,86]},{22:87,70:y},{22:88,70:y},{22:89,70:y},{22:90,70:y},t([5,51,64,71,72,73,74,75,76,77,78,79],[2,68]),t(v,[2,6]),t(v,[2,15]),t(L,[2,9],{10:91}),t(v,[2,17]),{5:[1,93],19:[1,92]},{5:[1,94]},t(v,[2,21]),{5:[1,95]},{5:[1,96]},t(v,[2,24]),t(v,[2,25]),t(v,[2,26]),t(v,[2,27]),t(v,[2,28]),t(v,[2,31]),t(v,[2,32]),t(pt,s,{7:97}),t(pt,s,{7:98}),t(pt,s,{7:99}),t(et,s,{40:100,7:101}),t(A,s,{42:102,7:103}),t(A,s,{7:103,42:104}),t($t,s,{45:105,7:106}),t(pt,s,{7:107}),{5:[1,109],51:[1,108]},{5:[1,111],51:[1,110]},{5:[1,112]},{22:115,68:[1,113],69:[1,114],70:y},t(lt,[2,69]),t(lt,[2,70]),t(lt,[2,71]),t(lt,[2,72]),t(lt,[2,73]),t(lt,[2,74]),t(lt,[2,75]),t(lt,[2,76]),{22:116,70:y},{22:118,58:117,70:y},{70:[2,63]},{70:[2,64]},{56:119,79:nt},{56:121,79:nt},{56:122,79:nt},{56:123,79:nt},{4:[1,126],5:[1,128],11:125,12:127,16:[1,124],50:q,52:Y,53:C},{5:[1,129]},t(v,[2,19]),t(v,[2,20]),t(v,[2,22]),t(v,[2,23]),{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,130],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,131],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,132],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{16:[1,133]},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,46],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,49:[1,134],50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{16:[1,135]},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,44],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,48:[1,136],50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{16:[1,137]},{16:[1,138]},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,42],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,47:[1,139],50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,140],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{15:[1,141]},t(v,[2,49]),{15:[1,142]},t(v,[2,51]),t(v,[2,52]),{22:143,70:y},{22:144,70:y},{56:145,79:nt},{56:146,79:nt},{56:147,79:nt},{64:[1,148],79:[2,62]},{5:[2,55]},{5:[2,77]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(v,[2,16]),t(L,[2,10]),{12:149,50:q,52:Y,53:C},t(L,[2,12]),t(L,[2,13]),t(v,[2,18]),t(v,[2,34]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),{15:[1,150]},t(v,[2,38]),{15:[1,151]},t(v,[2,39]),t(v,[2,40]),{15:[1,152]},t(v,[2,41]),{5:[1,153]},{5:[1,154]},{56:155,79:nt},{56:156,79:nt},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:157,70:y},t(L,[2,11]),t(et,s,{7:101,40:158}),t(A,s,{7:103,42:159}),t($t,s,{7:106,45:160}),t(v,[2,48]),t(v,[2,50]),{5:[2,65]},{5:[2,66]},{79:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],85:[2,63],86:[2,64],119:[2,55],120:[2,77],121:[2,56],122:[2,57],123:[2,58],145:[2,67],146:[2,53],147:[2,54],155:[2,65],156:[2,66],157:[2,61],158:[2,47],159:[2,45],160:[2,43]},parseError:function(m,_){if(_.recoverable)this.trace(m);else{var k=new Error(m);throw k.hash=_,k}},parse:function(m){var _=this,k=[0],T=[],M=[null],l=[],vt=this.table,d="",It=0,te=0,we=2,ee=1,ve=l.slice.call(arguments,1),B=Object.create(this.lexer),ut={yy:{}};for(var Bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Bt)&&(ut.yy[Bt]=this.yy[Bt]);B.setInput(m,ut.yy),ut.yy.lexer=B,ut.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var Yt=B.yylloc;l.push(Yt);var _e=B.options&&B.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pe(){var rt;return rt=T.pop()||B.lex()||ee,typeof rt!="number"&&(rt instanceof Array&&(T=rt,rt=T.pop()),rt=_.symbols_[rt]||rt),rt}for(var H,ft,$,Ft,yt={},At,at,ie,Nt;;){if(ft=k[k.length-1],this.defaultActions[ft]?$=this.defaultActions[ft]:((H===null||typeof H>"u")&&(H=Pe()),$=vt[ft]&&vt[ft][H]),typeof $>"u"||!$.length||!$[0]){var Wt="";Nt=[];for(At in vt[ft])this.terminals_[At]&&At>we&&Nt.push("'"+this.terminals_[At]+"'");B.showPosition?Wt="Parse error on line "+(It+1)+`: +import{g as ke,D as Le,B as Ie,c as dt,s as ae,b as Ae,a as Ne,E as Se,l as U,d as Mt,j as w,e as Me,h as St,i as Re,z as O,m as re,Y as oe,a5 as De,a6 as Ve}from"./index-e0ff10fa.js";import{d as Ce,a as Oe,g as Rt,b as Be,c as Ye,e as Gt}from"./svgDrawCommon-4835440b-b3589b66.js";var qt=function(){var t=function(ht,m,_,k){for(_=_||{},k=ht.length;k--;_[ht[k]]=m);return _},e=[1,2],o=[1,3],i=[1,4],s=[2,4],n=[1,9],c=[1,11],h=[1,13],p=[1,14],a=[1,16],x=[1,17],E=[1,18],u=[1,24],g=[1,25],b=[1,26],P=[1,27],I=[1,28],R=[1,29],N=[1,30],F=[1,31],S=[1,32],tt=[1,33],W=[1,34],K=[1,35],Z=[1,36],q=[1,37],Y=[1,38],C=[1,39],G=[1,41],z=[1,42],X=[1,43],Q=[1,44],j=[1,45],y=[1,46],v=[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,54,59,60,61,62,70],L=[4,5,16,50,52,53],pt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],et=[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,54,59,60,61,62,70],A=[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,54,59,60,61,62,70],$t=[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,54,59,60,61,62,70],lt=[68,69,70],nt=[1,120],Ct={trace:function(){},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,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,DOTTED_ARROW:74,SOLID_CROSS:75,DOTTED_CROSS:76,SOLID_POINT:77,DOTTED_POINT:78,TXT:79,$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",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"DOTTED_ARROW",75:"SOLID_CROSS",76:"DOTTED_CROSS",77:"SOLID_POINT",78:"DOTTED_POINT",79:"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],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:function(m,_,k,T,M,l,vt){var d=l.length-1;switch(M){case 3:return T.apply(l[d]),l[d];case 4:case 9:this.$=[];break;case 5:case 10:l[d-1].push(l[d]),this.$=l[d-1];break;case 6:case 7:case 11:case 12:this.$=l[d];break;case 8:case 13:this.$=[];break;case 15:l[d].type="createParticipant",this.$=l[d];break;case 16:l[d-1].unshift({type:"boxStart",boxData:T.parseBoxData(l[d-2])}),l[d-1].push({type:"boxEnd",boxText:l[d-2]}),this.$=l[d-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[d-2]),sequenceIndexStep:Number(l[d-1]),sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:T.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:T.LINETYPE.ACTIVE_START,actor:l[d-1]};break;case 23:this.$={type:"activeEnd",signalType:T.LINETYPE.ACTIVE_END,actor:l[d-1]};break;case 29:T.setDiagramTitle(l[d].substring(6)),this.$=l[d].substring(6);break;case 30:T.setDiagramTitle(l[d].substring(7)),this.$=l[d].substring(7);break;case 31:this.$=l[d].trim(),T.setAccTitle(this.$);break;case 32:case 33:this.$=l[d].trim(),T.setAccDescription(this.$);break;case 34:l[d-1].unshift({type:"loopStart",loopText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.LOOP_START}),l[d-1].push({type:"loopEnd",loopText:l[d-2],signalType:T.LINETYPE.LOOP_END}),this.$=l[d-1];break;case 35:l[d-1].unshift({type:"rectStart",color:T.parseMessage(l[d-2]),signalType:T.LINETYPE.RECT_START}),l[d-1].push({type:"rectEnd",color:T.parseMessage(l[d-2]),signalType:T.LINETYPE.RECT_END}),this.$=l[d-1];break;case 36:l[d-1].unshift({type:"optStart",optText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.OPT_START}),l[d-1].push({type:"optEnd",optText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.OPT_END}),this.$=l[d-1];break;case 37:l[d-1].unshift({type:"altStart",altText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.ALT_START}),l[d-1].push({type:"altEnd",signalType:T.LINETYPE.ALT_END}),this.$=l[d-1];break;case 38:l[d-1].unshift({type:"parStart",parText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.PAR_START}),l[d-1].push({type:"parEnd",signalType:T.LINETYPE.PAR_END}),this.$=l[d-1];break;case 39:l[d-1].unshift({type:"parStart",parText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.PAR_OVER_START}),l[d-1].push({type:"parEnd",signalType:T.LINETYPE.PAR_END}),this.$=l[d-1];break;case 40:l[d-1].unshift({type:"criticalStart",criticalText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.CRITICAL_START}),l[d-1].push({type:"criticalEnd",signalType:T.LINETYPE.CRITICAL_END}),this.$=l[d-1];break;case 41:l[d-1].unshift({type:"breakStart",breakText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.BREAK_START}),l[d-1].push({type:"breakEnd",optText:T.parseMessage(l[d-2]),signalType:T.LINETYPE.BREAK_END}),this.$=l[d-1];break;case 43:this.$=l[d-3].concat([{type:"option",optionText:T.parseMessage(l[d-1]),signalType:T.LINETYPE.CRITICAL_OPTION},l[d]]);break;case 45:this.$=l[d-3].concat([{type:"and",parText:T.parseMessage(l[d-1]),signalType:T.LINETYPE.PAR_AND},l[d]]);break;case 47:this.$=l[d-3].concat([{type:"else",altText:T.parseMessage(l[d-1]),signalType:T.LINETYPE.ALT_ELSE},l[d]]);break;case 48:l[d-3].draw="participant",l[d-3].type="addParticipant",l[d-3].description=T.parseMessage(l[d-1]),this.$=l[d-3];break;case 49:l[d-1].draw="participant",l[d-1].type="addParticipant",this.$=l[d-1];break;case 50:l[d-3].draw="actor",l[d-3].type="addParticipant",l[d-3].description=T.parseMessage(l[d-1]),this.$=l[d-3];break;case 51:l[d-1].draw="actor",l[d-1].type="addParticipant",this.$=l[d-1];break;case 52:l[d-1].type="destroyParticipant",this.$=l[d-1];break;case 53:this.$=[l[d-1],{type:"addNote",placement:l[d-2],actor:l[d-1].actor,text:l[d]}];break;case 54:l[d-2]=[].concat(l[d-1],l[d-1]).slice(0,2),l[d-2][0]=l[d-2][0].actor,l[d-2][1]=l[d-2][1].actor,this.$=[l[d-1],{type:"addNote",placement:T.PLACEMENT.OVER,actor:l[d-2].slice(0,2),text:l[d]}];break;case 55:this.$=[l[d-1],{type:"addLinks",actor:l[d-1].actor,text:l[d]}];break;case 56:this.$=[l[d-1],{type:"addALink",actor:l[d-1].actor,text:l[d]}];break;case 57:this.$=[l[d-1],{type:"addProperties",actor:l[d-1].actor,text:l[d]}];break;case 58:this.$=[l[d-1],{type:"addDetails",actor:l[d-1].actor,text:l[d]}];break;case 61:this.$=[l[d-2],l[d]];break;case 62:this.$=l[d];break;case 63:this.$=T.PLACEMENT.LEFTOF;break;case 64:this.$=T.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[d-4],l[d-1],{type:"addMessage",from:l[d-4].actor,to:l[d-1].actor,signalType:l[d-3],msg:l[d],activate:!0},{type:"activeStart",signalType:T.LINETYPE.ACTIVE_START,actor:l[d-1]}];break;case 66:this.$=[l[d-4],l[d-1],{type:"addMessage",from:l[d-4].actor,to:l[d-1].actor,signalType:l[d-3],msg:l[d]},{type:"activeEnd",signalType:T.LINETYPE.ACTIVE_END,actor:l[d-4]}];break;case 67:this.$=[l[d-3],l[d-1],{type:"addMessage",from:l[d-3].actor,to:l[d-1].actor,signalType:l[d-2],msg:l[d]}];break;case 68:this.$={type:"addParticipant",actor:l[d]};break;case 69:this.$=T.LINETYPE.SOLID_OPEN;break;case 70:this.$=T.LINETYPE.DOTTED_OPEN;break;case 71:this.$=T.LINETYPE.SOLID;break;case 72:this.$=T.LINETYPE.DOTTED;break;case 73:this.$=T.LINETYPE.SOLID_CROSS;break;case 74:this.$=T.LINETYPE.DOTTED_CROSS;break;case 75:this.$=T.LINETYPE.SOLID_POINT;break;case 76:this.$=T.LINETYPE.DOTTED_POINT;break;case 77:this.$=T.parseMessage(l[d].trim().substring(1));break}},table:[{3:1,4:e,5:o,6:i},{1:[3]},{3:5,4:e,5:o,6:i},{3:6,4:e,5:o,6:i},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,54,59,60,61,62,70],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:c,8:8,9:10,12:12,13:h,14:p,17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},t(v,[2,5]),{9:47,12:12,13:h,14:p,17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},t(v,[2,7]),t(v,[2,8]),t(v,[2,14]),{12:48,50:q,52:Y,53:C},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:y},{22:55,70:y},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(v,[2,29]),t(v,[2,30]),{32:[1,61]},{34:[1,62]},t(v,[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,70:y},{22:72,70:y},{22:73,70:y},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82]},{55:83,57:[1,84],65:[1,85],66:[1,86]},{22:87,70:y},{22:88,70:y},{22:89,70:y},{22:90,70:y},t([5,51,64,71,72,73,74,75,76,77,78,79],[2,68]),t(v,[2,6]),t(v,[2,15]),t(L,[2,9],{10:91}),t(v,[2,17]),{5:[1,93],19:[1,92]},{5:[1,94]},t(v,[2,21]),{5:[1,95]},{5:[1,96]},t(v,[2,24]),t(v,[2,25]),t(v,[2,26]),t(v,[2,27]),t(v,[2,28]),t(v,[2,31]),t(v,[2,32]),t(pt,s,{7:97}),t(pt,s,{7:98}),t(pt,s,{7:99}),t(et,s,{40:100,7:101}),t(A,s,{42:102,7:103}),t(A,s,{7:103,42:104}),t($t,s,{45:105,7:106}),t(pt,s,{7:107}),{5:[1,109],51:[1,108]},{5:[1,111],51:[1,110]},{5:[1,112]},{22:115,68:[1,113],69:[1,114],70:y},t(lt,[2,69]),t(lt,[2,70]),t(lt,[2,71]),t(lt,[2,72]),t(lt,[2,73]),t(lt,[2,74]),t(lt,[2,75]),t(lt,[2,76]),{22:116,70:y},{22:118,58:117,70:y},{70:[2,63]},{70:[2,64]},{56:119,79:nt},{56:121,79:nt},{56:122,79:nt},{56:123,79:nt},{4:[1,126],5:[1,128],11:125,12:127,16:[1,124],50:q,52:Y,53:C},{5:[1,129]},t(v,[2,19]),t(v,[2,20]),t(v,[2,22]),t(v,[2,23]),{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,130],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,131],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,132],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{16:[1,133]},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,46],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,49:[1,134],50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{16:[1,135]},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,44],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,48:[1,136],50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{16:[1,137]},{16:[1,138]},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,42],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,47:[1,139],50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{4:n,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,140],17:15,18:a,21:x,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:u,30:g,31:b,33:P,35:I,36:R,37:N,38:F,39:S,41:tt,43:W,44:K,46:Z,50:q,52:Y,53:C,54:G,59:z,60:X,61:Q,62:j,70:y},{15:[1,141]},t(v,[2,49]),{15:[1,142]},t(v,[2,51]),t(v,[2,52]),{22:143,70:y},{22:144,70:y},{56:145,79:nt},{56:146,79:nt},{56:147,79:nt},{64:[1,148],79:[2,62]},{5:[2,55]},{5:[2,77]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(v,[2,16]),t(L,[2,10]),{12:149,50:q,52:Y,53:C},t(L,[2,12]),t(L,[2,13]),t(v,[2,18]),t(v,[2,34]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),{15:[1,150]},t(v,[2,38]),{15:[1,151]},t(v,[2,39]),t(v,[2,40]),{15:[1,152]},t(v,[2,41]),{5:[1,153]},{5:[1,154]},{56:155,79:nt},{56:156,79:nt},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:157,70:y},t(L,[2,11]),t(et,s,{7:101,40:158}),t(A,s,{7:103,42:159}),t($t,s,{7:106,45:160}),t(v,[2,48]),t(v,[2,50]),{5:[2,65]},{5:[2,66]},{79:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],85:[2,63],86:[2,64],119:[2,55],120:[2,77],121:[2,56],122:[2,57],123:[2,58],145:[2,67],146:[2,53],147:[2,54],155:[2,65],156:[2,66],157:[2,61],158:[2,47],159:[2,45],160:[2,43]},parseError:function(m,_){if(_.recoverable)this.trace(m);else{var k=new Error(m);throw k.hash=_,k}},parse:function(m){var _=this,k=[0],T=[],M=[null],l=[],vt=this.table,d="",It=0,te=0,we=2,ee=1,ve=l.slice.call(arguments,1),B=Object.create(this.lexer),ut={yy:{}};for(var Bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Bt)&&(ut.yy[Bt]=this.yy[Bt]);B.setInput(m,ut.yy),ut.yy.lexer=B,ut.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var Yt=B.yylloc;l.push(Yt);var _e=B.options&&B.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pe(){var rt;return rt=T.pop()||B.lex()||ee,typeof rt!="number"&&(rt instanceof Array&&(T=rt,rt=T.pop()),rt=_.symbols_[rt]||rt),rt}for(var H,ft,$,Ft,yt={},At,at,ie,Nt;;){if(ft=k[k.length-1],this.defaultActions[ft]?$=this.defaultActions[ft]:((H===null||typeof H>"u")&&(H=Pe()),$=vt[ft]&&vt[ft][H]),typeof $>"u"||!$.length||!$[0]){var Wt="";Nt=[];for(At in vt[ft])this.terminals_[At]&&At>we&&Nt.push("'"+this.terminals_[At]+"'");B.showPosition?Wt="Parse error on line "+(It+1)+`: `+B.showPosition()+` Expecting `+Nt.join(", ")+", got '"+(this.terminals_[H]||H)+"'":Wt="Parse error on line "+(It+1)+": Unexpected "+(H==ee?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(Wt,{text:B.match,token:this.terminals_[H]||H,line:B.yylineno,loc:Yt,expected:Nt})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ft+", token: "+H);switch($[0]){case 1:k.push(H),M.push(B.yytext),l.push(B.yylloc),k.push($[1]),H=null,te=B.yyleng,d=B.yytext,It=B.yylineno,Yt=B.yylloc;break;case 2:if(at=this.productions_[$[1]][1],yt.$=M[M.length-at],yt._$={first_line:l[l.length-(at||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(at||1)].first_column,last_column:l[l.length-1].last_column},_e&&(yt._$.range=[l[l.length-(at||1)].range[0],l[l.length-1].range[1]]),Ft=this.performAction.apply(yt,[d,te,It,ut.yy,$[1],M,l].concat(ve)),typeof Ft<"u")return Ft;at&&(k=k.slice(0,-1*at*2),M=M.slice(0,-1*at),l=l.slice(0,-1*at)),k.push(this.productions_[$[1]][0]),M.push(yt.$),l.push(yt._$),ie=vt[k[k.length-2]][k[k.length-1]],k.push(ie);break;case 3:return!0}}return!0}},me=function(){var ht={EOF:1,parseError:function(_,k){if(this.yy.parser)this.yy.parser.parseError(_,k);else throw new Error(_)},setInput:function(m,_){return this.yy=_||this.yy||{},this._input=m,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},input:function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var _=m.match(/(?:\r\n?|\n).*/g);return _?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},unput:function(m){var _=m.length,k=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-_),this.offset-=_;var T=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),k.length-1&&(this.yylineno-=k.length-1);var M=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:k?(k.length===T.length?this.yylloc.first_column:0)+T[T.length-k.length].length-k[0].length:this.yylloc.first_column-_},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-_]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(m){this.unput(this.match.slice(m))},pastInput:function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var m=this.pastInput(),_=new Array(m.length+1).join("-");return m+this.upcomingInput()+` diff --git a/assets/stateDiagram-59f0c015-3ba775a8.js b/assets/stateDiagram-59f0c015-0ccbe740.js similarity index 98% rename from assets/stateDiagram-59f0c015-3ba775a8.js rename to assets/stateDiagram-59f0c015-0ccbe740.js index 8af1ae7..b920cb0 100644 --- a/assets/stateDiagram-59f0c015-3ba775a8.js +++ b/assets/stateDiagram-59f0c015-0ccbe740.js @@ -1 +1 @@ -import{p as P,d as N,s as W}from"./styles-9c745c82-7bbab345.js";import{c as t,h as H,l as b,i as R,j as T,F as v,z as U}from"./index-b371ab76.js";import{G as C,l as F}from"./layout-fa84e821.js";import{l as $}from"./line-63c0ea4d.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const O=e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),X=e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),J=(e,i)=>{const o=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=o.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),o},Y=(e,i)=>{const o=function(l,m,w){const E=l.append("tspan").attr("x",2*t().state.padding).text(m);w||E.attr("dy",t().state.textHeight)},s=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=s.height,p=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,r=!0;i.descriptions.forEach(function(l){a||(o(p,l,r),r=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),d=Math.max(x.width,s.width);return y.attr("x2",d+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",d+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},I=(e,i,o)=>{const c=t().state.padding,s=2*t().state.padding,g=e.node().getBBox(),p=g.width,a=g.x,r=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=r.node().getBBox().width+s;let d=Math.max(x,p);d===p&&(d=d+s);let l;const m=e.node().getBBox();i.doc,l=a-c,x>p&&(l=(p-d)/2+c),Math.abs(a-m.x)p&&(l=a-(x-p)/2);const w=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",w).attr("class",o?"alt-composit":"composit").attr("width",d).attr("height",m.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),r.attr("x",l+c),x<=p&&r.attr("x",a+(d-s)/2-x/2+c),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",d).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",d).attr("height",m.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},_=e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),q=(e,i)=>{let o=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let s=o;o=c,c=s}return e.append("rect").style("stroke","black").style("fill","black").attr("width",o).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},Z=(e,i,o,c)=>{let s=0;const g=c.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let p=e.replace(/\r\n/g,"
");p=p.replace(/\n/g,"
");const a=p.split(T.lineBreakRegex);let r=1.25*t().state.noteMargin;for(const y of a){const x=y.trim();if(x.length>0){const d=g.append("tspan");if(d.text(x),r===0){const l=d.node().getBBox();r+=l.height}s+=r,d.attr("x",i+t().state.noteMargin),d.attr("y",o+s+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:s}},j=(e,i)=>{i.attr("class","state-note");const o=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:s,textHeight:g}=Z(e,0,0,c);return o.attr("height",g+2*t().state.noteMargin),o.attr("width",s+t().state.noteMargin*2),o},L=function(e,i){const o=i.id,c={id:o,label:i.id,width:0,height:0},s=e.append("g").attr("id",o).attr("class","stateGroup");i.type==="start"&&O(s),i.type==="end"&&_(s),(i.type==="fork"||i.type==="join")&&q(s,i),i.type==="note"&&j(i.note.text,s),i.type==="divider"&&X(s),i.type==="default"&&i.descriptions.length===0&&J(s,i),i.type==="default"&&i.descriptions.length>0&&Y(s,i);const g=s.node().getBBox();return c.width=g.width+2*t().state.padding,c.height=g.height+2*t().state.padding,c};let G=0;const K=function(e,i,o){const c=function(r){switch(r){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}};i.points=i.points.filter(r=>!Number.isNaN(r.y));const s=i.points,g=$().x(function(r){return r.x}).y(function(r){return r.y}).curve(v),p=e.append("path").attr("d",g(s)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),o.title!==void 0){const r=e.append("g").attr("class","stateLabel"),{x:y,y:x}=U.calcLabelPosition(i.points),d=T.getRows(o.title);let l=0;const m=[];let w=0,E=0;for(let u=0;u<=d.length;u++){const h=r.append("text").attr("text-anchor","middle").text(d[u]).attr("x",y).attr("y",x+l),f=h.node().getBBox();w=Math.max(w,f.width),E=Math.min(E,f.x),b.info(f.x,y,x+l),l===0&&(l=h.node().getBBox().height,b.info("Title height",l,x)),m.push(h)}let k=l*d.length;if(d.length>1){const u=(d.length-1)*l*.5;m.forEach((h,f)=>h.attr("y",x+f*l-u)),k=l*d.length}const n=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",y-w/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",w+t().state.padding).attr("height",k+t().state.padding),b.info(n)}G++};let B;const z={},Q=function(){},V=function(e){e.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")},D=function(e,i,o,c){B=t().state;const s=t().securityLevel;let g;s==="sandbox"&&(g=H("#i"+i));const p=s==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=s==="sandbox"?g.nodes()[0].contentDocument:document;b.debug("Rendering diagram "+e);const r=p.select(`[id='${i}']`);V(r);const y=c.db.getRootDoc();A(y,r,void 0,!1,p,a,c);const x=B.padding,d=r.node().getBBox(),l=d.width+x*2,m=d.height+x*2,w=l*1.75;R(r,m,w,B.useMaxWidth),r.attr("viewBox",`${d.x-B.padding} ${d.y-B.padding} `+l+" "+m)},tt=e=>e?e.length*B.fontSizeFactor:1,A=(e,i,o,c,s,g,p)=>{const a=new C({compound:!0,multigraph:!0});let r,y=!0;for(r=0;r{const f=h.parentElement;let S=0,M=0;f&&(f.parentElement&&(S=f.parentElement.getBBox().width),M=parseInt(f.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",S-M-8)})):b.debug("No Node "+n+": "+JSON.stringify(a.node(n)))});let E=w.getBBox();a.edges().forEach(function(n){n!==void 0&&a.edge(n)!==void 0&&(b.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(a.edge(n))),K(i,a.edge(n),a.edge(n).relation))}),E=w.getBBox();const k={id:o||"root",label:o||"root",width:0,height:0};return k.width=E.width+2*B.padding,k.height=E.height+2*B.padding,b.debug("Doc rendered",k,a),k},et={setConf:Q,draw:D},dt={parser:P,db:N,renderer:et,styles:W,init:e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,N.clear()}};export{dt as diagram}; +import{p as P,d as N,s as W}from"./styles-9c745c82-5d32dd25.js";import{c as t,h as H,l as b,i as R,j as T,F as v,z as U}from"./index-e0ff10fa.js";import{G as C,l as F}from"./layout-608b290b.js";import{l as $}from"./line-434e5c73.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const O=e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),X=e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),J=(e,i)=>{const o=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=o.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),o},Y=(e,i)=>{const o=function(l,m,w){const E=l.append("tspan").attr("x",2*t().state.padding).text(m);w||E.attr("dy",t().state.textHeight)},s=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=s.height,p=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,r=!0;i.descriptions.forEach(function(l){a||(o(p,l,r),r=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),d=Math.max(x.width,s.width);return y.attr("x2",d+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",d+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},I=(e,i,o)=>{const c=t().state.padding,s=2*t().state.padding,g=e.node().getBBox(),p=g.width,a=g.x,r=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=r.node().getBBox().width+s;let d=Math.max(x,p);d===p&&(d=d+s);let l;const m=e.node().getBBox();i.doc,l=a-c,x>p&&(l=(p-d)/2+c),Math.abs(a-m.x)p&&(l=a-(x-p)/2);const w=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",w).attr("class",o?"alt-composit":"composit").attr("width",d).attr("height",m.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),r.attr("x",l+c),x<=p&&r.attr("x",a+(d-s)/2-x/2+c),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",d).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",d).attr("height",m.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},_=e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),q=(e,i)=>{let o=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let s=o;o=c,c=s}return e.append("rect").style("stroke","black").style("fill","black").attr("width",o).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},Z=(e,i,o,c)=>{let s=0;const g=c.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let p=e.replace(/\r\n/g,"
");p=p.replace(/\n/g,"
");const a=p.split(T.lineBreakRegex);let r=1.25*t().state.noteMargin;for(const y of a){const x=y.trim();if(x.length>0){const d=g.append("tspan");if(d.text(x),r===0){const l=d.node().getBBox();r+=l.height}s+=r,d.attr("x",i+t().state.noteMargin),d.attr("y",o+s+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:s}},j=(e,i)=>{i.attr("class","state-note");const o=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:s,textHeight:g}=Z(e,0,0,c);return o.attr("height",g+2*t().state.noteMargin),o.attr("width",s+t().state.noteMargin*2),o},L=function(e,i){const o=i.id,c={id:o,label:i.id,width:0,height:0},s=e.append("g").attr("id",o).attr("class","stateGroup");i.type==="start"&&O(s),i.type==="end"&&_(s),(i.type==="fork"||i.type==="join")&&q(s,i),i.type==="note"&&j(i.note.text,s),i.type==="divider"&&X(s),i.type==="default"&&i.descriptions.length===0&&J(s,i),i.type==="default"&&i.descriptions.length>0&&Y(s,i);const g=s.node().getBBox();return c.width=g.width+2*t().state.padding,c.height=g.height+2*t().state.padding,c};let G=0;const K=function(e,i,o){const c=function(r){switch(r){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}};i.points=i.points.filter(r=>!Number.isNaN(r.y));const s=i.points,g=$().x(function(r){return r.x}).y(function(r){return r.y}).curve(v),p=e.append("path").attr("d",g(s)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),o.title!==void 0){const r=e.append("g").attr("class","stateLabel"),{x:y,y:x}=U.calcLabelPosition(i.points),d=T.getRows(o.title);let l=0;const m=[];let w=0,E=0;for(let u=0;u<=d.length;u++){const h=r.append("text").attr("text-anchor","middle").text(d[u]).attr("x",y).attr("y",x+l),f=h.node().getBBox();w=Math.max(w,f.width),E=Math.min(E,f.x),b.info(f.x,y,x+l),l===0&&(l=h.node().getBBox().height,b.info("Title height",l,x)),m.push(h)}let k=l*d.length;if(d.length>1){const u=(d.length-1)*l*.5;m.forEach((h,f)=>h.attr("y",x+f*l-u)),k=l*d.length}const n=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",y-w/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",w+t().state.padding).attr("height",k+t().state.padding),b.info(n)}G++};let B;const z={},Q=function(){},V=function(e){e.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")},D=function(e,i,o,c){B=t().state;const s=t().securityLevel;let g;s==="sandbox"&&(g=H("#i"+i));const p=s==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=s==="sandbox"?g.nodes()[0].contentDocument:document;b.debug("Rendering diagram "+e);const r=p.select(`[id='${i}']`);V(r);const y=c.db.getRootDoc();A(y,r,void 0,!1,p,a,c);const x=B.padding,d=r.node().getBBox(),l=d.width+x*2,m=d.height+x*2,w=l*1.75;R(r,m,w,B.useMaxWidth),r.attr("viewBox",`${d.x-B.padding} ${d.y-B.padding} `+l+" "+m)},tt=e=>e?e.length*B.fontSizeFactor:1,A=(e,i,o,c,s,g,p)=>{const a=new C({compound:!0,multigraph:!0});let r,y=!0;for(r=0;r{const f=h.parentElement;let S=0,M=0;f&&(f.parentElement&&(S=f.parentElement.getBBox().width),M=parseInt(f.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",S-M-8)})):b.debug("No Node "+n+": "+JSON.stringify(a.node(n)))});let E=w.getBBox();a.edges().forEach(function(n){n!==void 0&&a.edge(n)!==void 0&&(b.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(a.edge(n))),K(i,a.edge(n),a.edge(n).relation))}),E=w.getBBox();const k={id:o||"root",label:o||"root",width:0,height:0};return k.width=E.width+2*B.padding,k.height=E.height+2*B.padding,b.debug("Doc rendered",k,a),k},et={setConf:Q,draw:D},dt={parser:P,db:N,renderer:et,styles:W,init:e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,N.clear()}};export{dt as diagram}; diff --git a/assets/stateDiagram-v2-2b26beab-78fc96ed.js b/assets/stateDiagram-v2-2b26beab-4af09cbf.js similarity index 93% rename from assets/stateDiagram-v2-2b26beab-78fc96ed.js rename to assets/stateDiagram-v2-2b26beab-4af09cbf.js index fdf11b1..bb2bd11 100644 --- a/assets/stateDiagram-v2-2b26beab-78fc96ed.js +++ b/assets/stateDiagram-v2-2b26beab-4af09cbf.js @@ -1 +1 @@ -import{p as J,d as B,s as Q,D as H,a as X,S as Z,b as F,c as I}from"./styles-9c745c82-7bbab345.js";import{G as tt}from"./layout-fa84e821.js";import{l as E,c as g,h as x,z as et,i as ot,j as w}from"./index-b371ab76.js";import{r as st}from"./index-2c4b9a3b-7c73707d.js";import"./edges-f2ad444c-795ea1c8.js";import"./createText-62fc7601-6b649b67.js";import"./line-63c0ea4d.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const h="rect",C="rectWithTitle",nt="start",ct="end",it="divider",rt="roundedWithTitle",lt="note",at="noteGroup",_="statediagram",dt="state",Et=`${_}-${dt}`,U="transition",St="note",Tt="note-edge",pt=`${U} ${Tt}`,_t=`${_}-${St}`,ut="cluster",Dt=`${_}-${ut}`,bt="cluster-alt",ft=`${_}-${bt}`,V="parent",Y="note",At="state",N="----",ht=`${N}${Y}`,M=`${N}${V}`,z="fill:none",W="fill: #333",m="c",j="text",q="normal";let y={},d=0;const yt=function(t){const n=Object.keys(t);for(const e of n)t[e]},gt=function(t,n){return n.db.extract(n.db.getRootDocV2()),n.db.getClasses()};function $t(t){return t==null?"":t.classes?t.classes.join(" "):""}function R(t="",n=0,e="",c=N){const i=e!==null&&e.length>0?`${c}${e}`:"";return`${At}-${t}${i}-${n}`}const A=(t,n,e,c,i,r)=>{const o=e.id,u=$t(c[o]);if(o!=="root"){let T=h;e.start===!0&&(T=nt),e.start===!1&&(T=ct),e.type!==H&&(T=e.type),y[o]||(y[o]={id:o,shape:T,description:w.sanitizeText(o,g()),classes:`${u} ${Et}`});const s=y[o];e.description&&(Array.isArray(s.description)?(s.shape=C,s.description.push(e.description)):s.description.length>0?(s.shape=C,s.description===o?s.description=[e.description]:s.description=[s.description,e.description]):(s.shape=h,s.description=e.description),s.description=w.sanitizeTextOrArray(s.description,g())),s.description.length===1&&s.shape===C&&(s.shape=h),!s.type&&e.doc&&(E.info("Setting cluster for ",o,G(e)),s.type="group",s.dir=G(e),s.shape=e.type===X?it:rt,s.classes=s.classes+" "+Dt+" "+(r?ft:""));const p={labelStyle:"",shape:s.shape,labelText:s.description,classes:s.classes,style:"",id:o,dir:s.dir,domId:R(o,d),type:s.type,padding:15};if(p.centerLabel=!0,e.note){const l={labelStyle:"",shape:lt,labelText:e.note.text,classes:_t,style:"",id:o+ht+"-"+d,domId:R(o,d,Y),type:s.type,padding:15},a={labelStyle:"",shape:at,labelText:e.note.text,classes:s.classes,style:"",id:o+M,domId:R(o,d,V),type:"group",padding:0};d++;const D=o+M;t.setNode(D,a),t.setNode(l.id,l),t.setNode(o,p),t.setParent(o,D),t.setParent(l.id,D);let S=o,b=l.id;e.note.position==="left of"&&(S=l.id,b=o),t.setEdge(S,b,{arrowhead:"none",arrowType:"",style:z,labelStyle:"",classes:pt,arrowheadStyle:W,labelpos:m,labelType:j,thickness:q})}else t.setNode(o,p)}n&&n.id!=="root"&&(E.trace("Setting node ",o," to be child of its parent ",n.id),t.setParent(o,n.id)),e.doc&&(E.trace("Adding nodes children "),xt(t,e,e.doc,c,i,!r))},xt=(t,n,e,c,i,r)=>{E.trace("items",e),e.forEach(o=>{switch(o.stmt){case F:A(t,n,o,c,i,r);break;case H:A(t,n,o,c,i,r);break;case Z:{A(t,n,o.state1,c,i,r),A(t,n,o.state2,c,i,r);const u={id:"edge"+d,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:z,labelStyle:"",label:w.sanitizeText(o.description,g()),arrowheadStyle:W,labelpos:m,labelType:j,thickness:q,classes:U};t.setEdge(o.state1.id,o.state2.id,u,d),d++}break}})},G=(t,n=I)=>{let e=n;if(t.doc)for(let c=0;c{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,B.clear()}};export{Mt as diagram}; +import{p as J,d as B,s as Q,D as H,a as X,S as Z,b as F,c as I}from"./styles-9c745c82-5d32dd25.js";import{G as tt}from"./layout-608b290b.js";import{l as E,c as g,h as x,z as et,i as ot,j as w}from"./index-e0ff10fa.js";import{r as st}from"./index-2c4b9a3b-bbd91aa2.js";import"./edges-f2ad444c-7df4797c.js";import"./createText-62fc7601-0312dc07.js";import"./line-434e5c73.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const h="rect",C="rectWithTitle",nt="start",ct="end",it="divider",rt="roundedWithTitle",lt="note",at="noteGroup",_="statediagram",dt="state",Et=`${_}-${dt}`,U="transition",St="note",Tt="note-edge",pt=`${U} ${Tt}`,_t=`${_}-${St}`,ut="cluster",Dt=`${_}-${ut}`,bt="cluster-alt",ft=`${_}-${bt}`,V="parent",Y="note",At="state",N="----",ht=`${N}${Y}`,M=`${N}${V}`,z="fill:none",W="fill: #333",m="c",j="text",q="normal";let y={},d=0;const yt=function(t){const n=Object.keys(t);for(const e of n)t[e]},gt=function(t,n){return n.db.extract(n.db.getRootDocV2()),n.db.getClasses()};function $t(t){return t==null?"":t.classes?t.classes.join(" "):""}function R(t="",n=0,e="",c=N){const i=e!==null&&e.length>0?`${c}${e}`:"";return`${At}-${t}${i}-${n}`}const A=(t,n,e,c,i,r)=>{const o=e.id,u=$t(c[o]);if(o!=="root"){let T=h;e.start===!0&&(T=nt),e.start===!1&&(T=ct),e.type!==H&&(T=e.type),y[o]||(y[o]={id:o,shape:T,description:w.sanitizeText(o,g()),classes:`${u} ${Et}`});const s=y[o];e.description&&(Array.isArray(s.description)?(s.shape=C,s.description.push(e.description)):s.description.length>0?(s.shape=C,s.description===o?s.description=[e.description]:s.description=[s.description,e.description]):(s.shape=h,s.description=e.description),s.description=w.sanitizeTextOrArray(s.description,g())),s.description.length===1&&s.shape===C&&(s.shape=h),!s.type&&e.doc&&(E.info("Setting cluster for ",o,G(e)),s.type="group",s.dir=G(e),s.shape=e.type===X?it:rt,s.classes=s.classes+" "+Dt+" "+(r?ft:""));const p={labelStyle:"",shape:s.shape,labelText:s.description,classes:s.classes,style:"",id:o,dir:s.dir,domId:R(o,d),type:s.type,padding:15};if(p.centerLabel=!0,e.note){const l={labelStyle:"",shape:lt,labelText:e.note.text,classes:_t,style:"",id:o+ht+"-"+d,domId:R(o,d,Y),type:s.type,padding:15},a={labelStyle:"",shape:at,labelText:e.note.text,classes:s.classes,style:"",id:o+M,domId:R(o,d,V),type:"group",padding:0};d++;const D=o+M;t.setNode(D,a),t.setNode(l.id,l),t.setNode(o,p),t.setParent(o,D),t.setParent(l.id,D);let S=o,b=l.id;e.note.position==="left of"&&(S=l.id,b=o),t.setEdge(S,b,{arrowhead:"none",arrowType:"",style:z,labelStyle:"",classes:pt,arrowheadStyle:W,labelpos:m,labelType:j,thickness:q})}else t.setNode(o,p)}n&&n.id!=="root"&&(E.trace("Setting node ",o," to be child of its parent ",n.id),t.setParent(o,n.id)),e.doc&&(E.trace("Adding nodes children "),xt(t,e,e.doc,c,i,!r))},xt=(t,n,e,c,i,r)=>{E.trace("items",e),e.forEach(o=>{switch(o.stmt){case F:A(t,n,o,c,i,r);break;case H:A(t,n,o,c,i,r);break;case Z:{A(t,n,o.state1,c,i,r),A(t,n,o.state2,c,i,r);const u={id:"edge"+d,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:z,labelStyle:"",label:w.sanitizeText(o.description,g()),arrowheadStyle:W,labelpos:m,labelType:j,thickness:q,classes:U};t.setEdge(o.state1.id,o.state2.id,u,d),d++}break}})},G=(t,n=I)=>{let e=n;if(t.doc)for(let c=0;c{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,B.clear()}};export{Mt as diagram}; diff --git a/assets/styles-080da4f6-2a42e0c3.js b/assets/styles-080da4f6-3483b67d.js similarity index 98% rename from assets/styles-080da4f6-2a42e0c3.js rename to assets/styles-080da4f6-3483b67d.js index f19168f..d1f25d4 100644 --- a/assets/styles-080da4f6-2a42e0c3.js +++ b/assets/styles-080da4f6-3483b67d.js @@ -1,4 +1,4 @@ -import{G as V}from"./layout-fa84e821.js";import{S as D,u as M,v as R,_ as F,C as j,x as U,y as H,o as A,l as y,p as W,c as C,j as z,q as $,n as E,h as _,z as X,r as J,A as K}from"./index-b371ab76.js";import{r as Q}from"./index-2c4b9a3b-7c73707d.js";function Y(e){return typeof e=="string"?new D([document.querySelectorAll(e)],[document.documentElement]):new D([R(e)],M)}const Z=(e,l)=>F.lang.round(j.parse(e)[l]),O=Z;function be(e,l){return!!e.children(l).length}function fe(e){return L(e.v)+":"+L(e.w)+":"+L(e.name)}var ee=/:/g;function L(e){return e?String(e).replace(ee,"\\:"):""}function te(e,l){l&&e.attr("style",l)}function ue(e,l,c){l&&e.attr("class",l).attr("class",c+" "+e.attr("class"))}function we(e,l){var c=l.graph();if(U(c)){var a=c.transition;if(H(a))return a(e)}return e}function re(e,l){var c=e.append("foreignObject").attr("width","100000"),a=c.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var i=l.label;switch(typeof i){case"function":a.insert(i);break;case"object":a.insert(function(){return i});break;default:a.html(i)}te(a,l.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var d=a.node().getBoundingClientRect();return c.attr("width",d.width).attr("height",d.height),c}const G={},le=function(e){const l=Object.keys(e);for(const c of l)G[c]=e[c]},q=function(e,l,c,a,i,d){const u=a.select(`[id="${c}"]`);Object.keys(e).forEach(function(p){const r=e[p];let g="default";r.classes.length>0&&(g=r.classes.join(" ")),g=g+" flowchart-label";const w=A(r.styles);let t=r.text!==void 0?r.text:r.id,s;if(y.info("vertex",r,r.labelType),r.labelType==="markdown")y.info("vertex",r,r.labelType);else if(W(C().flowchart.htmlLabels)){const m={label:t.replace(/fa[blrs]?:fa-[\w-]+/g,k=>``)};s=re(u,m).node(),s.parentNode.removeChild(s)}else{const m=i.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("style",w.labelStyle.replace("color:","fill:"));const k=t.split(z.lineBreakRegex);for(const T of k){const v=i.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),v.setAttribute("dy","1em"),v.setAttribute("x","1"),v.textContent=T,m.appendChild(v)}s=m}let b=0,o="";switch(r.type){case"round":b=5,o="rect";break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"odd_right":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}l.setNode(r.id,{labelStyle:w.labelStyle,shape:o,labelText:t,labelType:r.labelType,rx:b,ry:b,class:g,style:w.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:d.db.getTooltip(r.id)||"",domId:d.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:r.type==="group"?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:C().flowchart.padding}),y.info("setNode",{labelStyle:w.labelStyle,labelType:r.labelType,shape:o,labelText:t,rx:b,ry:b,class:g,style:w.style,id:r.id,domId:d.db.lookUpDomId(r.id),width:r.type==="group"?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:C().flowchart.padding})})},P=function(e,l,c){y.info("abc78 edges = ",e);let a=0,i={},d,u;if(e.defaultStyle!==void 0){const n=A(e.defaultStyle);d=n.style,u=n.labelStyle}e.forEach(function(n){a++;const p="L-"+n.start+"-"+n.end;i[p]===void 0?(i[p]=0,y.info("abc78 new entry",p,i[p])):(i[p]++,y.info("abc78 new entry",p,i[p]));let r=p+"-"+i[p];y.info("abc78 new link id to be used is",p,r,i[p]);const g="LS-"+n.start,w="LE-"+n.end,t={style:"",labelStyle:""};switch(t.minlen=n.length||1,n.type==="arrow_open"?t.arrowhead="none":t.arrowhead="normal",t.arrowTypeStart="arrow_open",t.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":t.arrowTypeStart="arrow_cross";case"arrow_cross":t.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":t.arrowTypeStart="arrow_point";case"arrow_point":t.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":t.arrowTypeStart="arrow_circle";case"arrow_circle":t.arrowTypeEnd="arrow_circle";break}let s="",b="";switch(n.stroke){case"normal":s="fill:none;",d!==void 0&&(s=d),u!==void 0&&(b=u),t.thickness="normal",t.pattern="solid";break;case"dotted":t.thickness="normal",t.pattern="dotted",t.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":t.thickness="thick",t.pattern="solid",t.style="stroke-width: 3.5px;fill:none;";break;case"invisible":t.thickness="invisible",t.pattern="solid",t.style="stroke-width: 0;fill:none;";break}if(n.style!==void 0){const o=A(n.style);s=o.style,b=o.labelStyle}t.style=t.style+=s,t.labelStyle=t.labelStyle+=b,n.interpolate!==void 0?t.curve=$(n.interpolate,E):e.defaultInterpolate!==void 0?t.curve=$(e.defaultInterpolate,E):t.curve=$(G.curve,E),n.text===void 0?n.style!==void 0&&(t.arrowheadStyle="fill: #333"):(t.arrowheadStyle="fill: #333",t.labelpos="c"),t.labelType=n.labelType,t.label=n.text.replace(z.lineBreakRegex,` +import{G as V}from"./layout-608b290b.js";import{S as D,u as M,v as R,_ as F,C as j,x as U,y as H,o as A,l as y,p as W,c as C,j as z,q as $,n as E,h as _,z as X,r as J,A as K}from"./index-e0ff10fa.js";import{r as Q}from"./index-2c4b9a3b-bbd91aa2.js";function Y(e){return typeof e=="string"?new D([document.querySelectorAll(e)],[document.documentElement]):new D([R(e)],M)}const Z=(e,l)=>F.lang.round(j.parse(e)[l]),O=Z;function be(e,l){return!!e.children(l).length}function fe(e){return L(e.v)+":"+L(e.w)+":"+L(e.name)}var ee=/:/g;function L(e){return e?String(e).replace(ee,"\\:"):""}function te(e,l){l&&e.attr("style",l)}function ue(e,l,c){l&&e.attr("class",l).attr("class",c+" "+e.attr("class"))}function we(e,l){var c=l.graph();if(U(c)){var a=c.transition;if(H(a))return a(e)}return e}function re(e,l){var c=e.append("foreignObject").attr("width","100000"),a=c.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var i=l.label;switch(typeof i){case"function":a.insert(i);break;case"object":a.insert(function(){return i});break;default:a.html(i)}te(a,l.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var d=a.node().getBoundingClientRect();return c.attr("width",d.width).attr("height",d.height),c}const G={},le=function(e){const l=Object.keys(e);for(const c of l)G[c]=e[c]},q=function(e,l,c,a,i,d){const u=a.select(`[id="${c}"]`);Object.keys(e).forEach(function(p){const r=e[p];let g="default";r.classes.length>0&&(g=r.classes.join(" ")),g=g+" flowchart-label";const w=A(r.styles);let t=r.text!==void 0?r.text:r.id,s;if(y.info("vertex",r,r.labelType),r.labelType==="markdown")y.info("vertex",r,r.labelType);else if(W(C().flowchart.htmlLabels)){const m={label:t.replace(/fa[blrs]?:fa-[\w-]+/g,k=>``)};s=re(u,m).node(),s.parentNode.removeChild(s)}else{const m=i.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("style",w.labelStyle.replace("color:","fill:"));const k=t.split(z.lineBreakRegex);for(const T of k){const v=i.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),v.setAttribute("dy","1em"),v.setAttribute("x","1"),v.textContent=T,m.appendChild(v)}s=m}let b=0,o="";switch(r.type){case"round":b=5,o="rect";break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"odd_right":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}l.setNode(r.id,{labelStyle:w.labelStyle,shape:o,labelText:t,labelType:r.labelType,rx:b,ry:b,class:g,style:w.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:d.db.getTooltip(r.id)||"",domId:d.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:r.type==="group"?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:C().flowchart.padding}),y.info("setNode",{labelStyle:w.labelStyle,labelType:r.labelType,shape:o,labelText:t,rx:b,ry:b,class:g,style:w.style,id:r.id,domId:d.db.lookUpDomId(r.id),width:r.type==="group"?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:C().flowchart.padding})})},P=function(e,l,c){y.info("abc78 edges = ",e);let a=0,i={},d,u;if(e.defaultStyle!==void 0){const n=A(e.defaultStyle);d=n.style,u=n.labelStyle}e.forEach(function(n){a++;const p="L-"+n.start+"-"+n.end;i[p]===void 0?(i[p]=0,y.info("abc78 new entry",p,i[p])):(i[p]++,y.info("abc78 new entry",p,i[p]));let r=p+"-"+i[p];y.info("abc78 new link id to be used is",p,r,i[p]);const g="LS-"+n.start,w="LE-"+n.end,t={style:"",labelStyle:""};switch(t.minlen=n.length||1,n.type==="arrow_open"?t.arrowhead="none":t.arrowhead="normal",t.arrowTypeStart="arrow_open",t.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":t.arrowTypeStart="arrow_cross";case"arrow_cross":t.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":t.arrowTypeStart="arrow_point";case"arrow_point":t.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":t.arrowTypeStart="arrow_circle";case"arrow_circle":t.arrowTypeEnd="arrow_circle";break}let s="",b="";switch(n.stroke){case"normal":s="fill:none;",d!==void 0&&(s=d),u!==void 0&&(b=u),t.thickness="normal",t.pattern="solid";break;case"dotted":t.thickness="normal",t.pattern="dotted",t.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":t.thickness="thick",t.pattern="solid",t.style="stroke-width: 3.5px;fill:none;";break;case"invisible":t.thickness="invisible",t.pattern="solid",t.style="stroke-width: 0;fill:none;";break}if(n.style!==void 0){const o=A(n.style);s=o.style,b=o.labelStyle}t.style=t.style+=s,t.labelStyle=t.labelStyle+=b,n.interpolate!==void 0?t.curve=$(n.interpolate,E):e.defaultInterpolate!==void 0?t.curve=$(e.defaultInterpolate,E):t.curve=$(G.curve,E),n.text===void 0?n.style!==void 0&&(t.arrowheadStyle="fill: #333"):(t.arrowheadStyle="fill: #333",t.labelpos="c"),t.labelType=n.labelType,t.label=n.text.replace(z.lineBreakRegex,` `),n.style===void 0&&(t.style=t.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),t.labelStyle=t.labelStyle.replace("color:","fill:"),t.id=r,t.classes="flowchart-link "+g+" "+w,l.setEdge(n.start,n.end,t,a)})},ae=function(e,l){return l.db.getClasses()},oe=async function(e,l,c,a){y.info("Drawing flowchart");let i=a.db.getDirection();i===void 0&&(i="TD");const{securityLevel:d,flowchart:u}=C(),n=u.nodeSpacing||50,p=u.rankSpacing||50;let r;d==="sandbox"&&(r=_("#i"+l));const g=d==="sandbox"?_(r.nodes()[0].contentDocument.body):_("body"),w=d==="sandbox"?r.nodes()[0].contentDocument:document,t=new V({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:n,ranksep:p,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let s;const b=a.db.getSubGraphs();y.info("Subgraphs - ",b);for(let f=b.length-1;f>=0;f--)s=b[f],y.info("Subgraph - ",s),a.db.addVertex(s.id,{text:s.title,type:s.labelType},"group",void 0,s.classes,s.dir);const o=a.db.getVertices(),m=a.db.getEdges();y.info("Edges",m);let k=0;for(k=b.length-1;k>=0;k--){s=b[k],Y("cluster").append("text");for(let f=0;f{const c=O,a=c(e,"r"),i=c(e,"g"),d=c(e,"b");return K(a,i,d,l)},se=e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; diff --git a/assets/styles-3dcbcfbf-02afae50.js b/assets/styles-3dcbcfbf-c6ba177b.js similarity index 99% rename from assets/styles-3dcbcfbf-02afae50.js rename to assets/styles-3dcbcfbf-c6ba177b.js index d81fa5a..1baf62e 100644 --- a/assets/styles-3dcbcfbf-02afae50.js +++ b/assets/styles-3dcbcfbf-c6ba177b.js @@ -1,4 +1,4 @@ -import{s as Xe,g as We,a as qe,b as He,c as F,B as Je,D as Ze,j as v,E as $e,l as et,z as Pe,h as U,d as tt,G as ye}from"./index-b371ab76.js";var De=function(){var e=function(L,u,a,o){for(a=a||{},o=L.length;o--;a[L[o]]=u);return a},n=[1,16],r=[1,17],h=[1,18],l=[1,37],A=[1,38],g=[1,24],D=[1,22],B=[1,23],_=[1,29],ne=[1,30],ue=[1,31],re=[1,32],ae=[1,33],le=[1,34],ce=[1,25],oe=[1,26],he=[1,27],Ae=[1,28],d=[1,42],E=[1,39],C=[1,40],m=[1,41],k=[1,43],pe=[1,9],c=[1,8,9],Y=[1,54],K=[1,55],j=[1,56],Q=[1,57],X=[1,58],fe=[1,59],de=[1,60],W=[1,8,9,38],Ne=[1,71],V=[1,8,9,12,13,21,36,38,41,58,59,60,61,62,63,64,69,71],q=[1,8,9,12,13,19,21,36,38,41,45,58,59,60,61,62,63,64,69,71,84,86,87,88,89],H=[13,84,86,87,88,89],G=[13,63,64,84,86,87,88,89],ve=[13,58,59,60,61,62,84,86,87,88,89],Ee=[1,90],Ce=[1,8,9,36,38,41],J=[1,8,9,21],me={trace:function(){},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,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,cssClassStatement:27,noteStatement:28,direction:29,acc_title:30,acc_title_value:31,acc_descr:32,acc_descr_value:33,acc_descr_multiline_value:34,namespaceIdentifier:35,STRUCT_START:36,classStatements:37,STRUCT_STOP:38,NAMESPACE:39,classIdentifier:40,STYLE_SEPARATOR:41,members:42,CLASS:43,ANNOTATION_START:44,ANNOTATION_END:45,MEMBER:46,SEPARATOR:47,relation:48,NOTE_FOR:49,noteText:50,NOTE:51,direction_tb:52,direction_bt:53,direction_rl:54,direction_lr:55,relationType:56,lineType:57,AGGREGATION:58,EXTENSION:59,COMPOSITION:60,DEPENDENCY:61,LOLLIPOP:62,LINE:63,DOTTED_LINE:64,CALLBACK:65,LINK:66,LINK_TARGET:67,CLICK:68,CALLBACK_NAME:69,CALLBACK_ARGS:70,HREF:71,CSSCLASS:72,commentToken:73,textToken:74,graphCodeTokens:75,textNoTagsToken:76,TAGSTART:77,TAGEND:78,"==":79,"--":80,PCT:81,DEFAULT:82,SPACE:83,MINUS:84,keywords:85,UNICODE_TEXT:86,NUM:87,ALPHA:88,BQUOTE_STR:89,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",30:"acc_title",31:"acc_title_value",32:"acc_descr",33:"acc_descr_value",34:"acc_descr_multiline_value",36:"STRUCT_START",38:"STRUCT_STOP",39:"NAMESPACE",41:"STYLE_SEPARATOR",43:"CLASS",44:"ANNOTATION_START",45:"ANNOTATION_END",46:"MEMBER",47:"SEPARATOR",49:"NOTE_FOR",51:"NOTE",52:"direction_tb",53:"direction_bt",54:"direction_rl",55:"direction_lr",58:"AGGREGATION",59:"EXTENSION",60:"COMPOSITION",61:"DEPENDENCY",62:"LOLLIPOP",63:"LINE",64:"DOTTED_LINE",65:"CALLBACK",66:"LINK",67:"LINK_TARGET",68:"CLICK",69:"CALLBACK_NAME",70:"CALLBACK_ARGS",71:"HREF",72:"CSSCLASS",75:"graphCodeTokens",77:"TAGSTART",78:"TAGEND",79:"==",80:"--",81:"PCT",82:"DEFAULT",83:"SPACE",84:"MINUS",85:"keywords",86:"UNICODE_TEXT",87:"NUM",88:"ALPHA",89:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[35,2],[37,1],[37,2],[37,3],[23,1],[23,3],[23,4],[23,6],[40,2],[40,3],[25,4],[42,1],[42,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[28,3],[28,2],[29,1],[29,1],[29,1],[29,1],[48,3],[48,2],[48,2],[48,1],[56,1],[56,1],[56,1],[56,1],[56,1],[57,1],[57,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[73,1],[73,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[76,1],[76,1],[76,1],[76,1],[16,1],[16,1],[16,1],[16,1],[18,1],[50,1]],performAction:function(u,a,o,i,p,t,M){var s=t.length-1;switch(p){case 8:this.$=t[s-1];break;case 9:case 11:case 12:this.$=t[s];break;case 10:case 13:this.$=t[s-1]+t[s];break;case 14:case 15:this.$=t[s-1]+"~"+t[s]+"~";break;case 16:i.addRelation(t[s]);break;case 17:t[s-1].title=i.cleanupLabel(t[s]),i.addRelation(t[s-1]);break;case 26:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 27:case 28:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 29:i.addClassesToNamespace(t[s-3],t[s-1]);break;case 30:i.addClassesToNamespace(t[s-4],t[s-1]);break;case 31:this.$=t[s],i.addNamespace(t[s]);break;case 32:this.$=[t[s]];break;case 33:this.$=[t[s-1]];break;case 34:t[s].unshift(t[s-2]),this.$=t[s];break;case 36:i.setCssClass(t[s-2],t[s]);break;case 37:i.addMembers(t[s-3],t[s-1]);break;case 38:i.setCssClass(t[s-5],t[s-3]),i.addMembers(t[s-5],t[s-1]);break;case 39:this.$=t[s],i.addClass(t[s]);break;case 40:this.$=t[s-1],i.addClass(t[s-1]),i.setClassLabel(t[s-1],t[s]);break;case 41:i.addAnnotation(t[s],t[s-2]);break;case 42:this.$=[t[s]];break;case 43:t[s].push(t[s-1]),this.$=t[s];break;case 44:break;case 45:i.addMember(t[s-1],i.cleanupLabel(t[s]));break;case 46:break;case 47:break;case 48:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 50:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 51:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 52:i.addNote(t[s],t[s-1]);break;case 53:i.addNote(t[s]);break;case 54:i.setDirection("TB");break;case 55:i.setDirection("BT");break;case 56:i.setDirection("RL");break;case 57:i.setDirection("LR");break;case 58:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 59:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 60:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 61:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 62:this.$=i.relationType.AGGREGATION;break;case 63:this.$=i.relationType.EXTENSION;break;case 64:this.$=i.relationType.COMPOSITION;break;case 65:this.$=i.relationType.DEPENDENCY;break;case 66:this.$=i.relationType.LOLLIPOP;break;case 67:this.$=i.lineType.LINE;break;case 68:this.$=i.lineType.DOTTED_LINE;break;case 69:case 75:this.$=t[s-2],i.setClickEvent(t[s-1],t[s]);break;case 70:case 76:this.$=t[s-3],i.setClickEvent(t[s-2],t[s-1]),i.setTooltip(t[s-2],t[s]);break;case 71:this.$=t[s-2],i.setLink(t[s-1],t[s]);break;case 72:this.$=t[s-3],i.setLink(t[s-2],t[s-1],t[s]);break;case 73:this.$=t[s-3],i.setLink(t[s-2],t[s-1]),i.setTooltip(t[s-2],t[s]);break;case 74:this.$=t[s-4],i.setLink(t[s-3],t[s-2],t[s]),i.setTooltip(t[s-3],t[s-1]);break;case 77:this.$=t[s-3],i.setClickEvent(t[s-2],t[s-1],t[s]);break;case 78:this.$=t[s-4],i.setClickEvent(t[s-3],t[s-2],t[s-1]),i.setTooltip(t[s-3],t[s]);break;case 79:this.$=t[s-3],i.setLink(t[s-2],t[s]);break;case 80:this.$=t[s-4],i.setLink(t[s-3],t[s-1],t[s]);break;case 81:this.$=t[s-4],i.setLink(t[s-3],t[s-1]),i.setTooltip(t[s-3],t[s]);break;case 82:this.$=t[s-5],i.setLink(t[s-4],t[s-2],t[s]),i.setTooltip(t[s-4],t[s-1]);break;case 83:i.setCssClass(t[s-1],t[s]);break}},table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:35,17:19,18:36,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:n,32:r,34:h,35:20,39:l,40:21,43:A,44:g,46:D,47:B,49:_,51:ne,52:ue,53:re,54:ae,55:le,65:ce,66:oe,68:he,72:Ae,84:d,86:E,87:C,88:m,89:k},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(pe,[2,5],{8:[1,44]}),{8:[1,45]},e(c,[2,16],{21:[1,46]}),e(c,[2,18]),e(c,[2,19]),e(c,[2,20]),e(c,[2,21]),e(c,[2,22]),e(c,[2,23]),e(c,[2,24]),e(c,[2,25]),{31:[1,47]},{33:[1,48]},e(c,[2,28]),e(c,[2,44],{48:49,56:52,57:53,13:[1,50],21:[1,51],58:Y,59:K,60:j,61:Q,62:X,63:fe,64:de}),{36:[1,61]},e(W,[2,35],{36:[1,63],41:[1,62]}),e(c,[2,46]),e(c,[2,47]),{16:64,84:d,86:E,87:C,88:m},{16:35,17:65,18:36,84:d,86:E,87:C,88:m,89:k},{16:35,17:66,18:36,84:d,86:E,87:C,88:m,89:k},{16:35,17:67,18:36,84:d,86:E,87:C,88:m,89:k},{13:[1,68]},{16:35,17:69,18:36,84:d,86:E,87:C,88:m,89:k},{13:Ne,50:70},e(c,[2,54]),e(c,[2,55]),e(c,[2,56]),e(c,[2,57]),e(V,[2,11],{16:35,18:36,17:72,19:[1,73],84:d,86:E,87:C,88:m,89:k}),e(V,[2,12],{19:[1,74]}),{15:75,16:76,84:d,86:E,87:C,88:m},{16:35,17:77,18:36,84:d,86:E,87:C,88:m,89:k},e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e([1,8,9,12,13,19,21,36,38,41,58,59,60,61,62,63,64,69,71],[2,101]),e(pe,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,17:19,35:20,40:21,16:35,18:36,5:78,30:n,32:r,34:h,39:l,43:A,44:g,46:D,47:B,49:_,51:ne,52:ue,53:re,54:ae,55:le,65:ce,66:oe,68:he,72:Ae,84:d,86:E,87:C,88:m,89:k}),{5:79,10:5,16:35,17:19,18:36,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:n,32:r,34:h,35:20,39:l,40:21,43:A,44:g,46:D,47:B,49:_,51:ne,52:ue,53:re,54:ae,55:le,65:ce,66:oe,68:he,72:Ae,84:d,86:E,87:C,88:m,89:k},e(c,[2,17]),e(c,[2,26]),e(c,[2,27]),{13:[1,81],16:35,17:80,18:36,84:d,86:E,87:C,88:m,89:k},{48:82,56:52,57:53,58:Y,59:K,60:j,61:Q,62:X,63:fe,64:de},e(c,[2,45]),{57:83,63:fe,64:de},e(H,[2,61],{56:84,58:Y,59:K,60:j,61:Q,62:X}),e(G,[2,62]),e(G,[2,63]),e(G,[2,64]),e(G,[2,65]),e(G,[2,66]),e(ve,[2,67]),e(ve,[2,68]),{8:[1,86],23:87,37:85,40:21,43:A},{16:88,84:d,86:E,87:C,88:m},{42:89,46:Ee},{45:[1,91]},{13:[1,92]},{13:[1,93]},{69:[1,94],71:[1,95]},{16:96,84:d,86:E,87:C,88:m},{13:Ne,50:97},e(c,[2,53]),e(c,[2,102]),e(V,[2,13]),e(V,[2,14]),e(V,[2,15]),{36:[2,31]},{15:98,16:76,36:[2,9],84:d,86:E,87:C,88:m},e(Ce,[2,39],{11:99,12:[1,100]}),e(pe,[2,7]),{9:[1,101]},e(J,[2,48]),{16:35,17:102,18:36,84:d,86:E,87:C,88:m,89:k},{13:[1,104],16:35,17:103,18:36,84:d,86:E,87:C,88:m,89:k},e(H,[2,60],{56:105,58:Y,59:K,60:j,61:Q,62:X}),e(H,[2,59]),{38:[1,106]},{23:87,37:107,40:21,43:A},{8:[1,108],38:[2,32]},e(W,[2,36],{36:[1,109]}),{38:[1,110]},{38:[2,42],42:111,46:Ee},{16:35,17:112,18:36,84:d,86:E,87:C,88:m,89:k},e(c,[2,69],{13:[1,113]}),e(c,[2,71],{13:[1,115],67:[1,114]}),e(c,[2,75],{13:[1,116],70:[1,117]}),{13:[1,118]},e(c,[2,83]),e(c,[2,52]),{36:[2,10]},e(Ce,[2,40]),{13:[1,119]},{1:[2,4]},e(J,[2,50]),e(J,[2,49]),{16:35,17:120,18:36,84:d,86:E,87:C,88:m,89:k},e(H,[2,58]),e(c,[2,29]),{38:[1,121]},{23:87,37:122,38:[2,33],40:21,43:A},{42:123,46:Ee},e(W,[2,37]),{38:[2,43]},e(c,[2,41]),e(c,[2,70]),e(c,[2,72]),e(c,[2,73],{67:[1,124]}),e(c,[2,76]),e(c,[2,77],{13:[1,125]}),e(c,[2,79],{13:[1,127],67:[1,126]}),{14:[1,128]},e(J,[2,51]),e(c,[2,30]),{38:[2,34]},{38:[1,129]},e(c,[2,74]),e(c,[2,78]),e(c,[2,80]),e(c,[2,81],{67:[1,130]}),e(Ce,[2,8]),e(W,[2,38]),e(c,[2,82])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],75:[2,31],98:[2,10],101:[2,4],111:[2,43],122:[2,34]},parseError:function(u,a){if(a.recoverable)this.trace(u);else{var o=new Error(u);throw o.hash=a,o}},parse:function(u){var a=this,o=[0],i=[],p=[null],t=[],M=this.table,s="",Z=0,Le=0,Ye=2,xe=1,Ke=t.slice.call(arguments,1),b=Object.create(this.lexer),I={yy:{}};for(var ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ge)&&(I.yy[ge]=this.yy[ge]);b.setInput(u,I.yy),I.yy.lexer=b,I.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var ke=b.yylloc;t.push(ke);var je=b.options&&b.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qe(){var N;return N=i.pop()||b.lex()||xe,typeof N!="number"&&(N instanceof Array&&(i=N,N=i.pop()),N=a.symbols_[N]||N),N}for(var T,O,y,Te,w={},$,S,Ie,ee;;){if(O=o[o.length-1],this.defaultActions[O]?y=this.defaultActions[O]:((T===null||typeof T>"u")&&(T=Qe()),y=M[O]&&M[O][T]),typeof y>"u"||!y.length||!y[0]){var Fe="";ee=[];for($ in M[O])this.terminals_[$]&&$>Ye&&ee.push("'"+this.terminals_[$]+"'");b.showPosition?Fe="Parse error on line "+(Z+1)+`: +import{s as Xe,g as We,a as qe,b as He,c as F,B as Je,D as Ze,j as v,E as $e,l as et,z as Pe,h as U,d as tt,G as ye}from"./index-e0ff10fa.js";var De=function(){var e=function(L,u,a,o){for(a=a||{},o=L.length;o--;a[L[o]]=u);return a},n=[1,16],r=[1,17],h=[1,18],l=[1,37],A=[1,38],g=[1,24],D=[1,22],B=[1,23],_=[1,29],ne=[1,30],ue=[1,31],re=[1,32],ae=[1,33],le=[1,34],ce=[1,25],oe=[1,26],he=[1,27],Ae=[1,28],d=[1,42],E=[1,39],C=[1,40],m=[1,41],k=[1,43],pe=[1,9],c=[1,8,9],Y=[1,54],K=[1,55],j=[1,56],Q=[1,57],X=[1,58],fe=[1,59],de=[1,60],W=[1,8,9,38],Ne=[1,71],V=[1,8,9,12,13,21,36,38,41,58,59,60,61,62,63,64,69,71],q=[1,8,9,12,13,19,21,36,38,41,45,58,59,60,61,62,63,64,69,71,84,86,87,88,89],H=[13,84,86,87,88,89],G=[13,63,64,84,86,87,88,89],ve=[13,58,59,60,61,62,84,86,87,88,89],Ee=[1,90],Ce=[1,8,9,36,38,41],J=[1,8,9,21],me={trace:function(){},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,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,cssClassStatement:27,noteStatement:28,direction:29,acc_title:30,acc_title_value:31,acc_descr:32,acc_descr_value:33,acc_descr_multiline_value:34,namespaceIdentifier:35,STRUCT_START:36,classStatements:37,STRUCT_STOP:38,NAMESPACE:39,classIdentifier:40,STYLE_SEPARATOR:41,members:42,CLASS:43,ANNOTATION_START:44,ANNOTATION_END:45,MEMBER:46,SEPARATOR:47,relation:48,NOTE_FOR:49,noteText:50,NOTE:51,direction_tb:52,direction_bt:53,direction_rl:54,direction_lr:55,relationType:56,lineType:57,AGGREGATION:58,EXTENSION:59,COMPOSITION:60,DEPENDENCY:61,LOLLIPOP:62,LINE:63,DOTTED_LINE:64,CALLBACK:65,LINK:66,LINK_TARGET:67,CLICK:68,CALLBACK_NAME:69,CALLBACK_ARGS:70,HREF:71,CSSCLASS:72,commentToken:73,textToken:74,graphCodeTokens:75,textNoTagsToken:76,TAGSTART:77,TAGEND:78,"==":79,"--":80,PCT:81,DEFAULT:82,SPACE:83,MINUS:84,keywords:85,UNICODE_TEXT:86,NUM:87,ALPHA:88,BQUOTE_STR:89,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",30:"acc_title",31:"acc_title_value",32:"acc_descr",33:"acc_descr_value",34:"acc_descr_multiline_value",36:"STRUCT_START",38:"STRUCT_STOP",39:"NAMESPACE",41:"STYLE_SEPARATOR",43:"CLASS",44:"ANNOTATION_START",45:"ANNOTATION_END",46:"MEMBER",47:"SEPARATOR",49:"NOTE_FOR",51:"NOTE",52:"direction_tb",53:"direction_bt",54:"direction_rl",55:"direction_lr",58:"AGGREGATION",59:"EXTENSION",60:"COMPOSITION",61:"DEPENDENCY",62:"LOLLIPOP",63:"LINE",64:"DOTTED_LINE",65:"CALLBACK",66:"LINK",67:"LINK_TARGET",68:"CLICK",69:"CALLBACK_NAME",70:"CALLBACK_ARGS",71:"HREF",72:"CSSCLASS",75:"graphCodeTokens",77:"TAGSTART",78:"TAGEND",79:"==",80:"--",81:"PCT",82:"DEFAULT",83:"SPACE",84:"MINUS",85:"keywords",86:"UNICODE_TEXT",87:"NUM",88:"ALPHA",89:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[35,2],[37,1],[37,2],[37,3],[23,1],[23,3],[23,4],[23,6],[40,2],[40,3],[25,4],[42,1],[42,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[28,3],[28,2],[29,1],[29,1],[29,1],[29,1],[48,3],[48,2],[48,2],[48,1],[56,1],[56,1],[56,1],[56,1],[56,1],[57,1],[57,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[73,1],[73,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[76,1],[76,1],[76,1],[76,1],[16,1],[16,1],[16,1],[16,1],[18,1],[50,1]],performAction:function(u,a,o,i,p,t,M){var s=t.length-1;switch(p){case 8:this.$=t[s-1];break;case 9:case 11:case 12:this.$=t[s];break;case 10:case 13:this.$=t[s-1]+t[s];break;case 14:case 15:this.$=t[s-1]+"~"+t[s]+"~";break;case 16:i.addRelation(t[s]);break;case 17:t[s-1].title=i.cleanupLabel(t[s]),i.addRelation(t[s-1]);break;case 26:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 27:case 28:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 29:i.addClassesToNamespace(t[s-3],t[s-1]);break;case 30:i.addClassesToNamespace(t[s-4],t[s-1]);break;case 31:this.$=t[s],i.addNamespace(t[s]);break;case 32:this.$=[t[s]];break;case 33:this.$=[t[s-1]];break;case 34:t[s].unshift(t[s-2]),this.$=t[s];break;case 36:i.setCssClass(t[s-2],t[s]);break;case 37:i.addMembers(t[s-3],t[s-1]);break;case 38:i.setCssClass(t[s-5],t[s-3]),i.addMembers(t[s-5],t[s-1]);break;case 39:this.$=t[s],i.addClass(t[s]);break;case 40:this.$=t[s-1],i.addClass(t[s-1]),i.setClassLabel(t[s-1],t[s]);break;case 41:i.addAnnotation(t[s],t[s-2]);break;case 42:this.$=[t[s]];break;case 43:t[s].push(t[s-1]),this.$=t[s];break;case 44:break;case 45:i.addMember(t[s-1],i.cleanupLabel(t[s]));break;case 46:break;case 47:break;case 48:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 50:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 51:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 52:i.addNote(t[s],t[s-1]);break;case 53:i.addNote(t[s]);break;case 54:i.setDirection("TB");break;case 55:i.setDirection("BT");break;case 56:i.setDirection("RL");break;case 57:i.setDirection("LR");break;case 58:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 59:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 60:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 61:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 62:this.$=i.relationType.AGGREGATION;break;case 63:this.$=i.relationType.EXTENSION;break;case 64:this.$=i.relationType.COMPOSITION;break;case 65:this.$=i.relationType.DEPENDENCY;break;case 66:this.$=i.relationType.LOLLIPOP;break;case 67:this.$=i.lineType.LINE;break;case 68:this.$=i.lineType.DOTTED_LINE;break;case 69:case 75:this.$=t[s-2],i.setClickEvent(t[s-1],t[s]);break;case 70:case 76:this.$=t[s-3],i.setClickEvent(t[s-2],t[s-1]),i.setTooltip(t[s-2],t[s]);break;case 71:this.$=t[s-2],i.setLink(t[s-1],t[s]);break;case 72:this.$=t[s-3],i.setLink(t[s-2],t[s-1],t[s]);break;case 73:this.$=t[s-3],i.setLink(t[s-2],t[s-1]),i.setTooltip(t[s-2],t[s]);break;case 74:this.$=t[s-4],i.setLink(t[s-3],t[s-2],t[s]),i.setTooltip(t[s-3],t[s-1]);break;case 77:this.$=t[s-3],i.setClickEvent(t[s-2],t[s-1],t[s]);break;case 78:this.$=t[s-4],i.setClickEvent(t[s-3],t[s-2],t[s-1]),i.setTooltip(t[s-3],t[s]);break;case 79:this.$=t[s-3],i.setLink(t[s-2],t[s]);break;case 80:this.$=t[s-4],i.setLink(t[s-3],t[s-1],t[s]);break;case 81:this.$=t[s-4],i.setLink(t[s-3],t[s-1]),i.setTooltip(t[s-3],t[s]);break;case 82:this.$=t[s-5],i.setLink(t[s-4],t[s-2],t[s]),i.setTooltip(t[s-4],t[s-1]);break;case 83:i.setCssClass(t[s-1],t[s]);break}},table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:35,17:19,18:36,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:n,32:r,34:h,35:20,39:l,40:21,43:A,44:g,46:D,47:B,49:_,51:ne,52:ue,53:re,54:ae,55:le,65:ce,66:oe,68:he,72:Ae,84:d,86:E,87:C,88:m,89:k},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(pe,[2,5],{8:[1,44]}),{8:[1,45]},e(c,[2,16],{21:[1,46]}),e(c,[2,18]),e(c,[2,19]),e(c,[2,20]),e(c,[2,21]),e(c,[2,22]),e(c,[2,23]),e(c,[2,24]),e(c,[2,25]),{31:[1,47]},{33:[1,48]},e(c,[2,28]),e(c,[2,44],{48:49,56:52,57:53,13:[1,50],21:[1,51],58:Y,59:K,60:j,61:Q,62:X,63:fe,64:de}),{36:[1,61]},e(W,[2,35],{36:[1,63],41:[1,62]}),e(c,[2,46]),e(c,[2,47]),{16:64,84:d,86:E,87:C,88:m},{16:35,17:65,18:36,84:d,86:E,87:C,88:m,89:k},{16:35,17:66,18:36,84:d,86:E,87:C,88:m,89:k},{16:35,17:67,18:36,84:d,86:E,87:C,88:m,89:k},{13:[1,68]},{16:35,17:69,18:36,84:d,86:E,87:C,88:m,89:k},{13:Ne,50:70},e(c,[2,54]),e(c,[2,55]),e(c,[2,56]),e(c,[2,57]),e(V,[2,11],{16:35,18:36,17:72,19:[1,73],84:d,86:E,87:C,88:m,89:k}),e(V,[2,12],{19:[1,74]}),{15:75,16:76,84:d,86:E,87:C,88:m},{16:35,17:77,18:36,84:d,86:E,87:C,88:m,89:k},e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e([1,8,9,12,13,19,21,36,38,41,58,59,60,61,62,63,64,69,71],[2,101]),e(pe,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,17:19,35:20,40:21,16:35,18:36,5:78,30:n,32:r,34:h,39:l,43:A,44:g,46:D,47:B,49:_,51:ne,52:ue,53:re,54:ae,55:le,65:ce,66:oe,68:he,72:Ae,84:d,86:E,87:C,88:m,89:k}),{5:79,10:5,16:35,17:19,18:36,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:n,32:r,34:h,35:20,39:l,40:21,43:A,44:g,46:D,47:B,49:_,51:ne,52:ue,53:re,54:ae,55:le,65:ce,66:oe,68:he,72:Ae,84:d,86:E,87:C,88:m,89:k},e(c,[2,17]),e(c,[2,26]),e(c,[2,27]),{13:[1,81],16:35,17:80,18:36,84:d,86:E,87:C,88:m,89:k},{48:82,56:52,57:53,58:Y,59:K,60:j,61:Q,62:X,63:fe,64:de},e(c,[2,45]),{57:83,63:fe,64:de},e(H,[2,61],{56:84,58:Y,59:K,60:j,61:Q,62:X}),e(G,[2,62]),e(G,[2,63]),e(G,[2,64]),e(G,[2,65]),e(G,[2,66]),e(ve,[2,67]),e(ve,[2,68]),{8:[1,86],23:87,37:85,40:21,43:A},{16:88,84:d,86:E,87:C,88:m},{42:89,46:Ee},{45:[1,91]},{13:[1,92]},{13:[1,93]},{69:[1,94],71:[1,95]},{16:96,84:d,86:E,87:C,88:m},{13:Ne,50:97},e(c,[2,53]),e(c,[2,102]),e(V,[2,13]),e(V,[2,14]),e(V,[2,15]),{36:[2,31]},{15:98,16:76,36:[2,9],84:d,86:E,87:C,88:m},e(Ce,[2,39],{11:99,12:[1,100]}),e(pe,[2,7]),{9:[1,101]},e(J,[2,48]),{16:35,17:102,18:36,84:d,86:E,87:C,88:m,89:k},{13:[1,104],16:35,17:103,18:36,84:d,86:E,87:C,88:m,89:k},e(H,[2,60],{56:105,58:Y,59:K,60:j,61:Q,62:X}),e(H,[2,59]),{38:[1,106]},{23:87,37:107,40:21,43:A},{8:[1,108],38:[2,32]},e(W,[2,36],{36:[1,109]}),{38:[1,110]},{38:[2,42],42:111,46:Ee},{16:35,17:112,18:36,84:d,86:E,87:C,88:m,89:k},e(c,[2,69],{13:[1,113]}),e(c,[2,71],{13:[1,115],67:[1,114]}),e(c,[2,75],{13:[1,116],70:[1,117]}),{13:[1,118]},e(c,[2,83]),e(c,[2,52]),{36:[2,10]},e(Ce,[2,40]),{13:[1,119]},{1:[2,4]},e(J,[2,50]),e(J,[2,49]),{16:35,17:120,18:36,84:d,86:E,87:C,88:m,89:k},e(H,[2,58]),e(c,[2,29]),{38:[1,121]},{23:87,37:122,38:[2,33],40:21,43:A},{42:123,46:Ee},e(W,[2,37]),{38:[2,43]},e(c,[2,41]),e(c,[2,70]),e(c,[2,72]),e(c,[2,73],{67:[1,124]}),e(c,[2,76]),e(c,[2,77],{13:[1,125]}),e(c,[2,79],{13:[1,127],67:[1,126]}),{14:[1,128]},e(J,[2,51]),e(c,[2,30]),{38:[2,34]},{38:[1,129]},e(c,[2,74]),e(c,[2,78]),e(c,[2,80]),e(c,[2,81],{67:[1,130]}),e(Ce,[2,8]),e(W,[2,38]),e(c,[2,82])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],75:[2,31],98:[2,10],101:[2,4],111:[2,43],122:[2,34]},parseError:function(u,a){if(a.recoverable)this.trace(u);else{var o=new Error(u);throw o.hash=a,o}},parse:function(u){var a=this,o=[0],i=[],p=[null],t=[],M=this.table,s="",Z=0,Le=0,Ye=2,xe=1,Ke=t.slice.call(arguments,1),b=Object.create(this.lexer),I={yy:{}};for(var ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ge)&&(I.yy[ge]=this.yy[ge]);b.setInput(u,I.yy),I.yy.lexer=b,I.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var ke=b.yylloc;t.push(ke);var je=b.options&&b.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qe(){var N;return N=i.pop()||b.lex()||xe,typeof N!="number"&&(N instanceof Array&&(i=N,N=i.pop()),N=a.symbols_[N]||N),N}for(var T,O,y,Te,w={},$,S,Ie,ee;;){if(O=o[o.length-1],this.defaultActions[O]?y=this.defaultActions[O]:((T===null||typeof T>"u")&&(T=Qe()),y=M[O]&&M[O][T]),typeof y>"u"||!y.length||!y[0]){var Fe="";ee=[];for($ in M[O])this.terminals_[$]&&$>Ye&&ee.push("'"+this.terminals_[$]+"'");b.showPosition?Fe="Parse error on line "+(Z+1)+`: `+b.showPosition()+` Expecting `+ee.join(", ")+", got '"+(this.terminals_[T]||T)+"'":Fe="Parse error on line "+(Z+1)+": Unexpected "+(T==xe?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(Fe,{text:b.match,token:this.terminals_[T]||T,line:b.yylineno,loc:ke,expected:ee})}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+T);switch(y[0]){case 1:o.push(T),p.push(b.yytext),t.push(b.yylloc),o.push(y[1]),T=null,Le=b.yyleng,s=b.yytext,Z=b.yylineno,ke=b.yylloc;break;case 2:if(S=this.productions_[y[1]][1],w.$=p[p.length-S],w._$={first_line:t[t.length-(S||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(S||1)].first_column,last_column:t[t.length-1].last_column},je&&(w._$.range=[t[t.length-(S||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(w,[s,Le,Z,I.yy,y[1],p,t].concat(Ke)),typeof Te<"u")return Te;S&&(o=o.slice(0,-1*S*2),p=p.slice(0,-1*S),t=t.slice(0,-1*S)),o.push(this.productions_[y[1]][0]),p.push(w.$),t.push(w._$),Ie=M[o[o.length-2]][o[o.length-1]],o.push(Ie);break;case 3:return!0}}return!0}},ze=function(){var L={EOF:1,parseError:function(a,o){if(this.yy.parser)this.yy.parser.parseError(a,o);else throw new Error(a)},setInput:function(u,a){return this.yy=a||this.yy||{},this._input=u,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},input:function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var a=u.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},unput:function(u){var a=u.length,o=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;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),o.length-1&&(this.yylineno-=o.length-1);var p=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:o?(o.length===i.length?this.yylloc.first_column:0)+i[i.length-o.length].length-o[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(u){this.unput(this.match.slice(u))},pastInput:function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var u=this.pastInput(),a=new Array(u.length+1).join("-");return u+this.upcomingInput()+` diff --git a/assets/styles-9c745c82-7bbab345.js b/assets/styles-9c745c82-5d32dd25.js similarity index 99% rename from assets/styles-9c745c82-7bbab345.js rename to assets/styles-9c745c82-5d32dd25.js index 685857f..5eebe9a 100644 --- a/assets/styles-9c745c82-7bbab345.js +++ b/assets/styles-9c745c82-5d32dd25.js @@ -1,4 +1,4 @@ -import{c as Y,g as Ut,s as zt,a as Mt,b as Ht,B as Xt,D as Kt,l as D,j as ot,E as Wt,a7 as Jt}from"./index-b371ab76.js";var gt=function(){var t=function(C,r,n,i){for(n=n||{},i=C.length;i--;n[C[i]]=r);return n},s=[1,2],a=[1,3],h=[1,4],f=[2,4],d=[1,9],y=[1,11],k=[1,15],u=[1,16],E=[1,17],T=[1,18],R=[1,30],G=[1,19],j=[1,20],U=[1,21],z=[1,22],M=[1,23],H=[1,25],X=[1,26],K=[1,27],W=[1,28],J=[1,29],q=[1,32],Q=[1,33],Z=[1,34],tt=[1,35],w=[1,31],c=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],et=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],Dt=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],ht={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"-->":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",13:"DESCR",14:"-->",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",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"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,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],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(r,n,i,o,p,e,$){var l=e.length-1;switch(p){case 3:return o.setRootDoc(e[l]),e[l];case 4:this.$=[];break;case 5:e[l]!="nl"&&(e[l-1].push(e[l]),this.$=e[l-1]);break;case 6:case 7:this.$=e[l];break;case 8:this.$="nl";break;case 11:this.$=e[l];break;case 12:const B=e[l-1];B.description=o.trimColon(e[l]),this.$=B;break;case 13:this.$={stmt:"relation",state1:e[l-2],state2:e[l]};break;case 14:const ft=o.trimColon(e[l]);this.$={stmt:"relation",state1:e[l-3],state2:e[l-1],description:ft};break;case 18:this.$={stmt:"state",id:e[l-3],type:"default",description:"",doc:e[l-1]};break;case 19:var v=e[l],O=e[l-2].trim();if(e[l].match(":")){var st=e[l].split(":");v=st[0],O=[O,st[1]]}this.$={stmt:"state",id:v,type:"default",description:O};break;case 20:this.$={stmt:"state",id:e[l-3],type:"default",description:e[l-5],doc:e[l-1]};break;case 21:this.$={stmt:"state",id:e[l],type:"fork"};break;case 22:this.$={stmt:"state",id:e[l],type:"join"};break;case 23:this.$={stmt:"state",id:e[l],type:"choice"};break;case 24:this.$={stmt:"state",id:o.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:e[l-1].trim(),note:{position:e[l-2].trim(),text:e[l].trim()}};break;case 28:this.$=e[l].trim(),o.setAccTitle(this.$);break;case 29:case 30:this.$=e[l].trim(),o.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:e[l-1].trim(),classes:e[l].trim()};break;case 33:this.$={stmt:"applyClass",id:e[l-1].trim(),styleClass:e[l].trim()};break;case 34:o.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:o.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:o.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:o.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:e[l].trim(),type:"default",description:""};break;case 42:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break;case 43:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break}},table:[{3:1,4:s,5:a,6:h},{1:[3]},{3:5,4:s,5:a,6:h},{3:6,4:s,5:a,6:h},t([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],f,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:d,5:y,8:8,9:10,10:12,11:13,12:14,15:k,16:u,18:E,21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,5]),{9:36,10:12,11:13,12:14,15:k,16:u,18:E,21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,7]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11],{13:[1,37],14:[1,38]}),t(c,[2,15]),{17:[1,39]},t(c,[2,17],{19:[1,40]}),{22:[1,41]},t(c,[2,21]),t(c,[2,22]),t(c,[2,23]),t(c,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},t(c,[2,27]),{33:[1,46]},{35:[1,47]},t(c,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},t(et,[2,40],{51:[1,51]}),t(et,[2,41],{51:[1,52]}),t(c,[2,34]),t(c,[2,35]),t(c,[2,36]),t(c,[2,37]),t(c,[2,6]),t(c,[2,12]),{12:53,23:R,50:w},t(c,[2,16]),t(Dt,f,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},t(c,[2,28]),t(c,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},t(c,[2,13],{13:[1,63]}),{4:d,5:y,8:8,9:10,10:12,11:13,12:14,15:k,16:u,18:E,20:[1,64],21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},t(c,[2,31]),t(c,[2,32]),t(c,[2,33]),t(et,[2,42]),t(et,[2,43]),t(c,[2,14]),t(c,[2,18]),t(Dt,f,{7:68}),t(c,[2,25]),t(c,[2,26]),{4:d,5:y,8:8,9:10,10:12,11:13,12:14,15:k,16:u,18:E,20:[1,69],21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(r,n){if(n.recoverable)this.trace(r);else{var i=new Error(r);throw i.hash=n,i}},parse:function(r){var n=this,i=[0],o=[],p=[null],e=[],$=this.table,l="",v=0,O=0,st=2,B=1,ft=e.slice.call(arguments,1),S=Object.create(this.lexer),A={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(A.yy[dt]=this.yy[dt]);S.setInput(r,A.yy),A.yy.lexer=S,A.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var yt=S.yylloc;e.push(yt);var Gt=S.options&&S.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function jt(){var x;return x=o.pop()||S.lex()||B,typeof x!="number"&&(x instanceof Array&&(o=x,x=o.pop()),x=n.symbols_[x]||x),x}for(var _,L,m,pt,N={},it,b,Ct,rt;;){if(L=i[i.length-1],this.defaultActions[L]?m=this.defaultActions[L]:((_===null||typeof _>"u")&&(_=jt()),m=$[L]&&$[L][_]),typeof m>"u"||!m.length||!m[0]){var St="";rt=[];for(it in $[L])this.terminals_[it]&&it>st&&rt.push("'"+this.terminals_[it]+"'");S.showPosition?St="Parse error on line "+(v+1)+`: +import{c as Y,g as Ut,s as zt,a as Mt,b as Ht,B as Xt,D as Kt,l as D,j as ot,E as Wt,a7 as Jt}from"./index-e0ff10fa.js";var gt=function(){var t=function(C,r,n,i){for(n=n||{},i=C.length;i--;n[C[i]]=r);return n},s=[1,2],a=[1,3],h=[1,4],f=[2,4],d=[1,9],y=[1,11],k=[1,15],u=[1,16],E=[1,17],T=[1,18],R=[1,30],G=[1,19],j=[1,20],U=[1,21],z=[1,22],M=[1,23],H=[1,25],X=[1,26],K=[1,27],W=[1,28],J=[1,29],q=[1,32],Q=[1,33],Z=[1,34],tt=[1,35],w=[1,31],c=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],et=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],Dt=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],ht={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"-->":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",13:"DESCR",14:"-->",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",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"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,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],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(r,n,i,o,p,e,$){var l=e.length-1;switch(p){case 3:return o.setRootDoc(e[l]),e[l];case 4:this.$=[];break;case 5:e[l]!="nl"&&(e[l-1].push(e[l]),this.$=e[l-1]);break;case 6:case 7:this.$=e[l];break;case 8:this.$="nl";break;case 11:this.$=e[l];break;case 12:const B=e[l-1];B.description=o.trimColon(e[l]),this.$=B;break;case 13:this.$={stmt:"relation",state1:e[l-2],state2:e[l]};break;case 14:const ft=o.trimColon(e[l]);this.$={stmt:"relation",state1:e[l-3],state2:e[l-1],description:ft};break;case 18:this.$={stmt:"state",id:e[l-3],type:"default",description:"",doc:e[l-1]};break;case 19:var v=e[l],O=e[l-2].trim();if(e[l].match(":")){var st=e[l].split(":");v=st[0],O=[O,st[1]]}this.$={stmt:"state",id:v,type:"default",description:O};break;case 20:this.$={stmt:"state",id:e[l-3],type:"default",description:e[l-5],doc:e[l-1]};break;case 21:this.$={stmt:"state",id:e[l],type:"fork"};break;case 22:this.$={stmt:"state",id:e[l],type:"join"};break;case 23:this.$={stmt:"state",id:e[l],type:"choice"};break;case 24:this.$={stmt:"state",id:o.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:e[l-1].trim(),note:{position:e[l-2].trim(),text:e[l].trim()}};break;case 28:this.$=e[l].trim(),o.setAccTitle(this.$);break;case 29:case 30:this.$=e[l].trim(),o.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:e[l-1].trim(),classes:e[l].trim()};break;case 33:this.$={stmt:"applyClass",id:e[l-1].trim(),styleClass:e[l].trim()};break;case 34:o.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:o.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:o.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:o.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:e[l].trim(),type:"default",description:""};break;case 42:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break;case 43:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break}},table:[{3:1,4:s,5:a,6:h},{1:[3]},{3:5,4:s,5:a,6:h},{3:6,4:s,5:a,6:h},t([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],f,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:d,5:y,8:8,9:10,10:12,11:13,12:14,15:k,16:u,18:E,21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,5]),{9:36,10:12,11:13,12:14,15:k,16:u,18:E,21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,7]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11],{13:[1,37],14:[1,38]}),t(c,[2,15]),{17:[1,39]},t(c,[2,17],{19:[1,40]}),{22:[1,41]},t(c,[2,21]),t(c,[2,22]),t(c,[2,23]),t(c,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},t(c,[2,27]),{33:[1,46]},{35:[1,47]},t(c,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},t(et,[2,40],{51:[1,51]}),t(et,[2,41],{51:[1,52]}),t(c,[2,34]),t(c,[2,35]),t(c,[2,36]),t(c,[2,37]),t(c,[2,6]),t(c,[2,12]),{12:53,23:R,50:w},t(c,[2,16]),t(Dt,f,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},t(c,[2,28]),t(c,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},t(c,[2,13],{13:[1,63]}),{4:d,5:y,8:8,9:10,10:12,11:13,12:14,15:k,16:u,18:E,20:[1,64],21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},t(c,[2,31]),t(c,[2,32]),t(c,[2,33]),t(et,[2,42]),t(et,[2,43]),t(c,[2,14]),t(c,[2,18]),t(Dt,f,{7:68}),t(c,[2,25]),t(c,[2,26]),{4:d,5:y,8:8,9:10,10:12,11:13,12:14,15:k,16:u,18:E,20:[1,69],21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(r,n){if(n.recoverable)this.trace(r);else{var i=new Error(r);throw i.hash=n,i}},parse:function(r){var n=this,i=[0],o=[],p=[null],e=[],$=this.table,l="",v=0,O=0,st=2,B=1,ft=e.slice.call(arguments,1),S=Object.create(this.lexer),A={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(A.yy[dt]=this.yy[dt]);S.setInput(r,A.yy),A.yy.lexer=S,A.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var yt=S.yylloc;e.push(yt);var Gt=S.options&&S.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function jt(){var x;return x=o.pop()||S.lex()||B,typeof x!="number"&&(x instanceof Array&&(o=x,x=o.pop()),x=n.symbols_[x]||x),x}for(var _,L,m,pt,N={},it,b,Ct,rt;;){if(L=i[i.length-1],this.defaultActions[L]?m=this.defaultActions[L]:((_===null||typeof _>"u")&&(_=jt()),m=$[L]&&$[L][_]),typeof m>"u"||!m.length||!m[0]){var St="";rt=[];for(it in $[L])this.terminals_[it]&&it>st&&rt.push("'"+this.terminals_[it]+"'");S.showPosition?St="Parse error on line "+(v+1)+`: `+S.showPosition()+` Expecting `+rt.join(", ")+", got '"+(this.terminals_[_]||_)+"'":St="Parse error on line "+(v+1)+": Unexpected "+(_==B?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(St,{text:S.match,token:this.terminals_[_]||_,line:S.yylineno,loc:yt,expected:rt})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+_);switch(m[0]){case 1:i.push(_),p.push(S.yytext),e.push(S.yylloc),i.push(m[1]),_=null,O=S.yyleng,l=S.yytext,v=S.yylineno,yt=S.yylloc;break;case 2:if(b=this.productions_[m[1]][1],N.$=p[p.length-b],N._$={first_line:e[e.length-(b||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(b||1)].first_column,last_column:e[e.length-1].last_column},Gt&&(N._$.range=[e[e.length-(b||1)].range[0],e[e.length-1].range[1]]),pt=this.performAction.apply(N,[l,O,v,A.yy,m[1],p,e].concat(ft)),typeof pt<"u")return pt;b&&(i=i.slice(0,-1*b*2),p=p.slice(0,-1*b),e=e.slice(0,-1*b)),i.push(this.productions_[m[1]][0]),p.push(N.$),e.push(N._$),Ct=$[i[i.length-2]][i[i.length-1]],i.push(Ct);break;case 3:return!0}}return!0}},Yt=function(){var C={EOF:1,parseError:function(n,i){if(this.yy.parser)this.yy.parser.parseError(n,i);else throw new Error(n)},setInput:function(r,n){return this.yy=n||this.yy||{},this._input=r,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},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var n=r.length,i=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=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 p=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===o.length?this.yylloc.first_column:0)+o[o.length-i.length].length-i[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/assets/svgDrawCommon-4835440b-3fa5d101.js b/assets/svgDrawCommon-4835440b-b3589b66.js similarity index 95% rename from assets/svgDrawCommon-4835440b-3fa5d101.js rename to assets/svgDrawCommon-4835440b-b3589b66.js index e5c2608..eb2e680 100644 --- a/assets/svgDrawCommon-4835440b-3fa5d101.js +++ b/assets/svgDrawCommon-4835440b-b3589b66.js @@ -1 +1 @@ -import{aP as o,m as i}from"./index-b371ab76.js";const c=(s,t)=>{const r=s.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.rx!==void 0&&r.attr("rx",t.rx),t.ry!==void 0&&r.attr("ry",t.ry),t.attrs!==void 0)for(const e in t.attrs)r.attr(e,t.attrs[e]);return t.class!==void 0&&r.attr("class",t.class),r},x=(s,t)=>{const r={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(s,r).lower()},d=(s,t)=>{const r=t.text.replace(o," "),e=s.append("text");e.attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),t.class!==void 0&&e.attr("class",t.class);const n=e.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(r),e},h=(s,t,r,e)=>{const n=s.append("image");n.attr("x",t),n.attr("y",r);const a=i.sanitizeUrl(e);n.attr("xlink:href",a)},y=(s,t,r,e)=>{const n=s.append("use");n.attr("x",t),n.attr("y",r);const a=i.sanitizeUrl(e);n.attr("xlink:href",`#${a}`)},g=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),p=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0});export{x as a,y as b,h as c,c as d,p as e,d as f,g}; +import{aP as o,m as i}from"./index-e0ff10fa.js";const c=(s,t)=>{const r=s.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.rx!==void 0&&r.attr("rx",t.rx),t.ry!==void 0&&r.attr("ry",t.ry),t.attrs!==void 0)for(const e in t.attrs)r.attr(e,t.attrs[e]);return t.class!==void 0&&r.attr("class",t.class),r},x=(s,t)=>{const r={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(s,r).lower()},d=(s,t)=>{const r=t.text.replace(o," "),e=s.append("text");e.attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),t.class!==void 0&&e.attr("class",t.class);const n=e.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(r),e},h=(s,t,r,e)=>{const n=s.append("image");n.attr("x",t),n.attr("y",r);const a=i.sanitizeUrl(e);n.attr("xlink:href",a)},y=(s,t,r,e)=>{const n=s.append("use");n.attr("x",t),n.attr("y",r);const a=i.sanitizeUrl(e);n.attr("xlink:href",`#${a}`)},g=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),p=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0});export{x as a,y as b,h as c,c as d,p as e,d as f,g}; diff --git a/assets/timeline-definition-5b62e21b-2e009dcd.js b/assets/timeline-definition-5b62e21b-fc0193a6.js similarity index 99% rename from assets/timeline-definition-5b62e21b-2e009dcd.js rename to assets/timeline-definition-5b62e21b-fc0193a6.js index ad03ddb..af0aa6d 100644 --- a/assets/timeline-definition-5b62e21b-2e009dcd.js +++ b/assets/timeline-definition-5b62e21b-fc0193a6.js @@ -1,4 +1,4 @@ -import{aS as ft,E as gt,c as mt,l as E,h as G,r as xt,aT as _t,aU as bt,aV as kt}from"./index-b371ab76.js";import{a as D}from"./arc-f4b03a28.js";import"./path-53f90ab3.js";var K=function(){var n=function(g,i,r,c){for(r=r||{},c=g.length;c--;r[g[c]]=i);return r},t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],s=[1,11],h=[1,12],l=[1,13],p=[1,16],y=[1,17],f={trace:function(){},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:function(i,r,c,d,u,o,$){var x=o.length-1;switch(u){case 1:return o[x-1];case 2:this.$=[];break;case 3:o[x-1].push(o[x]),this.$=o[x-1];break;case 4:case 5:this.$=o[x];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(o[x].substr(6)),this.$=o[x].substr(6);break;case 9:this.$=o[x].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[x].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(o[x].substr(8)),this.$=o[x].substr(8);break;case 15:d.addTask(o[x],0,""),this.$=o[x];break;case 16:d.addEvent(o[x].substr(2)),this.$=o[x];break}},table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=r,c}},parse:function(i){var r=this,c=[0],d=[],u=[null],o=[],$=this.table,x="",T=0,W=0,C=2,A=1,B=o.slice.call(arguments,1),k=Object.create(this.lexer),w={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(w.yy[v]=this.yy[v]);k.setInput(i,w.yy),w.yy.lexer=k,w.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var I=k.yylloc;o.push(I);var P=k.options&&k.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(){var M;return M=d.pop()||k.lex()||A,typeof M!="number"&&(M instanceof Array&&(d=M,M=d.pop()),M=r.symbols_[M]||M),M}for(var b,L,S,Z,R={},O,N,Y,j;;){if(L=c[c.length-1],this.defaultActions[L]?S=this.defaultActions[L]:((b===null||typeof b>"u")&&(b=z()),S=$[L]&&$[L][b]),typeof S>"u"||!S.length||!S[0]){var J="";j=[];for(O in $[L])this.terminals_[O]&&O>C&&j.push("'"+this.terminals_[O]+"'");k.showPosition?J="Parse error on line "+(T+1)+`: +import{aS as ft,E as gt,c as mt,l as E,h as G,r as xt,aT as _t,aU as bt,aV as kt}from"./index-e0ff10fa.js";import{a as D}from"./arc-1761d8ed.js";import"./path-53f90ab3.js";var K=function(){var n=function(g,i,r,c){for(r=r||{},c=g.length;c--;r[g[c]]=i);return r},t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],s=[1,11],h=[1,12],l=[1,13],p=[1,16],y=[1,17],f={trace:function(){},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:function(i,r,c,d,u,o,$){var x=o.length-1;switch(u){case 1:return o[x-1];case 2:this.$=[];break;case 3:o[x-1].push(o[x]),this.$=o[x-1];break;case 4:case 5:this.$=o[x];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(o[x].substr(6)),this.$=o[x].substr(6);break;case 9:this.$=o[x].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[x].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(o[x].substr(8)),this.$=o[x].substr(8);break;case 15:d.addTask(o[x],0,""),this.$=o[x];break;case 16:d.addEvent(o[x].substr(2)),this.$=o[x];break}},table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=r,c}},parse:function(i){var r=this,c=[0],d=[],u=[null],o=[],$=this.table,x="",T=0,W=0,C=2,A=1,B=o.slice.call(arguments,1),k=Object.create(this.lexer),w={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(w.yy[v]=this.yy[v]);k.setInput(i,w.yy),w.yy.lexer=k,w.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var I=k.yylloc;o.push(I);var P=k.options&&k.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(){var M;return M=d.pop()||k.lex()||A,typeof M!="number"&&(M instanceof Array&&(d=M,M=d.pop()),M=r.symbols_[M]||M),M}for(var b,L,S,Z,R={},O,N,Y,j;;){if(L=c[c.length-1],this.defaultActions[L]?S=this.defaultActions[L]:((b===null||typeof b>"u")&&(b=z()),S=$[L]&&$[L][b]),typeof S>"u"||!S.length||!S[0]){var J="";j=[];for(O in $[L])this.terminals_[O]&&O>C&&j.push("'"+this.terminals_[O]+"'");k.showPosition?J="Parse error on line "+(T+1)+`: `+k.showPosition()+` Expecting `+j.join(", ")+", got '"+(this.terminals_[b]||b)+"'":J="Parse error on line "+(T+1)+": Unexpected "+(b==A?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(J,{text:k.match,token:this.terminals_[b]||b,line:k.yylineno,loc:I,expected:j})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+b);switch(S[0]){case 1:c.push(b),u.push(k.yytext),o.push(k.yylloc),c.push(S[1]),b=null,W=k.yyleng,x=k.yytext,T=k.yylineno,I=k.yylloc;break;case 2:if(N=this.productions_[S[1]][1],R.$=u[u.length-N],R._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},P&&(R._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),Z=this.performAction.apply(R,[x,W,T,w.yy,S[1],u,o].concat(B)),typeof Z<"u")return Z;N&&(c=c.slice(0,-1*N*2),u=u.slice(0,-1*N),o=o.slice(0,-1*N)),c.push(this.productions_[S[1]][0]),u.push(R.$),o.push(R._$),Y=$[c[c.length-2]][c[c.length-1]],c.push(Y);break;case 3:return!0}}return!0}},_=function(){var g={EOF:1,parseError:function(r,c){if(this.yy.parser)this.yy.parser.parseError(r,c);else throw new Error(r)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,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},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var d=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),c.length-1&&(this.yylineno-=c.length-1);var u=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:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/assets/xychartDiagram-2b33534f-9913587a.js b/assets/xychartDiagram-2b33534f-91f0354e.js similarity index 99% rename from assets/xychartDiagram-2b33534f-9913587a.js rename to assets/xychartDiagram-2b33534f-91f0354e.js index bb894b6..37773fc 100644 --- a/assets/xychartDiagram-2b33534f-9913587a.js +++ b/assets/xychartDiagram-2b33534f-91f0354e.js @@ -1,4 +1,4 @@ -import{Z as zt,$ as ot,X as wt,W as Ft,s as Nt,g as Xt,B as Yt,D as St,a as Ht,b as $t,E as Ut,l as Ct,U as qt,i as jt,d as Gt}from"./index-b371ab76.js";import{c as Qt}from"./createText-62fc7601-6b649b67.js";import{i as Kt}from"./init-77b53fdd.js";import{o as Zt}from"./ordinal-ba9b4969.js";import{l as ft}from"./linear-ccca5fef.js";import{l as pt}from"./line-63c0ea4d.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";function Jt(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s"u"&&(k.yylloc={});var tt=k.yylloc;a.push(tt);var Wt=k.options&&k.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var I;return I=g.pop()||k.lex()||xt,typeof I!="number"&&(I instanceof Array&&(g=I,I=g.pop()),I=l.symbols_[I]||I),I}for(var D,W,v,it,O={},q,M,dt,j;;){if(W=u[u.length-1],this.defaultActions[W]?v=this.defaultActions[W]:((D===null||typeof D>"u")&&(D=Ot()),v=F[W]&&F[W][D]),typeof v>"u"||!v.length||!v[0]){var et="";j=[];for(q in F[W])this.terminals_[q]&&q>Vt&&j.push("'"+this.terminals_[q]+"'");k.showPosition?et="Parse error on line "+(U+1)+`: +import{Z as zt,$ as ot,X as wt,W as Ft,s as Nt,g as Xt,B as Yt,D as St,a as Ht,b as $t,E as Ut,l as Ct,U as qt,i as jt,d as Gt}from"./index-e0ff10fa.js";import{c as Qt}from"./createText-62fc7601-0312dc07.js";import{i as Kt}from"./init-77b53fdd.js";import{o as Zt}from"./ordinal-ba9b4969.js";import{l as ft}from"./linear-3615363e.js";import{l as pt}from"./line-434e5c73.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";function Jt(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s"u"&&(k.yylloc={});var tt=k.yylloc;a.push(tt);var Wt=k.options&&k.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var I;return I=g.pop()||k.lex()||xt,typeof I!="number"&&(I instanceof Array&&(g=I,I=g.pop()),I=l.symbols_[I]||I),I}for(var D,W,v,it,O={},q,M,dt,j;;){if(W=u[u.length-1],this.defaultActions[W]?v=this.defaultActions[W]:((D===null||typeof D>"u")&&(D=Ot()),v=F[W]&&F[W][D]),typeof v>"u"||!v.length||!v[0]){var et="";j=[];for(q in F[W])this.terminals_[q]&&q>Vt&&j.push("'"+this.terminals_[q]+"'");k.showPosition?et="Parse error on line "+(U+1)+`: `+k.showPosition()+` Expecting `+j.join(", ")+", got '"+(this.terminals_[D]||D)+"'":et="Parse error on line "+(U+1)+": Unexpected "+(D==xt?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(et,{text:k.match,token:this.terminals_[D]||D,line:k.yylineno,loc:tt,expected:j})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+D);switch(v[0]){case 1:u.push(D),b.push(k.yytext),a.push(k.yylloc),u.push(v[1]),D=null,gt=k.yyleng,x=k.yytext,U=k.yylineno,tt=k.yylloc;break;case 2:if(M=this.productions_[v[1]][1],O.$=b[b.length-M],O._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Wt&&(O._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),it=this.performAction.apply(O,[x,gt,U,B.yy,v[1],b,a].concat(Bt)),typeof it<"u")return it;M&&(u=u.slice(0,-1*M*2),b=b.slice(0,-1*M),a=a.slice(0,-1*M)),u.push(this.productions_[v[1]][0]),b.push(O.$),a.push(O._$),dt=F[u[u.length-2]][u[u.length-1]],u.push(dt);break;case 3:return!0}}return!0}},It=function(){var V={EOF:1,parseError:function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},setInput:function(r,l){return this.yy=l||this.yy||{},this._input=r,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},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var l=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var g=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),u.length-1&&(this.yylineno-=u.length-1);var b=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:u?(u.length===g.length?this.yylloc.first_column:0)+g[g.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/index.html b/index.html index 3a730ee..250ba23 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ name="description" content="Visualize a Makefile as a graph of its targets and their dependencies." /> - +