state-machine-cat 10.0.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- var Da=Object.create;var ie=Object.defineProperty,La=Object.defineProperties,Va=Object.getOwnPropertyDescriptor,Na=Object.getOwnPropertyDescriptors,Sa=Object.getOwnPropertyNames,ln=Object.getOwnPropertySymbols,Ma=Object.getPrototypeOf,an=Object.prototype.hasOwnProperty,za=Object.prototype.propertyIsEnumerable;var rn=(t,e,n)=>e in t?ie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F=(t,e)=>{for(var n in e||(e={}))an.call(e,n)&&rn(t,n,e[n]);if(ln)for(var n of ln(e))za.call(e,n)&&rn(t,n,e[n]);return t},N=(t,e)=>La(t,Na(e));var G=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ua=(t,e)=>{for(var n in e)ie(t,n,{get:e[n],enumerable:!0})},on=(t,e,n,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Sa(e))!an.call(t,r)&&r!==n&&ie(t,r,{get:()=>e[r],enumerable:!(d=Va(e,r))||d.enumerable});return t};var H=(t,e,n)=>(n=t!=null?Da(Ma(t)):{},on(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t)),Ga=t=>on(ie({},"__esModule",{value:!0}),t);var An=G(()=>{var Ie=require("handlebars/dist/handlebars.runtime"),wo=Ie.template,Po=Ie.templates=Ie.templates||{};Po["smcat.template.hbs"]=wo({1:function(t,e,n,d,r){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p="",a=(a=m(n,"note")||(e!=null?m(e,"note"):e))!=null?a:s,b={name:"note",hash:{},fn:t.program(2,r,0),inverse:t.noop,data:r,loc:{start:{line:2,column:0},end:{line:4,column:9}}},c=typeof a==f?a.call(u,b):a;return(c=m(n,"note")?c:v.call(e,c,b))!=null&&(p+=c),p+=(c=(m(n,"quotifyState")||e&&m(e,"quotifyState")||s).call(u,e!=null?m(e,"name"):e,{name:"quotifyState",hash:{},fn:t.program(4,r,0),inverse:t.noop,data:r,loc:{start:{line:5,column:0},end:{line:5,column:40}}}))!=null?c:"",a=(a=m(n,"hasExtendedAttributes")||(e!=null?m(e,"hasExtendedAttributes"):e))!=null?a:s,b={name:"hasExtendedAttributes",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r,loc:{start:{line:6,column:4},end:{line:6,column:270}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"hasExtendedAttributes")?c:v.call(e,c,b))!=null&&(p+=c),p+=(c=m(n,"if").call(u,e!=null?m(e,"actions"):e,{name:"if",hash:{},fn:t.program(18,r,0),inverse:t.noop,data:r,loc:{start:{line:7,column:4},end:{line:7,column:28}}}))!=null?c:"",a=(a=m(n,"actions")||(e!=null?m(e,"actions"):e))!=null?a:s,b={name:"actions",hash:{},fn:t.program(20,r,0),inverse:t.noop,data:r,loc:{start:{line:7,column:28},end:{line:7,column:93}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"actions")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"statemachine")||(e!=null?m(e,"statemachine"):e))!=null?a:s,b={name:"statemachine",hash:{},fn:t.program(22,r,0),inverse:t.noop,data:r,loc:{start:{line:8,column:4},end:{line:10,column:19}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"statemachine")?c:v.call(e,c,b))!=null&&(p+=c),p+((c=m(n,"if").call(u,r&&m(r,"last"),{name:"if",hash:{},fn:t.program(24,r,0),inverse:t.program(26,r,0),data:r,loc:{start:{line:11,column:0},end:{line:11,column:30}}}))!=null?c:"")+`
1
+ var Ta=Object.create;var ge=Object.defineProperty;var Ba=Object.getOwnPropertyDescriptor;var Ha=Object.getOwnPropertyNames;var qa=Object.getPrototypeOf,Ia=Object.prototype.hasOwnProperty;var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Da=(t,e)=>{for(var n in e)ge(t,n,{get:e[n],enumerable:!0})},tn=(t,e,n,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ha(e))!Ia.call(t,r)&&r!==n&&ge(t,r,{get:()=>e[r],enumerable:!(d=Ba(e,r))||d.enumerable});return t};var B=(t,e,n)=>(n=t!=null?Ta(qa(t)):{},tn(e||!t||!t.__esModule?ge(n,"default",{value:t,enumerable:!0}):n,t)),La=t=>tn(ge({},"__esModule",{value:!0}),t);var Pn=z(()=>{var He=require("handlebars/dist/handlebars.runtime"),go=He.template,yo=He.templates=He.templates||{};yo["smcat.template.hbs"]=go({1:function(t,e,n,d,r){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p="",a=(a=m(n,"note")||(e!=null?m(e,"note"):e))!=null?a:s,b={name:"note",hash:{},fn:t.program(2,r,0),inverse:t.noop,data:r,loc:{start:{line:2,column:0},end:{line:4,column:9}}},c=typeof a==f?a.call(u,b):a;return(c=m(n,"note")?c:v.call(e,c,b))!=null&&(p+=c),p+=(c=(m(n,"quotifyState")||e&&m(e,"quotifyState")||s).call(u,e!=null?m(e,"name"):e,{name:"quotifyState",hash:{},fn:t.program(4,r,0),inverse:t.noop,data:r,loc:{start:{line:5,column:0},end:{line:5,column:40}}}))!=null?c:"",a=(a=m(n,"hasExtendedAttributes")||(e!=null?m(e,"hasExtendedAttributes"):e))!=null?a:s,b={name:"hasExtendedAttributes",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r,loc:{start:{line:6,column:4},end:{line:6,column:270}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"hasExtendedAttributes")?c:v.call(e,c,b))!=null&&(p+=c),p+=(c=m(n,"if").call(u,e!=null?m(e,"actions"):e,{name:"if",hash:{},fn:t.program(18,r,0),inverse:t.noop,data:r,loc:{start:{line:7,column:4},end:{line:7,column:28}}}))!=null?c:"",a=(a=m(n,"actions")||(e!=null?m(e,"actions"):e))!=null?a:s,b={name:"actions",hash:{},fn:t.program(20,r,0),inverse:t.noop,data:r,loc:{start:{line:7,column:28},end:{line:7,column:93}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"actions")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"statemachine")||(e!=null?m(e,"statemachine"):e))!=null?a:s,b={name:"statemachine",hash:{},fn:t.program(22,r,0),inverse:t.noop,data:r,loc:{start:{line:8,column:4},end:{line:10,column:19}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"statemachine")?c:v.call(e,c,b))!=null&&(p+=c),p+((c=m(n,"if").call(u,r&&m(r,"last"),{name:"if",hash:{},fn:t.program(24,r,0),inverse:t.program(26,r,0),data:r,loc:{start:{line:11,column:0},end:{line:11,column:30}}}))!=null?c:"")+`
2
2
  `},2:function(t,e,n,d,r){return"# "+((t=t.lambda(e,e))!=null?t:"")+`
3
3
  `},4:function(t,e,n,d,r){return""},6:function(t,e,n,d,r){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p=" [",a=(a=m(n,"typeExplicitlySet")||(e!=null?m(e,"typeExplicitlySet"):e))!=null?a:s,b={name:"typeExplicitlySet",hash:{},fn:t.program(7,r,0),inverse:t.noop,data:r,loc:{start:{line:6,column:32},end:{line:6,column:107}}},c=typeof a==f?a.call(u,b):a;return(c=m(n,"typeExplicitlySet")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:s,b={name:"label",hash:{},fn:t.program(10,r,0),inverse:t.noop,data:r,loc:{start:{line:6,column:107},end:{line:6,column:142}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"label")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:s,b={name:"color",hash:{},fn:t.program(12,r,0),inverse:t.noop,data:r,loc:{start:{line:6,column:142},end:{line:6,column:178}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"color")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"class")||(e!=null?m(e,"class"):e))!=null?a:s,b={name:"class",hash:{},fn:t.program(14,r,0),inverse:t.noop,data:r,loc:{start:{line:6,column:178},end:{line:6,column:214}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"class")?c:v.call(e,c,b))!=null&&(p+=c),p+((c=m(n,"if").call(u,e!=null?m(e,"active"):e,{name:"if",hash:{},fn:t.program(16,r,0),inverse:t.noop,data:r,loc:{start:{line:6,column:214},end:{line:6,column:242}}}))!=null?c:"")+"]"},7:function(t,e,n,d,s){var u=t.lookupProperty||function(v,m){if(Object.prototype.hasOwnProperty.call(v,m))return v[m]},f=(f=u(n,"type")||(e!=null?u(e,"type"):e))!=null?f:t.hooks.helperMissing,s={name:"type",hash:{},fn:t.program(8,s,0),inverse:t.noop,data:s,loc:{start:{line:6,column:54},end:{line:6,column:85}}},f=typeof f=="function"?f.call(e??(t.nullContext||{}),s):f;return(f=u(n,"type")?f:t.hooks.blockHelperMissing.call(e,f,s))!=null?f:""},8:function(t,e,n,d,r){return"type="+((t=t.lambda(e,e))!=null?t:"")+" "},10:function(t,e,n,d,r){return'label="'+((t=t.lambda(e,e))!=null?t:"")+'"'},12:function(t,e,n,d,r){return' color="'+((t=t.lambda(e,e))!=null?t:"")+'"'},14:function(t,e,n,d,r){return' class="'+((t=t.lambda(e,e))!=null?t:"")+'"'},16:function(t,e,n,d,r){return" active"},18:function(t,e,n,d,r){return": "},20:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return(n=(u(n,"quotifyActions")||e&&u(e,"quotifyActions")||t.hooks.helperMissing).call(e??(t.nullContext||{}),e,{name:"quotifyActions",hash:{},fn:t.program(4,r,0),inverse:t.noop,data:r,loc:{start:{line:7,column:40},end:{line:7,column:80}}}))!=null?n:""},22:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return` {
4
4
  `+((u=t.invokePartial(u(d,"smcat.template.hbs"),e,{name:"smcat.template.hbs",data:r,indent:" ",helpers:n,partials:d,decorators:t.decorators}))!=null?u:"")+"}"},24:function(t,e,n,d,r){return";"},26:function(t,e,n,d,r){return","},28:function(t,e,n,d,r){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p="",a=(a=m(n,"note")||(e!=null?m(e,"note"):e))!=null?a:s,b={name:"note",hash:{},fn:t.program(2,r,0),inverse:t.noop,data:r,loc:{start:{line:15,column:0},end:{line:17,column:9}}},c=typeof a==f?a.call(u,b):a;return(c=m(n,"note")?c:v.call(e,c,b))!=null&&(p+=c),p+=((c=(m(n,"quotifyState")||e&&m(e,"quotifyState")||s).call(u,e!=null?m(e,"from"):e,{name:"quotifyState",hash:{},fn:t.program(4,r,0),inverse:t.noop,data:r,loc:{start:{line:18,column:0},end:{line:18,column:39}}}))!=null?c:"")+" => "+((c=(m(n,"quotifyState")||e&&m(e,"quotifyState")||s).call(u,e!=null?m(e,"to"):e,{name:"quotifyState",hash:{},fn:t.program(4,r,0),inverse:t.noop,data:r,loc:{start:{line:18,column:43},end:{line:18,column:81}}}))!=null?c:""),a=(a=m(n,"hasExtendedAttributes")||(e!=null?m(e,"hasExtendedAttributes"):e))!=null?a:s,b={name:"hasExtendedAttributes",hash:{},fn:t.program(29,r,0),inverse:t.noop,data:r,loc:{start:{line:19,column:4},end:{line:19,column:130}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"hasExtendedAttributes")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:s,b={name:"label",hash:{},fn:t.program(34,r,0),inverse:t.noop,data:r,loc:{start:{line:20,column:4},end:{line:20,column:62}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"label")?c:v.call(e,c,b))!=null&&(p+=c),p+`;
5
5
  `},29:function(t,e,n,d,r){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p=" [",a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:s,b={name:"color",hash:{},fn:t.program(30,r,0),inverse:t.noop,data:r,loc:{start:{line:19,column:32},end:{line:19,column:68}}},c=typeof a==f?a.call(u,b):a;return(c=m(n,"color")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"type")||(e!=null?m(e,"type"):e))!=null?a:s,b={name:"type",hash:{},fn:t.program(32,r,0),inverse:t.noop,data:r,loc:{start:{line:19,column:69},end:{line:19,column:102}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"type")?c:v.call(e,c,b))!=null&&(p+=c),p+"]"},30:function(t,e,n,d,r){return'color="'+((t=t.lambda(e,e))!=null?t:"")+'"'},32:function(t,e,n,d,r){return" type="+((t=t.lambda(e,e))!=null?t:"")},34:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return": "+((n=(u(n,"quotifyLabel")||e&&u(e,"quotifyLabel")||t.hooks.helperMissing).call(e??(t.nullContext||{}),e,{name:"quotifyLabel",hash:{},fn:t.program(4,r,0),inverse:t.noop,data:r,loc:{start:{line:20,column:16},end:{line:20,column:52}}}))!=null?n:"")},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,m){var u=e??(t.nullContext||{}),s=t.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]},f=((p=s(n,"each").call(u,e!=null?s(e,"states"):e,{name:"each",hash:{},fn:t.program(1,m,0),inverse:t.noop,data:m,loc:{start:{line:1,column:0},end:{line:12,column:9}}}))!=null?p:"")+`
6
- `,v=(v=s(n,"transitions")||(e!=null?s(e,"transitions"):e))!=null?v:t.hooks.helperMissing,m={name:"transitions",hash:{},fn:t.program(28,m,0),inverse:t.noop,data:m,loc:{start:{line:14,column:0},end:{line:21,column:16}}},p=typeof v=="function"?v.call(u,m):v;return(p=s(n,"transitions")?p:t.hooks.blockHelperMissing.call(e,p,m))!=null&&(f+=p),f},usePartial:!0,useData:!0})});var Tn=G((ps,Rn)=>{var te=require("handlebars/dist/handlebars.runtime.js"),_n=require("lodash/cloneDeep.js");An();var Co=/;|,|{| |\[/,Oo=/;|,|{/,Eo=/;|{/;function De(t,e){return t.test(e)?`"${e}"`:e}te.registerPartial("smcat.template.hbs",te.templates["smcat.template.hbs"]);function jo(t){return t==="activity"?"":`${t}/ `}function Ao(t){let e=F({},t);return e.actions=(t.actions||[]).map(n=>`${jo(n.type)}${n.body}`).join(`
7
- `),e}function _o(t){return(Object.prototype.hasOwnProperty.call(t,"label")||Object.prototype.hasOwnProperty.call(t,"typeExplicitlySet")||Object.prototype.hasOwnProperty.call(t,"color")||Object.prototype.hasOwnProperty.call(t,"active")||Object.prototype.hasOwnProperty.call(t,"class"))&&(t.hasExtendedAttributes=!0),t}function Fn(t,e){return t.map(_o).filter(n=>n.statemachine).forEach(n=>{n.statemachine.states=Fn(n.statemachine.states,e)}),t.map(Ao)}function Fo(t){return(Object.prototype.hasOwnProperty.call(t,"type")||Object.prototype.hasOwnProperty.call(t,"color")||Object.prototype.hasOwnProperty.call(t,"class"))&&(t.hasExtendedAttributes=!0),t}function Ro(t){return t.map(Fo)}te.registerHelper("quotifyState",t=>De(Co,t));te.registerHelper("quotifyLabel",t=>De(Eo,t));te.registerHelper("quotifyActions",t=>De(Oo,t));Rn.exports=function(e){return te.templates["smcat.template.hbs"](N(F({},e),{states:Fn(_n(e.states)),transitions:Ro(_n(e.transitions||[]))}))}});var Hn=G(()=>{var Ne=require("handlebars/dist/handlebars.runtime"),ti=Ne.template,ni=Ne.templates=Ne.templates||{};ni["dot.template.hbs"]=ti({1:function(t,e,n,d,r,u,s){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(D,L){if(Object.prototype.hasOwnProperty.call(D,L))return D[L]},b="",c=(c=a(n,"noteName")||(e!=null?a(e,"noteName"):e))!=null?c:v,k={name:"noteName",hash:{},fn:t.noop,inverse:t.program(2,r,0,u,s),data:r,loc:{start:{line:9,column:2},end:{line:26,column:15}}},$=typeof c==m?c.call(f,k):c;return($=a(n,"noteName")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"noteName")||(e!=null?a(e,"noteName"):e))!=null?c:v,k={name:"noteName",hash:{},fn:t.program(19,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:27,column:2},end:{line:37,column:15}}},$=typeof c==m?c.call(f,k):c,($=a(n,"noteName")?$:p.call(e,$,k))!=null&&(b+=$),b},2:function(t,e,n,d,r){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p="",a=(a=m(n,"isCompositeSelf")||(e!=null?m(e,"isCompositeSelf"):e))!=null?a:s,b={name:"isCompositeSelf",hash:{},fn:t.noop,inverse:t.program(3,r,0),data:r,loc:{start:{line:10,column:4},end:{line:16,column:24}}},c=typeof a==f?a.call(u,b):a;return(c=m(n,"isCompositeSelf")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"isCompositeSelf")||(e!=null?m(e,"isCompositeSelf"):e))!=null?a:s,b={name:"isCompositeSelf",hash:{},fn:t.program(14,r,0),inverse:t.noop,data:r,loc:{start:{line:17,column:4},end:{line:25,column:24}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"isCompositeSelf")?c:v.call(e,c,b))!=null&&(p+=c),p},3:function(t,e,n,d,r){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p=' "'+((c=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:s)==f?a.call(u,{name:"from",hash:{},data:r,loc:{start:{line:11,column:5},end:{line:11,column:15}}}):a)!=null?c:"")+'" -> "'+((c=typeof(a=(a=m(n,"to")||(e!=null?m(e,"to"):e))!=null?a:s)==f?a.call(u,{name:"to",hash:{},data:r,loc:{start:{line:11,column:21},end:{line:11,column:29}}}):a)!=null?c:"")+'" [label="',a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:s,b={name:"label",hash:{},fn:t.noop,inverse:t.program(4,r,0),data:r,loc:{start:{line:11,column:39},end:{line:11,column:60}}},c=typeof a==f?a.call(u,b):a;return(c=m(n,"label")?c:v.call(e,c,b))!=null&&(p+=c),p+=((c=typeof(a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:s)==f?a.call(u,{name:"label",hash:{},data:r,loc:{start:{line:11,column:60},end:{line:11,column:71}}}):a)!=null?c:"")+'"',a=(a=m(n,"fromComposite")||(e!=null?m(e,"fromComposite"):e))!=null?a:s,b={name:"fromComposite",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r,loc:{start:{line:12,column:28},end:{line:12,column:92}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"fromComposite")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"toComposite")||(e!=null?m(e,"toComposite"):e))!=null?a:s,b={name:"toComposite",hash:{},fn:t.program(8,r,0),inverse:t.noop,data:r,loc:{start:{line:13,column:28},end:{line:13,column:86}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"toComposite")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:s,b={name:"color",hash:{},fn:t.program(10,r,0),inverse:t.noop,data:r,loc:{start:{line:14,column:28},end:{line:14,column:85}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"color")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"width")||(e!=null?m(e,"width"):e))!=null?a:s,b={name:"width",hash:{},fn:t.program(12,r,0),inverse:t.noop,data:r,loc:{start:{line:15,column:28},end:{line:15,column:68}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"width")?c:v.call(e,c,b))!=null&&(p+=c),p+' class="'+((c=typeof(a=(a=m(n,"class")||(e!=null?m(e,"class"):e))!=null?a:s)==f?a.call(u,{name:"class",hash:{},data:r,loc:{start:{line:15,column:76},end:{line:15,column:87}}}):a)!=null?c:"")+`"]
6
+ `,v=(v=s(n,"transitions")||(e!=null?s(e,"transitions"):e))!=null?v:t.hooks.helperMissing,m={name:"transitions",hash:{},fn:t.program(28,m,0),inverse:t.noop,data:m,loc:{start:{line:14,column:0},end:{line:21,column:16}}},p=typeof v=="function"?v.call(u,m):v;return(p=s(n,"transitions")?p:t.hooks.blockHelperMissing.call(e,p,m))!=null&&(f+=p),f},usePartial:!0,useData:!0})});var jn=z((os,En)=>{var K=require("handlebars/dist/handlebars.runtime.js"),Cn=require("lodash/cloneDeep.js");Pn();var vo=/;|,|{| |\[/,bo=/;|,|{/,$o=/;|{/;function qe(t,e){return t.test(e)?`"${e}"`:e}K.registerPartial("smcat.template.hbs",K.templates["smcat.template.hbs"]);function xo(t){return t==="activity"?"":`${t}/ `}function ko(t){let e={...t};return e.actions=(t.actions||[]).map(n=>`${xo(n.type)}${n.body}`).join(`
7
+ `),e}function wo(t){return(Object.prototype.hasOwnProperty.call(t,"label")||Object.prototype.hasOwnProperty.call(t,"typeExplicitlySet")||Object.prototype.hasOwnProperty.call(t,"color")||Object.prototype.hasOwnProperty.call(t,"active")||Object.prototype.hasOwnProperty.call(t,"class"))&&(t.hasExtendedAttributes=!0),t}function On(t,e){return t.map(wo).filter(n=>n.statemachine).forEach(n=>{n.statemachine.states=On(n.statemachine.states,e)}),t.map(ko)}function Po(t){return(Object.prototype.hasOwnProperty.call(t,"type")||Object.prototype.hasOwnProperty.call(t,"color")||Object.prototype.hasOwnProperty.call(t,"class"))&&(t.hasExtendedAttributes=!0),t}function Co(t){return t.map(Po)}K.registerHelper("quotifyState",t=>qe(vo,t));K.registerHelper("quotifyLabel",t=>qe($o,t));K.registerHelper("quotifyActions",t=>qe(bo,t));En.exports=function(e){return K.templates["smcat.template.hbs"]({...e,states:On(Cn(e.states)),transitions:Co(Cn(e.transitions||[]))})}});var _n=z(()=>{var Le=require("handlebars/dist/handlebars.runtime"),Jo=Le.template,Qo=Le.templates=Le.templates||{};Qo["dot.template.hbs"]=Jo({1:function(t,e,n,d,r,u,s){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(I,D){if(Object.prototype.hasOwnProperty.call(I,D))return I[D]},b="",c=(c=a(n,"noteName")||(e!=null?a(e,"noteName"):e))!=null?c:v,k={name:"noteName",hash:{},fn:t.noop,inverse:t.program(2,r,0,u,s),data:r,loc:{start:{line:9,column:2},end:{line:26,column:15}}},$=typeof c==m?c.call(f,k):c;return($=a(n,"noteName")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"noteName")||(e!=null?a(e,"noteName"):e))!=null?c:v,k={name:"noteName",hash:{},fn:t.program(19,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:27,column:2},end:{line:37,column:15}}},$=typeof c==m?c.call(f,k):c,($=a(n,"noteName")?$:p.call(e,$,k))!=null&&(b+=$),b},2:function(t,e,n,d,r){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p="",a=(a=m(n,"isCompositeSelf")||(e!=null?m(e,"isCompositeSelf"):e))!=null?a:s,b={name:"isCompositeSelf",hash:{},fn:t.noop,inverse:t.program(3,r,0),data:r,loc:{start:{line:10,column:4},end:{line:16,column:24}}},c=typeof a==f?a.call(u,b):a;return(c=m(n,"isCompositeSelf")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"isCompositeSelf")||(e!=null?m(e,"isCompositeSelf"):e))!=null?a:s,b={name:"isCompositeSelf",hash:{},fn:t.program(14,r,0),inverse:t.noop,data:r,loc:{start:{line:17,column:4},end:{line:25,column:24}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"isCompositeSelf")?c:v.call(e,c,b))!=null&&(p+=c),p},3:function(t,e,n,d,r){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p=' "'+((c=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:s)==f?a.call(u,{name:"from",hash:{},data:r,loc:{start:{line:11,column:5},end:{line:11,column:15}}}):a)!=null?c:"")+'" -> "'+((c=typeof(a=(a=m(n,"to")||(e!=null?m(e,"to"):e))!=null?a:s)==f?a.call(u,{name:"to",hash:{},data:r,loc:{start:{line:11,column:21},end:{line:11,column:29}}}):a)!=null?c:"")+'" [label="',a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:s,b={name:"label",hash:{},fn:t.noop,inverse:t.program(4,r,0),data:r,loc:{start:{line:11,column:39},end:{line:11,column:60}}},c=typeof a==f?a.call(u,b):a;return(c=m(n,"label")?c:v.call(e,c,b))!=null&&(p+=c),p+=((c=typeof(a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:s)==f?a.call(u,{name:"label",hash:{},data:r,loc:{start:{line:11,column:60},end:{line:11,column:71}}}):a)!=null?c:"")+'"',a=(a=m(n,"fromComposite")||(e!=null?m(e,"fromComposite"):e))!=null?a:s,b={name:"fromComposite",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r,loc:{start:{line:12,column:28},end:{line:12,column:92}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"fromComposite")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"toComposite")||(e!=null?m(e,"toComposite"):e))!=null?a:s,b={name:"toComposite",hash:{},fn:t.program(8,r,0),inverse:t.noop,data:r,loc:{start:{line:13,column:28},end:{line:13,column:86}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"toComposite")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:s,b={name:"color",hash:{},fn:t.program(10,r,0),inverse:t.noop,data:r,loc:{start:{line:14,column:28},end:{line:14,column:85}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"color")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"width")||(e!=null?m(e,"width"):e))!=null?a:s,b={name:"width",hash:{},fn:t.program(12,r,0),inverse:t.noop,data:r,loc:{start:{line:15,column:28},end:{line:15,column:68}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"width")?c:v.call(e,c,b))!=null&&(p+=c),p+' class="'+((c=typeof(a=(a=m(n,"class")||(e!=null?m(e,"class"):e))!=null?a:s)==f?a.call(u,{name:"class",hash:{},data:r,loc:{start:{line:15,column:76},end:{line:15,column:87}}}):a)!=null?c:"")+`"]
8
8
  `},4:function(t,e,n,d,r){return" "},6:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return' ltail="cluster_'+((u=typeof(n=(n=u(n,"from")||(e!=null?u(e,"from"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"from",hash:{},data:r,loc:{start:{line:12,column:63},end:{line:12,column:73}}}):n)!=null?u:"")+'"'},8:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return' lhead="cluster_'+((u=typeof(n=(n=u(n,"to")||(e!=null?u(e,"to"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"to",hash:{},data:r,loc:{start:{line:13,column:61},end:{line:13,column:69}}}):n)!=null?u:"")+'"'},10:function(s,e,n,d,r){var u,s=s.lambda;return' color="'+((u=s(e,e))!=null?u:"")+'" fontcolor="'+((u=s(e,e))!=null?u:"")+'"'},12:function(t,e,n,d,r){return' penwidth="'+((t=t.lambda(e,e))!=null?t:"")+'"'},14:function(t,e,n,d,r){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p=' "'+((c=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:s)==f?a.call(u,{name:"from",hash:{},data:r,loc:{start:{line:18,column:7},end:{line:18,column:17}}}):a)!=null?c:"")+'" -> "self_'+((c=typeof(a=(a=m(n,"name")||(e!=null?m(e,"name"):e))!=null?a:s)==f?a.call(u,{name:"name",hash:{},data:r,loc:{start:{line:18,column:28},end:{line:18,column:38}}}):a)!=null?c:"")+'" [label="',a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:s,b={name:"label",hash:{},fn:t.noop,inverse:t.program(4,r,0),data:r,loc:{start:{line:18,column:48},end:{line:18,column:69}}},c=typeof a==f?a.call(u,b):a;return(c=m(n,"label")?c:v.call(e,c,b))!=null&&(p+=c),p+=((c=typeof(a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:s)==f?a.call(u,{name:"label",hash:{},data:r,loc:{start:{line:18,column:69},end:{line:18,column:80}}}):a)!=null?c:"")+'" arrowhead=none',a=(a=m(n,"tailportflags")||(e!=null?m(e,"tailportflags"):e))!=null?a:s,b={name:"tailportflags",hash:{},fn:t.program(15,r,0),inverse:t.noop,data:r,loc:{start:{line:19,column:28},end:{line:19,column:73}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"tailportflags")?c:v.call(e,c,b))!=null&&(p+=c),p+=' ltail="cluster_'+((c=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:s)==f?a.call(u,{name:"from",hash:{},data:r,loc:{start:{line:19,column:89},end:{line:19,column:99}}}):a)!=null?c:"")+'"',a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:s,b={name:"color",hash:{},fn:t.program(10,r,0),inverse:t.noop,data:r,loc:{start:{line:20,column:28},end:{line:20,column:85}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"color")?c:v.call(e,c,b))!=null&&(p+=c),p+=' class="'+((c=typeof(a=(a=m(n,"class")||(e!=null?m(e,"class"):e))!=null?a:s)==f?a.call(u,{name:"class",hash:{},data:r,loc:{start:{line:20,column:93},end:{line:20,column:104}}}):a)!=null?c:"")+`"]
9
9
  "self_`+((c=typeof(a=(a=m(n,"name")||(e!=null?m(e,"name"):e))!=null?a:s)==f?a.call(u,{name:"name",hash:{},data:r,loc:{start:{line:21,column:12},end:{line:21,column:22}}}):a)!=null?c:"")+'" -> "'+((c=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:s)==f?a.call(u,{name:"from",hash:{},data:r,loc:{start:{line:21,column:28},end:{line:21,column:38}}}):a)!=null?c:"")+'" [lhead="cluster_'+((c=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:s)==f?a.call(u,{name:"from",hash:{},data:r,loc:{start:{line:21,column:56},end:{line:21,column:66}}}):a)!=null?c:"")+'"',a=(a=m(n,"headportflags")||(e!=null?m(e,"headportflags"):e))!=null?a:s,b={name:"headportflags",hash:{},fn:t.program(15,r,0),inverse:t.noop,data:r,loc:{start:{line:22,column:28},end:{line:22,column:73}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"headportflags")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:s,b={name:"color",hash:{},fn:t.program(17,r,0),inverse:t.noop,data:r,loc:{start:{line:23,column:28},end:{line:23,column:65}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"color")?c:v.call(e,c,b))!=null&&(p+=c),a=(a=m(n,"width")||(e!=null?m(e,"width"):e))!=null?a:s,b={name:"width",hash:{},fn:t.program(12,r,0),inverse:t.noop,data:r,loc:{start:{line:24,column:28},end:{line:24,column:68}}},c=typeof a==f?a.call(u,b):a,(c=m(n,"width")?c:v.call(e,c,b))!=null&&(p+=c),p+' class="'+((c=typeof(a=(a=m(n,"class")||(e!=null?m(e,"class"):e))!=null?a:s)==f?a.call(u,{name:"class",hash:{},data:r,loc:{start:{line:24,column:76},end:{line:24,column:87}}}):a)!=null?c:"")+`"]
10
10
  `},15:function(t,e,n,d,r){return" "+((t=t.lambda(e,e))!=null?t:"")},17:function(t,e,n,d,r){return' color="'+((t=t.lambda(e,e))!=null?t:"")+'"'},19:function(t,e,n,d,r,u,s){var f,v=t.lambda,m=t.hooks.blockHelperMissing,p=t.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]};return' "i_'+((f=v(e,e))!=null?f:"")+`" [shape=point style=invis margin=0 width=0 height=0 fixedsize=true]
@@ -19,7 +19,7 @@ var Da=Object.create;var ie=Object.defineProperty,La=Object.defineProperties,Va=
19
19
 
20
20
  `+((c=t.invokePartial(m(p,"dot.states.template.hbs"),e,{name:"dot.states.template.hbs",data:r,indent:" ",helpers:n,partials:p,decorators:t.decorators}))!=null?c:"")+`
21
21
  `,a=(a=m(n,"transitions")||(e!=null?m(e,"transitions"):e))!=null?a:b,b={name:"transitions",hash:{},fn:t.program(1,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:8,column:2},end:{line:38,column:18}}},c=typeof a==v?a.call(f,b):a;return(c=m(n,"transitions")?c:t.hooks.blockHelperMissing.call(e,c,b))!=null&&(p+=c),p+`}
22
- `},usePartial:!0,useData:!0,useDepths:!0})});var qn=G(()=>{var Se=require("handlebars/dist/handlebars.runtime"),li=Se.template,ri=Se.templates=Se.templates||{};ri["dot.states.template.hbs"]=li({1:function(t,e,n,d,f){var u=t.lookupProperty||function(m,p){if(Object.prototype.hasOwnProperty.call(m,p))return m[p]},s="",v=(v=u(n,"nestedExternalSelfTransitions")||(e!=null?u(e,"nestedExternalSelfTransitions"):e))!=null?v:t.hooks.helperMissing,f={name:"nestedExternalSelfTransitions",hash:{},fn:t.program(2,f,0),inverse:t.noop,data:f,loc:{start:{line:2,column:2},end:{line:4,column:36}}},v=typeof v=="function"?v.call(e??(t.nullContext||{}),f):v;return(v=u(n,"nestedExternalSelfTransitions")?v:t.hooks.blockHelperMissing.call(e,v,f))!=null&&(s+=v),s},2:function(t,e,n,d,r){return' "self_'+((t=t.lambda(e,e))!=null?t:"")+`" [shape=point style=invis width=0 height=0 fixedsize=true]
22
+ `},usePartial:!0,useData:!0,useDepths:!0})});var Fn=z(()=>{var Ve=require("handlebars/dist/handlebars.runtime"),Wo=Ve.template,Yo=Ve.templates=Ve.templates||{};Yo["dot.states.template.hbs"]=Wo({1:function(t,e,n,d,f){var u=t.lookupProperty||function(m,p){if(Object.prototype.hasOwnProperty.call(m,p))return m[p]},s="",v=(v=u(n,"nestedExternalSelfTransitions")||(e!=null?u(e,"nestedExternalSelfTransitions"):e))!=null?v:t.hooks.helperMissing,f={name:"nestedExternalSelfTransitions",hash:{},fn:t.program(2,f,0),inverse:t.noop,data:f,loc:{start:{line:2,column:2},end:{line:4,column:36}}},v=typeof v=="function"?v.call(e??(t.nullContext||{}),f):v;return(v=u(n,"nestedExternalSelfTransitions")?v:t.hooks.blockHelperMissing.call(e,v,f))!=null&&(s+=v),s},2:function(t,e,n,d,r){return' "self_'+((t=t.lambda(e,e))!=null?t:"")+`" [shape=point style=invis width=0 height=0 fixedsize=true]
23
23
  `},4:function(t,e,n,d,r){var u,s,f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]};return' "'+((u=typeof(s=(s=p(n,"name")||(e!=null?p(e,"name"):e))!=null?s:v)==m?s.call(f,{name:"name",hash:{},data:r,loc:{start:{line:7,column:3},end:{line:7,column:13}}}):s)!=null?u:"")+'" [shape=circle style=filled class="'+((u=typeof(s=(s=p(n,"class")||(e!=null?p(e,"class"):e))!=null?s:v)==m?s.call(f,{name:"class",hash:{},data:r,loc:{start:{line:7,column:49},end:{line:7,column:60}}}):s)!=null?u:"")+'" '+((u=p(n,"if").call(f,e!=null?p(e,"color"):e,{name:"if",hash:{},fn:t.program(5,r,0),inverse:t.program(7,r,0),data:r,loc:{start:{line:7,column:62},end:{line:7,column:150}}}))!=null?u:"")+((u=p(n,"if").call(f,e!=null?p(e,"active"):e,{name:"if",hash:{},fn:t.program(9,r,0),inverse:t.noop,data:r,loc:{start:{line:7,column:150},end:{line:7,column:184}}}))!=null?u:"")+`fixedsize=true height=0.15 label=""]
24
24
  `},5:function(p,e,n,d,r){var u,s,f=e??(p.nullContext||{}),v=p.hooks.helperMissing,m="function",p=p.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]};return'color="'+((u=typeof(s=(s=p(n,"color")||(e!=null?p(e,"color"):e))!=null?s:v)==m?s.call(f,{name:"color",hash:{},data:r,loc:{start:{line:7,column:82},end:{line:7,column:93}}}):s)!=null?u:"")+'" fillcolor="'+((u=typeof(s=(s=p(n,"color")||(e!=null?p(e,"color"):e))!=null?s:v)==m?s.call(f,{name:"color",hash:{},data:r,loc:{start:{line:7,column:106},end:{line:7,column:117}}}):s)!=null?u:"")+'" '},7:function(t,e,n,d,r){return"fillcolor=black "},9:function(t,e,n,d,r){return"penwidth=3.0 "},11:function(t,e,n,d,r){var u=e??(t.nullContext||{}),p=t.hooks.helperMissing,s="function",f=t.lookupProperty||function(b,c){if(Object.prototype.hasOwnProperty.call(b,c))return b[c]},v=' "'+((a=typeof(m=(m=f(n,"name")||(e!=null?f(e,"name"):e))!=null?m:p)==s?m.call(u,{name:"name",hash:{},data:r,loc:{start:{line:10,column:3},end:{line:10,column:13}}}):m)!=null?a:"")+'" [margin=0 class="'+((a=typeof(m=(m=f(n,"class")||(e!=null?f(e,"class"):e))!=null?m:p)==s?m.call(u,{name:"class",hash:{},data:r,loc:{start:{line:10,column:32},end:{line:10,column:43}}}):m)!=null?a:"")+'" '+((a=f(n,"if").call(u,e!=null?f(e,"color"):e,{name:"if",hash:{},fn:t.program(12,r,0),inverse:t.noop,data:r,loc:{start:{line:10,column:45},end:{line:10,column:85}}}))!=null?a:"")+((a=f(n,"if").call(u,e!=null?f(e,"active"):e,{name:"if",hash:{},fn:t.program(14,r,0),inverse:t.noop,data:r,loc:{start:{line:10,column:85},end:{line:10,column:134}}}))!=null?a:"")+`label= <
25
25
  <table align="center" cellborder="0" border="2" style="rounded" width="48">
@@ -30,7 +30,7 @@ var Da=Object.create;var ie=Object.defineProperty,La=Object.defineProperties,Va=
30
30
  <tr><td align="left" cellpadding="2">`+t.escapeExpression(t.lambda(e,e))+`</td></tr>
31
31
  `},25:function(t,e,n,d,r){return"<hr/>"},27:function(t,e,n,d,r){var u,s,f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]};return' "'+((u=typeof(s=(s=p(n,"name")||(e!=null?p(e,"name"):e))!=null?s:v)==m?s.call(f,{name:"name",hash:{},data:r,loc:{start:{line:21,column:3},end:{line:21,column:13}}}):s)!=null?u:"")+'" [shape=circle class="'+((u=typeof(s=(s=p(n,"class")||(e!=null?p(e,"class"):e))!=null?s:v)==m?s.call(f,{name:"class",hash:{},data:r,loc:{start:{line:21,column:36},end:{line:21,column:47}}}):s)!=null?u:"")+'" '+((u=p(n,"if").call(f,e!=null?p(e,"color"):e,{name:"if",hash:{},fn:t.program(12,r,0),inverse:t.noop,data:r,loc:{start:{line:21,column:49},end:{line:21,column:89}}}))!=null?u:"")+((u=p(n,"if").call(f,e!=null?p(e,"active"):e,{name:"if",hash:{},fn:t.program(9,r,0),inverse:t.noop,data:r,loc:{start:{line:21,column:89},end:{line:21,column:123}}}))!=null?u:"")+`label="H"]
32
32
  `},29:function(t,e,n,d,r){var u,s,f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]};return' "'+((u=typeof(s=(s=p(n,"name")||(e!=null?p(e,"name"):e))!=null?s:v)==m?s.call(f,{name:"name",hash:{},data:r,loc:{start:{line:24,column:3},end:{line:24,column:13}}}):s)!=null?u:"")+'" [shape=circle class="'+((u=typeof(s=(s=p(n,"class")||(e!=null?p(e,"class"):e))!=null?s:v)==m?s.call(f,{name:"class",hash:{},data:r,loc:{start:{line:24,column:36},end:{line:24,column:47}}}):s)!=null?u:"")+'" '+((u=p(n,"if").call(f,e!=null?p(e,"color"):e,{name:"if",hash:{},fn:t.program(12,r,0),inverse:t.noop,data:r,loc:{start:{line:24,column:49},end:{line:24,column:89}}}))!=null?u:"")+((u=p(n,"if").call(f,e!=null?p(e,"active"):e,{name:"if",hash:{},fn:t.program(9,r,0),inverse:t.noop,data:r,loc:{start:{line:24,column:89},end:{line:24,column:123}}}))!=null?u:"")+`label="H*"]
33
- `},31:function(t,e,n,d,r,u,s){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(D,L){if(Object.prototype.hasOwnProperty.call(D,L))return D[L]},b=' "'+(($=typeof(c=(c=a(n,"name")||(e!=null?a(e,"name"):e))!=null?c:v)==m?c.call(f,{name:"name",hash:{},data:r,loc:{start:{line:27,column:3},end:{line:27,column:13}}}):c)!=null?$:"")+'" [shape=diamond fixedsize=true width=0.35 height=0.35 fontsize=10 class="'+(($=typeof(c=(c=a(n,"class")||(e!=null?a(e,"class"):e))!=null?c:v)==m?c.call(f,{name:"class",hash:{},data:r,loc:{start:{line:27,column:87},end:{line:27,column:98}}}):c)!=null?$:"")+'" '+(($=a(n,"if").call(f,e!=null?a(e,"color"):e,{name:"if",hash:{},fn:t.program(12,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:27,column:100},end:{line:27,column:140}}}))!=null?$:"")+(($=a(n,"if").call(f,e!=null?a(e,"active"):e,{name:"if",hash:{},fn:t.program(9,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:27,column:140},end:{line:27,column:174}}}))!=null?$:"")+`label=" "]
33
+ `},31:function(t,e,n,d,r,u,s){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(I,D){if(Object.prototype.hasOwnProperty.call(I,D))return I[D]},b=' "'+(($=typeof(c=(c=a(n,"name")||(e!=null?a(e,"name"):e))!=null?c:v)==m?c.call(f,{name:"name",hash:{},data:r,loc:{start:{line:27,column:3},end:{line:27,column:13}}}):c)!=null?$:"")+'" [shape=diamond fixedsize=true width=0.35 height=0.35 fontsize=10 class="'+(($=typeof(c=(c=a(n,"class")||(e!=null?a(e,"class"):e))!=null?c:v)==m?c.call(f,{name:"class",hash:{},data:r,loc:{start:{line:27,column:87},end:{line:27,column:98}}}):c)!=null?$:"")+'" '+(($=a(n,"if").call(f,e!=null?a(e,"color"):e,{name:"if",hash:{},fn:t.program(12,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:27,column:100},end:{line:27,column:140}}}))!=null?$:"")+(($=a(n,"if").call(f,e!=null?a(e,"active"):e,{name:"if",hash:{},fn:t.program(9,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:27,column:140},end:{line:27,column:174}}}))!=null?$:"")+`label=" "]
34
34
  "`+(($=typeof(c=(c=a(n,"name")||(e!=null?a(e,"name"):e))!=null?c:v)==m?c.call(f,{name:"name",hash:{},data:r,loc:{start:{line:28,column:3},end:{line:28,column:13}}}):c)!=null?$:"")+'" -> "'+(($=typeof(c=(c=a(n,"name")||(e!=null?a(e,"name"):e))!=null?c:v)==m?c.call(f,{name:"name",hash:{},data:r,loc:{start:{line:28,column:19},end:{line:28,column:29}}}):c)!=null?$:"")+'" [label=<',c=(c=a(n,"actions")||(e!=null?a(e,"actions"):e))!=null?c:v,k={name:"actions",hash:{},fn:t.program(32,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:28,column:39},end:{line:28,column:144}}},$=typeof c==m?c.call(f,k):c;return($=a(n,"actions")?$:p.call(e,$,k))!=null&&(b+=$),b+='> color="#FFFFFF01"',c=(c=a(n,"color")||(e!=null?a(e,"color"):e))!=null?c:v,k={name:"color",hash:{},fn:t.program(41,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:28,column:163},end:{line:28,column:203}}},$=typeof c==m?c.call(f,k):c,($=a(n,"color")?$:p.call(e,$,k))!=null&&(b+=$),b+' class="'+(($=typeof(c=(c=a(n,"class")||(e!=null?a(e,"class"):e))!=null?c:v)==m?c.call(f,{name:"class",hash:{},data:r,loc:{start:{line:28,column:211},end:{line:28,column:222}}}):c)!=null?$:"")+`"];
35
35
  `},32:function(t,v,n,d,r,u,s){var f,v=v??(t.nullContext||{}),m=t.lookupProperty||function(p,a){if(Object.prototype.hasOwnProperty.call(p,a))return p[a]};return((f=m(n,"if").call(v,r&&m(r,"first"),{name:"if",hash:{},fn:t.program(33,r,0,u,s),inverse:t.program(35,r,0,u,s),data:r,loc:{start:{line:28,column:51},end:{line:28,column:82}}}))!=null?f:"")+((f=m(n,"if").call(v,s[1]!=null?m(s[1],"active"):s[1],{name:"if",hash:{},fn:t.program(37,r,0,u,s),inverse:t.program(39,r,0,u,s),data:r,loc:{start:{line:28,column:82},end:{line:28,column:131}}}))!=null?f:"")},33:function(t,e,n,d,r){return""},35:function(t,e,n,d,r){return"\\n"},37:function(t,e,n,d,r){return"<i>"+t.escapeExpression(t.lambda(e,e))+"</i>"},39:function(t,e,n,d,r){return t.escapeExpression(t.lambda(e,e))},41:function(t,e,n,d,r){return' fontcolor="'+((t=t.lambda(e,e))!=null?t:"")+'"'},43:function(t,e,n,d,r){var u,s,f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]};return' "'+((u=typeof(s=(s=p(n,"name")||(e!=null?p(e,"name"):e))!=null?s:v)==m?s.call(f,{name:"name",hash:{},data:r,loc:{start:{line:31,column:3},end:{line:31,column:13}}}):s)!=null?u:"")+'" [shape=rect class="'+((u=typeof(s=(s=p(n,"class")||(e!=null?p(e,"class"):e))!=null?s:v)==m?s.call(f,{name:"class",hash:{},data:r,loc:{start:{line:31,column:34},end:{line:31,column:45}}}):s)!=null?u:"")+'" '+((u=p(n,"if").call(f,e!=null?p(e,"color"):e,{name:"if",hash:{},fn:t.program(5,r,0),inverse:t.program(7,r,0),data:r,loc:{start:{line:31,column:47},end:{line:31,column:135}}}))!=null?u:"")+((u=p(n,"if").call(f,e!=null?p(e,"active"):e,{name:"if",hash:{},fn:t.program(9,r,0),inverse:t.noop,data:r,loc:{start:{line:31,column:135},end:{line:31,column:169}}}))!=null?u:"")+'label=" " fixedsize=true style=filled '+((u=typeof(s=(s=p(n,"sizingExtras")||(e!=null?p(e,"sizingExtras"):e))!=null?s:v)==m?s.call(f,{name:"sizingExtras",hash:{},data:r,loc:{start:{line:31,column:207},end:{line:31,column:225}}}):s)!=null?u:"")+`]
36
36
  `},45:function(t,e,n,d,r){var u,s,f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]};return' "'+((u=typeof(s=(s=p(n,"name")||(e!=null?p(e,"name"):e))!=null?s:v)==m?s.call(f,{name:"name",hash:{},data:r,loc:{start:{line:37,column:3},end:{line:37,column:13}}}):s)!=null?u:"")+`" [label= <
@@ -53,10 +53,10 @@ var Da=Object.create;var ie=Object.defineProperty,La=Object.defineProperties,Va=
53
53
  <tr><td align="left">`+t.escapeExpression(t.lambda(e,e))+`</td></tr>
54
54
  `},53:function(t,e,n,d,r){return'style="dashed" penwidth=1'},55:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return"style=rounded "+((n=u(n,"if").call(e??(t.nullContext||{}),e!=null?u(e,"active"):e,{name:"if",hash:{},fn:t.program(56,r,0),inverse:t.program(58,r,0),data:r,loc:{start:{line:57,column:77},end:{line:57,column:130}}}))!=null?n:"")},56:function(t,e,n,d,r){return"penwidth=3.0"},58:function(t,e,n,d,r){return"penwidth=2.0"},60:function(t,e,n,d,r,p,a){var f=t.lookupProperty||function(b,c){if(Object.prototype.hasOwnProperty.call(b,c))return b[c]},v="",m=(m=f(n,"noteName")||(e!=null?f(e,"noteName"):e))!=null?m:t.hooks.helperMissing,p={name:"noteName",hash:{},fn:t.program(61,r,0,p,a),inverse:t.noop,data:r,loc:{start:{line:63,column:4},end:{line:66,column:17}}},a=typeof m=="function"?m.call(e??(t.nullContext||{}),p):m;return(a=f(n,"noteName")?a:t.hooks.blockHelperMissing.call(e,a,p))!=null&&(v+=a),v},61:function(m,e,n,d,r,u,s){var f,v=m.lambda,m=m.lookupProperty||function(p,a){if(Object.prototype.hasOwnProperty.call(p,a))return p[a]};return' "'+((f=v(e,e))!=null?f:"")+'" [color=black fontcolor=black label="'+((f=v(s[1]!=null?m(s[1],"noteFlattened"):s[1],e))!=null?f:"")+`" shape=note fontsize=10 fillcolor="#ffffcc" penwidth=1.0]
55
55
  "`+((f=v(s[1]!=null?m(s[1],"name"):s[1],e))!=null?f:"")+'" -> "'+((f=v(e,e))!=null?f:"")+`" [style=dashed arrowtail=none arrowhead=none]
56
- `},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,r,u,s){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(D,L){if(Object.prototype.hasOwnProperty.call(D,L))return D[L]},b="",c=(c=a(n,"compositeStates")||(e!=null?a(e,"compositeStates"):e))!=null?c:v,k={name:"compositeStates",hash:{},fn:t.program(1,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:1,column:0},end:{line:5,column:20}}},$=typeof c==m?c.call(f,k):c;return($=a(n,"compositeStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"initialStates")||(e!=null?a(e,"initialStates"):e))!=null?c:v,k={name:"initialStates",hash:{},fn:t.program(4,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:6,column:0},end:{line:8,column:18}}},$=typeof c==m?c.call(f,k):c,($=a(n,"initialStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"regularStates")||(e!=null?a(e,"regularStates"):e))!=null?c:v,k={name:"regularStates",hash:{},fn:t.program(11,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:9,column:0},end:{line:19,column:18}}},$=typeof c==m?c.call(f,k):c,($=a(n,"regularStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"historyStates")||(e!=null?a(e,"historyStates"):e))!=null?c:v,k={name:"historyStates",hash:{},fn:t.program(27,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:20,column:0},end:{line:22,column:18}}},$=typeof c==m?c.call(f,k):c,($=a(n,"historyStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"deepHistoryStates")||(e!=null?a(e,"deepHistoryStates"):e))!=null?c:v,k={name:"deepHistoryStates",hash:{},fn:t.program(29,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:23,column:0},end:{line:25,column:22}}},$=typeof c==m?c.call(f,k):c,($=a(n,"deepHistoryStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"choiceStates")||(e!=null?a(e,"choiceStates"):e))!=null?c:v,k={name:"choiceStates",hash:{},fn:t.program(31,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:26,column:0},end:{line:29,column:17}}},$=typeof c==m?c.call(f,k):c,($=a(n,"choiceStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"forkjoinStates")||(e!=null?a(e,"forkjoinStates"):e))!=null?c:v,k={name:"forkjoinStates",hash:{},fn:t.program(43,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:30,column:0},end:{line:32,column:19}}},$=typeof c==m?c.call(f,k):c,($=a(n,"forkjoinStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"junctionStates")||(e!=null?a(e,"junctionStates"):e))!=null?c:v,k={name:"junctionStates",hash:{},fn:t.program(4,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:33,column:0},end:{line:35,column:19}}},$=typeof c==m?c.call(f,k):c,($=a(n,"junctionStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"terminateStates")||(e!=null?a(e,"terminateStates"):e))!=null?c:v,k={name:"terminateStates",hash:{},fn:t.program(45,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:36,column:0},end:{line:43,column:20}}},$=typeof c==m?c.call(f,k):c,($=a(n,"terminateStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"finalStates")||(e!=null?a(e,"finalStates"):e))!=null?c:v,k={name:"finalStates",hash:{},fn:t.program(48,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:44,column:0},end:{line:46,column:16}}},$=typeof c==m?c.call(f,k):c,($=a(n,"finalStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"compositeStates")||(e!=null?a(e,"compositeStates"):e))!=null?c:v,k={name:"compositeStates",hash:{},fn:t.program(50,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:47,column:0},end:{line:61,column:20}}},$=typeof c==m?c.call(f,k):c,($=a(n,"compositeStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"states")||(e!=null?a(e,"states"):e))!=null?c:v,k={name:"states",hash:{},fn:t.program(60,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:62,column:0},end:{line:67,column:11}}},$=typeof c==m?c.call(f,k):c,($=a(n,"states")?$:p.call(e,$,k))!=null&&(b+=$),b},useData:!0,useDepths:!0})});var Dn=G((Cs,In)=>{var fe=require("handlebars/dist/handlebars.runtime.js");Hn();qn();fe.registerPartial("dot.states.template.hbs",fe.templates["dot.states.template.hbs"]);fe.registerHelper("stateSection",t=>fe.templates["dot.states.template.hbs"](oi(t)));function X(t){return e=>e.type===t}function ai(t){return e=>t.includes(e.type)}function oi(t){return t.initialStates=t.states.filter(X("initial")),t.regularStates=t.states.filter(e=>X("regular")(e)&&!e.statemachine),t.historyStates=t.states.filter(X("history")),t.deepHistoryStates=t.states.filter(X("deephistory")),t.choiceStates=t.states.filter(X("choice")),t.forkjoinStates=t.states.filter(ai(["fork","join","forkjoin"])),t.junctionStates=t.states.filter(X("junction")),t.terminateStates=t.states.filter(X("terminate")),t.finalStates=t.states.filter(X("final")),t.compositeStates=t.states.filter(e=>e.statemachine),t}In.exports=function(e){return fe.templates["dot.template.hbs"](e)}});var Xn=G(()=>{var Ue=require("handlebars/dist/handlebars.runtime"),Fi=Ue.template,Ri=Ue.templates=Ue.templates||{};Ri["scxml.template.hbs"]=Fi({1:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return'initial="'+t.escapeExpression(typeof(n=(n=u(n,"initial")||(e!=null?u(e,"initial"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"initial",hash:{},data:r,loc:{start:{line:2,column:71},end:{line:2,column:82}}}):n)+'" '},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,r){var u,s=t.lookupProperty||function(f,v){if(Object.prototype.hasOwnProperty.call(f,v))return f[v]};return`<?xml version="1.0" encoding="UTF-8"?>
56
+ `},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,r,u,s){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(I,D){if(Object.prototype.hasOwnProperty.call(I,D))return I[D]},b="",c=(c=a(n,"compositeStates")||(e!=null?a(e,"compositeStates"):e))!=null?c:v,k={name:"compositeStates",hash:{},fn:t.program(1,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:1,column:0},end:{line:5,column:20}}},$=typeof c==m?c.call(f,k):c;return($=a(n,"compositeStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"initialStates")||(e!=null?a(e,"initialStates"):e))!=null?c:v,k={name:"initialStates",hash:{},fn:t.program(4,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:6,column:0},end:{line:8,column:18}}},$=typeof c==m?c.call(f,k):c,($=a(n,"initialStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"regularStates")||(e!=null?a(e,"regularStates"):e))!=null?c:v,k={name:"regularStates",hash:{},fn:t.program(11,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:9,column:0},end:{line:19,column:18}}},$=typeof c==m?c.call(f,k):c,($=a(n,"regularStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"historyStates")||(e!=null?a(e,"historyStates"):e))!=null?c:v,k={name:"historyStates",hash:{},fn:t.program(27,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:20,column:0},end:{line:22,column:18}}},$=typeof c==m?c.call(f,k):c,($=a(n,"historyStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"deepHistoryStates")||(e!=null?a(e,"deepHistoryStates"):e))!=null?c:v,k={name:"deepHistoryStates",hash:{},fn:t.program(29,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:23,column:0},end:{line:25,column:22}}},$=typeof c==m?c.call(f,k):c,($=a(n,"deepHistoryStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"choiceStates")||(e!=null?a(e,"choiceStates"):e))!=null?c:v,k={name:"choiceStates",hash:{},fn:t.program(31,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:26,column:0},end:{line:29,column:17}}},$=typeof c==m?c.call(f,k):c,($=a(n,"choiceStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"forkjoinStates")||(e!=null?a(e,"forkjoinStates"):e))!=null?c:v,k={name:"forkjoinStates",hash:{},fn:t.program(43,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:30,column:0},end:{line:32,column:19}}},$=typeof c==m?c.call(f,k):c,($=a(n,"forkjoinStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"junctionStates")||(e!=null?a(e,"junctionStates"):e))!=null?c:v,k={name:"junctionStates",hash:{},fn:t.program(4,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:33,column:0},end:{line:35,column:19}}},$=typeof c==m?c.call(f,k):c,($=a(n,"junctionStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"terminateStates")||(e!=null?a(e,"terminateStates"):e))!=null?c:v,k={name:"terminateStates",hash:{},fn:t.program(45,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:36,column:0},end:{line:43,column:20}}},$=typeof c==m?c.call(f,k):c,($=a(n,"terminateStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"finalStates")||(e!=null?a(e,"finalStates"):e))!=null?c:v,k={name:"finalStates",hash:{},fn:t.program(48,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:44,column:0},end:{line:46,column:16}}},$=typeof c==m?c.call(f,k):c,($=a(n,"finalStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"compositeStates")||(e!=null?a(e,"compositeStates"):e))!=null?c:v,k={name:"compositeStates",hash:{},fn:t.program(50,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:47,column:0},end:{line:61,column:20}}},$=typeof c==m?c.call(f,k):c,($=a(n,"compositeStates")?$:p.call(e,$,k))!=null&&(b+=$),c=(c=a(n,"states")||(e!=null?a(e,"states"):e))!=null?c:v,k={name:"states",hash:{},fn:t.program(60,r,0,u,s),inverse:t.noop,data:r,loc:{start:{line:62,column:0},end:{line:67,column:11}}},$=typeof c==m?c.call(f,k):c,($=a(n,"states")?$:p.call(e,$,k))!=null&&(b+=$),b},useData:!0,useDepths:!0})});var Tn=z((vs,Rn)=>{var se=require("handlebars/dist/handlebars.runtime.js");_n();Fn();se.registerPartial("dot.states.template.hbs",se.templates["dot.states.template.hbs"]);se.registerHelper("stateSection",t=>se.templates["dot.states.template.hbs"](Ko(t)));function U(t){return e=>e.type===t}function Zo(t){return e=>t.includes(e.type)}function Ko(t){return t.initialStates=t.states.filter(U("initial")),t.regularStates=t.states.filter(e=>U("regular")(e)&&!e.statemachine),t.historyStates=t.states.filter(U("history")),t.deepHistoryStates=t.states.filter(U("deephistory")),t.choiceStates=t.states.filter(U("choice")),t.forkjoinStates=t.states.filter(Zo(["fork","join","forkjoin"])),t.junctionStates=t.states.filter(U("junction")),t.terminateStates=t.states.filter(U("terminate")),t.finalStates=t.states.filter(U("final")),t.compositeStates=t.states.filter(e=>e.statemachine),t}Rn.exports=function(e){return se.templates["dot.template.hbs"](e)}});var Sn=z(()=>{var Me=require("handlebars/dist/handlebars.runtime"),Pi=Me.template,Ci=Me.templates=Me.templates||{};Ci["scxml.template.hbs"]=Pi({1:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return'initial="'+t.escapeExpression(typeof(n=(n=u(n,"initial")||(e!=null?u(e,"initial"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"initial",hash:{},data:r,loc:{start:{line:2,column:71},end:{line:2,column:82}}}):n)+'" '},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,r){var u,s=t.lookupProperty||function(f,v){if(Object.prototype.hasOwnProperty.call(f,v))return f[v]};return`<?xml version="1.0" encoding="UTF-8"?>
57
57
  <scxml xmlns="http://www.w3.org/2005/07/scxml" `+((u=s(n,"if").call(e??(t.nullContext||{}),e!=null?s(e,"initial"):e,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r,loc:{start:{line:2,column:47},end:{line:2,column:91}}}))!=null?u:"")+`version="1.0">
58
58
  `+((u=t.invokePartial(s(d,"scxml.states.template.hbs"),e,{name:"scxml.states.template.hbs",data:r,helpers:n,partials:d,decorators:t.decorators}))!=null?u:"")+`</scxml>
59
- `},usePartial:!0,useData:!0})});var Jn=G(()=>{var Ge=require("handlebars/dist/handlebars.runtime"),Ti=Ge.template,Bi=Ge.templates=Ge.templates||{};Bi["scxml.states.template.hbs"]=Ti({1:function(t,e,n,d,r){var u,s,f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.escapeExpression,a=t.lookupProperty||function(b,c){if(Object.prototype.hasOwnProperty.call(b,c))return b[c]};return" <"+p(typeof(s=(s=a(n,"kind")||(e!=null?a(e,"kind"):e))!=null?s:v)==m?s.call(f,{name:"kind",hash:{},data:r,loc:{start:{line:2,column:5},end:{line:2,column:13}}}):s)+' id="'+p(typeof(s=(s=a(n,"id")||(e!=null?a(e,"id"):e))!=null?s:v)==m?s.call(f,{name:"id",hash:{},data:r,loc:{start:{line:2,column:18},end:{line:2,column:24}}}):s)+'"'+((u=a(n,"if").call(f,e!=null?a(e,"initial"):e,{name:"if",hash:{},fn:t.program(2,r,0),inverse:t.noop,data:r,loc:{start:{line:2,column:25},end:{line:2,column:69}}}))!=null?u:"")+((u=a(n,"if").call(f,e!=null?a(e,"type"):e,{name:"if",hash:{},fn:t.program(4,r,0),inverse:t.noop,data:r,loc:{start:{line:2,column:69},end:{line:2,column:104}}}))!=null?u:"")+`>
59
+ `},usePartial:!0,useData:!0})});var Mn=z(()=>{var ze=require("handlebars/dist/handlebars.runtime"),Oi=ze.template,Ei=ze.templates=ze.templates||{};Ei["scxml.states.template.hbs"]=Oi({1:function(t,e,n,d,r){var u,s,f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.escapeExpression,a=t.lookupProperty||function(b,c){if(Object.prototype.hasOwnProperty.call(b,c))return b[c]};return" <"+p(typeof(s=(s=a(n,"kind")||(e!=null?a(e,"kind"):e))!=null?s:v)==m?s.call(f,{name:"kind",hash:{},data:r,loc:{start:{line:2,column:5},end:{line:2,column:13}}}):s)+' id="'+p(typeof(s=(s=a(n,"id")||(e!=null?a(e,"id"):e))!=null?s:v)==m?s.call(f,{name:"id",hash:{},data:r,loc:{start:{line:2,column:18},end:{line:2,column:24}}}):s)+'"'+((u=a(n,"if").call(f,e!=null?a(e,"initial"):e,{name:"if",hash:{},fn:t.program(2,r,0),inverse:t.noop,data:r,loc:{start:{line:2,column:25},end:{line:2,column:69}}}))!=null?u:"")+((u=a(n,"if").call(f,e!=null?a(e,"type"):e,{name:"if",hash:{},fn:t.program(4,r,0),inverse:t.noop,data:r,loc:{start:{line:2,column:69},end:{line:2,column:104}}}))!=null?u:"")+`>
60
60
  `+((u=t.invokePartial(a(d,"scxml.states.template.hbs"),e,{name:"scxml.states.template.hbs",data:r,indent:" ",helpers:n,partials:d,decorators:t.decorators}))!=null?u:"")+((u=a(n,"each").call(f,e!=null?a(e,"onentries"):e,{name:"each",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))!=null?u:"")+((u=a(n,"each").call(f,e!=null?a(e,"onexits"):e,{name:"each",hash:{},fn:t.program(8,r,0),inverse:t.noop,data:r,loc:{start:{line:7,column:4},end:{line:9,column:13}}}))!=null?u:"")+((u=a(n,"each").call(f,e!=null?a(e,"transitions"):e,{name:"each",hash:{},fn:t.program(10,r,0),inverse:t.noop,data:r,loc:{start:{line:10,column:4},end:{line:18,column:13}}}))!=null?u:"")+" </"+p(typeof(s=(s=a(n,"kind")||(e!=null?a(e,"kind"):e))!=null?s:v)==m?s.call(f,{name:"kind",hash:{},data:r,loc:{start:{line:19,column:6},end:{line:19,column:14}}}):s)+`>
61
61
  `},2:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return' initial="'+t.escapeExpression(typeof(n=(n=u(n,"initial")||(e!=null?u(e,"initial"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"initial",hash:{},data:r,loc:{start:{line:2,column:50},end:{line:2,column:61}}}):n)+'"'},4:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return' type="'+t.escapeExpression(typeof(n=(n=u(n,"type")||(e!=null?u(e,"type"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"type",hash:{},data:r,loc:{start:{line:2,column:88},end:{line:2,column:96}}}):n)+'"'},6:function(t,e,n,d,r){return" <onentry>"+t.escapeExpression(t.lambda(e,e))+`</onentry>
62
62
  `},8:function(t,e,n,d,r){return" <onexit>"+t.escapeExpression(t.lambda(e,e))+`</onexit>
@@ -64,16 +64,16 @@ var Da=Object.create;var ie=Object.defineProperty,La=Object.defineProperties,Va=
64
64
  `+m(typeof(t=(t=p(n,"action")||(e!=null?p(e,"action"):e))!=null?t:f)==v?t.call(s,{name:"action",hash:{},data:r,loc:{start:{line:13,column:12},end:{line:13,column:22}}}):t)+`
65
65
  </transition>
66
66
  `},12:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return'event="'+t.escapeExpression(typeof(n=(n=u(n,"event")||(e!=null?u(e,"event"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"event",hash:{},data:r,loc:{start:{line:12,column:40},end:{line:12,column:49}}}):n)+'" '},14:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return'cond="'+t.escapeExpression(typeof(n=(n=u(n,"cond")||(e!=null?u(e,"cond"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"cond",hash:{},data:r,loc:{start:{line:12,column:76},end:{line:12,column:84}}}):n)+'" '},16:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return'type="'+t.escapeExpression(typeof(n=(n=u(n,"type")||(e!=null?u(e,"type"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"type",hash:{},data:r,loc:{start:{line:12,column:111},end:{line:12,column:119}}}):n)+'" '},18:function(t,e,n,d,r){var u,s=e??(t.nullContext||{}),f=t.lookupProperty||function(v,m){if(Object.prototype.hasOwnProperty.call(v,m))return v[m]};return" <transition "+((u=f(n,"if").call(s,e!=null?f(e,"event"):e,{name:"if",hash:{},fn:t.program(12,r,0),inverse:t.noop,data:r,loc:{start:{line:16,column:20},end:{line:16,column:58}}}))!=null?u:"")+((u=f(n,"if").call(s,e!=null?f(e,"cond"):e,{name:"if",hash:{},fn:t.program(14,r,0),inverse:t.noop,data:r,loc:{start:{line:16,column:58},end:{line:16,column:93}}}))!=null?u:"")+((u=f(n,"if").call(s,e!=null?f(e,"type"):e,{name:"if",hash:{},fn:t.program(16,r,0),inverse:t.noop,data:r,loc:{start:{line:16,column:93},end:{line:16,column:128}}}))!=null?u:"")+'target="'+t.escapeExpression(typeof(u=(u=f(n,"target")||(e!=null?f(e,"target"):e))!=null?u:t.hooks.helperMissing)=="function"?u.call(s,{name:"target",hash:{},data:r,loc:{start:{line:16,column:136},end:{line:16,column:146}}}):u)+`"/>
67
- `},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return(n=u(n,"each").call(e??(t.nullContext||{}),e!=null?u(e,"states"):e,{name:"each",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r,loc:{start:{line:1,column:0},end:{line:20,column:9}}}))!=null?n:""},usePartial:!0,useData:!0})});var Wn=G((Xs,Qn)=>{var Xe=require("handlebars/dist/handlebars.runtime.js");Xn();Jn();Xe.registerPartial("scxml.states.template.hbs",Xe.templates["scxml.states.template.hbs"]);Qn.exports=function(e){return Xe.templates["scxml.template.hbs"](e)}});var qi={};Ua(qi,{default:()=>Hi,getAllowedValues:()=>ll,render:()=>tl,version:()=>nl});module.exports=Ga(qi);var sn=Object.freeze({inputType:{default:"smcat",values:[{name:"smcat"},{name:"json"},{name:"scxml"}]},outputType:{default:"svg",values:[{name:"svg"},{name:"eps"},{name:"ps"},{name:"ps2"},{name:"dot"},{name:"smcat"},{name:"json"},{name:"ast"},{name:"scxml"},{name:"oldsvg"},{name:"oldps2"},{name:"oldeps"},{name:"scjson"}]},engine:{default:"dot",values:[{name:"dot"},{name:"circo"},{name:"fdp"},{name:"neato"},{name:"osage"},{name:"twopi"}]},direction:{default:"top-down",values:[{name:"top-down"},{name:"bottom-top"},{name:"left-right"},{name:"right-left"}]},desugar:{default:!1,values:[{name:!0},{name:!1}]}});function Xa(t,e){return(t==null?void 0:t[e])??sn[e].default}function Ja(){return sn}var q={getAllowedValues:Ja,getOptionValue:Xa};var Pn=H(require("ajv"),1);function cn(t,e=!1){let n=[];return t.filter(d=>Boolean(d.statemachine)).forEach(d=>{Object.prototype.hasOwnProperty.call(d.statemachine,"states")&&(n=n.concat(cn(d.statemachine.states,!0)))}),n.concat(t.map(d=>({name:d.name,type:d.type,statemachine:Boolean(d.statemachine),hasParent:e})))}function un(t){let e=[];return Object.prototype.hasOwnProperty.call(t,"transitions")&&(e=t.transitions),Object.prototype.hasOwnProperty.call(t,"states")&&t.states.filter(n=>Boolean(n.statemachine)).forEach(n=>{e=e.concat(un(n.statemachine))}),e}var I=class{constructor(e){this._flattenedStates=cn(e.states||[]),this._flattenedTransitions=un(e)}get flattenedTransitions(){return this._flattenedTransitions}findStateByName(e){return this._flattenedStates.find(n=>n.name===e)}findStatesByTypes(e){return this._flattenedStates.filter(n=>e.includes(n.type))}findExternalSelfTransitions(e){return this._flattenedTransitions.filter(n=>n.from===e&&n.to===e&&n.type!=="internal")}findTransitionsByFrom(e){return this._flattenedTransitions.filter(n=>n.from===e)}findTransitionsByTo(e){return this._flattenedTransitions.filter(n=>n.to===e)}};var Qa="^(entry|activity|exit)\\s*/\\s*([^\\n$]*)(\\n|$)",Wa=new RegExp(Qa);function fn(t,e){return t.includes(e)}var Ya=[{re:/initial/,stateType:"initial"},{re:/final/,stateType:"final"},{re:/parallel/,stateType:"parallel"},{re:/(deep.*history)|(history.*deep)/,stateType:"deephistory"},{re:/history/,stateType:"history"},{re:/^\^.*/,stateType:"choice"},{re:/^].*/,stateType:"forkjoin"}];function Za(t){return e=>e.re.test(t)}function mn(t){return(Ya.find(Za(t))||{stateType:"regular"}).stateType}function _e(t){return{name:t,type:mn(t)}}function pn(t){return Boolean(t.statemachine)}function dn(t){let e=t.states||[];return e.filter(pn).reduce((n,d)=>n.concat(dn(d.statemachine)),e.map(n=>n.name))}function hn(t,e){e=e||dn(t),t.states=t.states||[];let n=t.transitions||[];return t.states.filter(pn).forEach(d=>{d.statemachine.states=hn(d.statemachine,e)}),n.forEach(d=>{fn(e,d.from)||(e.push(d.from),t.states.push(_e(d.from))),fn(e,d.to)||(e.push(d.to),t.states.push(_e(d.to)))}),t.states}function Ka(t,e){let n="junction";return t<=1&&e>1&&(n="fork"),t>1&&e<=1&&(n="join"),n}function gn(t,e=new I(t)){return t.states=t.states.map(n=>{if(n.type==="forkjoin"&&!n.typeExplicitlySet){let d=e.findTransitionsByTo(n.name).length,r=e.findTransitionsByFrom(n.name).length;n.type=Ka(d,r)}return n.statemachine&&(n.statemachine=gn(n.statemachine,e)),n}),t}function eo(t,e){return t.name===e.name}function to(t,e){return t.reduce((n,d)=>{let r=n.findIndex(u=>e(u,d));return r>-1?(n[r]=d,n):n.concat(d)},[])}function no(t){let e=/([^[/]+)?(\[[^\]]+\])?[^/]*(\/.+)?/,n={},d=t.match(e),r=1,u=2,s=3;return d[r]&&(n.event=d[r].trim()),d[u]&&(n.cond=d[u].slice(1,-1).trim()),d[s]&&(n.action=d[s].slice(1,d[s].length).trim()),n}function yn(t,e,n,d=r=>r){d(n)&&(t[e]=n)}function lo(t,e,n){yn(t,e,n,d=>d&&d.length>0)}function ro(t){let e=t.match(Wa),n=1,d=2;return e?{type:e[n],body:e[d]}:{type:"activity",body:t}}function ao(t){return t.split(/\n\s*/g).map(e=>e.trim()).map(ro)}var T={initState:_e,extractUndeclaredStates:hn,classifyForkJoins:gn,getStateType:mn,stateEqual:eo,uniq:to,parseTransitionExpression:no,extractActions:ao,setIf:yn,setIfNotEmpty:lo};function oo(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function Y(t,e,n,d){var r=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(r,Y.prototype),r.expected=e,r.found=n,r.location=d,r.name="SyntaxError",r}oo(Y,Error);function Fe(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}Y.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,d;for(d=0;d<t.length;d++)if(t[d].source===this.location.source){n=t[d].text.split(/\r\n|\n|\r/g);break}var r=this.location.start,u=this.location.source+":"+r.line+":"+r.column;if(n){var s=this.location.end,f=Fe("",r.line.toString().length," "),v=n[r.line-1],m=r.line===s.line?s.column:v.length+1,p=m-r.column||1;e+=`
67
+ `},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,r){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return(n=u(n,"each").call(e??(t.nullContext||{}),e!=null?u(e,"states"):e,{name:"each",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r,loc:{start:{line:1,column:0},end:{line:20,column:9}}}))!=null?n:""},usePartial:!0,useData:!0})});var Un=z((Vs,zn)=>{var Ue=require("handlebars/dist/handlebars.runtime.js");Sn();Mn();Ue.registerPartial("scxml.states.template.hbs",Ue.templates["scxml.states.template.hbs"]);zn.exports=function(e){return Ue.templates["scxml.template.hbs"](e)}});var Ai={};Da(Ai,{default:()=>ji,getAllowedValues:()=>Zn,render:()=>Wn,version:()=>Yn});module.exports=La(Ai);var nn=Object.freeze({inputType:{default:"smcat",values:[{name:"smcat"},{name:"json"},{name:"scxml"}]},outputType:{default:"svg",values:[{name:"svg"},{name:"eps"},{name:"ps"},{name:"ps2"},{name:"dot"},{name:"smcat"},{name:"json"},{name:"ast"},{name:"scxml"},{name:"oldsvg"},{name:"oldps2"},{name:"oldeps"},{name:"scjson"}]},engine:{default:"dot",values:[{name:"dot"},{name:"circo"},{name:"fdp"},{name:"neato"},{name:"osage"},{name:"twopi"}]},direction:{default:"top-down",values:[{name:"top-down"},{name:"bottom-top"},{name:"left-right"},{name:"right-left"}]},desugar:{default:!1,values:[{name:!0},{name:!1}]}});function Va(t,e){return(t==null?void 0:t[e])??nn[e].default}function Na(){return nn}var H={getAllowedValues:Na,getOptionValue:Va};var bn=B(require("ajv"),1);function ln(t,e=!1){let n=[];return t.filter(d=>Boolean(d.statemachine)).forEach(d=>{Object.prototype.hasOwnProperty.call(d.statemachine,"states")&&(n=n.concat(ln(d.statemachine.states,!0)))}),n.concat(t.map(d=>({name:d.name,type:d.type,statemachine:Boolean(d.statemachine),hasParent:e})))}function rn(t){let e=[];return Object.prototype.hasOwnProperty.call(t,"transitions")&&(e=t.transitions),Object.prototype.hasOwnProperty.call(t,"states")&&t.states.filter(n=>Boolean(n.statemachine)).forEach(n=>{e=e.concat(rn(n.statemachine))}),e}var q=class{constructor(e){this._flattenedStates=ln(e.states||[]),this._flattenedTransitions=rn(e)}get flattenedTransitions(){return this._flattenedTransitions}findStateByName(e){return this._flattenedStates.find(n=>n.name===e)}findStatesByTypes(e){return this._flattenedStates.filter(n=>e.includes(n.type))}findExternalSelfTransitions(e){return this._flattenedTransitions.filter(n=>n.from===e&&n.to===e&&n.type!=="internal")}findTransitionsByFrom(e){return this._flattenedTransitions.filter(n=>n.from===e)}findTransitionsByTo(e){return this._flattenedTransitions.filter(n=>n.to===e)}};var Sa="^(entry|activity|exit)\\s*/\\s*([^\\n$]*)(\\n|$)",Ma=new RegExp(Sa);function an(t,e){return t.includes(e)}var za=[{re:/initial/,stateType:"initial"},{re:/final/,stateType:"final"},{re:/parallel/,stateType:"parallel"},{re:/(deep.*history)|(history.*deep)/,stateType:"deephistory"},{re:/history/,stateType:"history"},{re:/^\^.*/,stateType:"choice"},{re:/^].*/,stateType:"forkjoin"}];function Ua(t){return e=>e.re.test(t)}function on(t){return(za.find(Ua(t))||{stateType:"regular"}).stateType}function je(t){return{name:t,type:on(t)}}function sn(t){return Boolean(t.statemachine)}function cn(t){let e=t.states||[];return e.filter(sn).reduce((n,d)=>n.concat(cn(d.statemachine)),e.map(n=>n.name))}function un(t,e){e=e||cn(t),t.states=t.states||[];let n=t.transitions||[];return t.states.filter(sn).forEach(d=>{d.statemachine.states=un(d.statemachine,e)}),n.forEach(d=>{an(e,d.from)||(e.push(d.from),t.states.push(je(d.from))),an(e,d.to)||(e.push(d.to),t.states.push(je(d.to)))}),t.states}function Ga(t,e){let n="junction";return t<=1&&e>1&&(n="fork"),t>1&&e<=1&&(n="join"),n}function fn(t,e=new q(t)){return t.states=t.states.map(n=>{if(n.type==="forkjoin"&&!n.typeExplicitlySet){let d=e.findTransitionsByTo(n.name).length,r=e.findTransitionsByFrom(n.name).length;n.type=Ga(d,r)}return n.statemachine&&(n.statemachine=fn(n.statemachine,e)),n}),t}function Xa(t,e){return t.name===e.name}function Ja(t,e){return t.reduce((n,d)=>{let r=n.findIndex(u=>e(u,d));return r>-1?(n[r]=d,n):n.concat(d)},[])}function Qa(t){let e=/([^[/]+)?(\[[^\]]+\])?[^/]*(\/.+)?/,n={},d=t.match(e),r=1,u=2,s=3;return d[r]&&(n.event=d[r].trim()),d[u]&&(n.cond=d[u].slice(1,-1).trim()),d[s]&&(n.action=d[s].slice(1,d[s].length).trim()),n}function mn(t,e,n,d=r=>r){d(n)&&(t[e]=n)}function Wa(t,e,n){mn(t,e,n,d=>d&&d.length>0)}function Ya(t){let e=t.match(Ma),n=1,d=2;return e?{type:e[n],body:e[d]}:{type:"activity",body:t}}function Za(t){return t.split(/\n\s*/g).map(e=>e.trim()).map(Ya)}var R={initState:je,extractUndeclaredStates:un,classifyForkJoins:fn,getStateType:on,stateEqual:Xa,uniq:Ja,parseTransitionExpression:Qa,extractActions:Za,setIf:mn,setIfNotEmpty:Wa};function Ka(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function Q(t,e,n,d){var r=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(r,Q.prototype),r.expected=e,r.found=n,r.location=d,r.name="SyntaxError",r}Ka(Q,Error);function Ae(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}Q.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,d;for(d=0;d<t.length;d++)if(t[d].source===this.location.source){n=t[d].text.split(/\r\n|\n|\r/g);break}var r=this.location.start,u=this.location.source+":"+r.line+":"+r.column;if(n){var s=this.location.end,f=Ae("",r.line.toString().length," "),v=n[r.line-1],m=r.line===s.line?s.column:v.length+1,p=m-r.column||1;e+=`
68
68
  --> `+u+`
69
69
  `+f+` |
70
70
  `+r.line+" | "+v+`
71
- `+f+" | "+Fe("",r.column-1," ")+Fe("",p,"^")}else e+=`
72
- at `+u}return e};Y.buildMessage=function(t,e){var n={literal:function(m){return'"'+r(m.text)+'"'},class:function(m){var p=m.parts.map(function(a){return Array.isArray(a)?u(a[0])+"-"+u(a[1]):u(a)});return"["+(m.inverted?"^":"")+p.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(m){return m.description}};function d(m){return m.charCodeAt(0).toString(16).toUpperCase()}function r(m){return m.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+d(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+d(p)})}function u(m){return m.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+d(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+d(p)})}function s(m){return n[m.type](m)}function f(m){var p=m.map(s),a,b;if(p.sort(),p.length>0){for(a=1,b=1;a<p.length;a++)p[a-1]!==p[a]&&(p[b]=p[a],b++);p.length=b}switch(p.length){case 1:return p[0];case 2:return p[0]+" or "+p[1];default:return p.slice(0,-1).join(", ")+", or "+p[p.length-1]}}function v(m){return m?'"'+r(m)+'"':"end of input"}return"Expected "+f(t)+" but "+v(e)+" found."};function vn(t,e){e=e!==void 0?e:{};var n={},d=e.grammarSource,r={program:Ut},u=Ut,s=",",f=";",v="[",m="]",p=":",a="{",b="}",c="=",k="label",$="color",D="class",L="active",We="type",Ye="regular",Ze="initial",Ke="terminate",et="final",tt="parallel",nt="history",lt="deephistory",rt="choice",at="forkjoin",ot="fork",it="join",st="junction",rl="width",ct="external",ut="internal",ft="->",mt="=>>",pt="=>",dt=">>",ht=":>",gt="--",yt="==",vt="<-",bt="<<=",$t="<=",xt="<<",kt="<:",al="#",ol=".",z='"',me='\\"',wt="/*",pe="*/",Pt="//",Ct=/^[0-9]/,Ot=/^[a-zA-Z0-9_\- ]/,Et=/^[^;, "\t\n\r=\-><:{[]/,il=/^[ \t]/,sl=/^[\r\n]/,cl=/^[^\r\n]/,ul=_("statemachine"),de=E(",",!1),K=E(";",!1),fl=_("state"),jt=E("[",!1),At=E("]",!1),_t=E(":",!1),le=E("{",!1),ml=E("}",!1),pl=_("extended state attributes"),dl=_("extended state attribute"),J=E("=",!1),hl=_("state attribute name"),gl=E("label",!0),Ft=E("color",!0),yl=_("class attribute"),vl=E("class",!0),bl=_("state flag"),$l=E("active",!0),xl=_("state type"),Rt=E("type",!0),kl=_("state type type"),wl=E("regular",!1),Pl=E("initial",!1),Cl=E("terminate",!1),Ol=E("final",!1),El=E("parallel",!1),jl=E("history",!1),Al=E("deephistory",!1),_l=E("choice",!1),Fl=E("forkjoin",!1),Rl=E("fork",!1),Tl=E("join",!1),Bl=E("junction",!1),Hl=_("transition"),ql=_("extended transition attributes"),Il=_("extended transition attribute"),Dl=_("transition attribute name"),Ll=_("transition type name"),Vl=_("numeric transition attribute name"),Nl=E("width",!0),Sl=_("transition type value"),Ml=E("external",!1),zl=E("internal",!1),Ul=_("left to right arrow"),Gl=E("->",!1),Xl=E("=>>",!1),Jl=E("=>",!1),Ql=E(">>",!1),Wl=E(":>",!1),Yl=E("--",!1),Zl=E("==",!1),Kl=_("right to left arrow"),er=E("<-",!1),tr=E("<<=",!1),nr=E("<=",!1),lr=E("<<",!1),rr=E("<:",!1),ar=E("#",!1),or=E(".",!1),Tt=ee([["0","9"]],!1,!1),ir=_("double quoted string"),U=E('"',!1),Bt=E('\\"',!1),Q=aa(),sr=_("valid class string"),Ht=ee([["a","z"],["A","Z"],["0","9"],"_","-"," "],!1,!1),cr=_("identifier"),qt=ee([";",","," ",'"'," ",`
73
- `,"\r","=","-",">","<",":","{","["],!0,!1),ur=_("whitespace"),fr=ee([" "," "],!1,!1),mr=_("line end"),pr=ee(["\r",`
74
- `],!1,!1),dr=E("/*",!1),It=E("*/",!1),hr=E("//",!1),gr=ee(["\r",`
75
- `],!0,!1),yr=_("comment"),vr=function(l){return l.states=T.extractUndeclaredStates(l),T.classifyForkJoins(l)},br=function(l,i){let g={};return T.setIf(g,"states",l),T.setIfNotEmpty(g,"transitions",i),g},Dt=function(l){return l},$r=function(l){return l},xr=function(l){return T.uniq(l[0].concat(l[1]),T.stateEqual)},kr=function(l,i,g){return g},wr=function(l,i,g,h){return h},Pr=function(l,i,g,h,w){return w},Cr=function(l,i,g,h,w){let O=T.initState(i);return(g||[]).forEach(j=>T.setIf(O,j.name,j.value)),T.setIf(O,"typeExplicitlySet",(g||[]).some(j=>j.typeExplicitlySet)),T.setIf(O,"statemachine",w),T.setIfNotEmpty(O,"note",l),Boolean(h)&&T.setIfNotEmpty(O,"actions",T.extractActions(h)),O},Or=function(l,i){return{name:l,value:i}},Er=function(l,i){return{name:l,value:i}},jr=function(l){return{name:l,value:!0}},Ar=function(l,i){return{name:l,value:i,typeExplicitlySet:!0}},_r=function(l){return l.toLowerCase()},Fr=function(l){return l.toLowerCase()},Rr=function(l){return l.toLowerCase()},Tr=function(l){return l.toLowerCase()},Br=function(l,i,g){return g},Hr=function(l,i,g,h){return h},qr=function(l,i,g,h){return h&&(i.label=h,i=Object.assign(i,T.parseTransitionExpression(h))),(g||[]).forEach(w=>T.setIf(i,w.name,w.value)),T.setIfNotEmpty(i,"note",l),i},Ir=function(l,i){return{from:l,to:i}},Dr=function(l,i){return{from:i,to:l}},Lr=function(l,i){return{name:l,value:i}},Vr=function(l,i){return{name:l,value:i}},Nr=function(l,i){return{name:l,value:i}},Sr=function(l,i){return{name:l,value:i}},Mr=function(l){return l.toLowerCase()},zr=function(l){return l.toLowerCase()},Ur=function(l){return l},Gr=function(l){return l.join("").trim()},Xr=function(l){return parseFloat(l.join(""))},Jr=function(l){return parseInt(l.join(""),10)},Qr=function(l){return l.join("").replace(/\\\"/g,'"')},Lt=function(l){return l},Wr=function(l){return l.join("")},Vt=function(l){return l},Yr=function(l){return l.join("").trim()},Zr=function(l){return l.join("").trim()},Nt=function(l){return l},St=function(l){return l},Kr=function(l){return l.join("")},ea=function(l){return l},ta=function(l){return l},na=function(l){return l},la=function(l,i,g){return l+i.join("")+g},ra=function(l,i){return l+i.join("")},o=0,P=0,he=[{line:1,column:1}],V=0,Ce=[],y=0,ge;if("startRule"in e){if(!(e.startRule in r))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');u=r[e.startRule]}function Ii(){return t.substring(P,o)}function Di(){return P}function Li(){return{source:d,start:P,end:o}}function Vi(){return re(P,o)}function Ni(l,i){throw i=i!==void 0?i:re(P,o),zt([_(l)],t.substring(P,o),i)}function Si(l,i){throw i=i!==void 0?i:re(P,o),ia(l,i)}function E(l,i){return{type:"literal",text:l,ignoreCase:i}}function ee(l,i,g){return{type:"class",parts:l,inverted:i,ignoreCase:g}}function aa(){return{type:"any"}}function oa(){return{type:"end"}}function _(l){return{type:"other",description:l}}function Mt(l){var i=he[l],g;if(i)return i;for(g=l-1;!he[g];)g--;for(i=he[g],i={line:i.line,column:i.column};g<l;)t.charCodeAt(g)===10?(i.line++,i.column=1):i.column++,g++;return he[l]=i,i}function re(l,i){var g=Mt(l),h=Mt(i);return{source:d,start:{offset:l,line:g.line,column:g.column},end:{offset:i,line:h.line,column:h.column}}}function x(l){o<V||(o>V&&(V=o,Ce=[]),Ce.push(l))}function ia(l,i){return new Y(l,null,null,i)}function zt(l,i,g){return new Y(Y.buildMessage(l,i),l,i,g)}function Ut(){var l,i,g,h;return l=o,i=C(),g=Gt(),h=C(),P=l,l=vr(g),l}function Gt(){var l,i,g,h;for(y++,l=o,i=sa(),i===n&&(i=null),g=[],h=Qt();h!==n;)g.push(h),h=Qt();return P=l,l=br(i,g),y--,i=n,y===0&&x(ul),l}function sa(){var l,i,g,h,w,O;for(l=o,i=o,g=[],h=o,w=Oe(),w!==n?(t.charCodeAt(o)===44?(O=s,o++):(O=n,y===0&&x(de)),O!==n?(P=h,h=Dt(w)):(o=h,h=n)):(o=h,h=n);h!==n;)g.push(h),h=o,w=Oe(),w!==n?(t.charCodeAt(o)===44?(O=s,o++):(O=n,y===0&&x(de)),O!==n?(P=h,h=Dt(w)):(o=h,h=n)):(o=h,h=n);return h=o,w=Oe(),w!==n?(t.charCodeAt(o)===59?(O=f,o++):(O=n,y===0&&x(K)),O!==n?(P=h,h=$r(w)):(o=h,h=n)):(o=h,h=n),h!==n?(g=[g,h],i=g):(o=i,i=n),i!==n&&(P=l,i=xr(i)),l=i,l}function Oe(){var l,i,g,h,w,O,j,A,S,B,W,nn,je,Ia,Ae;for(y++,l=o,i=[],g=ye();g!==n;)i.push(g),g=ye();return g=C(),h=oe(),h!==n?(w=C(),O=o,t.charCodeAt(o)===91?(j=v,o++):(j=n,y===0&&x(jt)),j!==n?(A=ca(),t.charCodeAt(o)===93?(S=m,o++):(S=n,y===0&&x(At)),S!==n?(P=O,O=kr(i,h,A)):(o=O,O=n)):(o=O,O=n),O===n&&(O=null),j=C(),A=o,t.charCodeAt(o)===58?(S=p,o++):(S=n,y===0&&x(_t)),S!==n?(B=C(),W=Ca(),W!==n?(nn=C(),P=A,A=wr(i,h,O,W)):(o=A,A=n)):(o=A,A=n),A===n&&(A=null),S=C(),B=o,t.charCodeAt(o)===123?(W=a,o++):(W=n,y===0&&x(le)),W!==n?(nn=C(),je=Gt(),je!==n?(Ia=C(),t.charCodeAt(o)===125?(Ae=b,o++):(Ae=n,y===0&&x(ml)),Ae!==n?(P=B,B=Pr(i,h,O,A,je)):(o=B,B=n)):(o=B,B=n)):(o=B,B=n),B===n&&(B=null),W=C(),P=l,l=Cr(i,h,O,A,B)):(o=l,l=n),y--,l===n&&(i=n,y===0&&x(fl)),l}function ca(){var l,i;for(y++,l=[],i=Xt();i!==n;)l.push(i),i=Xt();return y--,i=n,y===0&&x(pl),l}function Xt(){var l,i,g,h,w,O,j,A;return y++,l=o,i=C(),g=ua(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(J)),w!==n?(O=C(),j=ae(),j!==n?(A=C(),P=l,l=Or(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=Jt(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(J)),w!==n?(O=C(),j=Yt(),j!==n?(A=C(),P=l,l=Er(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=fa(),g!==n?(h=C(),P=l,l=jr(g)):(o=l,l=n),l===n&&(l=o,i=C(),g=ma(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(J)),w!==n?(O=C(),j=pa(),j!==n?(A=C(),P=l,l=Ar(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n)))),y--,l===n&&(i=n,y===0&&x(dl)),l}function ua(){var l,i;return y++,l=o,t.substr(o,5).toLowerCase()===k?(i=t.substr(o,5),o+=5):(i=n,y===0&&x(gl)),i===n&&(t.substr(o,5).toLowerCase()===$?(i=t.substr(o,5),o+=5):(i=n,y===0&&x(Ft))),i!==n&&(P=l,i=_r(i)),l=i,y--,l===n&&(i=n,y===0&&x(hl)),l}function Jt(){var l,i;return y++,l=o,t.substr(o,5).toLowerCase()===D?(i=t.substr(o,5),o+=5):(i=n,y===0&&x(vl)),i!==n&&(P=l,i=Fr(i)),l=i,y--,l===n&&(i=n,y===0&&x(yl)),l}function fa(){var l,i;return y++,l=o,t.substr(o,6).toLowerCase()===L?(i=t.substr(o,6),o+=6):(i=n,y===0&&x($l)),i!==n&&(P=l,i=Rr(i)),l=i,y--,l===n&&(i=n,y===0&&x(bl)),l}function ma(){var l,i;return y++,l=o,t.substr(o,4).toLowerCase()===We?(i=t.substr(o,4),o+=4):(i=n,y===0&&x(Rt)),i!==n&&(P=l,i=Tr(i)),l=i,y--,l===n&&(i=n,y===0&&x(xl)),l}function pa(){var l,i;return y++,t.substr(o,7)===Ye?(l=Ye,o+=7):(l=n,y===0&&x(wl)),l===n&&(t.substr(o,7)===Ze?(l=Ze,o+=7):(l=n,y===0&&x(Pl)),l===n&&(t.substr(o,9)===Ke?(l=Ke,o+=9):(l=n,y===0&&x(Cl)),l===n&&(t.substr(o,5)===et?(l=et,o+=5):(l=n,y===0&&x(Ol)),l===n&&(t.substr(o,8)===tt?(l=tt,o+=8):(l=n,y===0&&x(El)),l===n&&(t.substr(o,7)===nt?(l=nt,o+=7):(l=n,y===0&&x(jl)),l===n&&(t.substr(o,11)===lt?(l=lt,o+=11):(l=n,y===0&&x(Al)),l===n&&(t.substr(o,6)===rt?(l=rt,o+=6):(l=n,y===0&&x(_l)),l===n&&(t.substr(o,8)===at?(l=at,o+=8):(l=n,y===0&&x(Fl)),l===n&&(t.substr(o,4)===ot?(l=ot,o+=4):(l=n,y===0&&x(Rl)),l===n&&(t.substr(o,4)===it?(l=it,o+=4):(l=n,y===0&&x(Tl)),l===n&&(t.substr(o,8)===st?(l=st,o+=8):(l=n,y===0&&x(Bl))))))))))))),y--,l===n&&(i=n,y===0&&x(kl)),l}function Qt(){var l,i,g,h,w,O,j,A,S;for(y++,l=o,i=[],g=ye();g!==n;)i.push(g),g=ye();return g=da(),g!==n?(h=o,t.charCodeAt(o)===91?(w=v,o++):(w=n,y===0&&x(jt)),w!==n?(O=ha(),t.charCodeAt(o)===93?(j=m,o++):(j=n,y===0&&x(At)),j!==n?(A=C(),P=h,h=Br(i,g,O)):(o=h,h=n)):(o=h,h=n),h===n&&(h=null),w=o,t.charCodeAt(o)===58?(O=p,o++):(O=n,y===0&&x(_t)),O!==n?(j=C(),A=Pa(),A!==n?(S=C(),P=w,w=Hr(i,g,h,A)):(o=w,w=n)):(o=w,w=n),w===n&&(w=null),t.charCodeAt(o)===59?(O=f,o++):(O=n,y===0&&x(K)),O!==n?(P=l,l=qr(i,g,h,w)):(o=l,l=n)):(o=l,l=n),y--,l===n&&(i=n,y===0&&x(Hl)),l}function da(){var l,i,g,h,w,O,j,A;return l=o,i=C(),g=oe(),g!==n?(h=C(),w=$a(),w!==n?(O=C(),j=oe(),j!==n?(A=C(),P=l,l=Ir(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=oe(),g!==n?(h=C(),w=xa(),w!==n?(O=C(),j=oe(),j!==n?(A=C(),P=l,l=Dr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n)),l}function ha(){var l,i;for(y++,l=[],i=Wt();i!==n;)l.push(i),i=Wt();return y--,i=n,y===0&&x(ql),l}function Wt(){var l,i,g,h,w,O,j,A;return y++,l=o,i=C(),g=ga(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(J)),w!==n?(O=C(),j=ae(),j!==n?(A=C(),P=l,l=Lr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=Jt(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(J)),w!==n?(O=C(),j=Yt(),j!==n?(A=C(),P=l,l=Vr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=ya(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(J)),w!==n?(O=C(),j=ba(),j!==n?(A=C(),P=l,l=Nr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=va(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(J)),w!==n?(O=C(),j=ka(),j!==n?(A=C(),P=l,l=Sr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n)))),y--,l===n&&(i=n,y===0&&x(Il)),l}function ga(){var l,i;return y++,l=o,t.substr(o,5).toLowerCase()===$?(i=t.substr(o,5),o+=5):(i=n,y===0&&x(Ft)),i!==n&&(P=l,i=Mr(i)),l=i,y--,l===n&&(i=n,y===0&&x(Dl)),l}function ya(){var l,i;return y++,l=o,t.substr(o,4).toLowerCase()===We?(i=t.substr(o,4),o+=4):(i=n,y===0&&x(Rt)),i!==n&&(P=l,i=zr(i)),l=i,y--,l===n&&(i=n,y===0&&x(Ll)),l}function va(){var l,i;return y++,l=o,t.substr(o,5).toLowerCase()===rl?(i=t.substr(o,5),o+=5):(i=n,y===0&&x(Nl)),i!==n&&(P=l,i=Ur(i)),l=i,y--,l===n&&(i=n,y===0&&x(Vl)),l}function ba(){var l,i;return y++,t.substr(o,8)===ct?(l=ct,o+=8):(l=n,y===0&&x(Ml)),l===n&&(t.substr(o,8)===ut?(l=ut,o+=8):(l=n,y===0&&x(zl))),y--,l===n&&(i=n,y===0&&x(Sl)),l}function $a(){var l,i;return y++,t.substr(o,2)===ft?(l=ft,o+=2):(l=n,y===0&&x(Gl)),l===n&&(t.substr(o,3)===mt?(l=mt,o+=3):(l=n,y===0&&x(Xl)),l===n&&(t.substr(o,2)===pt?(l=pt,o+=2):(l=n,y===0&&x(Jl)),l===n&&(t.substr(o,2)===dt?(l=dt,o+=2):(l=n,y===0&&x(Ql)),l===n&&(t.substr(o,2)===ht?(l=ht,o+=2):(l=n,y===0&&x(Wl)),l===n&&(t.substr(o,2)===gt?(l=gt,o+=2):(l=n,y===0&&x(Yl)),l===n&&(t.substr(o,2)===yt?(l=yt,o+=2):(l=n,y===0&&x(Zl)))))))),y--,l===n&&(i=n,y===0&&x(Ul)),l}function xa(){var l,i;return y++,t.substr(o,2)===vt?(l=vt,o+=2):(l=n,y===0&&x(er)),l===n&&(t.substr(o,3)===bt?(l=bt,o+=3):(l=n,y===0&&x(tr)),l===n&&(t.substr(o,2)===$t?(l=$t,o+=2):(l=n,y===0&&x(nr)),l===n&&(t.substr(o,2)===xt?(l=xt,o+=2):(l=n,y===0&&x(lr)),l===n&&(t.substr(o,2)===kt?(l=kt,o+=2):(l=n,y===0&&x(rr)))))),y--,l===n&&(i=n,y===0&&x(Kl)),l}function ye(){var l,i,g,h,w;if(l=o,i=C(),t.charCodeAt(o)===35?(g=al,o++):(g=n,y===0&&x(ar)),g!==n){for(h=[],w=ve();w!==n;)h.push(w),w=ve();P=l,l=Gr(h)}else o=l,l=n;return l}function ka(){var l;return l=wa(),l===n&&(l=Ee()),l}function wa(){var l,i,g,h,w;return l=o,i=o,g=Ee(),g!==n?(t.charCodeAt(o)===46?(h=ol,o++):(h=n,y===0&&x(or)),h!==n?(w=Ee(),w!==n?(g=[g,h,w],i=g):(o=i,i=n)):(o=i,i=n)):(o=i,i=n),i!==n&&(P=l,i=Xr(i)),l=i,l}function Ee(){var l,i,g;if(l=o,i=[],Ct.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(Tt)),g!==n)for(;g!==n;)i.push(g),Ct.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(Tt));else i=n;return i!==n&&(P=l,i=Jr(i)),l=i,l}function Pa(){var l;return l=ae(),l===n&&(l=ja()),l}function Ca(){var l;return l=ae(),l===n&&(l=Aa()),l}function ae(){var l,i,g,h;return y++,l=o,t.charCodeAt(o)===34?(i=z,o++):(i=n,y===0&&x(U)),i!==n?(g=Oa(),t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&x(U)),h!==n?(P=l,l=Qr(g)):(o=l,l=n)):(o=l,l=n),y--,l===n&&(i=n,y===0&&x(ir)),l}function Oa(){var l,i,g,h;for(l=[],i=o,g=o,y++,t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&x(U)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.substr(o,2)===me?(h=me,o+=2):(h=n,y===0&&x(Bt)),h===n&&(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(Q))),h!==n?(P=i,i=Lt(h)):(o=i,i=n)):(o=i,i=n);i!==n;)l.push(i),i=o,g=o,y++,t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&x(U)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.substr(o,2)===me?(h=me,o+=2):(h=n,y===0&&x(Bt)),h===n&&(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(Q))),h!==n?(P=i,i=Lt(h)):(o=i,i=n)):(o=i,i=n);return l}function Yt(){var l,i,g,h;return y++,l=o,t.charCodeAt(o)===34?(i=z,o++):(i=n,y===0&&x(U)),i!==n?(g=Ea(),t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&x(U)),h!==n?(P=l,l=Wr(g)):(o=l,l=n)):(o=l,l=n),y--,l===n&&(i=n,y===0&&x(sr)),l}function Ea(){var l,i,g,h;for(l=[],i=o,g=o,y++,t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&x(U)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(Ot.test(t.charAt(o))?(h=t.charAt(o),o++):(h=n,y===0&&x(Ht)),h!==n?(P=i,i=Vt(h)):(o=i,i=n)):(o=i,i=n);i!==n;)l.push(i),i=o,g=o,y++,t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&x(U)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(Ot.test(t.charAt(o))?(h=t.charAt(o),o++):(h=n,y===0&&x(Ht)),h!==n?(P=i,i=Vt(h)):(o=i,i=n)):(o=i,i=n);return l}function ja(){var l,i;return l=o,i=Fa(),P=l,i=Yr(i),l=i,l}function Aa(){var l,i;return l=o,i=_a(),P=l,i=Zr(i),l=i,l}function _a(){var l,i,g,h;for(l=[],i=o,g=o,y++,t.charCodeAt(o)===44?(h=s,o++):(h=n,y===0&&x(de)),h===n&&(t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(K)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&x(le)))),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(Q)),h!==n?(P=i,i=Nt(h)):(o=i,i=n)):(o=i,i=n);i!==n;)l.push(i),i=o,g=o,y++,t.charCodeAt(o)===44?(h=s,o++):(h=n,y===0&&x(de)),h===n&&(t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(K)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&x(le)))),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(Q)),h!==n?(P=i,i=Nt(h)):(o=i,i=n)):(o=i,i=n);return l}function Fa(){var l,i,g,h;for(l=[],i=o,g=o,y++,t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(K)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&x(le))),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(Q)),h!==n?(P=i,i=St(h)):(o=i,i=n)):(o=i,i=n);i!==n;)l.push(i),i=o,g=o,y++,t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(K)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&x(le))),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(Q)),h!==n?(P=i,i=St(h)):(o=i,i=n)):(o=i,i=n);return l}function oe(){var l,i,g;if(y++,l=o,i=[],Et.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(qt)),g!==n)for(;g!==n;)i.push(g),Et.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(qt));else i=n;return i!==n&&(P=l,i=Kr(i)),l=i,l===n&&(l=ae()),y--,l===n&&(i=n,y===0&&x(cr)),l}function Zt(){var l,i;return y++,l=o,il.test(t.charAt(o))?(i=t.charAt(o),o++):(i=n,y===0&&x(fr)),i!==n&&(P=l,i=ea(i)),l=i,y--,l===n&&(i=n,y===0&&x(ur)),l}function Kt(){var l,i;return y++,l=o,sl.test(t.charAt(o))?(i=t.charAt(o),o++):(i=n,y===0&&x(pr)),i!==n&&(P=l,i=ta(i)),l=i,y--,l===n&&(i=n,y===0&&x(mr)),l}function Ra(){var l;return t.substr(o,2)===wt?(l=wt,o+=2):(l=n,y===0&&x(dr)),l}function Ta(){var l;return t.substr(o,2)===pe?(l=pe,o+=2):(l=n,y===0&&x(It)),l}function en(){var l,i,g;return l=o,i=o,y++,t.substr(o,2)===pe?(g=pe,o+=2):(g=n,y===0&&x(It)),y--,g===n?i=void 0:(o=i,i=n),i!==n?(t.length>o?(g=t.charAt(o),o++):(g=n,y===0&&x(Q)),g!==n?(P=l,l=na(g)):(o=l,l=n)):(o=l,l=n),l}function Ba(){var l,i,g,h;if(l=o,i=Ra(),i!==n){for(g=[],h=en();h!==n;)g.push(h),h=en();h=Ta(),h!==n?(P=l,l=la(i,g,h)):(o=l,l=n)}else o=l,l=n;return l}function Ha(){var l;return t.substr(o,2)===Pt?(l=Pt,o+=2):(l=n,y===0&&x(hr)),l}function ve(){var l;return cl.test(t.charAt(o))?(l=t.charAt(o),o++):(l=n,y===0&&x(gr)),l}function qa(){var l,i,g,h;if(l=o,i=Ha(),i!==n){for(g=[],h=ve();h!==n;)g.push(h),h=ve();P=l,l=ra(i,g)}else o=l,l=n;return l}function tn(){var l,i;return y++,l=qa(),l===n&&(l=Ba()),y--,l===n&&(i=n,y===0&&x(yr)),l}function C(){var l,i;for(l=[],i=Zt(),i===n&&(i=Kt(),i===n&&(i=tn()));i!==n;)l.push(i),i=Zt(),i===n&&(i=Kt(),i===n&&(i=tn()));return l}if(ge=u(),ge!==n&&o===t.length)return ge;throw ge!==n&&o<t.length&&x(oa()),zt(Ce,V<t.length?t.charAt(V):null,V<t.length?re(V,V+1):re(V,V))}var Be=H(require("fast-xml-parser"),1),Z=H(require("he"),1),$e=H(require("lodash/castArray.js"),1);function io(t,e,n){let d="";return t&&(d+=t),e&&(d+=` [${e}]`),n&&(d+=`/ ${n}`),d.trim()}var be={formatLabel:io};var se=H(require("lodash/castArray.js"),1);function so(t){let e={id:t.id?`${t.id}.initial`:"initial"};return t.initial.transition&&Object.assign(e,{transition:[t.initial.transition]}),e}function co(t){return{id:"initial",transition:[{target:t.initial}]}}function uo(t){let e=[],n={};return t.initial&&(t.initial.transition||t.initial.id?n=so(t):n=co(t),e.push(n)),e}function Re(t){return N(F({},t),{initial:uo(t),state:(0,se.default)((t==null?void 0:t.state)??[]),parallel:(0,se.default)((t==null?void 0:t.parallel)??[]),history:(0,se.default)((t==null?void 0:t.history)??[]),final:(0,se.default)((t==null?void 0:t.final)??[])})}var fo=be.formatLabel;function bn(t,e){return(0,$e.default)(t[e]).map(n=>({type:e==="onexit"?"exit":"entry",body:Z.default.decode(n).trim()}))}function mo(t){return(0,$e.default)(t).map(e=>{let n=Z.default.decode(e.id||"").trim();return{type:"activity",body:n||Z.default.decode(e||"").trim()}})}function po(t){let e=[];return t.onentry&&(e=e.concat(bn(t,"onentry"))),t.invoke&&(e=e.concat(mo(t.invoke))),t.onexit&&(e=e.concat(bn(t,"onexit"))),e}function ho(t,e){return t==="history"&&e.type==="deep"?"deephistory":t}function ce(t){return e=>{let n={name:e.id,type:ho(t,e)};return T.getStateType(e.id)!==n.type&&(n.typeExplicitlySet=!0),(e.onentry||e.onexit||e.invoke)&&(n.actions=po(e)),Object.keys(e).some(d=>["initial","state","history","parallel","final"].includes(d))&&(n.statemachine=$n(e)),n}}function go(t){let e={};return t.event&&(e.event=t.event.split(/\s+/).join(`
76
- `)),t.cond&&(e.cond=t.cond),t["#text"]&&(e.action=Z.default.decode(t["#text"]).trim()),t.type&&(e.type=t.type),e}function yo(t){let e={};typeof t=="string"?e.action=Z.default.decode(t).trim():Object.assign(e,go(t));let n=fo(e.event,e.cond,e.action);return n&&(e.label=n),e}function vo(t){return(e,n)=>{let d=(n.target||t.id).split(/\s+/),r=yo(n);return e.concat(d.map(u=>F({from:t.id,to:u},r)))}}function Te(t){return t.filter(e=>Object.prototype.hasOwnProperty.call(e,"transition")).reduce((e,n)=>e.concat((0,$e.default)(n.transition).reduce(vo(n),[])),[])}function $n(t){let e=Re(t),n={};n.states=e.initial.map(ce("initial")).concat(e.state.map(ce("regular"))).concat(e.parallel.map(ce("parallel"))).concat(e.history.map(ce("history"))).concat(e.final.map(ce("final")));let d=Te(e.initial).concat(Te(e.state)).concat(Te(e.parallel));return d.length>0&&(n.transitions=d),n}function xn(t){let e=t.trim();if(Be.default.validate(e)===!0){let n=Be.default.parse(e,{attributeNamePrefix:"",ignoreAttributes:!1,tagValueProcessor:d=>Z.default.decode(d),stopNodes:["onentry","onexit","transition"]});return $n((n==null?void 0:n.scxml)??{})}throw new Error(`That doesn't look like valid xml ...
77
- `)}var kn={$schema:"http://json-schema.org/draft-07/schema#",title:"state-machine-cat abstract syntax tree schema",$ref:"#/definitions/StateMachineType",$id:"org.js.state-machine-cat/v7.4.0",definitions:{StateType:{type:"string",enum:["regular","initial","terminate","final","parallel","history","deephistory","choice","forkjoin","fork","join","junction"]},TransitionType:{type:"string",enum:["internal","external"]},NoteType:{type:"array",items:{type:"string"}},ActionTypeType:{type:"string",enum:["entry","activity","exit"]},ActionType:{type:"object",required:["type","body"],additionalProperties:!1,properties:{type:{$ref:"#/definitions/ActionTypeType"},body:{type:"string"}}},ClassType:{type:"string",pattern:"^[a-zA-Z0-9_\\- ]*$"},StateMachineType:{type:"object",additionalProperties:!1,required:["states"],properties:{states:{type:"array",items:{type:"object",required:["name","type"],additionalProperties:!1,properties:{name:{description:"The name and identifier of the state. Unique within the root state machine.",type:"string"},type:{description:"What kind of state (or pseudo state) this state is. E.g. 'regular' for normal states or 'initial', 'final', 'choice' etc for pseudo states. Most UML (pseudo-) states are supported.",$ref:"#/definitions/StateType"},label:{description:"The display label of the state. If it's not present, most renderers will use the states' name in stead.",type:"string"},color:{description:'Color to use for rendering the state. Accepts all css color names ("blue") and hex notation - with ("#0000FF77") or without ("#0000FF") transparency.',type:"string"},class:{description:"Class name to give the state in dot and svg output.",$ref:"#/definitions/ClassType"},active:{description:"If true the state is considered to be active and rendered as such.",type:"boolean"},typeExplicitlySet:{description:"The default parser derives the `type` from the `name` with inband signaling. The user can override that behavior by explicitly setting the `type`. This attribute is there to express that (and make sure that on next parses & processing it doesn't get accidentily re-derived from the name again).",type:"boolean"},isComposite:{description:"convenience, derived attribute - set to true if there's a state machine inside the state; false in all other cases. For internal use - @deprecated",type:"boolean"},actions:{type:"array",description:"A series of actions and their types. The type describe when the action takes place (on entry, exit, or otherwise ('activity'))",items:{$ref:"#/definitions/ActionType"}},note:{description:"Comments related to this state. Some renderers will use the note attribute to render a note (i.e. as a post-it) attached to the state.",$ref:"#/definitions/NoteType"},statemachine:{description:"state machine nested within the state.",$ref:"#/definitions/StateMachineType"}}}},transitions:{type:"array",items:{type:"object",required:["from","to"],additionalProperties:!1,properties:{from:{description:"The name of the state this transition transitions from",type:"string"},to:{description:"The name of the state this transition transitions to",type:"string"},label:{description:"A display label to represent this transition. Parsers can parse this label into events conditions and actions.",type:"string"},event:{description:"Event triggering the transition",type:"string"},cond:{description:"Condition for the transition to occur.",type:"string"},action:{description:"Action to execute when the transition occurs.",type:"string"},note:{description:"Comments related to this transition",$ref:"#/definitions/NoteType"},color:{description:'Color to use for rendering the transition. Accepts all css color names ("blue") and hex notation - with ("#0000FF77") or without ("#0000FF") transparency.',type:"string"},width:{description:"The line width to use for rendering the transition",type:"number",minimum:0,maximum:30},class:{description:"Class name to give the state in dot and svg output.",$ref:"#/definitions/ClassType"},type:{description:"Whether the transition is external (default) or internal. See https://www.w3.org/TR/scxml/#transition for details.",$ref:"#/definitions/TransitionType"}}}}}}}};var wn=new Pn.default;function bo(t,e){if(!wn.validate(t,e))throw new Error(`The provided JSON is not a valid state-machine-cat AST: ${wn.errorsText()}.
78
- `)}var Cn={getAST(t,e){let n=t;return q.getOptionValue(e,"inputType")==="smcat"?n=vn(t):q.getOptionValue(e,"inputType")==="scxml"?n=xn(t):typeof t=="string"&&(n=JSON.parse(t)),bo(kn,n),n}};var qe=H(require("lodash/cloneDeep.js"),1),He=H(require("lodash/reject.js"),1);function $o(t,e,n){return t?`${t}${n}${e}`:e}function xo(t,e){let n=N(F(F({},t),e),{from:t.from,to:e.to});return e.action&&(n.action=$o(t.action,e.action,`
79
- `)),(n.event||n.cond||n.action)&&(n.label=be.formatLabel(n.event,n.cond,n.action)),n}function ko(t,e,n){return t.reduce((d,r)=>(e.forEach((u,s)=>{u===r.to&&n[u]?d=d.concat(n[u].map(f=>xo(r,f))):d=s===0?d.concat(r):d}),d),[])}function On(t,e,n){let d=(0,qe.default)(t);return d.transitions&&e.length>0&&(d.transitions=ko(d.transitions,e,n)),d.states=d.states.map(r=>r.statemachine?N(F({},r),{statemachine:On(r.statemachine,e,n)}):r),d}function En(t,e){let n=(0,qe.default)(t);return n.transitions&&(n.transitions=(0,He.default)(n.transitions,d=>e.some(r=>r===d.from||r===d.to))),n.states=(0,He.default)(n.states,d=>e.includes(d.name)).map(d=>d.statemachine?N(F({},d),{statemachine:En(d.statemachine,e)}):d),n}var jn=(t,e=["fork","junction","choice"])=>{let n=new I(t),d=n.findStatesByTypes(e).map(s=>s.name),r=d.reduce((s,f)=>(s[f]=n.findTransitionsByFrom(f),s),{}),u=On(t,d,r);return En(u,d)};var Zn=H(require("lodash/has.js"),1),Kn=H(Tn(),1);var Ln=H(require("lodash/cloneDeep.js"),1);var To=[{name:"fontname",value:'"Helvetica"'},{name:"fontsize",value:"12"},{name:"penwidth",value:"2.0"}],Bo={dot:[{name:"splines",value:"true"},{name:"ordering",value:"out"},{name:"compound",value:"true"},{name:"overlap",value:"scale"},{name:"nodesep",value:"0.3"},{name:"ranksep",value:"0.1"}],fdp:[{name:"K",value:"0.9"}],osage:[{name:"pack",value:"42"}],neato:[{name:"epsilon",value:"0.9"}]},Ho={"bottom-top":[{name:"rankdir",value:"BT"}],"left-right":[{name:"rankdir",value:"LR"}],"right-left":[{name:"rankdir",value:"RL"}]},qo=[{name:"shape",value:"plaintext"},{name:"style",value:"filled"},{name:"fillcolor",value:'"#FFFFFF01"'},{name:"fontname",value:"Helvetica"},{name:"fontsize",value:12},{name:"penwidth",value:"2.0"}],Io=[{name:"fontname",value:"Helvetica"},{name:"fontsize",value:10}];function Le(t){return`${t.name}=${t.value}`}var xe={buildGraphAttributes:(t,e,n)=>To.concat(Bo[t]||[]).concat(Ho[e]||[]).concat(n||[]).map(Le).join(" "),buildNodeAttributes:t=>qo.concat(t||[]).map(Le).join(" "),buildEdgeAttributes:t=>Io.concat(t||[]).map(Le).join(" ")};function Do(t){return t.replace(/\\/g,"\\\\").replace(/\n\s*/g,"\\l").replace(/"/g,'\\"').concat("\\l")}function Lo(t){return t.replace(/\\/g,"\\\\").replace(/\n\s*/g," \\l").replace(/"/g,'\\"').concat(" \\l")}function Vo(t){let e=t||"top-down";return e==="top-down"||e==="bottom-top"}function No(t,e){return e.from===e.to&&t.findStateByName(e.from).statemachine&&e.type!=="internal"}var M={escapeString:Do,escapeLabelString:Lo,isVertical:Vo,isCompositeSelf:No};function Bn(t){return e=>e.type===t}function Ve(t){return e=>t.includes(e.type)}function So(t){return t.label=t.label||t.name,t}function Mo(t){return Object.prototype.hasOwnProperty.call(t,"note")&&(t.noteName=`note_${t.name}`),t}function zo(t){let e=["state",t.type];return Object.prototype.hasOwnProperty.call(t,"class")&&e.push(t.class.trim().replace(/[ ]{2,}/g," ")),t.class=e.join(" "),t}function Uo(t){return t==="activity"?"":`${t}/ `}function Go(t){let e=F({},t);return t.actions&&(e.actions=t.actions.map(n=>`${Uo(n.type)}${n.body}`)),e}function Xo(t){return Object.prototype.hasOwnProperty.call(t,"note")&&(t.noteFlattened=t.note.join("")),t}function Jo(t){return e=>{var d;let n=(d=(t||[]).find(r=>r.name==="color"))==null?void 0:d.value;return n&&!e.color&&Ve(["initial","fork","join","junction","forkjoin","final"])(e)&&(e.color=n),e}}function Qo(t){return t.note&&(t.note=t.note.map(M.escapeString)),t}function Wo(t){return e=>Ve(["fork","join","forkjoin"])(e)?F({sizingExtras:M.isVertical(t)?"height=0.1":"width=0.1"},e):e}function Yo(t){return t.type==="parallel"&&t.statemachine&&t.statemachine.states&&(t.statemachine.states=t.statemachine.states.map(e=>Bn("regular")(e)?N(F({},e),{parentIsParallel:!0}):e)),t}var R={isType:Bn,isOneOfTypes:Ve,setLabel:So,classifyState:zo,nameNote:Mo,flattenActions:Go,flattenNote:Xo,recolor:Jo,escapeStateStrings:Qo,tipForkJoinStates:Wo,flagParallelChildren:Yo};function Zo(t){return t.note&&(t.note=t.note.map(M.escapeString)),t.label&&(t.label=M.escapeLabelString(t.label)),t}function Ko(t){return e=>{let n={};return e.isCompositeSelf&&(M.isVertical(t)?n={tailportflags:'tailport="e" headport="e"',headportflags:'tailport="w"'}:e.hasParent?n={tailportflags:'tailport="n" headport="n"',headportflags:'tailport="s"'}:n={tailportflags:'tailport="s" headport="s"',headportflags:'tailport="n"'}),F(F({},e),n)}}function ei(t){let e=["transition"];return t.type&&e.push(t.type),t.class&&e.push(t.class.trim().replace(/[ ]{2,}/g," ")),t.class=e.join(" "),t}var ke={escapeTransitionStrings:Zo,addPorts:Ko,classifyTransition:ei};var ue=class{constructor(){this.reset()}reset(){this.COUNTER=0}next(){return++this.COUNTER}nextAsString(){return this.next().toString(10)}};var Vn=H(Dn(),1);var Nn={};function ii(t){return e=>(Object.prototype.hasOwnProperty.call(e,"statemachine")&&(e.nestedExternalSelfTransitions=t.findExternalSelfTransitions(e.name).map(n=>n.name)),e)}function Sn(t,e,n,d){return t.filter(r=>r.statemachine).forEach(r=>{r.statemachine.states=Sn(r.statemachine.states,e,n,d)}),t.map(R.setLabel).map(R.nameNote).map(R.classifyState).map(R.escapeStateStrings).map(R.flattenNote).map(R.flattenActions).map(R.flagParallelChildren).map(R.tipForkJoinStates(e)).map(R.recolor(n)).map(ii(d))}function si(t){return t.initialStates=t.states.filter(R.isType("initial")),t.regularStates=t.states.filter(e=>R.isType("regular")(e)&&!e.statemachine),t.historyStates=t.states.filter(R.isType("history")),t.deepHistoryStates=t.states.filter(R.isType("deephistory")),t.choiceStates=t.states.filter(R.isType("choice")),t.forkjoinStates=t.states.filter(R.isOneOfTypes(["fork","join","forkjoin"])),t.junctionStates=t.states.filter(R.isType("junction")),t.terminateStates=t.states.filter(R.isType("terminate")),t.finalStates=t.states.filter(R.isType("final")),t.compositeStates=t.states.filter(e=>e.statemachine),t}function ci(t){return e=>(t.findStateByName(e.from).statemachine&&(e.fromComposite=!0),t.findStateByName(e.to).statemachine&&(e.toComposite=!0),e)}function ui(t){return e=>{let n={};return M.isCompositeSelf(t,e)&&(t.findStateByName(e.from).hasParent?n={hasParent:!0,isCompositeSelf:!0}:n={isCompositeSelf:!0}),F(F({},e),n)}}function fi(t){return t.name=`tr_${t.from}_${t.to}_${Nn.nextAsString()}`,Boolean(t.note)&&(t.noteName=`note_${t.name}`),t}function mi(t,e){return t.flattenedTransitions.map(fi).map(ke.escapeTransitionStrings).map(ke.classifyTransition).map(R.flattenNote).map(ci(t)).map(ui(t)).map(ke.addPorts(e))}var we=(t,e)=>{e=e||{},Nn=new ue;let n=(0,Ln.default)(t),d=new I(n);return n.transitions=mi(d,e.direction),n.states=Sn(n.states,e.direction,e.dotNodeAttrs,d),n=si(n),n.graphAttributes=xe.buildGraphAttributes(q.getOptionValue(e,"engine"),q.getOptionValue(e,"direction"),e.dotGraphAttrs),n.nodeAttributes=xe.buildNodeAttributes(e.dotNodeAttrs),n.edgeAttributes=xe.buildEdgeAttributes(e.dotEdgeAttrs),(0,Vn.default)(n)};var Mn=H(require("viz.js"),1);var pi={oldsvg:"svg",oldps2:"ps2",oldeps:"eps"},Me=(t,e)=>(0,Mn.default)(we(t,e),{engine:q.getOptionValue(e,"engine"),format:pi[q.getOptionValue(e,"outputType")]||"svg"});var di=/[\u0000-\u002C|\u002F|\u003B-\u0040|\u005B-\u0060|\u007B-\u00BF|\u00D7|\u00F7|\u0300-\u036F|\u037E|\u2000-\u200B|\u200E-\u206F|\u2190-\u2BFF|\u2FF0-\u3000|\uD800-\uF8FF|\uFDD0-\uFDEF|\uFFFE-\uFFFF]/g,hi=/[-|.|0-9|\u00B7|\u0300-\u036F|\u203F-\u2040]/g;function zn(t){return t.replace(di,"_")}function gi(t){let e=zn(t);return e.match(hi)&&(e=`_${t}`),e}var Pe=t=>(t=t||"",t.length===0?"__empty":gi(t[0]).concat(zn(t.slice(1))));var yi=/[\u00B7|\u0300-\u036F|\u203F-\u2040|\u0000-\u0029|\u002B-\u002C|\u002F|\u003B-\u0040|\u005B-\u0060|\u007B-\u00BF|\u00D7|\u00F7|\u0300-\u036F|\u037E|\u2000-\u200B|\u200E-\u206F|\u2190-\u2BFF|\u2FF0-\u3000|\uD800-\uF8FF|\uFDD0-\uFDEF|\uFFFE-\uFFFF]/g,vi=/[.]/g;function Un(t){return t.replace(yi,"_")}function bi(t){let e=Un(t);return e.match(vi)&&(e=`_${t}`),e}function $i(t){return t=t.replace(/\s+/g," ").trim(),bi(t[0]).concat(Un(t.slice(1)))}var Gn=t=>(t=t||"",t.length===0?"empty":t.split(/[\n\r]+/).filter(e=>e.length>0).map($i).join(" "));var xi={regular:"state",initial:"initial",final:"final",terminate:"final",parallel:"parallel",history:"history",deephistory:"history"};function ki(t){return xi[t]||"state"}function wi(t){let e={target:Pe(t.to)};return Boolean(t.event)&&(e.event=Gn(t.event)),Boolean(t.cond)&&(e.cond=t.cond),Boolean(t.action)&&(e.action=t.action),Boolean(t.type)&&(e.type=t.type),e}function Pi(t,e){return t.filter(n=>n.type===e).map(n=>n.body)}function ze(t,e,n,d){let r=Pi(n,d);r.length>0&&(t[e]=(t[e]||[]).concat(r))}function Ci(t,e){Boolean(e.actions)&&(ze(t,"onentries",e.actions,"entry"),ze(t,"onentries",e.actions,"activity"),ze(t,"onexits",e.actions,"exit"))}function Oi(t,e,n){let d=n.filter(r=>r.from===e.name).map(wi);d.length>0&&(t.transitions=d)}function Ei(t,e,n){if(Boolean(e.statemachine)){let d=ne(e.statemachine,null,n);t.states=(t.states||[]).concat(d.states),d.initial&&(t.initial=d.initial)}}function ji(t){return t=t||[],e=>{let n={kind:ki(e.type),id:Pe(e.name)};return e.type==="deephistory"&&(n.type="deep"),Ci(n,e),Oi(n,e,t),Ei(n,e,t),n}}function Ai(t){let e=null,n=t.states.filter(d=>d.type==="initial");return n.length>0&&(e=n[0].name),e}function _i(t,e){let n=e;if(e&&t.transitions){let d=t.transitions.filter(r=>r.from===e);d.length>0&&!d[0].action&&(n=d[0].to)}return n}function ne(t,e,n){let d=Ai(t),r=_i(t,d),u={states:t.states.filter(s=>r&&r!==d?s.type!=="initial":!0).map(ji(n||new I(t).flattenedTransitions))};return r&&(u.initial=Pe(r)),u}var Yn=H(Wn(),1);function Je(t){return(0,Yn.default)(ne(t))}function Qe(t){let e={smcat:Kn.default,dot:we,svg:Me,oldsvg:Me,scjson:ne,scxml:Je};return(0,Zn.default)(e,t)?e[t]:n=>n}var el="10.0.0";function tl(t,e){let n=Cn.getAST(t,e),d=q.getOptionValue(e,"desugar");return Qe(q.getOptionValue(e,"outputType"))(d?jn(n):n,e)}var nl=el;function ll(){return q.getAllowedValues()}var Hi={render:tl,version:nl,getAllowedValues:ll};
71
+ `+f+" | "+Ae("",r.column-1," ")+Ae("",p,"^")}else e+=`
72
+ at `+u}return e};Q.buildMessage=function(t,e){var n={literal:function(m){return'"'+r(m.text)+'"'},class:function(m){var p=m.parts.map(function(a){return Array.isArray(a)?u(a[0])+"-"+u(a[1]):u(a)});return"["+(m.inverted?"^":"")+p.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(m){return m.description}};function d(m){return m.charCodeAt(0).toString(16).toUpperCase()}function r(m){return m.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+d(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+d(p)})}function u(m){return m.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+d(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+d(p)})}function s(m){return n[m.type](m)}function f(m){var p=m.map(s),a,b;if(p.sort(),p.length>0){for(a=1,b=1;a<p.length;a++)p[a-1]!==p[a]&&(p[b]=p[a],b++);p.length=b}switch(p.length){case 1:return p[0];case 2:return p[0]+" or "+p[1];default:return p.slice(0,-1).join(", ")+", or "+p[p.length-1]}}function v(m){return m?'"'+r(m)+'"':"end of input"}return"Expected "+f(t)+" but "+v(e)+" found."};function pn(t,e){e=e!==void 0?e:{};var n={},d=e.grammarSource,r={program:Mt},u=Mt,s=",",f=";",v="[",m="]",p=":",a="{",b="}",c="=",k="label",$="color",I="class",D="active",Je="type",Qe="regular",We="initial",Ye="terminate",Ze="final",Ke="parallel",et="history",tt="deephistory",nt="choice",lt="forkjoin",rt="fork",at="join",ot="junction",Kn="width",it="external",st="internal",ct="->",ut="=>>",ft="=>",mt=">>",pt=":>",dt="--",ht="==",gt="<-",yt="<<=",vt="<=",bt="<<",$t="<:",el="#",tl=".",S='"',ce='\\"',xt="/*",ue="*/",kt="//",wt=/^[0-9]/,Pt=/^[a-zA-Z0-9_\- ]/,Ct=/^[^;, "\t\n\r=\-><:{[]/,nl=/^[ \t]/,ll=/^[\r\n]/,rl=/^[^\r\n]/,al=_("statemachine"),fe=E(",",!1),Y=E(";",!1),ol=_("state"),Ot=E("[",!1),Et=E("]",!1),jt=E(":",!1),te=E("{",!1),il=E("}",!1),sl=_("extended state attributes"),cl=_("extended state attribute"),G=E("=",!1),ul=_("state attribute name"),fl=E("label",!0),At=E("color",!0),ml=_("class attribute"),pl=E("class",!0),dl=_("state flag"),hl=E("active",!0),gl=_("state type"),_t=E("type",!0),yl=_("state type type"),vl=E("regular",!1),bl=E("initial",!1),$l=E("terminate",!1),xl=E("final",!1),kl=E("parallel",!1),wl=E("history",!1),Pl=E("deephistory",!1),Cl=E("choice",!1),Ol=E("forkjoin",!1),El=E("fork",!1),jl=E("join",!1),Al=E("junction",!1),_l=_("transition"),Fl=_("extended transition attributes"),Rl=_("extended transition attribute"),Tl=_("transition attribute name"),Bl=_("transition type name"),Hl=_("numeric transition attribute name"),ql=E("width",!0),Il=_("transition type value"),Dl=E("external",!1),Ll=E("internal",!1),Vl=_("left to right arrow"),Nl=E("->",!1),Sl=E("=>>",!1),Ml=E("=>",!1),zl=E(">>",!1),Ul=E(":>",!1),Gl=E("--",!1),Xl=E("==",!1),Jl=_("right to left arrow"),Ql=E("<-",!1),Wl=E("<<=",!1),Yl=E("<=",!1),Zl=E("<<",!1),Kl=E("<:",!1),er=E("#",!1),tr=E(".",!1),Ft=Z([["0","9"]],!1,!1),nr=_("double quoted string"),M=E('"',!1),Rt=E('\\"',!1),X=ea(),lr=_("valid class string"),Tt=Z([["a","z"],["A","Z"],["0","9"],"_","-"," "],!1,!1),rr=_("identifier"),Bt=Z([";",","," ",'"'," ",`
73
+ `,"\r","=","-",">","<",":","{","["],!0,!1),ar=_("whitespace"),or=Z([" "," "],!1,!1),ir=_("line end"),sr=Z(["\r",`
74
+ `],!1,!1),cr=E("/*",!1),Ht=E("*/",!1),ur=E("//",!1),fr=Z(["\r",`
75
+ `],!0,!1),mr=_("comment"),pr=function(l){return l.states=R.extractUndeclaredStates(l),R.classifyForkJoins(l)},dr=function(l,i){let g={};return R.setIf(g,"states",l),R.setIfNotEmpty(g,"transitions",i),g},qt=function(l){return l},hr=function(l){return l},gr=function(l){return R.uniq(l[0].concat(l[1]),R.stateEqual)},yr=function(l,i,g){return g},vr=function(l,i,g,h){return h},br=function(l,i,g,h,w){return w},$r=function(l,i,g,h,w){let O=R.initState(i);return(g||[]).forEach(j=>R.setIf(O,j.name,j.value)),R.setIf(O,"typeExplicitlySet",(g||[]).some(j=>j.typeExplicitlySet)),R.setIf(O,"statemachine",w),R.setIfNotEmpty(O,"note",l),Boolean(h)&&R.setIfNotEmpty(O,"actions",R.extractActions(h)),O},xr=function(l,i){return{name:l,value:i}},kr=function(l,i){return{name:l,value:i}},wr=function(l){return{name:l,value:!0}},Pr=function(l,i){return{name:l,value:i,typeExplicitlySet:!0}},Cr=function(l){return l.toLowerCase()},Or=function(l){return l.toLowerCase()},Er=function(l){return l.toLowerCase()},jr=function(l){return l.toLowerCase()},Ar=function(l,i,g){return g},_r=function(l,i,g,h){return h},Fr=function(l,i,g,h){return h&&(i.label=h,i=Object.assign(i,R.parseTransitionExpression(h))),(g||[]).forEach(w=>R.setIf(i,w.name,w.value)),R.setIfNotEmpty(i,"note",l),i},Rr=function(l,i){return{from:l,to:i}},Tr=function(l,i){return{from:i,to:l}},Br=function(l,i){return{name:l,value:i}},Hr=function(l,i){return{name:l,value:i}},qr=function(l,i){return{name:l,value:i}},Ir=function(l,i){return{name:l,value:i}},Dr=function(l){return l.toLowerCase()},Lr=function(l){return l.toLowerCase()},Vr=function(l){return l},Nr=function(l){return l.join("").trim()},Sr=function(l){return parseFloat(l.join(""))},Mr=function(l){return parseInt(l.join(""),10)},zr=function(l){return l.join("").replace(/\\\"/g,'"')},It=function(l){return l},Ur=function(l){return l.join("")},Dt=function(l){return l},Gr=function(l){return l.join("").trim()},Xr=function(l){return l.join("").trim()},Lt=function(l){return l},Vt=function(l){return l},Jr=function(l){return l.join("")},Qr=function(l){return l},Wr=function(l){return l},Yr=function(l){return l},Zr=function(l,i,g){return l+i.join("")+g},Kr=function(l,i){return l+i.join("")},o=0,P=0,me=[{line:1,column:1}],L=0,we=[],y=0,pe;if("startRule"in e){if(!(e.startRule in r))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');u=r[e.startRule]}function _i(){return t.substring(P,o)}function Fi(){return P}function Ri(){return{source:d,start:P,end:o}}function Ti(){return ne(P,o)}function Bi(l,i){throw i=i!==void 0?i:ne(P,o),St([_(l)],t.substring(P,o),i)}function Hi(l,i){throw i=i!==void 0?i:ne(P,o),na(l,i)}function E(l,i){return{type:"literal",text:l,ignoreCase:i}}function Z(l,i,g){return{type:"class",parts:l,inverted:i,ignoreCase:g}}function ea(){return{type:"any"}}function ta(){return{type:"end"}}function _(l){return{type:"other",description:l}}function Nt(l){var i=me[l],g;if(i)return i;for(g=l-1;!me[g];)g--;for(i=me[g],i={line:i.line,column:i.column};g<l;)t.charCodeAt(g)===10?(i.line++,i.column=1):i.column++,g++;return me[l]=i,i}function ne(l,i){var g=Nt(l),h=Nt(i);return{source:d,start:{offset:l,line:g.line,column:g.column},end:{offset:i,line:h.line,column:h.column}}}function x(l){o<L||(o>L&&(L=o,we=[]),we.push(l))}function na(l,i){return new Q(l,null,null,i)}function St(l,i,g){return new Q(Q.buildMessage(l,i),l,i,g)}function Mt(){var l,i,g,h;return l=o,i=C(),g=zt(),h=C(),P=l,l=pr(g),l}function zt(){var l,i,g,h;for(y++,l=o,i=la(),i===n&&(i=null),g=[],h=Xt();h!==n;)g.push(h),h=Xt();return P=l,l=dr(i,g),y--,i=n,y===0&&x(al),l}function la(){var l,i,g,h,w,O;for(l=o,i=o,g=[],h=o,w=Pe(),w!==n?(t.charCodeAt(o)===44?(O=s,o++):(O=n,y===0&&x(fe)),O!==n?(P=h,h=qt(w)):(o=h,h=n)):(o=h,h=n);h!==n;)g.push(h),h=o,w=Pe(),w!==n?(t.charCodeAt(o)===44?(O=s,o++):(O=n,y===0&&x(fe)),O!==n?(P=h,h=qt(w)):(o=h,h=n)):(o=h,h=n);return h=o,w=Pe(),w!==n?(t.charCodeAt(o)===59?(O=f,o++):(O=n,y===0&&x(Y)),O!==n?(P=h,h=hr(w)):(o=h,h=n)):(o=h,h=n),h!==n?(g=[g,h],i=g):(o=i,i=n),i!==n&&(P=l,i=gr(i)),l=i,l}function Pe(){var l,i,g,h,w,O,j,A,V,T,J,en,Oe,Ra,Ee;for(y++,l=o,i=[],g=de();g!==n;)i.push(g),g=de();return g=C(),h=re(),h!==n?(w=C(),O=o,t.charCodeAt(o)===91?(j=v,o++):(j=n,y===0&&x(Ot)),j!==n?(A=ra(),t.charCodeAt(o)===93?(V=m,o++):(V=n,y===0&&x(Et)),V!==n?(P=O,O=yr(i,h,A)):(o=O,O=n)):(o=O,O=n),O===n&&(O=null),j=C(),A=o,t.charCodeAt(o)===58?(V=p,o++):(V=n,y===0&&x(jt)),V!==n?(T=C(),J=$a(),J!==n?(en=C(),P=A,A=vr(i,h,O,J)):(o=A,A=n)):(o=A,A=n),A===n&&(A=null),V=C(),T=o,t.charCodeAt(o)===123?(J=a,o++):(J=n,y===0&&x(te)),J!==n?(en=C(),Oe=zt(),Oe!==n?(Ra=C(),t.charCodeAt(o)===125?(Ee=b,o++):(Ee=n,y===0&&x(il)),Ee!==n?(P=T,T=br(i,h,O,A,Oe)):(o=T,T=n)):(o=T,T=n)):(o=T,T=n),T===n&&(T=null),J=C(),P=l,l=$r(i,h,O,A,T)):(o=l,l=n),y--,l===n&&(i=n,y===0&&x(ol)),l}function ra(){var l,i;for(y++,l=[],i=Ut();i!==n;)l.push(i),i=Ut();return y--,i=n,y===0&&x(sl),l}function Ut(){var l,i,g,h,w,O,j,A;return y++,l=o,i=C(),g=aa(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(G)),w!==n?(O=C(),j=le(),j!==n?(A=C(),P=l,l=xr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=Gt(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(G)),w!==n?(O=C(),j=Qt(),j!==n?(A=C(),P=l,l=kr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=oa(),g!==n?(h=C(),P=l,l=wr(g)):(o=l,l=n),l===n&&(l=o,i=C(),g=ia(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(G)),w!==n?(O=C(),j=sa(),j!==n?(A=C(),P=l,l=Pr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n)))),y--,l===n&&(i=n,y===0&&x(cl)),l}function aa(){var l,i;return y++,l=o,t.substr(o,5).toLowerCase()===k?(i=t.substr(o,5),o+=5):(i=n,y===0&&x(fl)),i===n&&(t.substr(o,5).toLowerCase()===$?(i=t.substr(o,5),o+=5):(i=n,y===0&&x(At))),i!==n&&(P=l,i=Cr(i)),l=i,y--,l===n&&(i=n,y===0&&x(ul)),l}function Gt(){var l,i;return y++,l=o,t.substr(o,5).toLowerCase()===I?(i=t.substr(o,5),o+=5):(i=n,y===0&&x(pl)),i!==n&&(P=l,i=Or(i)),l=i,y--,l===n&&(i=n,y===0&&x(ml)),l}function oa(){var l,i;return y++,l=o,t.substr(o,6).toLowerCase()===D?(i=t.substr(o,6),o+=6):(i=n,y===0&&x(hl)),i!==n&&(P=l,i=Er(i)),l=i,y--,l===n&&(i=n,y===0&&x(dl)),l}function ia(){var l,i;return y++,l=o,t.substr(o,4).toLowerCase()===Je?(i=t.substr(o,4),o+=4):(i=n,y===0&&x(_t)),i!==n&&(P=l,i=jr(i)),l=i,y--,l===n&&(i=n,y===0&&x(gl)),l}function sa(){var l,i;return y++,t.substr(o,7)===Qe?(l=Qe,o+=7):(l=n,y===0&&x(vl)),l===n&&(t.substr(o,7)===We?(l=We,o+=7):(l=n,y===0&&x(bl)),l===n&&(t.substr(o,9)===Ye?(l=Ye,o+=9):(l=n,y===0&&x($l)),l===n&&(t.substr(o,5)===Ze?(l=Ze,o+=5):(l=n,y===0&&x(xl)),l===n&&(t.substr(o,8)===Ke?(l=Ke,o+=8):(l=n,y===0&&x(kl)),l===n&&(t.substr(o,7)===et?(l=et,o+=7):(l=n,y===0&&x(wl)),l===n&&(t.substr(o,11)===tt?(l=tt,o+=11):(l=n,y===0&&x(Pl)),l===n&&(t.substr(o,6)===nt?(l=nt,o+=6):(l=n,y===0&&x(Cl)),l===n&&(t.substr(o,8)===lt?(l=lt,o+=8):(l=n,y===0&&x(Ol)),l===n&&(t.substr(o,4)===rt?(l=rt,o+=4):(l=n,y===0&&x(El)),l===n&&(t.substr(o,4)===at?(l=at,o+=4):(l=n,y===0&&x(jl)),l===n&&(t.substr(o,8)===ot?(l=ot,o+=8):(l=n,y===0&&x(Al))))))))))))),y--,l===n&&(i=n,y===0&&x(yl)),l}function Xt(){var l,i,g,h,w,O,j,A,V;for(y++,l=o,i=[],g=de();g!==n;)i.push(g),g=de();return g=ca(),g!==n?(h=o,t.charCodeAt(o)===91?(w=v,o++):(w=n,y===0&&x(Ot)),w!==n?(O=ua(),t.charCodeAt(o)===93?(j=m,o++):(j=n,y===0&&x(Et)),j!==n?(A=C(),P=h,h=Ar(i,g,O)):(o=h,h=n)):(o=h,h=n),h===n&&(h=null),w=o,t.charCodeAt(o)===58?(O=p,o++):(O=n,y===0&&x(jt)),O!==n?(j=C(),A=ba(),A!==n?(V=C(),P=w,w=_r(i,g,h,A)):(o=w,w=n)):(o=w,w=n),w===n&&(w=null),t.charCodeAt(o)===59?(O=f,o++):(O=n,y===0&&x(Y)),O!==n?(P=l,l=Fr(i,g,h,w)):(o=l,l=n)):(o=l,l=n),y--,l===n&&(i=n,y===0&&x(_l)),l}function ca(){var l,i,g,h,w,O,j,A;return l=o,i=C(),g=re(),g!==n?(h=C(),w=ha(),w!==n?(O=C(),j=re(),j!==n?(A=C(),P=l,l=Rr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=re(),g!==n?(h=C(),w=ga(),w!==n?(O=C(),j=re(),j!==n?(A=C(),P=l,l=Tr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n)),l}function ua(){var l,i;for(y++,l=[],i=Jt();i!==n;)l.push(i),i=Jt();return y--,i=n,y===0&&x(Fl),l}function Jt(){var l,i,g,h,w,O,j,A;return y++,l=o,i=C(),g=fa(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(G)),w!==n?(O=C(),j=le(),j!==n?(A=C(),P=l,l=Br(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=Gt(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(G)),w!==n?(O=C(),j=Qt(),j!==n?(A=C(),P=l,l=Hr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=ma(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(G)),w!==n?(O=C(),j=da(),j!==n?(A=C(),P=l,l=qr(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,i=C(),g=pa(),g!==n?(h=C(),t.charCodeAt(o)===61?(w=c,o++):(w=n,y===0&&x(G)),w!==n?(O=C(),j=ya(),j!==n?(A=C(),P=l,l=Ir(g,j)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n)))),y--,l===n&&(i=n,y===0&&x(Rl)),l}function fa(){var l,i;return y++,l=o,t.substr(o,5).toLowerCase()===$?(i=t.substr(o,5),o+=5):(i=n,y===0&&x(At)),i!==n&&(P=l,i=Dr(i)),l=i,y--,l===n&&(i=n,y===0&&x(Tl)),l}function ma(){var l,i;return y++,l=o,t.substr(o,4).toLowerCase()===Je?(i=t.substr(o,4),o+=4):(i=n,y===0&&x(_t)),i!==n&&(P=l,i=Lr(i)),l=i,y--,l===n&&(i=n,y===0&&x(Bl)),l}function pa(){var l,i;return y++,l=o,t.substr(o,5).toLowerCase()===Kn?(i=t.substr(o,5),o+=5):(i=n,y===0&&x(ql)),i!==n&&(P=l,i=Vr(i)),l=i,y--,l===n&&(i=n,y===0&&x(Hl)),l}function da(){var l,i;return y++,t.substr(o,8)===it?(l=it,o+=8):(l=n,y===0&&x(Dl)),l===n&&(t.substr(o,8)===st?(l=st,o+=8):(l=n,y===0&&x(Ll))),y--,l===n&&(i=n,y===0&&x(Il)),l}function ha(){var l,i;return y++,t.substr(o,2)===ct?(l=ct,o+=2):(l=n,y===0&&x(Nl)),l===n&&(t.substr(o,3)===ut?(l=ut,o+=3):(l=n,y===0&&x(Sl)),l===n&&(t.substr(o,2)===ft?(l=ft,o+=2):(l=n,y===0&&x(Ml)),l===n&&(t.substr(o,2)===mt?(l=mt,o+=2):(l=n,y===0&&x(zl)),l===n&&(t.substr(o,2)===pt?(l=pt,o+=2):(l=n,y===0&&x(Ul)),l===n&&(t.substr(o,2)===dt?(l=dt,o+=2):(l=n,y===0&&x(Gl)),l===n&&(t.substr(o,2)===ht?(l=ht,o+=2):(l=n,y===0&&x(Xl)))))))),y--,l===n&&(i=n,y===0&&x(Vl)),l}function ga(){var l,i;return y++,t.substr(o,2)===gt?(l=gt,o+=2):(l=n,y===0&&x(Ql)),l===n&&(t.substr(o,3)===yt?(l=yt,o+=3):(l=n,y===0&&x(Wl)),l===n&&(t.substr(o,2)===vt?(l=vt,o+=2):(l=n,y===0&&x(Yl)),l===n&&(t.substr(o,2)===bt?(l=bt,o+=2):(l=n,y===0&&x(Zl)),l===n&&(t.substr(o,2)===$t?(l=$t,o+=2):(l=n,y===0&&x(Kl)))))),y--,l===n&&(i=n,y===0&&x(Jl)),l}function de(){var l,i,g,h,w;if(l=o,i=C(),t.charCodeAt(o)===35?(g=el,o++):(g=n,y===0&&x(er)),g!==n){for(h=[],w=he();w!==n;)h.push(w),w=he();P=l,l=Nr(h)}else o=l,l=n;return l}function ya(){var l;return l=va(),l===n&&(l=Ce()),l}function va(){var l,i,g,h,w;return l=o,i=o,g=Ce(),g!==n?(t.charCodeAt(o)===46?(h=tl,o++):(h=n,y===0&&x(tr)),h!==n?(w=Ce(),w!==n?(g=[g,h,w],i=g):(o=i,i=n)):(o=i,i=n)):(o=i,i=n),i!==n&&(P=l,i=Sr(i)),l=i,l}function Ce(){var l,i,g;if(l=o,i=[],wt.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(Ft)),g!==n)for(;g!==n;)i.push(g),wt.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(Ft));else i=n;return i!==n&&(P=l,i=Mr(i)),l=i,l}function ba(){var l;return l=le(),l===n&&(l=wa()),l}function $a(){var l;return l=le(),l===n&&(l=Pa()),l}function le(){var l,i,g,h;return y++,l=o,t.charCodeAt(o)===34?(i=S,o++):(i=n,y===0&&x(M)),i!==n?(g=xa(),t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(M)),h!==n?(P=l,l=zr(g)):(o=l,l=n)):(o=l,l=n),y--,l===n&&(i=n,y===0&&x(nr)),l}function xa(){var l,i,g,h;for(l=[],i=o,g=o,y++,t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(M)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.substr(o,2)===ce?(h=ce,o+=2):(h=n,y===0&&x(Rt)),h===n&&(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(X))),h!==n?(P=i,i=It(h)):(o=i,i=n)):(o=i,i=n);i!==n;)l.push(i),i=o,g=o,y++,t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(M)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.substr(o,2)===ce?(h=ce,o+=2):(h=n,y===0&&x(Rt)),h===n&&(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(X))),h!==n?(P=i,i=It(h)):(o=i,i=n)):(o=i,i=n);return l}function Qt(){var l,i,g,h;return y++,l=o,t.charCodeAt(o)===34?(i=S,o++):(i=n,y===0&&x(M)),i!==n?(g=ka(),t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(M)),h!==n?(P=l,l=Ur(g)):(o=l,l=n)):(o=l,l=n),y--,l===n&&(i=n,y===0&&x(lr)),l}function ka(){var l,i,g,h;for(l=[],i=o,g=o,y++,t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(M)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(Pt.test(t.charAt(o))?(h=t.charAt(o),o++):(h=n,y===0&&x(Tt)),h!==n?(P=i,i=Dt(h)):(o=i,i=n)):(o=i,i=n);i!==n;)l.push(i),i=o,g=o,y++,t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(M)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(Pt.test(t.charAt(o))?(h=t.charAt(o),o++):(h=n,y===0&&x(Tt)),h!==n?(P=i,i=Dt(h)):(o=i,i=n)):(o=i,i=n);return l}function wa(){var l,i;return l=o,i=Oa(),P=l,i=Gr(i),l=i,l}function Pa(){var l,i;return l=o,i=Ca(),P=l,i=Xr(i),l=i,l}function Ca(){var l,i,g,h;for(l=[],i=o,g=o,y++,t.charCodeAt(o)===44?(h=s,o++):(h=n,y===0&&x(fe)),h===n&&(t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(Y)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&x(te)))),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(X)),h!==n?(P=i,i=Lt(h)):(o=i,i=n)):(o=i,i=n);i!==n;)l.push(i),i=o,g=o,y++,t.charCodeAt(o)===44?(h=s,o++):(h=n,y===0&&x(fe)),h===n&&(t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(Y)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&x(te)))),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(X)),h!==n?(P=i,i=Lt(h)):(o=i,i=n)):(o=i,i=n);return l}function Oa(){var l,i,g,h;for(l=[],i=o,g=o,y++,t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(Y)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&x(te))),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(X)),h!==n?(P=i,i=Vt(h)):(o=i,i=n)):(o=i,i=n);i!==n;)l.push(i),i=o,g=o,y++,t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(Y)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&x(te))),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(X)),h!==n?(P=i,i=Vt(h)):(o=i,i=n)):(o=i,i=n);return l}function re(){var l,i,g;if(y++,l=o,i=[],Ct.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(Bt)),g!==n)for(;g!==n;)i.push(g),Ct.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(Bt));else i=n;return i!==n&&(P=l,i=Jr(i)),l=i,l===n&&(l=le()),y--,l===n&&(i=n,y===0&&x(rr)),l}function Wt(){var l,i;return y++,l=o,nl.test(t.charAt(o))?(i=t.charAt(o),o++):(i=n,y===0&&x(or)),i!==n&&(P=l,i=Qr(i)),l=i,y--,l===n&&(i=n,y===0&&x(ar)),l}function Yt(){var l,i;return y++,l=o,ll.test(t.charAt(o))?(i=t.charAt(o),o++):(i=n,y===0&&x(sr)),i!==n&&(P=l,i=Wr(i)),l=i,y--,l===n&&(i=n,y===0&&x(ir)),l}function Ea(){var l;return t.substr(o,2)===xt?(l=xt,o+=2):(l=n,y===0&&x(cr)),l}function ja(){var l;return t.substr(o,2)===ue?(l=ue,o+=2):(l=n,y===0&&x(Ht)),l}function Zt(){var l,i,g;return l=o,i=o,y++,t.substr(o,2)===ue?(g=ue,o+=2):(g=n,y===0&&x(Ht)),y--,g===n?i=void 0:(o=i,i=n),i!==n?(t.length>o?(g=t.charAt(o),o++):(g=n,y===0&&x(X)),g!==n?(P=l,l=Yr(g)):(o=l,l=n)):(o=l,l=n),l}function Aa(){var l,i,g,h;if(l=o,i=Ea(),i!==n){for(g=[],h=Zt();h!==n;)g.push(h),h=Zt();h=ja(),h!==n?(P=l,l=Zr(i,g,h)):(o=l,l=n)}else o=l,l=n;return l}function _a(){var l;return t.substr(o,2)===kt?(l=kt,o+=2):(l=n,y===0&&x(ur)),l}function he(){var l;return rl.test(t.charAt(o))?(l=t.charAt(o),o++):(l=n,y===0&&x(fr)),l}function Fa(){var l,i,g,h;if(l=o,i=_a(),i!==n){for(g=[],h=he();h!==n;)g.push(h),h=he();P=l,l=Kr(i,g)}else o=l,l=n;return l}function Kt(){var l,i;return y++,l=Fa(),l===n&&(l=Aa()),y--,l===n&&(i=n,y===0&&x(mr)),l}function C(){var l,i;for(l=[],i=Wt(),i===n&&(i=Yt(),i===n&&(i=Kt()));i!==n;)l.push(i),i=Wt(),i===n&&(i=Yt(),i===n&&(i=Kt()));return l}if(pe=u(),pe!==n&&o===t.length)return pe;throw pe!==n&&o<t.length&&x(ta()),St(we,L<t.length?t.charAt(L):null,L<t.length?ne(L,L+1):ne(L,L))}var Re=B(require("fast-xml-parser"),1),W=B(require("he"),1),ve=B(require("lodash/castArray.js"),1);function eo(t,e,n){let d="";return t&&(d+=t),e&&(d+=` [${e}]`),n&&(d+=`/ ${n}`),d.trim()}var ye={formatLabel:eo};var ae=B(require("lodash/castArray.js"),1);function to(t){let e={id:t.id?`${t.id}.initial`:"initial"};return t.initial.transition&&Object.assign(e,{transition:[t.initial.transition]}),e}function no(t){return{id:"initial",transition:[{target:t.initial}]}}function lo(t){let e=[],n={};return t.initial&&(t.initial.transition||t.initial.id?n=to(t):n=no(t),e.push(n)),e}function _e(t){return{...t,initial:lo(t),state:(0,ae.default)((t==null?void 0:t.state)??[]),parallel:(0,ae.default)((t==null?void 0:t.parallel)??[]),history:(0,ae.default)((t==null?void 0:t.history)??[]),final:(0,ae.default)((t==null?void 0:t.final)??[])}}var ro=ye.formatLabel;function dn(t,e){return(0,ve.default)(t[e]).map(n=>({type:e==="onexit"?"exit":"entry",body:W.default.decode(n).trim()}))}function ao(t){return(0,ve.default)(t).map(e=>{let n=W.default.decode(e.id||"").trim();return{type:"activity",body:n||W.default.decode(e||"").trim()}})}function oo(t){let e=[];return t.onentry&&(e=e.concat(dn(t,"onentry"))),t.invoke&&(e=e.concat(ao(t.invoke))),t.onexit&&(e=e.concat(dn(t,"onexit"))),e}function io(t,e){return t==="history"&&e.type==="deep"?"deephistory":t}function oe(t){return e=>{let n={name:e.id,type:io(t,e)};return R.getStateType(e.id)!==n.type&&(n.typeExplicitlySet=!0),(e.onentry||e.onexit||e.invoke)&&(n.actions=oo(e)),Object.keys(e).some(d=>["initial","state","history","parallel","final"].includes(d))&&(n.statemachine=hn(e)),n}}function so(t){let e={};return t.event&&(e.event=t.event.split(/\s+/).join(`
76
+ `)),t.cond&&(e.cond=t.cond),t["#text"]&&(e.action=W.default.decode(t["#text"]).trim()),t.type&&(e.type=t.type),e}function co(t){let e={};typeof t=="string"?e.action=W.default.decode(t).trim():Object.assign(e,so(t));let n=ro(e.event,e.cond,e.action);return n&&(e.label=n),e}function uo(t){return(e,n)=>{let d=(n.target||t.id).split(/\s+/),r=co(n);return e.concat(d.map(u=>({from:t.id,to:u,...r})))}}function Fe(t){return t.filter(e=>Object.prototype.hasOwnProperty.call(e,"transition")).reduce((e,n)=>e.concat((0,ve.default)(n.transition).reduce(uo(n),[])),[])}function hn(t){let e=_e(t),n={};n.states=e.initial.map(oe("initial")).concat(e.state.map(oe("regular"))).concat(e.parallel.map(oe("parallel"))).concat(e.history.map(oe("history"))).concat(e.final.map(oe("final")));let d=Fe(e.initial).concat(Fe(e.state)).concat(Fe(e.parallel));return d.length>0&&(n.transitions=d),n}function gn(t){let e=t.trim();if(Re.default.validate(e)===!0){let n=Re.default.parse(e,{attributeNamePrefix:"",ignoreAttributes:!1,tagValueProcessor:d=>W.default.decode(d),stopNodes:["onentry","onexit","transition"]});return hn((n==null?void 0:n.scxml)??{})}throw new Error(`That doesn't look like valid xml ...
77
+ `)}var yn={$schema:"http://json-schema.org/draft-07/schema#",title:"state-machine-cat abstract syntax tree schema",$ref:"#/definitions/StateMachineType",$id:"org.js.state-machine-cat/v7.4.0",definitions:{StateType:{type:"string",enum:["regular","initial","terminate","final","parallel","history","deephistory","choice","forkjoin","fork","join","junction"]},TransitionType:{type:"string",enum:["internal","external"]},NoteType:{type:"array",items:{type:"string"}},ActionTypeType:{type:"string",enum:["entry","activity","exit"]},ActionType:{type:"object",required:["type","body"],additionalProperties:!1,properties:{type:{$ref:"#/definitions/ActionTypeType"},body:{type:"string"}}},ClassType:{type:"string",pattern:"^[a-zA-Z0-9_\\- ]*$"},StateMachineType:{type:"object",additionalProperties:!1,required:["states"],properties:{states:{type:"array",items:{type:"object",required:["name","type"],additionalProperties:!1,properties:{name:{description:"The name and identifier of the state. Unique within the root state machine.",type:"string"},type:{description:"What kind of state (or pseudo state) this state is. E.g. 'regular' for normal states or 'initial', 'final', 'choice' etc for pseudo states. Most UML (pseudo-) states are supported.",$ref:"#/definitions/StateType"},label:{description:"The display label of the state. If it's not present, most renderers will use the states' name in stead.",type:"string"},color:{description:'Color to use for rendering the state. Accepts all css color names ("blue") and hex notation - with ("#0000FF77") or without ("#0000FF") transparency.',type:"string"},class:{description:"Class name to give the state in dot and svg output.",$ref:"#/definitions/ClassType"},active:{description:"If true the state is considered to be active and rendered as such.",type:"boolean"},typeExplicitlySet:{description:"The default parser derives the `type` from the `name` with inband signaling. The user can override that behavior by explicitly setting the `type`. This attribute is there to express that (and make sure that on next parses & processing it doesn't get accidentily re-derived from the name again).",type:"boolean"},isComposite:{description:"convenience, derived attribute - set to true if there's a state machine inside the state; false in all other cases. For internal use - @deprecated",type:"boolean"},actions:{type:"array",description:"A series of actions and their types. The type describe when the action takes place (on entry, exit, or otherwise ('activity'))",items:{$ref:"#/definitions/ActionType"}},note:{description:"Comments related to this state. Some renderers will use the note attribute to render a note (i.e. as a post-it) attached to the state.",$ref:"#/definitions/NoteType"},statemachine:{description:"state machine nested within the state.",$ref:"#/definitions/StateMachineType"}}}},transitions:{type:"array",items:{type:"object",required:["from","to"],additionalProperties:!1,properties:{from:{description:"The name of the state this transition transitions from",type:"string"},to:{description:"The name of the state this transition transitions to",type:"string"},label:{description:"A display label to represent this transition. Parsers can parse this label into events conditions and actions.",type:"string"},event:{description:"Event triggering the transition",type:"string"},cond:{description:"Condition for the transition to occur.",type:"string"},action:{description:"Action to execute when the transition occurs.",type:"string"},note:{description:"Comments related to this transition",$ref:"#/definitions/NoteType"},color:{description:'Color to use for rendering the transition. Accepts all css color names ("blue") and hex notation - with ("#0000FF77") or without ("#0000FF") transparency.',type:"string"},width:{description:"The line width to use for rendering the transition",type:"number",minimum:0,maximum:30},class:{description:"Class name to give the state in dot and svg output.",$ref:"#/definitions/ClassType"},type:{description:"Whether the transition is external (default) or internal. See https://www.w3.org/TR/scxml/#transition for details.",$ref:"#/definitions/TransitionType"}}}}}}}};var vn=new bn.default;function fo(t,e){if(!vn.validate(t,e))throw new Error(`The provided JSON is not a valid state-machine-cat AST: ${vn.errorsText()}.
78
+ `)}var $n={getAST(t,e){let n=t;return H.getOptionValue(e,"inputType")==="smcat"?n=pn(t):H.getOptionValue(e,"inputType")==="scxml"?n=gn(t):typeof t=="string"&&(n=JSON.parse(t)),fo(yn,n),n}};var Be=B(require("lodash/cloneDeep.js"),1),Te=B(require("lodash/reject.js"),1);function mo(t,e,n){return t?`${t}${n}${e}`:e}function po(t,e){let n={...t,...e,from:t.from,to:e.to};return e.action&&(n.action=mo(t.action,e.action,`
79
+ `)),(n.event||n.cond||n.action)&&(n.label=ye.formatLabel(n.event,n.cond,n.action)),n}function ho(t,e,n){return t.reduce((d,r)=>(e.forEach((u,s)=>{u===r.to&&n[u]?d=d.concat(n[u].map(f=>po(r,f))):d=s===0?d.concat(r):d}),d),[])}function xn(t,e,n){let d=(0,Be.default)(t);return d.transitions&&e.length>0&&(d.transitions=ho(d.transitions,e,n)),d.states=d.states.map(r=>r.statemachine?{...r,statemachine:xn(r.statemachine,e,n)}:r),d}function kn(t,e){let n=(0,Be.default)(t);return n.transitions&&(n.transitions=(0,Te.default)(n.transitions,d=>e.some(r=>r===d.from||r===d.to))),n.states=(0,Te.default)(n.states,d=>e.includes(d.name)).map(d=>d.statemachine?{...d,statemachine:kn(d.statemachine,e)}:d),n}var wn=(t,e=["fork","junction","choice"])=>{let n=new q(t),d=n.findStatesByTypes(e).map(s=>s.name),r=d.reduce((s,f)=>(s[f]=n.findTransitionsByFrom(f),s),{}),u=xn(t,d,r);return kn(u,d)};var Xn=B(require("lodash/has.js"),1),Jn=B(jn(),1);var Bn=B(require("lodash/cloneDeep.js"),1);var Oo=[{name:"fontname",value:'"Helvetica"'},{name:"fontsize",value:"12"},{name:"penwidth",value:"2.0"}],Eo={dot:[{name:"splines",value:"true"},{name:"ordering",value:"out"},{name:"compound",value:"true"},{name:"overlap",value:"scale"},{name:"nodesep",value:"0.3"},{name:"ranksep",value:"0.1"}],fdp:[{name:"K",value:"0.9"}],osage:[{name:"pack",value:"42"}],neato:[{name:"epsilon",value:"0.9"}]},jo={"bottom-top":[{name:"rankdir",value:"BT"}],"left-right":[{name:"rankdir",value:"LR"}],"right-left":[{name:"rankdir",value:"RL"}]},Ao=[{name:"shape",value:"plaintext"},{name:"style",value:"filled"},{name:"fillcolor",value:'"#FFFFFF01"'},{name:"fontname",value:"Helvetica"},{name:"fontsize",value:12},{name:"penwidth",value:"2.0"}],_o=[{name:"fontname",value:"Helvetica"},{name:"fontsize",value:10}];function Ie(t){return`${t.name}=${t.value}`}var be={buildGraphAttributes:(t,e,n)=>Oo.concat(Eo[t]||[]).concat(jo[e]||[]).concat(n||[]).map(Ie).join(" "),buildNodeAttributes:t=>Ao.concat(t||[]).map(Ie).join(" "),buildEdgeAttributes:t=>_o.concat(t||[]).map(Ie).join(" ")};function Fo(t){return t.replace(/\\/g,"\\\\").replace(/\n\s*/g,"\\l").replace(/"/g,'\\"').concat("\\l")}function Ro(t){return t.replace(/\\/g,"\\\\").replace(/\n\s*/g," \\l").replace(/"/g,'\\"').concat(" \\l")}function To(t){let e=t||"top-down";return e==="top-down"||e==="bottom-top"}function Bo(t,e){return e.from===e.to&&t.findStateByName(e.from).statemachine&&e.type!=="internal"}var N={escapeString:Fo,escapeLabelString:Ro,isVertical:To,isCompositeSelf:Bo};function An(t){return e=>e.type===t}function De(t){return e=>t.includes(e.type)}function Ho(t){return t.label=t.label||t.name,t}function qo(t){return Object.prototype.hasOwnProperty.call(t,"note")&&(t.noteName=`note_${t.name}`),t}function Io(t){let e=["state",t.type];return Object.prototype.hasOwnProperty.call(t,"class")&&e.push(t.class.trim().replace(/[ ]{2,}/g," ")),t.class=e.join(" "),t}function Do(t){return t==="activity"?"":`${t}/ `}function Lo(t){let e={...t};return t.actions&&(e.actions=t.actions.map(n=>`${Do(n.type)}${n.body}`)),e}function Vo(t){return Object.prototype.hasOwnProperty.call(t,"note")&&(t.noteFlattened=t.note.join("")),t}function No(t){return e=>{var d;let n=(d=(t||[]).find(r=>r.name==="color"))==null?void 0:d.value;return n&&!e.color&&De(["initial","fork","join","junction","forkjoin","final"])(e)&&(e.color=n),e}}function So(t){return t.note&&(t.note=t.note.map(N.escapeString)),t}function Mo(t){return e=>De(["fork","join","forkjoin"])(e)?{sizingExtras:N.isVertical(t)?"height=0.1":"width=0.1",...e}:e}function zo(t){return t.type==="parallel"&&t.statemachine&&t.statemachine.states&&(t.statemachine.states=t.statemachine.states.map(e=>An("regular")(e)?{...e,parentIsParallel:!0}:e)),t}var F={isType:An,isOneOfTypes:De,setLabel:Ho,classifyState:Io,nameNote:qo,flattenActions:Lo,flattenNote:Vo,recolor:No,escapeStateStrings:So,tipForkJoinStates:Mo,flagParallelChildren:zo};function Uo(t){return t.note&&(t.note=t.note.map(N.escapeString)),t.label&&(t.label=N.escapeLabelString(t.label)),t}function Go(t){return e=>{let n={};return e.isCompositeSelf&&(N.isVertical(t)?n={tailportflags:'tailport="e" headport="e"',headportflags:'tailport="w"'}:e.hasParent?n={tailportflags:'tailport="n" headport="n"',headportflags:'tailport="s"'}:n={tailportflags:'tailport="s" headport="s"',headportflags:'tailport="n"'}),{...e,...n}}}function Xo(t){let e=["transition"];return t.type&&e.push(t.type),t.class&&e.push(t.class.trim().replace(/[ ]{2,}/g," ")),t.class=e.join(" "),t}var $e={escapeTransitionStrings:Uo,addPorts:Go,classifyTransition:Xo};var ie=class{constructor(){this.reset()}reset(){this.COUNTER=0}next(){return++this.COUNTER}nextAsString(){return this.next().toString(10)}};var Hn=B(Tn(),1);var qn={};function ei(t){return e=>(Object.prototype.hasOwnProperty.call(e,"statemachine")&&(e.nestedExternalSelfTransitions=t.findExternalSelfTransitions(e.name).map(n=>n.name)),e)}function In(t,e,n,d){return t.filter(r=>r.statemachine).forEach(r=>{r.statemachine.states=In(r.statemachine.states,e,n,d)}),t.map(F.setLabel).map(F.nameNote).map(F.classifyState).map(F.escapeStateStrings).map(F.flattenNote).map(F.flattenActions).map(F.flagParallelChildren).map(F.tipForkJoinStates(e)).map(F.recolor(n)).map(ei(d))}function ti(t){return t.initialStates=t.states.filter(F.isType("initial")),t.regularStates=t.states.filter(e=>F.isType("regular")(e)&&!e.statemachine),t.historyStates=t.states.filter(F.isType("history")),t.deepHistoryStates=t.states.filter(F.isType("deephistory")),t.choiceStates=t.states.filter(F.isType("choice")),t.forkjoinStates=t.states.filter(F.isOneOfTypes(["fork","join","forkjoin"])),t.junctionStates=t.states.filter(F.isType("junction")),t.terminateStates=t.states.filter(F.isType("terminate")),t.finalStates=t.states.filter(F.isType("final")),t.compositeStates=t.states.filter(e=>e.statemachine),t}function ni(t){return e=>(t.findStateByName(e.from).statemachine&&(e.fromComposite=!0),t.findStateByName(e.to).statemachine&&(e.toComposite=!0),e)}function li(t){return e=>{let n={};return N.isCompositeSelf(t,e)&&(t.findStateByName(e.from).hasParent?n={hasParent:!0,isCompositeSelf:!0}:n={isCompositeSelf:!0}),{...e,...n}}}function ri(t){return t.name=`tr_${t.from}_${t.to}_${qn.nextAsString()}`,Boolean(t.note)&&(t.noteName=`note_${t.name}`),t}function ai(t,e){return t.flattenedTransitions.map(ri).map($e.escapeTransitionStrings).map($e.classifyTransition).map(F.flattenNote).map(ni(t)).map(li(t)).map($e.addPorts(e))}var xe=(t,e)=>{e=e||{},qn=new ie;let n=(0,Bn.default)(t),d=new q(n);return n.transitions=ai(d,e.direction),n.states=In(n.states,e.direction,e.dotNodeAttrs,d),n=ti(n),n.graphAttributes=be.buildGraphAttributes(H.getOptionValue(e,"engine"),H.getOptionValue(e,"direction"),e.dotGraphAttrs),n.nodeAttributes=be.buildNodeAttributes(e.dotNodeAttrs),n.edgeAttributes=be.buildEdgeAttributes(e.dotEdgeAttrs),(0,Hn.default)(n)};var Dn=B(require("viz.js"),1);var oi={oldsvg:"svg",oldps2:"ps2",oldeps:"eps"},Ne=(t,e)=>(0,Dn.default)(xe(t,e),{engine:H.getOptionValue(e,"engine"),format:oi[H.getOptionValue(e,"outputType")]||"svg"});var ii=/[\u0000-\u002C|\u002F|\u003B-\u0040|\u005B-\u0060|\u007B-\u00BF|\u00D7|\u00F7|\u0300-\u036F|\u037E|\u2000-\u200B|\u200E-\u206F|\u2190-\u2BFF|\u2FF0-\u3000|\uD800-\uF8FF|\uFDD0-\uFDEF|\uFFFE-\uFFFF]/g,si=/[-|.|0-9|\u00B7|\u0300-\u036F|\u203F-\u2040]/g;function Ln(t){return t.replace(ii,"_")}function ci(t){let e=Ln(t);return e.match(si)&&(e=`_${t}`),e}var ke=t=>(t=t||"",t.length===0?"__empty":ci(t[0]).concat(Ln(t.slice(1))));var ui=/[\u00B7|\u0300-\u036F|\u203F-\u2040|\u0000-\u0029|\u002B-\u002C|\u002F|\u003B-\u0040|\u005B-\u0060|\u007B-\u00BF|\u00D7|\u00F7|\u0300-\u036F|\u037E|\u2000-\u200B|\u200E-\u206F|\u2190-\u2BFF|\u2FF0-\u3000|\uD800-\uF8FF|\uFDD0-\uFDEF|\uFFFE-\uFFFF]/g,fi=/[.]/g;function Vn(t){return t.replace(ui,"_")}function mi(t){let e=Vn(t);return e.match(fi)&&(e=`_${t}`),e}function pi(t){return t=t.replace(/\s+/g," ").trim(),mi(t[0]).concat(Vn(t.slice(1)))}var Nn=t=>(t=t||"",t.length===0?"empty":t.split(/[\n\r]+/).filter(e=>e.length>0).map(pi).join(" "));var di={regular:"state",initial:"initial",final:"final",terminate:"final",parallel:"parallel",history:"history",deephistory:"history"};function hi(t){return di[t]||"state"}function gi(t){let e={target:ke(t.to)};return Boolean(t.event)&&(e.event=Nn(t.event)),Boolean(t.cond)&&(e.cond=t.cond),Boolean(t.action)&&(e.action=t.action),Boolean(t.type)&&(e.type=t.type),e}function yi(t,e){return t.filter(n=>n.type===e).map(n=>n.body)}function Se(t,e,n,d){let r=yi(n,d);r.length>0&&(t[e]=(t[e]||[]).concat(r))}function vi(t,e){Boolean(e.actions)&&(Se(t,"onentries",e.actions,"entry"),Se(t,"onentries",e.actions,"activity"),Se(t,"onexits",e.actions,"exit"))}function bi(t,e,n){let d=n.filter(r=>r.from===e.name).map(gi);d.length>0&&(t.transitions=d)}function $i(t,e,n){if(Boolean(e.statemachine)){let d=ee(e.statemachine,null,n);t.states=(t.states||[]).concat(d.states),d.initial&&(t.initial=d.initial)}}function xi(t){return t=t||[],e=>{let n={kind:hi(e.type),id:ke(e.name)};return e.type==="deephistory"&&(n.type="deep"),vi(n,e),bi(n,e,t),$i(n,e,t),n}}function ki(t){let e=null,n=t.states.filter(d=>d.type==="initial");return n.length>0&&(e=n[0].name),e}function wi(t,e){let n=e;if(e&&t.transitions){let d=t.transitions.filter(r=>r.from===e);d.length>0&&!d[0].action&&(n=d[0].to)}return n}function ee(t,e,n){let d=ki(t),r=wi(t,d),u={states:t.states.filter(s=>r&&r!==d?s.type!=="initial":!0).map(xi(n||new q(t).flattenedTransitions))};return r&&(u.initial=ke(r)),u}var Gn=B(Un(),1);function Ge(t){return(0,Gn.default)(ee(t))}function Xe(t){let e={smcat:Jn.default,dot:xe,svg:Ne,oldsvg:Ne,scjson:ee,scxml:Ge};return(0,Xn.default)(e,t)?e[t]:n=>n}var Qn="10.0.1";function Wn(t,e){let n=$n.getAST(t,e),d=H.getOptionValue(e,"desugar");return Xe(H.getOptionValue(e,"outputType"))(d?wn(n):n,e)}var Yn=Qn;function Zn(){return H.getAllowedValues()}var ji={render:Wn,version:Yn,getAllowedValues:Zn};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "state-machine-cat",
3
- "version": "10.0.0",
3
+ "version": "10.0.1",
4
4
  "description": "write beautiful state charts",
5
5
  "main": "./dist/commonjs/index.js",
6
6
  "module": "./src/index.mjs",
@@ -38,6 +38,9 @@
38
38
  "depcruise:graph:dev": "wireit",
39
39
  "depcruise:graph:dev:flat": "wireit",
40
40
  "depcruise:view-report": "wireit",
41
+ "depcruise:github-actions:markdown": "wireit",
42
+ "depcruise:github-actions:mermaid": "wireit",
43
+ "depcruise:github-actions:mermaid:diff": "wireit",
41
44
  "lint": "wireit",
42
45
  "lint:eslint": "wireit",
43
46
  "lint:prettier": "wireit",
@@ -79,11 +82,6 @@
79
82
  ],
80
83
  "upem": {
81
84
  "policies": [
82
- {
83
- "package": "eslint-plugin-mocha",
84
- "policy": "pin",
85
- "because": "https://github.com/lo1tuma/eslint-plugin-mocha/issues/322"
86
- },
87
85
  {
88
86
  "package": "fast-xml-parser",
89
87
  "policy": "wanted",
@@ -260,6 +258,24 @@
260
258
  "depcruise:json"
261
259
  ]
262
260
  },
261
+ "depcruise:github-actions:markdown": {
262
+ "command": "depcruise-fmt node_modules/.cache/depcruise-cache.json --output-type markdown >> $GITHUB_STEP_SUMMARY",
263
+ "dependencies": [
264
+ "depcruise:json"
265
+ ]
266
+ },
267
+ "depcruise:github-actions:mermaid": {
268
+ "command": "echo '\n\n```mermaid' >> $GITHUB_STEP_SUMMARY && depcruise-fmt node_modules/.cache/depcruise-cache.json --include-only '^(bin|src)' --output-type mermaid >> $GITHUB_STEP_SUMMARY && echo '```\n\n' >> $GITHUB_STEP_SUMMARY",
269
+ "dependencies": [
270
+ "depcruise:json"
271
+ ]
272
+ },
273
+ "depcruise:github-actions:mermaid:diff": {
274
+ "command": "echo '\n\n```mermaid' >> $GITHUB_STEP_SUMMARY && depcruise-fmt node_modules/.cache/depcruise-cache.json --include-only '^(bin|src)' --focus '$(watskeburt $SHA -T regex)' --output-type mermaid >> $GITHUB_STEP_SUMMARY && echo '```\n\n' >> $GITHUB_STEP_SUMMARY",
275
+ "dependencies": [
276
+ "depcruise:json"
277
+ ]
278
+ },
263
279
  "lint": {
264
280
  "dependencies": [
265
281
  "lint:eslint",
@@ -268,7 +284,7 @@
268
284
  ]
269
285
  },
270
286
  "lint:eslint": {
271
- "command": "eslint --cache --cache-location .cache --color src test config",
287
+ "command": "eslint --cache --cache-location node_modules/.cache/eslint/cache.json --color src test config",
272
288
  "files": [
273
289
  "{src,test}/**/*.{js,mjs}",
274
290
  "config/**/*.{js,json}",
@@ -377,7 +393,7 @@
377
393
  "dependencies": {
378
394
  "ajv": "8.11.0",
379
395
  "chalk": "5.0.1",
380
- "commander": "9.3.0",
396
+ "commander": "9.4.0",
381
397
  "fast-xml-parser": "3.21.1",
382
398
  "get-stream": "6.0.1",
383
399
  "handlebars": "4.7.7",
@@ -389,34 +405,35 @@
389
405
  "wrap-ansi": "8.0.1"
390
406
  },
391
407
  "devDependencies": {
392
- "@typescript-eslint/eslint-plugin": "5.27.0",
393
- "@typescript-eslint/parser": "5.27.0",
394
- "c8": "7.11.3",
408
+ "@typescript-eslint/eslint-plugin": "5.31.0",
409
+ "@typescript-eslint/parser": "5.31.0",
410
+ "c8": "7.12.0",
395
411
  "chai": "4.3.6",
396
412
  "chai-as-promised": "7.1.1",
397
413
  "chai-json-schema": "1.5.1",
398
414
  "chai-xml": "0.4.0",
399
- "dependency-cruiser": "11.8.0",
400
- "esbuild": "0.14.42",
401
- "eslint": "^8.17.0",
415
+ "dependency-cruiser": "11.14.0",
416
+ "esbuild": "0.14.51",
417
+ "eslint": "^8.20.0",
402
418
  "eslint-config-moving-meadow": "3.0.0",
403
419
  "eslint-config-prettier": "8.5.0",
404
- "eslint-plugin-budapestian": "3.0.2",
420
+ "eslint-plugin-budapestian": "4.0.0",
405
421
  "eslint-plugin-import": "2.26.0",
406
- "eslint-plugin-mocha": "10.0.3",
422
+ "eslint-plugin-mocha": "10.1.0",
407
423
  "eslint-plugin-node": "11.1.0",
408
424
  "eslint-plugin-security": "1.5.0",
409
- "eslint-plugin-unicorn": "^42.0.0",
425
+ "eslint-plugin-unicorn": "^43.0.2",
410
426
  "husky": "4.3.8",
411
- "lint-staged": "13.0.0",
427
+ "lint-staged": "13.0.3",
412
428
  "mocha": "10.0.0",
413
429
  "npm-run-all": "4.1.5",
414
430
  "peggy": "2.0.1",
415
- "prettier": "^2.6.2",
431
+ "prettier": "^2.7.1",
416
432
  "query-string": "7.1.1",
417
- "typescript": "4.7.3",
433
+ "typescript": "4.7.4",
418
434
  "upem": "^7.0.0",
419
- "wireit": "0.5.0",
435
+ "watskeburt": "0.6.0",
436
+ "wireit": "0.7.1",
420
437
  "xml-name-validator": "4.0.0"
421
438
  },
422
439
  "eslintIgnore": [
package/src/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ /* eslint-disable budapestian/global-constant-pattern */
1
2
  import options from "./options.mjs";
2
3
  import parse from "./parse/index.mjs";
3
4
  import desugar from "./transform/desugar.mjs";
@@ -5,7 +6,7 @@ import getRenderFunction from "./render/index.mjs";
5
6
  import { version as _version } from "./version.mjs";
6
7
 
7
8
  /**
8
- * Translates the input script to an outputscript.
9
+ * Translates the input script to an output-script.
9
10
  *
10
11
  * @param {string} pScript The script to translate
11
12
  * @param {object} pOptions options influencing parsing & rendering.
package/src/version.mjs CHANGED
@@ -1 +1 @@
1
- export const version = "10.0.0";
1
+ export const version = "10.0.1";