state-machine-cat 10.1.5 → 10.1.7

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.
Files changed (79) hide show
  1. package/bin/smcat.mjs +5 -4
  2. package/dist/commonjs/bundle.js +67 -67
  3. package/{src → dist/esm}/cli/actions.mjs +24 -40
  4. package/dist/esm/cli/attributes-parser.mjs +981 -0
  5. package/dist/esm/cli/file-name-to-stream.mjs +13 -0
  6. package/dist/esm/cli/make-description.mjs +21 -0
  7. package/dist/esm/cli/normalize.mjs +95 -0
  8. package/dist/esm/cli/validations.mjs +70 -0
  9. package/dist/esm/index-node.mjs +16 -0
  10. package/dist/esm/index.mjs +19 -0
  11. package/dist/esm/options.mjs +61 -0
  12. package/dist/esm/parse/index.mjs +27 -0
  13. package/dist/esm/parse/parser-helpers.mjs +175 -0
  14. package/dist/esm/parse/scxml/index.mjs +136 -0
  15. package/dist/esm/parse/scxml/normalize-machine.mjs +44 -0
  16. package/dist/esm/parse/smcat/smcat-parser.mjs +2924 -0
  17. package/dist/esm/parse/smcat-ast.schema.mjs +170 -0
  18. package/dist/esm/render/dot/attributebuilder.mjs +51 -0
  19. package/dist/esm/render/dot/counter.mjs +16 -0
  20. package/dist/esm/render/dot/dot.states.template.js +26 -0
  21. package/dist/esm/render/dot/dot.template.js +14 -0
  22. package/dist/esm/render/dot/index.mjs +106 -0
  23. package/dist/esm/render/dot/render-dot-from-ast.js +29 -0
  24. package/dist/esm/render/dot/state-transformers.mjs +113 -0
  25. package/dist/esm/render/dot/transition-transformers.mjs +49 -0
  26. package/dist/esm/render/dot/utl.mjs +29 -0
  27. package/dist/esm/render/index-node.mjs +28 -0
  28. package/dist/esm/render/index.mjs +20 -0
  29. package/dist/esm/render/scjson/index.mjs +121 -0
  30. package/dist/esm/render/scjson/make-valid-event-names.mjs +27 -0
  31. package/dist/esm/render/scjson/make-valid-xml-name.mjs +19 -0
  32. package/dist/esm/render/scxml/index.mjs +4 -0
  33. package/dist/esm/render/scxml/render-from-scjson.js +9 -0
  34. package/dist/esm/render/scxml/scxml.states.template.js +14 -0
  35. package/dist/esm/render/scxml/scxml.template.js +6 -0
  36. package/dist/esm/render/smcat/index.js +63 -0
  37. package/dist/esm/render/smcat/smcat.template.js +13 -0
  38. package/dist/esm/render/vector/dot-to-vector-native.mjs +35 -0
  39. package/dist/esm/render/vector/vector-native-dot-with-fallback.mjs +37 -0
  40. package/dist/esm/render/vector/vector-with-viz-js.mjs +13 -0
  41. package/dist/esm/state-machine-model.mjs +58 -0
  42. package/dist/esm/transform/desugar.mjs +77 -0
  43. package/dist/esm/transform/utl.mjs +16 -0
  44. package/dist/esm/version.mjs +1 -0
  45. package/package.json +36 -45
  46. package/src/render/dot/dot.states.template.js +1 -1
  47. package/src/render/dot/index.mjs +14 -14
  48. package/types/state-machine-cat.d.ts +4 -4
  49. package/src/cli/file-name-to-stream.mjs +0 -25
  50. package/src/cli/make-description.mjs +0 -45
  51. package/src/cli/normalize.mjs +0 -204
  52. package/src/cli/validations.mjs +0 -140
  53. package/src/index-node.mjs +0 -55
  54. package/src/index.mjs +0 -58
  55. package/src/options.mjs +0 -78
  56. package/src/parse/index.mjs +0 -47
  57. package/src/parse/parser-helpers.mjs +0 -297
  58. package/src/parse/scxml/normalize-machine.mjs +0 -73
  59. package/src/parse/smcat-ast.schema.mjs +0 -187
  60. package/src/render/dot/attributebuilder.mjs +0 -68
  61. package/src/render/dot/counter.mjs +0 -33
  62. package/src/render/dot/render-dot-from-ast.js +0 -70
  63. package/src/render/dot/state-transformers.mjs +0 -128
  64. package/src/render/dot/transition-transformers.mjs +0 -52
  65. package/src/render/dot/utl.mjs +0 -56
  66. package/src/render/index-node.mjs +0 -36
  67. package/src/render/index.mjs +0 -22
  68. package/src/render/scjson/index.mjs +0 -175
  69. package/src/render/scjson/make-valid-event-names.mjs +0 -71
  70. package/src/render/scjson/make-valid-xml-name.mjs +0 -70
  71. package/src/render/scxml/index.mjs +0 -8
  72. package/src/render/smcat/index.js +0 -129
  73. package/src/render/vector/dot-to-vector-native.mjs +0 -60
  74. package/src/render/vector/vector-native-dot-with-fallback.mjs +0 -55
  75. package/src/render/vector/vector-with-viz-js.mjs +0 -18
  76. package/src/state-machine-model.mjs +0 -124
  77. package/src/transform/desugar.mjs +0 -222
  78. package/src/transform/utl.mjs +0 -26
  79. package/src/version.mjs +0 -2
@@ -1,79 +1,79 @@
1
- var Ba=Object.create;var ge=Object.defineProperty;var Ha=Object.getOwnPropertyDescriptor;var qa=Object.getOwnPropertyNames;var Da=Object.getPrototypeOf,Ia=Object.prototype.hasOwnProperty;var U=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),La=(t,e)=>{for(var n in e)ge(t,n,{get:e[n],enumerable:!0})},en=(t,e,n,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of qa(e))!Ia.call(t,r)&&r!==n&&ge(t,r,{get:()=>e[r],enumerable:!(d=Ha(e,r))||d.enumerable});return t};var R=(t,e,n)=>(n=t!=null?Ba(Da(t)):{},en(e||!t||!t.__esModule?ge(n,"default",{value:t,enumerable:!0}):n,t)),Na=t=>en(ge({},"__esModule",{value:!0}),t);var An=U(()=>{var Be=require("handlebars/dist/handlebars.runtime"),yo=Be.template,vo=Be.templates=Be.templates||{};vo["smcat.template.hbs"]=yo({1:function(t,e,n,d,r){var c=e??(t.nullContext||{}),i=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:i,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}}},u=typeof a==f?a.call(c,b):a;return(u=m(n,"note")?u:v.call(e,u,b))!=null&&(p+=u),p+=(u=(m(n,"quotifyState")||e&&m(e,"quotifyState")||i).call(c,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?u:"",a=(a=m(n,"hasExtendedAttributes")||(e!=null?m(e,"hasExtendedAttributes"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"hasExtendedAttributes")?u:v.call(e,u,b))!=null&&(p+=u),p+=(u=m(n,"if").call(c,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?u:"",a=(a=m(n,"actions")||(e!=null?m(e,"actions"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"actions")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"statemachine")||(e!=null?m(e,"statemachine"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"statemachine")?u:v.call(e,u,b))!=null&&(p+=u),p+((u=m(n,"if").call(c,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?u:"")+`
2
- `},2:function(t,e,n,d,r){return"# "+((t=t.lambda(e,e))!=null?t:"")+`
3
- `},4:function(t,e,n,d,r){return""},6:function(t,e,n,d,r){var c=e??(t.nullContext||{}),i=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:i,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}}},u=typeof a==f?a.call(c,b):a;return(u=m(n,"typeExplicitlySet")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"label")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"color")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"class")||(e!=null?m(e,"class"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"class")?u:v.call(e,u,b))!=null&&(p+=u),p+((u=m(n,"if").call(c,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?u:"")+"]"},7:function(t,e,n,d,i){var c=t.lookupProperty||function(v,m){if(Object.prototype.hasOwnProperty.call(v,m))return v[m]},f=(f=c(n,"type")||(e!=null?c(e,"type"):e))!=null?f:t.hooks.helperMissing,i={name:"type",hash:{},fn:t.program(8,i,0),inverse:t.noop,data:i,loc:{start:{line:6,column:54},end:{line:6,column:85}}},f=typeof f=="function"?f.call(e??(t.nullContext||{}),i):f;return(f=c(n,"type")?f:t.hooks.blockHelperMissing.call(e,f,i))!=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 c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return(n=(c(n,"quotifyActions")||e&&c(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 c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return` {
4
- `+((c=t.invokePartial(c(d,"smcat.template.hbs"),e,{name:"smcat.template.hbs",data:r,indent:" ",helpers:n,partials:d,decorators:t.decorators}))!=null?c:"")+"}"},24:function(t,e,n,d,r){return";"},26:function(t,e,n,d,r){return","},28:function(t,e,n,d,r){var c=e??(t.nullContext||{}),i=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:i,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}}},u=typeof a==f?a.call(c,b):a;return(u=m(n,"note")?u:v.call(e,u,b))!=null&&(p+=u),p+=((u=(m(n,"quotifyState")||e&&m(e,"quotifyState")||i).call(c,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?u:"")+" => "+((u=(m(n,"quotifyState")||e&&m(e,"quotifyState")||i).call(c,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?u:""),a=(a=m(n,"hasExtendedAttributes")||(e!=null?m(e,"hasExtendedAttributes"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"hasExtendedAttributes")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"label")?u:v.call(e,u,b))!=null&&(p+=u),p+`;
5
- `},29:function(t,e,n,d,r){var c=e??(t.nullContext||{}),i=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:i,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}}},u=typeof a==f?a.call(c,b):a;return(u=m(n,"color")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"type")||(e!=null?m(e,"type"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"type")?u:v.call(e,u,b))!=null&&(p+=u),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 c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return": "+((n=(c(n,"quotifyLabel")||e&&c(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 c=e??(t.nullContext||{}),i=t.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]},f=((p=i(n,"each").call(c,e!=null?i(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=i(n,"transitions")||(e!=null?i(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(c,m):v;return(p=i(n,"transitions")?p:t.hooks.blockHelperMissing.call(e,p,m))!=null&&(f+=p),f},usePartial:!0,useData:!0})});var En=U((si,On)=>{var M=require("handlebars/dist/handlebars.runtime.js"),Pn=require("lodash/cloneDeep.js");An();var bo=/;|,|{| |\[/,$o=/;|,|{/,xo=/;|{/;function He(t,e){return t.test(e)?`"${e}"`:e}M.registerPartial("smcat.template.hbs",M.templates["smcat.template.hbs"]);function ko(t){return t==="activity"?"":`${t}/ `}function wo(t){return{...t,actions:(t.actions||[]).map(e=>`${ko(e.type)}${e.body}`).join(`
7
- `)}}function Ao(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 Cn(t){return t.map(Ao).filter(e=>e.statemachine).forEach(e=>{e.statemachine.states=Cn(e.statemachine.states)}),t.map(wo)}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)}M.registerHelper("quotifyState",t=>He(bo,t));M.registerHelper("quotifyLabel",t=>He(xo,t));M.registerHelper("quotifyActions",t=>He($o,t));On.exports=function(e){return M.templates["smcat.template.hbs"]({...e,states:Cn(Pn(e.states)),transitions:Co(Pn(e.transitions||[]))})}});var Fn=U(()=>{var Ie=require("handlebars/dist/handlebars.runtime"),Wo=Ie.template,Yo=Ie.templates=Ie.templates||{};Yo["dot.template.hbs"]=Wo({1:function(t,e,n,d,r,c,i){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(D,I){if(Object.prototype.hasOwnProperty.call(D,I))return D[I]},b="",u=(u=a(n,"noteName")||(e!=null?a(e,"noteName"):e))!=null?u:v,k={name:"noteName",hash:{},fn:t.noop,inverse:t.program(2,r,0,c,i),data:r,loc:{start:{line:9,column:2},end:{line:26,column:15}}},$=typeof u==m?u.call(f,k):u;return($=a(n,"noteName")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"noteName")||(e!=null?a(e,"noteName"):e))!=null?u:v,k={name:"noteName",hash:{},fn:t.program(19,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:27,column:2},end:{line:37,column:15}}},$=typeof u==m?u.call(f,k):u,($=a(n,"noteName")?$:p.call(e,$,k))!=null&&(b+=$),b},2:function(t,e,n,d,r){var c=e??(t.nullContext||{}),i=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:i,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}}},u=typeof a==f?a.call(c,b):a;return(u=m(n,"isCompositeSelf")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"isCompositeSelf")||(e!=null?m(e,"isCompositeSelf"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"isCompositeSelf")?u:v.call(e,u,b))!=null&&(p+=u),p},3:function(t,e,n,d,r){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p=' "'+((u=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:i)==f?a.call(c,{name:"from",hash:{},data:r,loc:{start:{line:11,column:5},end:{line:11,column:15}}}):a)!=null?u:"")+'" -> "'+((u=typeof(a=(a=m(n,"to")||(e!=null?m(e,"to"):e))!=null?a:i)==f?a.call(c,{name:"to",hash:{},data:r,loc:{start:{line:11,column:21},end:{line:11,column:29}}}):a)!=null?u:"")+'" [label="',a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a;return(u=m(n,"label")?u:v.call(e,u,b))!=null&&(p+=u),p+=((u=typeof(a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:i)==f?a.call(c,{name:"label",hash:{},data:r,loc:{start:{line:11,column:60},end:{line:11,column:71}}}):a)!=null?u:"")+'"',a=(a=m(n,"fromComposite")||(e!=null?m(e,"fromComposite"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"fromComposite")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"toComposite")||(e!=null?m(e,"toComposite"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"toComposite")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"color")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"width")||(e!=null?m(e,"width"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"width")?u:v.call(e,u,b))!=null&&(p+=u),p+' class="'+((u=typeof(a=(a=m(n,"class")||(e!=null?m(e,"class"):e))!=null?a:i)==f?a.call(c,{name:"class",hash:{},data:r,loc:{start:{line:15,column:76},end:{line:15,column:87}}}):a)!=null?u:"")+`"]
8
- `},4:function(t,e,n,d,r){return" "},6:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return' ltail="cluster_'+((c=typeof(n=(n=c(n,"from")||(e!=null?c(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?c:"")+'"'},8:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return' lhead="cluster_'+((c=typeof(n=(n=c(n,"to")||(e!=null?c(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?c:"")+'"'},10:function(i,e,n,d,r){var c,i=i.lambda;return' color="'+((c=i(e,e))!=null?c:"")+'" fontcolor="'+((c=i(e,e))!=null?c:"")+'"'},12:function(t,e,n,d,r){return' penwidth="'+((t=t.lambda(e,e))!=null?t:"")+'"'},14:function(t,e,n,d,r){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p=' "'+((u=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:i)==f?a.call(c,{name:"from",hash:{},data:r,loc:{start:{line:18,column:7},end:{line:18,column:17}}}):a)!=null?u:"")+'" -> "self_'+((u=typeof(a=(a=m(n,"name")||(e!=null?m(e,"name"):e))!=null?a:i)==f?a.call(c,{name:"name",hash:{},data:r,loc:{start:{line:18,column:28},end:{line:18,column:38}}}):a)!=null?u:"")+'" [label="',a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a;return(u=m(n,"label")?u:v.call(e,u,b))!=null&&(p+=u),p+=((u=typeof(a=(a=m(n,"label")||(e!=null?m(e,"label"):e))!=null?a:i)==f?a.call(c,{name:"label",hash:{},data:r,loc:{start:{line:18,column:69},end:{line:18,column:80}}}):a)!=null?u:"")+'" arrowhead=none',a=(a=m(n,"tailportflags")||(e!=null?m(e,"tailportflags"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"tailportflags")?u:v.call(e,u,b))!=null&&(p+=u),p+=' ltail="cluster_'+((u=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:i)==f?a.call(c,{name:"from",hash:{},data:r,loc:{start:{line:19,column:89},end:{line:19,column:99}}}):a)!=null?u:"")+'"',a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"color")?u:v.call(e,u,b))!=null&&(p+=u),p+=' class="'+((u=typeof(a=(a=m(n,"class")||(e!=null?m(e,"class"):e))!=null?a:i)==f?a.call(c,{name:"class",hash:{},data:r,loc:{start:{line:20,column:93},end:{line:20,column:104}}}):a)!=null?u:"")+`"]
9
- "self_`+((u=typeof(a=(a=m(n,"name")||(e!=null?m(e,"name"):e))!=null?a:i)==f?a.call(c,{name:"name",hash:{},data:r,loc:{start:{line:21,column:12},end:{line:21,column:22}}}):a)!=null?u:"")+'" -> "'+((u=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:i)==f?a.call(c,{name:"from",hash:{},data:r,loc:{start:{line:21,column:28},end:{line:21,column:38}}}):a)!=null?u:"")+'" [lhead="cluster_'+((u=typeof(a=(a=m(n,"from")||(e!=null?m(e,"from"):e))!=null?a:i)==f?a.call(c,{name:"from",hash:{},data:r,loc:{start:{line:21,column:56},end:{line:21,column:66}}}):a)!=null?u:"")+'"',a=(a=m(n,"headportflags")||(e!=null?m(e,"headportflags"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"headportflags")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"color")?u:v.call(e,u,b))!=null&&(p+=u),a=(a=m(n,"width")||(e!=null?m(e,"width"):e))!=null?a:i,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}}},u=typeof a==f?a.call(c,b):a,(u=m(n,"width")?u:v.call(e,u,b))!=null&&(p+=u),p+' class="'+((u=typeof(a=(a=m(n,"class")||(e!=null?m(e,"class"):e))!=null?a:i)==f?a.call(c,{name:"class",hash:{},data:r,loc:{start:{line:24,column:76},end:{line:24,column:87}}}):a)!=null?u:"")+`"]
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,c,i){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]
11
- "`+((f=v(i[1]!=null?p(i[1],"from"):i[1],e))!=null?f:"")+'" -> "i_'+((f=v(e,e))!=null?f:"")+'" [arrowhead=none'+((f=m.call(e,v(i[1]!=null?p(i[1],"fromComposite"):i[1],e),{name:"../fromComposite",hash:{},fn:t.program(20,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:30,column:32},end:{line:30,column:105}}}))!=null?f:"")+((f=m.call(e,v(i[1]!=null?p(i[1],"color"):i[1],e),{name:"../color",hash:{},fn:t.program(17,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:31,column:32},end:{line:31,column:75}}}))!=null?f:"")+`]
12
- "i_`+((f=v(e,e))!=null?f:"")+'" -> "'+((f=v(i[1]!=null?p(i[1],"to"):i[1],e))!=null?f:"")+'" [label="'+((f=m.call(e,v(i[1]!=null?p(i[1],"label"):i[1],e),{name:"../label",hash:{},fn:t.noop,inverse:t.program(4,r,0,c,i),data:r,loc:{start:{line:32,column:43},end:{line:32,column:70}}}))!=null?f:"")+((f=v(i[1]!=null?p(i[1],"label"):i[1],e))!=null?f:"")+'"'+((f=m.call(e,v(i[1]!=null?p(i[1],"toComposite"):i[1],e),{name:"../toComposite",hash:{},fn:t.program(22,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:33,column:32},end:{line:33,column:99}}}))!=null?f:"")+((f=m.call(e,v(i[1]!=null?p(i[1],"color"):i[1],e),{name:"../color",hash:{},fn:t.program(10,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:34,column:32},end:{line:34,column:95}}}))!=null?f:"")+`]
1
+ "use strict";var _a=Object.create;var ge=Object.defineProperty;var Fa=Object.getOwnPropertyDescriptor;var Ra=Object.getOwnPropertyNames;var Na=Object.getPrototypeOf,Va=Object.prototype.hasOwnProperty;var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),La=(t,e)=>{for(var n in e)ge(t,n,{get:e[n],enumerable:!0})},Kt=(t,e,n,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of Ra(e))!Va.call(t,l)&&l!==n&&ge(t,l,{get:()=>e[l],enumerable:!(d=Fa(e,l))||d.enumerable});return t};var _=(t,e,n)=>(n=t!=null?_a(Na(t)):{},Kt(e||!t||!t.__esModule?ge(n,"default",{value:t,enumerable:!0}):n,t)),Ba=t=>Kt(ge({},"__esModule",{value:!0}),t);var En=z(()=>{"use strict";var Fe=require("handlebars/dist/handlebars.runtime"),go=Fe.template,yo=Fe.templates=Fe.templates||{};yo["smcat.template.hbs"]=go({1:function(t,e,n,d,l){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},p="",a=(a=m(n,"note")||(e!=null?m(e,"note"):e))!=null?a:s,b={name:"note",hash:{},fn:t.program(2,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l&&m(l,"last"),{name:"if",hash:{},fn:t.program(24,l,0),inverse:t.program(26,l,0),data:l,loc:{start:{line:11,column:0},end:{line:11,column:30}}}))!=null?c:"")+`
2
+ `},2:function(t,e,n,d,l){return"# "+((t=t.lambda(e,e))!=null?t:"")+`
3
+ `},4:function(t,e,n,d,l){return""},6:function(t,e,n,d,l){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},p=" [",a=(a=m(n,"typeExplicitlySet")||(e!=null?m(e,"typeExplicitlySet"):e))!=null?a:s,b={name:"typeExplicitlySet",hash:{},fn:t.program(7,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l){return"type="+((t=t.lambda(e,e))!=null?t:"")+" "},10:function(t,e,n,d,l){return'label="'+((t=t.lambda(e,e))!=null?t:"")+'"'},12:function(t,e,n,d,l){return' color="'+((t=t.lambda(e,e))!=null?t:"")+'"'},14:function(t,e,n,d,l){return' class="'+((t=t.lambda(e,e))!=null?t:"")+'"'},16:function(t,e,n,d,l){return" active"},18:function(t,e,n,d,l){return": "},20:function(t,e,n,d,l){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,l,0),inverse:t.noop,data:l,loc:{start:{line:7,column:40},end:{line:7,column:80}}}))!=null?n:""},22:function(t,e,n,d,l){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return` {
4
+ `+((u=t.invokePartial(u(d,"smcat.template.hbs"),e,{name:"smcat.template.hbs",data:l,indent:" ",helpers:n,partials:d,decorators:t.decorators}))!=null?u:"")+"}"},24:function(t,e,n,d,l){return";"},26:function(t,e,n,d,l){return","},28:function(t,e,n,d,l){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},p="",a=(a=m(n,"note")||(e!=null?m(e,"note"):e))!=null?a:s,b={name:"note",hash:{},fn:t.program(2,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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
+ `},29:function(t,e,n,d,l){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},p=" [",a=(a=m(n,"color")||(e!=null?m(e,"color"):e))!=null?a:s,b={name:"color",hash:{},fn:t.program(30,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l){return'color="'+((t=t.lambda(e,e))!=null?t:"")+'"'},32:function(t,e,n,d,l){return" type="+((t=t.lambda(e,e))!=null?t:"")},34:function(t,e,n,d,l){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,l,0),inverse:t.noop,data:l,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 An=z((cs,kn)=>{"use strict";var K=require("handlebars/dist/handlebars.runtime.js"),Sn=require("lodash/cloneDeep.js");En();var vo=/;|,|{| |\[/,bo=/;|,|{/,xo=/;|{/;function Re(t,e){return t.test(e)?`"${e}"`:e}K.registerPartial("smcat.template.hbs",K.templates["smcat.template.hbs"]);function $o(t){return t==="activity"?"":`${t}/ `}function Io(t){return{...t,actions:(t.actions||[]).map(e=>`${$o(e.type)}${e.body}`).join(`
7
+ `)}}function Eo(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 Tn(t){return t.map(Eo).filter(e=>e.statemachine).forEach(e=>{e.statemachine.states=Tn(e.statemachine.states)}),t.map(Io)}function So(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 To(t){return t.map(So)}K.registerHelper("quotifyState",t=>Re(vo,t));K.registerHelper("quotifyLabel",t=>Re(xo,t));K.registerHelper("quotifyActions",t=>Re(bo,t));kn.exports=function(e){return K.templates["smcat.template.hbs"]({...e,states:Tn(Sn(e.states)),transitions:To(Sn(e.transitions||[]))})}});var On=z(()=>{"use strict";var Le=require("handlebars/dist/handlebars.runtime"),Go=Le.template,Wo=Le.templates=Le.templates||{};Wo["dot.template.hbs"]=Go({1:function(t,e,n,d,l,u,s){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(V,L){if(Object.prototype.hasOwnProperty.call(V,L))return V[L]},b="",c=(c=a(n,"noteName")||(e!=null?a(e,"noteName"):e))!=null?c:v,I={name:"noteName",hash:{},fn:t.noop,inverse:t.program(2,l,0,u,s),data:l,loc:{start:{line:9,column:2},end:{line:26,column:15}}},x=typeof c==m?c.call(f,I):c;return(x=a(n,"noteName")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"noteName")||(e!=null?a(e,"noteName"):e))!=null?c:v,I={name:"noteName",hash:{},fn:t.program(19,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:27,column:2},end:{line:37,column:15}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"noteName")?x:p.call(e,x,I))!=null&&(b+=x),b},2:function(t,e,n,d,l){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},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,l,0),data:l,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,l,0),inverse:t.noop,data:l,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,l){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},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:l,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:l,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,l,0),data:l,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:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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:l,loc:{start:{line:15,column:76},end:{line:15,column:87}}}):a)!=null?c:"")+`"]
8
+ `},4:function(t,e,n,d,l){return" "},6:function(t,e,n,d,l){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:l,loc:{start:{line:12,column:63},end:{line:12,column:73}}}):n)!=null?u:"")+'"'},8:function(t,e,n,d,l){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:l,loc:{start:{line:13,column:61},end:{line:13,column:69}}}):n)!=null?u:"")+'"'},10:function(s,e,n,d,l){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,l){return' penwidth="'+((t=t.lambda(e,e))!=null?t:"")+'"'},14:function(t,e,n,d,l){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.hooks.blockHelperMissing,m=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},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:l,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:l,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,l,0),data:l,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:l,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,l,0),inverse:t.noop,data:l,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:l,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,l,0),inverse:t.noop,data:l,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:l,loc:{start:{line:20,column:93},end:{line:20,column:104}}}):a)!=null?c:"")+`"]
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:l,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:l,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:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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:l,loc:{start:{line:24,column:76},end:{line:24,column:87}}}):a)!=null?c:"")+`"]
10
+ `},15:function(t,e,n,d,l){return" "+((t=t.lambda(e,e))!=null?t:"")},17:function(t,e,n,d,l){return' color="'+((t=t.lambda(e,e))!=null?t:"")+'"'},19:function(t,e,n,d,l,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]
11
+ "`+((f=v(s[1]!=null?p(s[1],"from"):s[1],e))!=null?f:"")+'" -> "i_'+((f=v(e,e))!=null?f:"")+'" [arrowhead=none'+((f=m.call(e,v(s[1]!=null?p(s[1],"fromComposite"):s[1],e),{name:"../fromComposite",hash:{},fn:t.program(20,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:30,column:32},end:{line:30,column:105}}}))!=null?f:"")+((f=m.call(e,v(s[1]!=null?p(s[1],"color"):s[1],e),{name:"../color",hash:{},fn:t.program(17,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:31,column:32},end:{line:31,column:75}}}))!=null?f:"")+`]
12
+ "i_`+((f=v(e,e))!=null?f:"")+'" -> "'+((f=v(s[1]!=null?p(s[1],"to"):s[1],e))!=null?f:"")+'" [label="'+((f=m.call(e,v(s[1]!=null?p(s[1],"label"):s[1],e),{name:"../label",hash:{},fn:t.noop,inverse:t.program(4,l,0,u,s),data:l,loc:{start:{line:32,column:43},end:{line:32,column:70}}}))!=null?f:"")+((f=v(s[1]!=null?p(s[1],"label"):s[1],e))!=null?f:"")+'"'+((f=m.call(e,v(s[1]!=null?p(s[1],"toComposite"):s[1],e),{name:"../toComposite",hash:{},fn:t.program(22,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:33,column:32},end:{line:33,column:99}}}))!=null?f:"")+((f=m.call(e,v(s[1]!=null?p(s[1],"color"):s[1],e),{name:"../color",hash:{},fn:t.program(10,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:34,column:32},end:{line:34,column:95}}}))!=null?f:"")+`]
13
13
  "i_`+((f=v(e,e))!=null?f:"")+'" -> "'+((f=v(e,e))!=null?f:"")+`" [style=dashed arrowtail=none arrowhead=none weight=0]
14
- "`+((f=v(e,e))!=null?f:"")+'" [label="'+((f=v(i[1]!=null?p(i[1],"noteFlattened"):i[1],e))!=null?f:"")+`" shape=note fontsize=10 color=black fontcolor=black fillcolor="#ffffcc" penwidth=1.0]
15
- `},20:function(t,e,n,d,r,c,i){var f=t.lookupProperty||function(v,m){if(Object.prototype.hasOwnProperty.call(v,m))return v[m]};return' ltail="cluster_'+((t=t.lambda(i[1]!=null?f(i[1],"from"):i[1],e))!=null?t:"")+'"'},22:function(t,e,n,d,r,c,i){var f=t.lookupProperty||function(v,m){if(Object.prototype.hasOwnProperty.call(v,m))return v[m]};return' lhead="cluster_'+((t=t.lambda(i[1]!=null?f(i[1],"to"):i[1],e))!=null?t:"")+'"'},compiler:[8,">= 4.3.0"],main:function(t,e,n,p,r,c,i){var f=e??(t.nullContext||{}),b=t.hooks.helperMissing,v="function",m=t.lookupProperty||function(k,$){if(Object.prototype.hasOwnProperty.call(k,$))return k[$]},p=`digraph "state transitions" {
16
- `+((u=typeof(a=(a=m(n,"graphAttributes")||(e!=null?m(e,"graphAttributes"):e))!=null?a:b)==v?a.call(f,{name:"graphAttributes",hash:{},data:r,loc:{start:{line:2,column:2},end:{line:2,column:23}}}):a)!=null?u:"")+`
17
- node [`+((u=typeof(a=(a=m(n,"nodeAttributes")||(e!=null?m(e,"nodeAttributes"):e))!=null?a:b)==v?a.call(f,{name:"nodeAttributes",hash:{},data:r,loc:{start:{line:3,column:8},end:{line:3,column:28}}}):a)!=null?u:"")+`]
18
- edge [`+((u=typeof(a=(a=m(n,"edgeAttributes")||(e!=null?m(e,"edgeAttributes"):e))!=null?a:b)==v?a.call(f,{name:"edgeAttributes",hash:{},data:r,loc:{start:{line:4,column:8},end:{line:4,column:28}}}):a)!=null?u:"")+`]
14
+ "`+((f=v(e,e))!=null?f:"")+'" [label="'+((f=v(s[1]!=null?p(s[1],"noteFlattened"):s[1],e))!=null?f:"")+`" shape=note fontsize=10 color=black fontcolor=black fillcolor="#ffffcc" penwidth=1.0]
15
+ `},20:function(t,e,n,d,l,u,s){var f=t.lookupProperty||function(v,m){if(Object.prototype.hasOwnProperty.call(v,m))return v[m]};return' ltail="cluster_'+((t=t.lambda(s[1]!=null?f(s[1],"from"):s[1],e))!=null?t:"")+'"'},22:function(t,e,n,d,l,u,s){var f=t.lookupProperty||function(v,m){if(Object.prototype.hasOwnProperty.call(v,m))return v[m]};return' lhead="cluster_'+((t=t.lambda(s[1]!=null?f(s[1],"to"):s[1],e))!=null?t:"")+'"'},compiler:[8,">= 4.3.0"],main:function(t,e,n,p,l,u,s){var f=e??(t.nullContext||{}),b=t.hooks.helperMissing,v="function",m=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},p=`digraph "state transitions" {
16
+ `+((c=typeof(a=(a=m(n,"graphAttributes")||(e!=null?m(e,"graphAttributes"):e))!=null?a:b)==v?a.call(f,{name:"graphAttributes",hash:{},data:l,loc:{start:{line:2,column:2},end:{line:2,column:23}}}):a)!=null?c:"")+`
17
+ node [`+((c=typeof(a=(a=m(n,"nodeAttributes")||(e!=null?m(e,"nodeAttributes"):e))!=null?a:b)==v?a.call(f,{name:"nodeAttributes",hash:{},data:l,loc:{start:{line:3,column:8},end:{line:3,column:28}}}):a)!=null?c:"")+`]
18
+ edge [`+((c=typeof(a=(a=m(n,"edgeAttributes")||(e!=null?m(e,"edgeAttributes"):e))!=null?a:b)==v?a.call(f,{name:"edgeAttributes",hash:{},data:l,loc:{start:{line:4,column:8},end:{line:4,column:28}}}):a)!=null?c:"")+`]
19
19
 
20
- `+((u=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?u:"")+`
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,c,i),inverse:t.noop,data:r,loc:{start:{line:8,column:2},end:{line:38,column:18}}},u=typeof a==v?a.call(f,b):a;return(u=m(n,"transitions")?u:t.hooks.blockHelperMissing.call(e,u,b))!=null&&(p+=u),p+`}
22
- `},usePartial:!0,useData:!0,useDepths:!0})});var Tn=U(()=>{var Le=require("handlebars/dist/handlebars.runtime"),Zo=Le.template,Ko=Le.templates=Le.templates||{};Ko["dot.states.template.hbs"]=Zo({1:function(t,e,n,d,f){var c=t.lookupProperty||function(m,p){if(Object.prototype.hasOwnProperty.call(m,p))return m[p]},i="",v=(v=c(n,"nestedExternalSelfTransitions")||(e!=null?c(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=c(n,"nestedExternalSelfTransitions")?v:t.hooks.blockHelperMissing.call(e,v,f))!=null&&(i+=v),i},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
- `},4:function(t,e,n,d,r){var c,i,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' "'+((c=typeof(i=(i=p(n,"name")||(e!=null?p(e,"name"):e))!=null?i:v)==m?i.call(f,{name:"name",hash:{},data:r,loc:{start:{line:7,column:3},end:{line:7,column:13}}}):i)!=null?c:"")+'" [shape=circle style=filled class="'+((c=typeof(i=(i=p(n,"class")||(e!=null?p(e,"class"):e))!=null?i:v)==m?i.call(f,{name:"class",hash:{},data:r,loc:{start:{line:7,column:49},end:{line:7,column:60}}}):i)!=null?c:"")+'" '+((c=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?c:"")+((c=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?c:"")+`fixedsize=true height=0.15 label=""]
24
- `},5:function(p,e,n,d,r){var c,i,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="'+((c=typeof(i=(i=p(n,"color")||(e!=null?p(e,"color"):e))!=null?i:v)==m?i.call(f,{name:"color",hash:{},data:r,loc:{start:{line:7,column:82},end:{line:7,column:93}}}):i)!=null?c:"")+'" fillcolor="'+((c=typeof(i=(i=p(n,"color")||(e!=null?p(e,"color"):e))!=null?i:v)==m?i.call(f,{name:"color",hash:{},data:r,loc:{start:{line:7,column:106},end:{line:7,column:117}}}):i)!=null?c:"")+'" '},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 c=e??(t.nullContext||{}),p=t.hooks.helperMissing,i="function",f=t.lookupProperty||function(b,u){if(Object.prototype.hasOwnProperty.call(b,u))return b[u]},v=' "'+((a=typeof(m=(m=f(n,"name")||(e!=null?f(e,"name"):e))!=null?m:p)==i?m.call(c,{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)==i?m.call(c,{name:"class",hash:{},data:r,loc:{start:{line:10,column:32},end:{line:10,column:43}}}):m)!=null?a:"")+'" '+((a=f(n,"if").call(c,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(c,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= <
20
+ `+((c=t.invokePartial(m(p,"dot.states.template.hbs"),e,{name:"dot.states.template.hbs",data:l,indent:" ",helpers:n,partials:p,decorators:t.decorators}))!=null?c:"")+`
21
+ `,a=(a=m(n,"transitions")||(e!=null?m(e,"transitions"):e))!=null?a:b,b={name:"transitions",hash:{},fn:t.program(1,l,0,u,s),inverse:t.noop,data:l,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 Pn=z(()=>{"use strict";var Be=require("handlebars/dist/handlebars.runtime"),Qo=Be.template,Yo=Be.templates=Be.templates||{};Yo["dot.states.template.hbs"]=Qo({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,l){return' "self_'+((t=t.lambda(e,e))!=null?t:"")+`" [shape=point style=invis width=0 height=0 fixedsize=true]
23
+ `},4:function(t,e,n,d,l){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:l,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:l,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,l,0),inverse:t.program(7,l,0),data:l,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,l,0),inverse:t.noop,data:l,loc:{start:{line:7,column:150},end:{line:7,column:184}}}))!=null?u:"")+`fixedsize=true height=0.15 label=""]
24
+ `},5:function(p,e,n,d,l){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:l,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:l,loc:{start:{line:7,column:106},end:{line:7,column:117}}}):s)!=null?u:"")+'" '},7:function(t,e,n,d,l){return"fillcolor=black "},9:function(t,e,n,d,l){return"penwidth=3.0 "},11:function(t,e,n,d,l){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:l,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:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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">
26
- <tr><td width="48"`+((a=f(n,"if").call(c,e!=null?f(e,"actions"):e,{name:"if",hash:{},fn:t.program(16,r,0),inverse:t.program(18,r,0),data:r,loc:{start:{line:12,column:24},end:{line:12,column:86}}}))!=null?a:"")+">"+((a=f(n,"if").call(c,e!=null?f(e,"active"):e,{name:"if",hash:{},fn:t.program(20,r,0),inverse:t.program(22,r,0),data:r,loc:{start:{line:12,column:87},end:{line:12,column:141}}}))!=null?a:"")+`</td></tr>
27
- `,m=(m=f(n,"actions")||(e!=null?f(e,"actions"):e))!=null?m:p,p={name:"actions",hash:{},fn:t.program(24,r,0),inverse:t.noop,data:r,loc:{start:{line:13,column:6},end:{line:16,column:18}}},a=typeof m==i?m.call(c,p):m;return(a=f(n,"actions")?a:t.hooks.blockHelperMissing.call(e,a,p))!=null&&(v+=a),v+` </table>
26
+ <tr><td width="48"`+((a=f(n,"if").call(u,e!=null?f(e,"actionStrings"):e,{name:"if",hash:{},fn:t.program(16,l,0),inverse:t.program(18,l,0),data:l,loc:{start:{line:12,column:24},end:{line:12,column:92}}}))!=null?a:"")+">"+((a=f(n,"if").call(u,e!=null?f(e,"active"):e,{name:"if",hash:{},fn:t.program(20,l,0),inverse:t.program(22,l,0),data:l,loc:{start:{line:12,column:93},end:{line:12,column:147}}}))!=null?a:"")+`</td></tr>
27
+ `,m=(m=f(n,"actionStrings")||(e!=null?f(e,"actionStrings"):e))!=null?m:p,p={name:"actionStrings",hash:{},fn:t.program(24,l,0),inverse:t.noop,data:l,loc:{start:{line:13,column:6},end:{line:16,column:24}}},a=typeof m==s?m.call(u,p):m;return(a=f(n,"actionStrings")?a:t.hooks.blockHelperMissing.call(e,a,p))!=null&&(v+=a),v+` </table>
28
28
  >]
29
- `},12:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'color="'+((c=typeof(n=(n=c(n,"color")||(e!=null?c(e,"color"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"color",hash:{},data:r,loc:{start:{line:10,column:65},end:{line:10,column:76}}}):n)!=null?c:"")+'" '},14:function(t,e,n,d,r){return"peripheries=1 style=rounded "},16:function(t,e,n,d,r){return' cellpadding="2"'},18:function(t,e,n,d,r){return' cellpadding="7"'},20:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return"<i>"+t.escapeExpression(typeof(n=(n=c(n,"label")||(e!=null?c(e,"label"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"label",hash:{},data:r,loc:{start:{line:12,column:104},end:{line:12,column:113}}}):n)+"</i>"},22:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return t.escapeExpression(typeof(n=(n=c(n,"label")||(e!=null?c(e,"label"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"label",hash:{},data:r,loc:{start:{line:12,column:125},end:{line:12,column:134}}}):n)},24:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return" "+((n=c(n,"if").call(e??(t.nullContext||{}),r&&c(r,"first"),{name:"if",hash:{},fn:t.program(25,r,0),inverse:t.noop,data:r,loc:{start:{line:14,column:8},end:{line:14,column:34}}}))!=null?n:"")+`
29
+ `},12:function(t,e,n,d,l){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return'color="'+((u=typeof(n=(n=u(n,"color")||(e!=null?u(e,"color"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"color",hash:{},data:l,loc:{start:{line:10,column:65},end:{line:10,column:76}}}):n)!=null?u:"")+'" '},14:function(t,e,n,d,l){return"peripheries=1 style=rounded "},16:function(t,e,n,d,l){return' cellpadding="2"'},18:function(t,e,n,d,l){return' cellpadding="7"'},20:function(t,e,n,d,l){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return"<i>"+t.escapeExpression(typeof(n=(n=u(n,"label")||(e!=null?u(e,"label"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"label",hash:{},data:l,loc:{start:{line:12,column:110},end:{line:12,column:119}}}):n)+"</i>"},22:function(t,e,n,d,l){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return t.escapeExpression(typeof(n=(n=u(n,"label")||(e!=null?u(e,"label"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"label",hash:{},data:l,loc:{start:{line:12,column:131},end:{line:12,column:140}}}):n)},24:function(t,e,n,d,l){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return" "+((n=u(n,"if").call(e??(t.nullContext||{}),l&&u(l,"first"),{name:"if",hash:{},fn:t.program(25,l,0),inverse:t.noop,data:l,loc:{start:{line:14,column:8},end:{line:14,column:34}}}))!=null?n:"")+`
30
30
  <tr><td align="left" cellpadding="2">`+t.escapeExpression(t.lambda(e,e))+`</td></tr>
31
- `},25:function(t,e,n,d,r){return"<hr/>"},27:function(t,e,n,d,r){var c,i,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' "'+((c=typeof(i=(i=p(n,"name")||(e!=null?p(e,"name"):e))!=null?i:v)==m?i.call(f,{name:"name",hash:{},data:r,loc:{start:{line:21,column:3},end:{line:21,column:13}}}):i)!=null?c:"")+'" [shape=circle class="'+((c=typeof(i=(i=p(n,"class")||(e!=null?p(e,"class"):e))!=null?i:v)==m?i.call(f,{name:"class",hash:{},data:r,loc:{start:{line:21,column:36},end:{line:21,column:47}}}):i)!=null?c:"")+'" '+((c=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?c:"")+((c=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?c:"")+`label="H"]
32
- `},29:function(t,e,n,d,r){var c,i,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' "'+((c=typeof(i=(i=p(n,"name")||(e!=null?p(e,"name"):e))!=null?i:v)==m?i.call(f,{name:"name",hash:{},data:r,loc:{start:{line:24,column:3},end:{line:24,column:13}}}):i)!=null?c:"")+'" [shape=circle class="'+((c=typeof(i=(i=p(n,"class")||(e!=null?p(e,"class"):e))!=null?i:v)==m?i.call(f,{name:"class",hash:{},data:r,loc:{start:{line:24,column:36},end:{line:24,column:47}}}):i)!=null?c:"")+'" '+((c=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?c:"")+((c=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?c:"")+`label="H*"]
33
- `},31:function(t,e,n,d,r,c,i){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(D,I){if(Object.prototype.hasOwnProperty.call(D,I))return D[I]},b=' "'+(($=typeof(u=(u=a(n,"name")||(e!=null?a(e,"name"):e))!=null?u:v)==m?u.call(f,{name:"name",hash:{},data:r,loc:{start:{line:27,column:3},end:{line:27,column:13}}}):u)!=null?$:"")+'" [shape=diamond fixedsize=true width=0.35 height=0.35 fontsize=10 class="'+(($=typeof(u=(u=a(n,"class")||(e!=null?a(e,"class"):e))!=null?u:v)==m?u.call(f,{name:"class",hash:{},data:r,loc:{start:{line:27,column:87},end:{line:27,column:98}}}):u)!=null?$:"")+'" '+(($=a(n,"if").call(f,e!=null?a(e,"color"):e,{name:"if",hash:{},fn:t.program(12,r,0,c,i),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,c,i),inverse:t.noop,data:r,loc:{start:{line:27,column:140},end:{line:27,column:174}}}))!=null?$:"")+`label=" "]
34
- "`+(($=typeof(u=(u=a(n,"name")||(e!=null?a(e,"name"):e))!=null?u:v)==m?u.call(f,{name:"name",hash:{},data:r,loc:{start:{line:28,column:3},end:{line:28,column:13}}}):u)!=null?$:"")+'" -> "'+(($=typeof(u=(u=a(n,"name")||(e!=null?a(e,"name"):e))!=null?u:v)==m?u.call(f,{name:"name",hash:{},data:r,loc:{start:{line:28,column:19},end:{line:28,column:29}}}):u)!=null?$:"")+'" [label=<',u=(u=a(n,"actions")||(e!=null?a(e,"actions"):e))!=null?u:v,k={name:"actions",hash:{},fn:t.program(32,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:28,column:39},end:{line:28,column:144}}},$=typeof u==m?u.call(f,k):u;return($=a(n,"actions")?$:p.call(e,$,k))!=null&&(b+=$),b+='> color="#FFFFFF01"',u=(u=a(n,"color")||(e!=null?a(e,"color"):e))!=null?u:v,k={name:"color",hash:{},fn:t.program(41,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:28,column:163},end:{line:28,column:203}}},$=typeof u==m?u.call(f,k):u,($=a(n,"color")?$:p.call(e,$,k))!=null&&(b+=$),b+' class="'+(($=typeof(u=(u=a(n,"class")||(e!=null?a(e,"class"):e))!=null?u:v)==m?u.call(f,{name:"class",hash:{},data:r,loc:{start:{line:28,column:211},end:{line:28,column:222}}}):u)!=null?$:"")+`"];
35
- `},32:function(t,v,n,d,r,c,i){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,c,i),inverse:t.program(35,r,0,c,i),data:r,loc:{start:{line:28,column:51},end:{line:28,column:82}}}))!=null?f:"")+((f=m(n,"if").call(v,i[1]!=null?m(i[1],"active"):i[1],{name:"if",hash:{},fn:t.program(37,r,0,c,i),inverse:t.program(39,r,0,c,i),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 c,i,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' "'+((c=typeof(i=(i=p(n,"name")||(e!=null?p(e,"name"):e))!=null?i:v)==m?i.call(f,{name:"name",hash:{},data:r,loc:{start:{line:31,column:3},end:{line:31,column:13}}}):i)!=null?c:"")+'" [shape=rect class="'+((c=typeof(i=(i=p(n,"class")||(e!=null?p(e,"class"):e))!=null?i:v)==m?i.call(f,{name:"class",hash:{},data:r,loc:{start:{line:31,column:34},end:{line:31,column:45}}}):i)!=null?c:"")+'" '+((c=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?c:"")+((c=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?c:"")+'label=" " fixedsize=true style=filled '+((c=typeof(i=(i=p(n,"sizingExtras")||(e!=null?p(e,"sizingExtras"):e))!=null?i:v)==m?i.call(f,{name:"sizingExtras",hash:{},data:r,loc:{start:{line:31,column:207},end:{line:31,column:225}}}):i)!=null?c:"")+`]
36
- `},45:function(t,e,n,d,r){var c,i,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' "'+((c=typeof(i=(i=p(n,"name")||(e!=null?p(e,"name"):e))!=null?i:v)==m?i.call(f,{name:"name",hash:{},data:r,loc:{start:{line:37,column:3},end:{line:37,column:13}}}):i)!=null?c:"")+`" [label= <
31
+ `},25:function(t,e,n,d,l){return"<hr/>"},27:function(t,e,n,d,l){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:l,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:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,loc:{start:{line:21,column:89},end:{line:21,column:123}}}))!=null?u:"")+`label="H"]
32
+ `},29:function(t,e,n,d,l){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:l,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:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,loc:{start:{line:24,column:89},end:{line:24,column:123}}}))!=null?u:"")+`label="H*"]
33
+ `},31:function(t,e,n,d,l,u,s){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(V,L){if(Object.prototype.hasOwnProperty.call(V,L))return V[L]},b=' "'+((x=typeof(c=(c=a(n,"name")||(e!=null?a(e,"name"):e))!=null?c:v)==m?c.call(f,{name:"name",hash:{},data:l,loc:{start:{line:27,column:3},end:{line:27,column:13}}}):c)!=null?x:"")+'" [shape=diamond fixedsize=true width=0.35 height=0.35 fontsize=10 class="'+((x=typeof(c=(c=a(n,"class")||(e!=null?a(e,"class"):e))!=null?c:v)==m?c.call(f,{name:"class",hash:{},data:l,loc:{start:{line:27,column:87},end:{line:27,column:98}}}):c)!=null?x:"")+'" '+((x=a(n,"if").call(f,e!=null?a(e,"color"):e,{name:"if",hash:{},fn:t.program(12,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:27,column:100},end:{line:27,column:140}}}))!=null?x:"")+((x=a(n,"if").call(f,e!=null?a(e,"active"):e,{name:"if",hash:{},fn:t.program(9,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:27,column:140},end:{line:27,column:174}}}))!=null?x:"")+`label=" "]
34
+ "`+((x=typeof(c=(c=a(n,"name")||(e!=null?a(e,"name"):e))!=null?c:v)==m?c.call(f,{name:"name",hash:{},data:l,loc:{start:{line:28,column:3},end:{line:28,column:13}}}):c)!=null?x:"")+'" -> "'+((x=typeof(c=(c=a(n,"name")||(e!=null?a(e,"name"):e))!=null?c:v)==m?c.call(f,{name:"name",hash:{},data:l,loc:{start:{line:28,column:19},end:{line:28,column:29}}}):c)!=null?x:"")+'" [label=<',c=(c=a(n,"actionStrings")||(e!=null?a(e,"actionStrings"):e))!=null?c:v,I={name:"actionStrings",hash:{},fn:t.program(32,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:28,column:39},end:{line:28,column:156}}},x=typeof c==m?c.call(f,I):c;return(x=a(n,"actionStrings")?x:p.call(e,x,I))!=null&&(b+=x),b+='> color="#FFFFFF01"',c=(c=a(n,"color")||(e!=null?a(e,"color"):e))!=null?c:v,I={name:"color",hash:{},fn:t.program(41,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:28,column:175},end:{line:28,column:215}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"color")?x:p.call(e,x,I))!=null&&(b+=x),b+' class="'+((x=typeof(c=(c=a(n,"class")||(e!=null?a(e,"class"):e))!=null?c:v)==m?c.call(f,{name:"class",hash:{},data:l,loc:{start:{line:28,column:223},end:{line:28,column:234}}}):c)!=null?x:"")+`"];
35
+ `},32:function(t,v,n,d,l,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,l&&m(l,"first"),{name:"if",hash:{},fn:t.program(33,l,0,u,s),inverse:t.program(35,l,0,u,s),data:l,loc:{start:{line:28,column:57},end:{line:28,column:88}}}))!=null?f:"")+((f=m(n,"if").call(v,s[1]!=null?m(s[1],"active"):s[1],{name:"if",hash:{},fn:t.program(37,l,0,u,s),inverse:t.program(39,l,0,u,s),data:l,loc:{start:{line:28,column:88},end:{line:28,column:137}}}))!=null?f:"")},33:function(t,e,n,d,l){return""},35:function(t,e,n,d,l){return"\\n"},37:function(t,e,n,d,l){return"<i>"+t.escapeExpression(t.lambda(e,e))+"</i>"},39:function(t,e,n,d,l){return t.escapeExpression(t.lambda(e,e))},41:function(t,e,n,d,l){return' fontcolor="'+((t=t.lambda(e,e))!=null?t:"")+'"'},43:function(t,e,n,d,l){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:l,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:l,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,l,0),inverse:t.program(7,l,0),data:l,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,l,0),inverse:t.noop,data:l,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:l,loc:{start:{line:31,column:207},end:{line:31,column:225}}}):s)!=null?u:"")+`]
36
+ `},45:function(t,e,n,d,l){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:l,loc:{start:{line:37,column:3},end:{line:37,column:13}}}):s)!=null?u:"")+`" [label= <
37
37
  <table align="center" cellborder="0" border="0">
38
- <tr><td cellpadding="0"><font `+((c=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:39,column:38},end:{line:39,column:78}}}))!=null?c:"")+`point-size="20">X</font></td></tr>
39
- <tr><td cellpadding="0"><font `+((c=p(n,"if").call(f,e!=null?p(e,"color"):e,{name:"if",hash:{},fn:t.program(46,r,0),inverse:t.noop,data:r,loc:{start:{line:40,column:38},end:{line:40,column:77}}}))!=null?c:"")+">"+t.escapeExpression(typeof(i=(i=p(n,"label")||(e!=null?p(e,"label"):e))!=null?i:v)==m?i.call(f,{name:"label",hash:{},data:r,loc:{start:{line:40,column:78},end:{line:40,column:87}}}):i)+`</font></td></tr>
38
+ <tr><td cellpadding="0"><font `+((u=p(n,"if").call(f,e!=null?p(e,"color"):e,{name:"if",hash:{},fn:t.program(12,l,0),inverse:t.noop,data:l,loc:{start:{line:39,column:38},end:{line:39,column:78}}}))!=null?u:"")+`point-size="20">X</font></td></tr>
39
+ <tr><td cellpadding="0"><font `+((u=p(n,"if").call(f,e!=null?p(e,"color"):e,{name:"if",hash:{},fn:t.program(46,l,0),inverse:t.noop,data:l,loc:{start:{line:40,column:38},end:{line:40,column:77}}}))!=null?u:"")+">"+t.escapeExpression(typeof(s=(s=p(n,"label")||(e!=null?p(e,"label"):e))!=null?s:v)==m?s.call(f,{name:"label",hash:{},data:l,loc:{start:{line:40,column:78},end:{line:40,column:87}}}):s)+`</font></td></tr>
40
40
  </table>
41
- > class="`+((c=typeof(i=(i=p(n,"class")||(e!=null?p(e,"class"):e))!=null?i:v)==m?i.call(f,{name:"class",hash:{},data:r,loc:{start:{line:42,column:13},end:{line:42,column:24}}}):i)!=null?c:"")+`"]
42
- `},46:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'color="'+((c=typeof(n=(n=c(n,"color")||(e!=null?c(e,"color"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"color",hash:{},data:r,loc:{start:{line:40,column:58},end:{line:40,column:69}}}):n)!=null?c:"")+'"'},48:function(t,e,n,d,r){var c,i,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' "'+((c=typeof(i=(i=p(n,"name")||(e!=null?p(e,"name"):e))!=null?i:v)==m?i.call(f,{name:"name",hash:{},data:r,loc:{start:{line:45,column:3},end:{line:45,column:13}}}):i)!=null?c:"")+'" [shape=circle style=filled class="'+((c=typeof(i=(i=p(n,"class")||(e!=null?p(e,"class"):e))!=null?i:v)==m?i.call(f,{name:"class",hash:{},data:r,loc:{start:{line:45,column:49},end:{line:45,column:60}}}):i)!=null?c:"")+'" '+((c=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:45,column:62},end:{line:45,column:150}}}))!=null?c:"")+"fixedsize=true height=0.15 peripheries=2 "+((c=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:45,column:191},end:{line:45,column:225}}}))!=null?c:"")+`label=""]
43
- `},50:function(t,e,n,d,r){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",v=t.lookupProperty||function(u,k){if(Object.prototype.hasOwnProperty.call(u,k))return u[k]},m=' subgraph "cluster_'+((b=typeof(p=(p=v(n,"name")||(e!=null?v(e,"name"):e))!=null?p:i)==f?p.call(c,{name:"name",hash:{},data:r,loc:{start:{line:48,column:20},end:{line:48,column:30}}}):p)!=null?b:"")+`" {
44
- class="`+((b=typeof(p=(p=v(n,"class")||(e!=null?v(e,"class"):e))!=null?p:i)==f?p.call(c,{name:"class",hash:{},data:r,loc:{start:{line:49,column:11},end:{line:49,column:22}}}):p)!=null?b:"")+'" '+((b=v(n,"if").call(c,e!=null?v(e,"color"):e,{name:"if",hash:{},fn:t.program(12,r,0),inverse:t.noop,data:r,loc:{start:{line:49,column:24},end:{line:49,column:64}}}))!=null?b:"")+`label= <
41
+ > 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:l,loc:{start:{line:42,column:13},end:{line:42,column:24}}}):s)!=null?u:"")+`"]
42
+ `},46:function(t,e,n,d,l){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return'color="'+((u=typeof(n=(n=u(n,"color")||(e!=null?u(e,"color"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"color",hash:{},data:l,loc:{start:{line:40,column:58},end:{line:40,column:69}}}):n)!=null?u:"")+'"'},48:function(t,e,n,d,l){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:l,loc:{start:{line:45,column:3},end:{line:45,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:l,loc:{start:{line:45,column:49},end:{line:45,column:60}}}):s)!=null?u:"")+'" '+((u=p(n,"if").call(f,e!=null?p(e,"color"):e,{name:"if",hash:{},fn:t.program(5,l,0),inverse:t.program(7,l,0),data:l,loc:{start:{line:45,column:62},end:{line:45,column:150}}}))!=null?u:"")+"fixedsize=true height=0.15 peripheries=2 "+((u=p(n,"if").call(f,e!=null?p(e,"active"):e,{name:"if",hash:{},fn:t.program(9,l,0),inverse:t.noop,data:l,loc:{start:{line:45,column:191},end:{line:45,column:225}}}))!=null?u:"")+`label=""]
43
+ `},50:function(t,e,n,d,l){var u=e??(t.nullContext||{}),s=t.hooks.helperMissing,f="function",v=t.lookupProperty||function(c,I){if(Object.prototype.hasOwnProperty.call(c,I))return c[I]},m=' subgraph "cluster_'+((b=typeof(p=(p=v(n,"name")||(e!=null?v(e,"name"):e))!=null?p:s)==f?p.call(u,{name:"name",hash:{},data:l,loc:{start:{line:48,column:20},end:{line:48,column:30}}}):p)!=null?b:"")+`" {
44
+ class="`+((b=typeof(p=(p=v(n,"class")||(e!=null?v(e,"class"):e))!=null?p:s)==f?p.call(u,{name:"class",hash:{},data:l,loc:{start:{line:49,column:11},end:{line:49,column:22}}}):p)!=null?b:"")+'" '+((b=v(n,"if").call(u,e!=null?v(e,"color"):e,{name:"if",hash:{},fn:t.program(12,l,0),inverse:t.noop,data:l,loc:{start:{line:49,column:24},end:{line:49,column:64}}}))!=null?b:"")+`label= <
45
45
  <table cellborder="0" border="0">
46
- <tr><td>`+((b=v(n,"if").call(c,e!=null?v(e,"active"):e,{name:"if",hash:{},fn:t.program(20,r,0),inverse:t.program(22,r,0),data:r,loc:{start:{line:51,column:14},end:{line:51,column:68}}}))!=null?b:"")+`</td></tr>
47
- `,p=(p=v(n,"actions")||(e!=null?v(e,"actions"):e))!=null?p:i,a={name:"actions",hash:{},fn:t.program(51,r,0),inverse:t.noop,data:r,loc:{start:{line:52,column:6},end:{line:55,column:18}}},b=typeof p==f?p.call(c,a):p;return(b=v(n,"actions")?b:t.hooks.blockHelperMissing.call(e,b,a))!=null&&(m+=b),m+` </table>
48
- > `+((b=v(n,"if").call(c,e!=null?v(e,"parentIsParallel"):e,{name:"if",hash:{},fn:t.program(53,r,0),inverse:t.program(55,r,0),data:r,loc:{start:{line:57,column:6},end:{line:57,column:137}}}))!=null?b:"")+`
49
- "`+((b=typeof(p=(p=v(n,"name")||(e!=null?v(e,"name"):e))!=null?p:i)==f?p.call(c,{name:"name",hash:{},data:r,loc:{start:{line:58,column:5},end:{line:58,column:15}}}):p)!=null?b:"")+`" [shape=point style=invis margin=0 width=0 height=0 fixedsize=true]
50
- `+((b=(v(n,"stateSection")||e&&v(e,"stateSection")||i).call(c,e!=null?v(e,"statemachine"):e,{name:"stateSection",hash:{},fn:t.program(33,r,0),inverse:t.noop,data:r,loc:{start:{line:59,column:4},end:{line:59,column:51}}}))!=null?b:"")+`
46
+ <tr><td>`+((b=v(n,"if").call(u,e!=null?v(e,"active"):e,{name:"if",hash:{},fn:t.program(20,l,0),inverse:t.program(22,l,0),data:l,loc:{start:{line:51,column:14},end:{line:51,column:68}}}))!=null?b:"")+`</td></tr>
47
+ `,p=(p=v(n,"actionStrings")||(e!=null?v(e,"actionStrings"):e))!=null?p:s,a={name:"actionStrings",hash:{},fn:t.program(51,l,0),inverse:t.noop,data:l,loc:{start:{line:52,column:6},end:{line:55,column:24}}},b=typeof p==f?p.call(u,a):p;return(b=v(n,"actionStrings")?b:t.hooks.blockHelperMissing.call(e,b,a))!=null&&(m+=b),m+` </table>
48
+ > `+((b=v(n,"if").call(u,e!=null?v(e,"parentIsParallel"):e,{name:"if",hash:{},fn:t.program(53,l,0),inverse:t.program(55,l,0),data:l,loc:{start:{line:57,column:6},end:{line:57,column:137}}}))!=null?b:"")+`
49
+ "`+((b=typeof(p=(p=v(n,"name")||(e!=null?v(e,"name"):e))!=null?p:s)==f?p.call(u,{name:"name",hash:{},data:l,loc:{start:{line:58,column:5},end:{line:58,column:15}}}):p)!=null?b:"")+`" [shape=point style=invis margin=0 width=0 height=0 fixedsize=true]
50
+ `+((b=(v(n,"stateSection")||e&&v(e,"stateSection")||s).call(u,e!=null?v(e,"statemachine"):e,{name:"stateSection",hash:{},fn:t.program(33,l,0),inverse:t.noop,data:l,loc:{start:{line:59,column:4},end:{line:59,column:51}}}))!=null?b:"")+`
51
51
  }
52
- `},51:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return" "+((n=c(n,"if").call(e??(t.nullContext||{}),r&&c(r,"first"),{name:"if",hash:{},fn:t.program(25,r,0),inverse:t.noop,data:r,loc:{start:{line:53,column:8},end:{line:53,column:34}}}))!=null?n:"")+`
52
+ `},51:function(t,e,n,d,l){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return" "+((n=u(n,"if").call(e??(t.nullContext||{}),l&&u(l,"first"),{name:"if",hash:{},fn:t.program(25,l,0),inverse:t.noop,data:l,loc:{start:{line:53,column:8},end:{line:53,column:34}}}))!=null?n:"")+`
53
53
  <tr><td align="left">`+t.escapeExpression(t.lambda(e,e))+`</td></tr>
54
- `},53:function(t,e,n,d,r){return'style="dashed" penwidth=1'},55:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return"style=rounded "+((n=c(n,"if").call(e??(t.nullContext||{}),e!=null?c(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,u){if(Object.prototype.hasOwnProperty.call(b,u))return b[u]},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,c,i){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(i[1]!=null?m(i[1],"noteFlattened"):i[1],e))!=null?f:"")+`" shape=note fontsize=10 fillcolor="#ffffcc" penwidth=1.0]
55
- "`+((f=v(i[1]!=null?m(i[1],"name"):i[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,c,i){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(D,I){if(Object.prototype.hasOwnProperty.call(D,I))return D[I]},b="",u=(u=a(n,"compositeStates")||(e!=null?a(e,"compositeStates"):e))!=null?u:v,k={name:"compositeStates",hash:{},fn:t.program(1,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:1,column:0},end:{line:5,column:20}}},$=typeof u==m?u.call(f,k):u;return($=a(n,"compositeStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"initialStates")||(e!=null?a(e,"initialStates"):e))!=null?u:v,k={name:"initialStates",hash:{},fn:t.program(4,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:6,column:0},end:{line:8,column:18}}},$=typeof u==m?u.call(f,k):u,($=a(n,"initialStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"regularStates")||(e!=null?a(e,"regularStates"):e))!=null?u:v,k={name:"regularStates",hash:{},fn:t.program(11,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:9,column:0},end:{line:19,column:18}}},$=typeof u==m?u.call(f,k):u,($=a(n,"regularStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"historyStates")||(e!=null?a(e,"historyStates"):e))!=null?u:v,k={name:"historyStates",hash:{},fn:t.program(27,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:20,column:0},end:{line:22,column:18}}},$=typeof u==m?u.call(f,k):u,($=a(n,"historyStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"deepHistoryStates")||(e!=null?a(e,"deepHistoryStates"):e))!=null?u:v,k={name:"deepHistoryStates",hash:{},fn:t.program(29,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:23,column:0},end:{line:25,column:22}}},$=typeof u==m?u.call(f,k):u,($=a(n,"deepHistoryStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"choiceStates")||(e!=null?a(e,"choiceStates"):e))!=null?u:v,k={name:"choiceStates",hash:{},fn:t.program(31,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:26,column:0},end:{line:29,column:17}}},$=typeof u==m?u.call(f,k):u,($=a(n,"choiceStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"forkjoinStates")||(e!=null?a(e,"forkjoinStates"):e))!=null?u:v,k={name:"forkjoinStates",hash:{},fn:t.program(43,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:30,column:0},end:{line:32,column:19}}},$=typeof u==m?u.call(f,k):u,($=a(n,"forkjoinStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"junctionStates")||(e!=null?a(e,"junctionStates"):e))!=null?u:v,k={name:"junctionStates",hash:{},fn:t.program(4,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:33,column:0},end:{line:35,column:19}}},$=typeof u==m?u.call(f,k):u,($=a(n,"junctionStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"terminateStates")||(e!=null?a(e,"terminateStates"):e))!=null?u:v,k={name:"terminateStates",hash:{},fn:t.program(45,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:36,column:0},end:{line:43,column:20}}},$=typeof u==m?u.call(f,k):u,($=a(n,"terminateStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"finalStates")||(e!=null?a(e,"finalStates"):e))!=null?u:v,k={name:"finalStates",hash:{},fn:t.program(48,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:44,column:0},end:{line:46,column:16}}},$=typeof u==m?u.call(f,k):u,($=a(n,"finalStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"compositeStates")||(e!=null?a(e,"compositeStates"):e))!=null?u:v,k={name:"compositeStates",hash:{},fn:t.program(50,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:47,column:0},end:{line:61,column:20}}},$=typeof u==m?u.call(f,k):u,($=a(n,"compositeStates")?$:p.call(e,$,k))!=null&&(b+=$),u=(u=a(n,"states")||(e!=null?a(e,"states"):e))!=null?u:v,k={name:"states",hash:{},fn:t.program(60,r,0,c,i),inverse:t.noop,data:r,loc:{start:{line:62,column:0},end:{line:67,column:11}}},$=typeof u==m?u.call(f,k):u,($=a(n,"states")?$:p.call(e,$,k))!=null&&(b+=$),b},useData:!0,useDepths:!0})});var Bn=U((bi,Rn)=>{var ie=require("handlebars/dist/handlebars.runtime.js");Fn();Tn();ie.registerPartial("dot.states.template.hbs",ie.templates["dot.states.template.hbs"]);ie.registerHelper("stateSection",t=>ie.templates["dot.states.template.hbs"](es(t)));function G(t){return e=>e.type===t}function Mo(t){return e=>t.includes(e.type)}function es(t){return t.initialStates=t.states.filter(G("initial")),t.regularStates=t.states.filter(e=>G("regular")(e)&&!e.statemachine),t.historyStates=t.states.filter(G("history")),t.deepHistoryStates=t.states.filter(G("deephistory")),t.choiceStates=t.states.filter(G("choice")),t.forkjoinStates=t.states.filter(Mo(["fork","join","forkjoin"])),t.junctionStates=t.states.filter(G("junction")),t.terminateStates=t.states.filter(G("terminate")),t.finalStates=t.states.filter(G("final")),t.compositeStates=t.states.filter(e=>e.statemachine),t}Rn.exports=function(e){return ie.templates["dot.template.hbs"](e)}});var zn=U(()=>{var Se=require("handlebars/dist/handlebars.runtime"),Ps=Se.template,Cs=Se.templates=Se.templates||{};Cs["scxml.template.hbs"]=Ps({1:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'initial="'+t.escapeExpression(typeof(n=(n=c(n,"initial")||(e!=null?c(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 c,i=t.lookupProperty||function(f,v){if(Object.prototype.hasOwnProperty.call(f,v))return f[v]};return`<?xml version="1.0" encoding="UTF-8"?>
57
- <scxml xmlns="http://www.w3.org/2005/07/scxml" `+((c=i(n,"if").call(e??(t.nullContext||{}),e!=null?i(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?c:"")+`version="1.0">
58
- `+((c=t.invokePartial(i(d,"scxml.states.template.hbs"),e,{name:"scxml.states.template.hbs",data:r,helpers:n,partials:d,decorators:t.decorators}))!=null?c:"")+`</scxml>
59
- `},usePartial:!0,useData:!0})});var Un=U(()=>{var ze=require("handlebars/dist/handlebars.runtime"),Os=ze.template,Es=ze.templates=ze.templates||{};Es["scxml.states.template.hbs"]=Os({1:function(t,e,n,d,r){var c,i,f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.escapeExpression,a=t.lookupProperty||function(b,u){if(Object.prototype.hasOwnProperty.call(b,u))return b[u]};return" <"+p(typeof(i=(i=a(n,"kind")||(e!=null?a(e,"kind"):e))!=null?i:v)==m?i.call(f,{name:"kind",hash:{},data:r,loc:{start:{line:2,column:5},end:{line:2,column:13}}}):i)+' id="'+p(typeof(i=(i=a(n,"id")||(e!=null?a(e,"id"):e))!=null?i:v)==m?i.call(f,{name:"id",hash:{},data:r,loc:{start:{line:2,column:18},end:{line:2,column:24}}}):i)+'"'+((c=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?c:"")+((c=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?c:"")+`>
60
- `+((c=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?c:"")+((c=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?c:"")+((c=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?c:"")+((c=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?c:"")+" </"+p(typeof(i=(i=a(n,"kind")||(e!=null?a(e,"kind"):e))!=null?i:v)==m?i.call(f,{name:"kind",hash:{},data:r,loc:{start:{line:19,column:6},end:{line:19,column:14}}}):i)+`>
61
- `},2:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return' initial="'+t.escapeExpression(typeof(n=(n=c(n,"initial")||(e!=null?c(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 c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return' type="'+t.escapeExpression(typeof(n=(n=c(n,"type")||(e!=null?c(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
- `},8:function(t,e,n,d,r){return" <onexit>"+t.escapeExpression(t.lambda(e,e))+`</onexit>
63
- `},10:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return(n=c(n,"if").call(e??(t.nullContext||{}),e!=null?c(e,"action"):e,{name:"if",hash:{},fn:t.program(11,r,0),inverse:t.program(18,r,0),data:r,loc:{start:{line:11,column:8},end:{line:17,column:15}}}))!=null?n:""},11:function(t,e,n,d,r){var c,i=e??(t.nullContext||{}),f=t.hooks.helperMissing,v="function",m=t.escapeExpression,p=t.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]};return" <transition "+((c=p(n,"if").call(i,e!=null?p(e,"event"):e,{name:"if",hash:{},fn:t.program(12,r,0),inverse:t.noop,data:r,loc:{start:{line:12,column:20},end:{line:12,column:58}}}))!=null?c:"")+((c=p(n,"if").call(i,e!=null?p(e,"cond"):e,{name:"if",hash:{},fn:t.program(14,r,0),inverse:t.noop,data:r,loc:{start:{line:12,column:58},end:{line:12,column:93}}}))!=null?c:"")+((c=p(n,"if").call(i,e!=null?p(e,"type"):e,{name:"if",hash:{},fn:t.program(16,r,0),inverse:t.noop,data:r,loc:{start:{line:12,column:93},end:{line:12,column:128}}}))!=null?c:"")+'target="'+m(typeof(t=(t=p(n,"target")||(e!=null?p(e,"target"):e))!=null?t:f)==v?t.call(i,{name:"target",hash:{},data:r,loc:{start:{line:12,column:136},end:{line:12,column:146}}}):t)+`">
64
- `+m(typeof(t=(t=p(n,"action")||(e!=null?p(e,"action"):e))!=null?t:f)==v?t.call(i,{name:"action",hash:{},data:r,loc:{start:{line:13,column:12},end:{line:13,column:22}}}):t)+`
54
+ `},53:function(t,e,n,d,l){return'style="dashed" penwidth=1'},55:function(t,e,n,d,l){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,l,0),inverse:t.program(58,l,0),data:l,loc:{start:{line:57,column:77},end:{line:57,column:130}}}))!=null?n:"")},56:function(t,e,n,d,l){return"penwidth=3.0"},58:function(t,e,n,d,l){return"penwidth=2.0"},60:function(t,e,n,d,l,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,l,0,p,a),inverse:t.noop,data:l,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,l,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
+ "`+((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,l,u,s){var f=e??(t.nullContext||{}),v=t.hooks.helperMissing,m="function",p=t.hooks.blockHelperMissing,a=t.lookupProperty||function(V,L){if(Object.prototype.hasOwnProperty.call(V,L))return V[L]},b="",c=(c=a(n,"compositeStates")||(e!=null?a(e,"compositeStates"):e))!=null?c:v,I={name:"compositeStates",hash:{},fn:t.program(1,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:1,column:0},end:{line:5,column:20}}},x=typeof c==m?c.call(f,I):c;return(x=a(n,"compositeStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"initialStates")||(e!=null?a(e,"initialStates"):e))!=null?c:v,I={name:"initialStates",hash:{},fn:t.program(4,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:6,column:0},end:{line:8,column:18}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"initialStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"regularStates")||(e!=null?a(e,"regularStates"):e))!=null?c:v,I={name:"regularStates",hash:{},fn:t.program(11,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:9,column:0},end:{line:19,column:18}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"regularStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"historyStates")||(e!=null?a(e,"historyStates"):e))!=null?c:v,I={name:"historyStates",hash:{},fn:t.program(27,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:20,column:0},end:{line:22,column:18}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"historyStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"deepHistoryStates")||(e!=null?a(e,"deepHistoryStates"):e))!=null?c:v,I={name:"deepHistoryStates",hash:{},fn:t.program(29,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:23,column:0},end:{line:25,column:22}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"deepHistoryStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"choiceStates")||(e!=null?a(e,"choiceStates"):e))!=null?c:v,I={name:"choiceStates",hash:{},fn:t.program(31,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:26,column:0},end:{line:29,column:17}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"choiceStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"forkjoinStates")||(e!=null?a(e,"forkjoinStates"):e))!=null?c:v,I={name:"forkjoinStates",hash:{},fn:t.program(43,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:30,column:0},end:{line:32,column:19}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"forkjoinStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"junctionStates")||(e!=null?a(e,"junctionStates"):e))!=null?c:v,I={name:"junctionStates",hash:{},fn:t.program(4,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:33,column:0},end:{line:35,column:19}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"junctionStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"terminateStates")||(e!=null?a(e,"terminateStates"):e))!=null?c:v,I={name:"terminateStates",hash:{},fn:t.program(45,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:36,column:0},end:{line:43,column:20}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"terminateStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"finalStates")||(e!=null?a(e,"finalStates"):e))!=null?c:v,I={name:"finalStates",hash:{},fn:t.program(48,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:44,column:0},end:{line:46,column:16}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"finalStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"compositeStates")||(e!=null?a(e,"compositeStates"):e))!=null?c:v,I={name:"compositeStates",hash:{},fn:t.program(50,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:47,column:0},end:{line:61,column:20}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"compositeStates")?x:p.call(e,x,I))!=null&&(b+=x),c=(c=a(n,"states")||(e!=null?a(e,"states"):e))!=null?c:v,I={name:"states",hash:{},fn:t.program(60,l,0,u,s),inverse:t.noop,data:l,loc:{start:{line:62,column:0},end:{line:67,column:11}}},x=typeof c==m?c.call(f,I):c,(x=a(n,"states")?x:p.call(e,x,I))!=null&&(b+=x),b},useData:!0,useDepths:!0})});var _n=z(($s,jn)=>{"use strict";var se=require("handlebars/dist/handlebars.runtime.js");On();Pn();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}jn.exports=function(e){return se.templates["dot.template.hbs"](e)}});var qn=z(()=>{"use strict";var De=require("handlebars/dist/handlebars.runtime"),Ti=De.template,ki=De.templates=De.templates||{};ki["scxml.template.hbs"]=Ti({1:function(t,e,n,d,l){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:l,loc:{start:{line:2,column:71},end:{line:2,column:82}}}):n)+'" '},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,l){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
+ <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,l,0),inverse:t.noop,data:l,loc:{start:{line:2,column:47},end:{line:2,column:91}}}))!=null?u:"")+`version="1.0">
58
+ `+((u=t.invokePartial(s(d,"scxml.states.template.hbs"),e,{name:"scxml.states.template.hbs",data:l,helpers:n,partials:d,decorators:t.decorators}))!=null?u:"")+`</scxml>
59
+ `},usePartial:!0,useData:!0})});var Dn=z(()=>{"use strict";var Me=require("handlebars/dist/handlebars.runtime"),Ai=Me.template,wi=Me.templates=Me.templates||{};wi["scxml.states.template.hbs"]=Ai({1:function(t,e,n,d,l){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:l,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:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,loc:{start:{line:2,column:69},end:{line:2,column:104}}}))!=null?u:"")+`>
60
+ `+((u=t.invokePartial(a(d,"scxml.states.template.hbs"),e,{name:"scxml.states.template.hbs",data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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:l,loc:{start:{line:19,column:6},end:{line:19,column:14}}}):s)+`>
61
+ `},2:function(t,e,n,d,l){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:l,loc:{start:{line:2,column:50},end:{line:2,column:61}}}):n)+'"'},4:function(t,e,n,d,l){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:l,loc:{start:{line:2,column:88},end:{line:2,column:96}}}):n)+'"'},6:function(t,e,n,d,l){return" <onentry>"+t.escapeExpression(t.lambda(e,e))+`</onentry>
62
+ `},8:function(t,e,n,d,l){return" <onexit>"+t.escapeExpression(t.lambda(e,e))+`</onexit>
63
+ `},10:function(t,e,n,d,l){var u=t.lookupProperty||function(s,f){if(Object.prototype.hasOwnProperty.call(s,f))return s[f]};return(n=u(n,"if").call(e??(t.nullContext||{}),e!=null?u(e,"action"):e,{name:"if",hash:{},fn:t.program(11,l,0),inverse:t.program(18,l,0),data:l,loc:{start:{line:11,column:8},end:{line:17,column:15}}}))!=null?n:""},11:function(t,e,n,d,l){var u,s=e??(t.nullContext||{}),f=t.hooks.helperMissing,v="function",m=t.escapeExpression,p=t.lookupProperty||function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]};return" <transition "+((u=p(n,"if").call(s,e!=null?p(e,"event"):e,{name:"if",hash:{},fn:t.program(12,l,0),inverse:t.noop,data:l,loc:{start:{line:12,column:20},end:{line:12,column:58}}}))!=null?u:"")+((u=p(n,"if").call(s,e!=null?p(e,"cond"):e,{name:"if",hash:{},fn:t.program(14,l,0),inverse:t.noop,data:l,loc:{start:{line:12,column:58},end:{line:12,column:93}}}))!=null?u:"")+((u=p(n,"if").call(s,e!=null?p(e,"type"):e,{name:"if",hash:{},fn:t.program(16,l,0),inverse:t.noop,data:l,loc:{start:{line:12,column:93},end:{line:12,column:128}}}))!=null?u:"")+'target="'+m(typeof(t=(t=p(n,"target")||(e!=null?p(e,"target"):e))!=null?t:f)==v?t.call(s,{name:"target",hash:{},data:l,loc:{start:{line:12,column:136},end:{line:12,column:146}}}):t)+`">
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:l,loc:{start:{line:13,column:12},end:{line:13,column:22}}}):t)+`
65
65
  </transition>
66
- `},12:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'event="'+t.escapeExpression(typeof(n=(n=c(n,"event")||(e!=null?c(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 c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'cond="'+t.escapeExpression(typeof(n=(n=c(n,"cond")||(e!=null?c(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 c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'type="'+t.escapeExpression(typeof(n=(n=c(n,"type")||(e!=null?c(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 c,i=e??(t.nullContext||{}),f=t.lookupProperty||function(v,m){if(Object.prototype.hasOwnProperty.call(v,m))return v[m]};return" <transition "+((c=f(n,"if").call(i,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?c:"")+((c=f(n,"if").call(i,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?c:"")+((c=f(n,"if").call(i,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?c:"")+'target="'+t.escapeExpression(typeof(c=(c=f(n,"target")||(e!=null?f(e,"target"):e))!=null?c:t.hooks.helperMissing)=="function"?c.call(i,{name:"target",hash:{},data:r,loc:{start:{line:16,column:136},end:{line:16,column:146}}}):c)+`"/>
67
- `},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,r){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return(n=c(n,"each").call(e??(t.nullContext||{}),e!=null?c(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 Xn=U((Vi,Gn)=>{var Ue=require("handlebars/dist/handlebars.runtime.js");zn();Un();Ue.registerPartial("scxml.states.template.hbs",Ue.templates["scxml.states.template.hbs"]);Gn.exports=function(e){return Ue.templates["scxml.template.hbs"](e)}});var _s={};La(_s,{default:()=>js,getAllowedValues:()=>Mn,render:()=>Zn,version:()=>Kn});module.exports=Na(_s);var tn=Object.freeze({inputType:{default:"smcat",values:[{name:"smcat"},{name:"json"},{name:"scxml"}]},outputType:{default:"svg",values:[{name:"ast"},{name:"dot"},{name:"eps"},{name:"json"},{name:"oldeps"},{name:"oldps"},{name:"oldps2"},{name:"oldsvg"},{name:"pdf"},{name:"png"},{name:"ps"},{name:"ps2"},{name:"scjson"},{name:"scxml"},{name:"smcat"},{name:"svg"}]},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])??tn[e].default}function Sa(){return tn}var H={getAllowedValues:Sa,getOptionValue:Va};var bn=R(require("ajv"),1);function nn(t,e=!1){let n=[];return t.filter(d=>Boolean(d.statemachine)).forEach(d=>{Object.prototype.hasOwnProperty.call(d.statemachine,"states")&&(n=n.concat(nn(d.statemachine.states,!0)))}),n.concat(t.map(d=>({name:d.name,type:d.type,statemachine:Boolean(d.statemachine),hasParent:e})))}function ln(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(ln(n.statemachine))}),e}var q=class{constructor(e){this._flattenedStates=nn(e.states||[]),this._flattenedTransitions=ln(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 za="^(entry|activity|exit)\\s*/\\s*([^\\n$]*)(\\n|$)",Ua=new RegExp(za);function rn(t,e){return t.includes(e)}var Ga=[{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 Xa(t){return e=>e.re.test(t)}function an(t){return(Ga.find(Xa(t))||{stateType:"regular"}).stateType}function Ee(t){return{name:t,type:an(t)}}function on(t){return Boolean(t.statemachine)}function sn(t){let e=(t==null?void 0:t.states)??[];return e.filter(on).reduce((n,d)=>n.concat(sn(d.statemachine)),e.map(({name:n})=>n))}function un(t,e){e=e||sn(t),t.states=(t==null?void 0:t.states)??[];let n=(t==null?void 0:t.transitions)??[];return t.states.filter(on).forEach(d=>{d.statemachine.states=un(d.statemachine,e)}),n.forEach(d=>{rn(e,d.from)||(e.push(d.from),t.states.push(Ee(d.from))),rn(e,d.to)||(e.push(d.to),t.states.push(Ee(d.to)))}),t.states}function Ja(t,e){let n="junction";return t<=1&&e>1&&(n="fork"),t>1&&e<=1&&(n="join"),n}function cn(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=Ja(d,r)}return n.statemachine&&(n.statemachine=cn(n.statemachine,e)),n}),t}function Qa(t,e){return t.name===e.name}function Wa(t,e){return t.reduce((n,d)=>{let r=n.findIndex(c=>e(c,d));return r>-1?(n[r]=d,n):n.concat(d)},[])}function Ya(t){let e=/([^[/]+)?(\[[^\]]+\])?[^/]*(\/.+)?/,n={},d=t.match(e),r=1,c=2,i=3;return d[r]&&(n.event=d[r].trim()),d[c]&&(n.cond=d[c].slice(1,-1).trim()),d[i]&&(n.action=d[i].slice(1,d[i].length).trim()),n}function fn(t,e,n,d=r=>r){d(n)&&(t[e]=n)}function Za(t,e,n){fn(t,e,n,d=>d&&d.length>0)}function Ka(t){let e=t.match(Ua),n=1,d=2;return e?{type:e[n],body:e[d]}:{type:"activity",body:t}}function Ma(t){return t.split(/\n\s*/g).map(e=>e.trim()).map(Ka)}var T={initState:Ee,extractUndeclaredStates:un,classifyForkJoins:cn,getStateType:an,stateEqual:Qa,uniq:Wa,parseTransitionExpression:Ya,extractActions:Ma,setIf:fn,setIfNotEmpty:Za};function eo(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function W(t,e,n,d){var r=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(r,W.prototype),r.expected=e,r.found=n,r.location=d,r.name="SyntaxError",r}eo(W,Error);function je(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}W.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,c=this.location.source+":"+r.line+":"+r.column;if(n){var i=this.location.end,f=je("",r.line.toString().length," "),v=n[r.line-1],m=r.line===i.line?i.column:v.length+1,p=m-r.column||1;e+=`
68
- --> `+c+`
66
+ `},12:function(t,e,n,d,l){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:l,loc:{start:{line:12,column:40},end:{line:12,column:49}}}):n)+'" '},14:function(t,e,n,d,l){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:l,loc:{start:{line:12,column:76},end:{line:12,column:84}}}):n)+'" '},16:function(t,e,n,d,l){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:l,loc:{start:{line:12,column:111},end:{line:12,column:119}}}):n)+'" '},18:function(t,e,n,d,l){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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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,l,0),inverse:t.noop,data:l,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:l,loc:{start:{line:16,column:136},end:{line:16,column:146}}}):u)+`"/>
67
+ `},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,l){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,l,0),inverse:t.noop,data:l,loc:{start:{line:1,column:0},end:{line:20,column:9}}}))!=null?n:""},usePartial:!0,useData:!0})});var zn=z((Ms,Mn)=>{"use strict";var ze=require("handlebars/dist/handlebars.runtime.js");qn();Dn();ze.registerPartial("scxml.states.template.hbs",ze.templates["scxml.states.template.hbs"]);Mn.exports=function(e){return ze.templates["scxml.template.hbs"](e)}});var ji={};La(ji,{default:()=>Pi,getAllowedValues:()=>Zn,render:()=>Qn,version:()=>Yn});module.exports=Ba(ji);var en=Object.freeze({inputType:{default:"smcat",values:[{name:"smcat"},{name:"json"},{name:"scxml"}]},outputType:{default:"svg",values:[{name:"ast"},{name:"dot"},{name:"eps"},{name:"json"},{name:"oldeps"},{name:"oldps"},{name:"oldps2"},{name:"oldsvg"},{name:"pdf"},{name:"png"},{name:"ps"},{name:"ps2"},{name:"scjson"},{name:"scxml"},{name:"smcat"},{name:"svg"}]},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 Ha(t,e){return(t==null?void 0:t[e])??en[e].default}function qa(){return en}var R={getAllowedValues:qa,getOptionValue:Ha};var vn=_(require("ajv"),1);function tn(t,e=!1){let n=[];return t.filter(d=>Boolean(d.statemachine)).forEach(d=>{Object.prototype.hasOwnProperty.call(d.statemachine,"states")&&(n=n.concat(tn(d.statemachine.states,!0)))}),n.concat(t.map(d=>({name:d.name,type:d.type,statemachine:Boolean(d.statemachine),hasParent:e})))}function nn(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(nn(n.statemachine))}),e}var N=class{_flattenedTransitions;_flattenedStates;constructor(e){this._flattenedStates=tn(e.states||[]),this._flattenedTransitions=nn(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 Da="^(entry|activity|exit)\\s*/\\s*([^\\n$]*)(\\n|$)",Ma=new RegExp(Da);function rn(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 ln(t){return(za.find(Ua(t))||{stateType:"regular"}).stateType}function we(t){return{name:t,type:ln(t)}}function an(t){return Boolean(t.statemachine)}function on(t){let e=(t==null?void 0:t.states)??[];return e.filter(an).reduce((n,d)=>n.concat(on(d.statemachine)),e.map(({name:n})=>n))}function sn(t,e){e=e||on(t),t.states=(t==null?void 0:t.states)??[];let n=(t==null?void 0:t.transitions)??[];return t.states.filter(an).forEach(d=>{d.statemachine.states=sn(d.statemachine,e)}),n.forEach(d=>{rn(e,d.from)||(e.push(d.from),t.states.push(we(d.from))),rn(e,d.to)||(e.push(d.to),t.states.push(we(d.to)))}),t.states}function Ja(t,e){let n="junction";return t<=1&&e>1&&(n="fork"),t>1&&e<=1&&(n="join"),n}function cn(t,e=new N(t)){return t.states=t.states.map(n=>{if(n.type==="forkjoin"&&!n.typeExplicitlySet){let d=e.findTransitionsByTo(n.name).length,l=e.findTransitionsByFrom(n.name).length;n.type=Ja(d,l)}return n.statemachine&&(n.statemachine=cn(n.statemachine,e)),n}),t}function Xa(t,e){return t.name===e.name}function Ga(t,e){return t.reduce((n,d)=>{let l=n.findIndex(u=>e(u,d));return l>-1?(n[l]=d,n):n.concat(d)},[])}function Wa(t){let e=/([^[/]+)?(\[[^\]]+\])?[^/]*(\/.+)?/,n={},d=t.match(e),l=1,u=2,s=3;return d[l]&&(n.event=d[l].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 un(t,e,n,d=Boolean){d(n)&&(t[e]=n)}function Qa(t,e,n){un(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 j={initState:we,extractUndeclaredStates:sn,classifyForkJoins:cn,getStateType:ln,stateEqual:Xa,uniq:Ga,parseTransitionExpression:Wa,extractActions:Za,setIf:un,setIfNotEmpty:Qa};function Ka(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function W(t,e,n,d){var l=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(l,W.prototype),l.expected=e,l.found=n,l.location=d,l.name="SyntaxError",l}Ka(W,Error);function Ce(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}W.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 l=this.location.start,u=this.location.source+":"+l.line+":"+l.column;if(n){var s=this.location.end,f=Ce("",l.line.toString().length," "),v=n[l.line-1],m=l.line===s.line?s.column:v.length+1,p=m-l.column||1;e+=`
68
+ --> `+u+`
69
69
  `+f+` |
70
- `+r.line+" | "+v+`
71
- `+f+" | "+je("",r.column-1," ")+je("",p,"^")}else e+=`
72
- at `+c}return e};W.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)?c(a[0])+"-"+c(a[1]):c(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 c(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 i(m){return n[m.type](m)}function f(m){var p=m.map(i),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 mn(t,e){e=e!==void 0?e:{};var n={},d=e.grammarSource,r={program:St},c=St,i=",",f=";",v="[",m="]",p=":",a="{",b="}",u="=",k="label",$="color",D="class",I="active",Je="type",Qe="regular",We="initial",Ye="terminate",Ze="final",Ke="parallel",Me="history",et="deephistory",tt="choice",nt="forkjoin",lt="fork",rt="join",at="junction",el="width",ot="external",st="internal",it="->",ut="=>>",ct="=>",ft=">>",mt=":>",pt="--",dt="==",ht="<-",gt="<<=",yt="<=",vt="<<",bt="<:",tl="#",nl=".",S='"',ue='\\"',$t="/*",ce="*/",xt="//",kt=/^[0-9]/,wt=/^[a-zA-Z0-9_\- ]/,At=/^[^;, "\t\n\r=\-><:{[]/,ll=/^[ \t]/,rl=/^[\r\n]/,al=/^[^\r\n]/,ol=_("statemachine"),fe=O(",",!1),Z=O(";",!1),sl=_("state"),Pt=O("[",!1),Ct=O("]",!1),Ot=O(":",!1),te=O("{",!1),il=O("}",!1),ul=_("extended state attributes"),cl=_("extended state attribute"),X=O("=",!1),fl=_("state attribute name"),ml=O("label",!0),Et=O("color",!0),pl=_("class attribute"),dl=O("class",!0),hl=_("state flag"),gl=O("active",!0),yl=_("state type"),jt=O("type",!0),vl=_("state type type"),bl=O("regular",!1),$l=O("initial",!1),xl=O("terminate",!1),kl=O("final",!1),wl=O("parallel",!1),Al=O("history",!1),Pl=O("deephistory",!1),Cl=O("choice",!1),Ol=O("forkjoin",!1),El=O("fork",!1),jl=O("join",!1),_l=O("junction",!1),Fl=_("transition"),Tl=_("extended transition attributes"),Rl=_("extended transition attribute"),Bl=_("transition attribute name"),Hl=_("transition type name"),ql=_("numeric transition attribute name"),Dl=O("width",!0),Il=_("transition type value"),Ll=O("external",!1),Nl=O("internal",!1),Vl=_("left to right arrow"),Sl=O("->",!1),zl=O("=>>",!1),Ul=O("=>",!1),Gl=O(">>",!1),Xl=O(":>",!1),Jl=O("--",!1),Ql=O("==",!1),Wl=_("right to left arrow"),Yl=O("<-",!1),Zl=O("<<=",!1),Kl=O("<=",!1),Ml=O("<<",!1),er=O("<:",!1),tr=O("#",!1),nr=O(".",!1),_t=K([["0","9"]],!1,!1),lr=_("double quoted string"),z=O('"',!1),Ft=O('\\"',!1),J=ta(),rr=_("valid class string"),Tt=K([["a","z"],["A","Z"],["0","9"],"_","-"," "],!1,!1),ar=_("identifier"),Rt=K([";",","," ",'"'," ",`
73
- `,"\r","=","-",">","<",":","{","["],!0,!1),or=_("whitespace"),sr=K([" "," "],!1,!1),ir=_("line end"),ur=K(["\r",`
74
- `],!1,!1),cr=O("/*",!1),Bt=O("*/",!1),fr=O("//",!1),mr=K(["\r",`
75
- `],!0,!1),pr=_("comment"),dr=function(l){return l.states=T.extractUndeclaredStates(l),T.classifyForkJoins(l)},hr=function(l,s){let g={};return T.setIf(g,"states",l),T.setIfNotEmpty(g,"transitions",s),g},Ht=function(l){return l},gr=function(l){return l},yr=function(l){return T.uniq(l[0].concat(l[1]),T.stateEqual)},vr=function(l,s,g){return g},br=function(l,s,g,h){return h},$r=function(l,s,g,h,w){return w},xr=function(l,s,g,h,w){let C=T.initState(s);return(g||[]).forEach(E=>T.setIf(C,E.name,E.value)),T.setIf(C,"typeExplicitlySet",(g||[]).some(E=>E.typeExplicitlySet)),T.setIf(C,"statemachine",w),T.setIfNotEmpty(C,"note",l),Boolean(h)&&T.setIfNotEmpty(C,"actions",T.extractActions(h)),C},kr=function(l,s){return{name:l,value:s}},wr=function(l,s){return{name:l,value:s}},Ar=function(l){return{name:l,value:!0}},Pr=function(l,s){return{name:l,value:s,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()},_r=function(l,s,g){return g},Fr=function(l,s,g,h){return h},Tr=function(l,s,g,h){return h&&(s.label=h,s=Object.assign(s,T.parseTransitionExpression(h))),(g||[]).forEach(w=>T.setIf(s,w.name,w.value)),T.setIfNotEmpty(s,"note",l),s},Rr=function(l,s){return{from:l,to:s}},Br=function(l,s){return{from:s,to:l}},Hr=function(l,s){return{name:l,value:s}},qr=function(l,s){return{name:l,value:s}},Dr=function(l,s){return{name:l,value:s}},Ir=function(l,s){return{name:l,value:s}},Lr=function(l){return l.toLowerCase()},Nr=function(l){return l.toLowerCase()},Vr=function(l){return l},Sr=function(l){return l.join("").trim()},zr=function(l){return parseFloat(l.join(""))},Ur=function(l){return parseInt(l.join(""),10)},Gr=function(l){return l.join("").replace(/\\\"/g,'"')},qt=function(l){return l},Xr=function(l){return l.join("")},Dt=function(l){return l},Jr=function(l){return l.join("").trim()},Qr=function(l){return l.join("").trim()},It=function(l){return l},Lt=function(l){return l},Wr=function(l){return l.join("")},Yr=function(l){return l},Zr=function(l){return l},Kr=function(l){return l},Mr=function(l,s,g){return l+s.join("")+g},ea=function(l,s){return l+s.join("")},o=0,A=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+'".');c=r[e.startRule]}function Fs(){return t.substring(A,o)}function Ts(){return A}function Rs(){return{source:d,start:A,end:o}}function Bs(){return ne(A,o)}function Hs(l,s){throw s=s!==void 0?s:ne(A,o),Vt([_(l)],t.substring(A,o),s)}function qs(l,s){throw s=s!==void 0?s:ne(A,o),la(l,s)}function O(l,s){return{type:"literal",text:l,ignoreCase:s}}function K(l,s,g){return{type:"class",parts:l,inverted:s,ignoreCase:g}}function ta(){return{type:"any"}}function na(){return{type:"end"}}function _(l){return{type:"other",description:l}}function Nt(l){var s=me[l],g;if(s)return s;for(g=l-1;!me[g];)g--;for(s=me[g],s={line:s.line,column:s.column};g<l;)t.charCodeAt(g)===10?(s.line++,s.column=1):s.column++,g++;return me[l]=s,s}function ne(l,s){var g=Nt(l),h=Nt(s);return{source:d,start:{offset:l,line:g.line,column:g.column},end:{offset:s,line:h.line,column:h.column}}}function x(l){o<L||(o>L&&(L=o,we=[]),we.push(l))}function la(l,s){return new W(l,null,null,s)}function Vt(l,s,g){return new W(W.buildMessage(l,s),l,s,g)}function St(){var l,s,g,h;return l=o,s=P(),g=zt(),h=P(),A=l,l=dr(g),l}function zt(){var l,s,g,h;for(y++,l=o,s=ra(),s===n&&(s=null),g=[],h=Xt();h!==n;)g.push(h),h=Xt();return A=l,l=hr(s,g),y--,s=n,y===0&&x(ol),l}function ra(){var l,s,g,h,w,C;for(l=o,s=o,g=[],h=o,w=Ae(),w!==n?(t.charCodeAt(o)===44?(C=i,o++):(C=n,y===0&&x(fe)),C!==n?(A=h,h=Ht(w)):(o=h,h=n)):(o=h,h=n);h!==n;)g.push(h),h=o,w=Ae(),w!==n?(t.charCodeAt(o)===44?(C=i,o++):(C=n,y===0&&x(fe)),C!==n?(A=h,h=Ht(w)):(o=h,h=n)):(o=h,h=n);return h=o,w=Ae(),w!==n?(t.charCodeAt(o)===59?(C=f,o++):(C=n,y===0&&x(Z)),C!==n?(A=h,h=gr(w)):(o=h,h=n)):(o=h,h=n),h!==n?(g=[g,h],s=g):(o=s,s=n),s!==n&&(A=l,s=yr(s)),l=s,l}function Ae(){var l,s,g,h,w,C,E,j,N,B,Q,Mt,Ce,Ra,Oe;for(y++,l=o,s=[],g=de();g!==n;)s.push(g),g=de();return g=P(),h=re(),h!==n?(w=P(),C=o,t.charCodeAt(o)===91?(E=v,o++):(E=n,y===0&&x(Pt)),E!==n?(j=aa(),t.charCodeAt(o)===93?(N=m,o++):(N=n,y===0&&x(Ct)),N!==n?(A=C,C=vr(s,h,j)):(o=C,C=n)):(o=C,C=n),C===n&&(C=null),E=P(),j=o,t.charCodeAt(o)===58?(N=p,o++):(N=n,y===0&&x(Ot)),N!==n?(B=P(),Q=xa(),Q!==n?(Mt=P(),A=j,j=br(s,h,C,Q)):(o=j,j=n)):(o=j,j=n),j===n&&(j=null),N=P(),B=o,t.charCodeAt(o)===123?(Q=a,o++):(Q=n,y===0&&x(te)),Q!==n?(Mt=P(),Ce=zt(),Ce!==n?(Ra=P(),t.charCodeAt(o)===125?(Oe=b,o++):(Oe=n,y===0&&x(il)),Oe!==n?(A=B,B=$r(s,h,C,j,Ce)):(o=B,B=n)):(o=B,B=n)):(o=B,B=n),B===n&&(B=null),Q=P(),A=l,l=xr(s,h,C,j,B)):(o=l,l=n),y--,l===n&&(s=n,y===0&&x(sl)),l}function aa(){var l,s;for(y++,l=[],s=Ut();s!==n;)l.push(s),s=Ut();return y--,s=n,y===0&&x(ul),l}function Ut(){var l,s,g,h,w,C,E,j;return y++,l=o,s=P(),g=oa(),g!==n?(h=P(),t.charCodeAt(o)===61?(w=u,o++):(w=n,y===0&&x(X)),w!==n?(C=P(),E=le(),E!==n?(j=P(),A=l,l=kr(g,E)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,s=P(),g=Gt(),g!==n?(h=P(),t.charCodeAt(o)===61?(w=u,o++):(w=n,y===0&&x(X)),w!==n?(C=P(),E=Qt(),E!==n?(j=P(),A=l,l=wr(g,E)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,s=P(),g=sa(),g!==n?(h=P(),A=l,l=Ar(g)):(o=l,l=n),l===n&&(l=o,s=P(),g=ia(),g!==n?(h=P(),t.charCodeAt(o)===61?(w=u,o++):(w=n,y===0&&x(X)),w!==n?(C=P(),E=ua(),E!==n?(j=P(),A=l,l=Pr(g,E)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n)))),y--,l===n&&(s=n,y===0&&x(cl)),l}function oa(){var l,s;return y++,l=o,t.substr(o,5).toLowerCase()===k?(s=t.substr(o,5),o+=5):(s=n,y===0&&x(ml)),s===n&&(t.substr(o,5).toLowerCase()===$?(s=t.substr(o,5),o+=5):(s=n,y===0&&x(Et))),s!==n&&(A=l,s=Cr(s)),l=s,y--,l===n&&(s=n,y===0&&x(fl)),l}function Gt(){var l,s;return y++,l=o,t.substr(o,5).toLowerCase()===D?(s=t.substr(o,5),o+=5):(s=n,y===0&&x(dl)),s!==n&&(A=l,s=Or(s)),l=s,y--,l===n&&(s=n,y===0&&x(pl)),l}function sa(){var l,s;return y++,l=o,t.substr(o,6).toLowerCase()===I?(s=t.substr(o,6),o+=6):(s=n,y===0&&x(gl)),s!==n&&(A=l,s=Er(s)),l=s,y--,l===n&&(s=n,y===0&&x(hl)),l}function ia(){var l,s;return y++,l=o,t.substr(o,4).toLowerCase()===Je?(s=t.substr(o,4),o+=4):(s=n,y===0&&x(jt)),s!==n&&(A=l,s=jr(s)),l=s,y--,l===n&&(s=n,y===0&&x(yl)),l}function ua(){var l,s;return y++,t.substr(o,7)===Qe?(l=Qe,o+=7):(l=n,y===0&&x(bl)),l===n&&(t.substr(o,7)===We?(l=We,o+=7):(l=n,y===0&&x($l)),l===n&&(t.substr(o,9)===Ye?(l=Ye,o+=9):(l=n,y===0&&x(xl)),l===n&&(t.substr(o,5)===Ze?(l=Ze,o+=5):(l=n,y===0&&x(kl)),l===n&&(t.substr(o,8)===Ke?(l=Ke,o+=8):(l=n,y===0&&x(wl)),l===n&&(t.substr(o,7)===Me?(l=Me,o+=7):(l=n,y===0&&x(Al)),l===n&&(t.substr(o,11)===et?(l=et,o+=11):(l=n,y===0&&x(Pl)),l===n&&(t.substr(o,6)===tt?(l=tt,o+=6):(l=n,y===0&&x(Cl)),l===n&&(t.substr(o,8)===nt?(l=nt,o+=8):(l=n,y===0&&x(Ol)),l===n&&(t.substr(o,4)===lt?(l=lt,o+=4):(l=n,y===0&&x(El)),l===n&&(t.substr(o,4)===rt?(l=rt,o+=4):(l=n,y===0&&x(jl)),l===n&&(t.substr(o,8)===at?(l=at,o+=8):(l=n,y===0&&x(_l))))))))))))),y--,l===n&&(s=n,y===0&&x(vl)),l}function Xt(){var l,s,g,h,w,C,E,j,N;for(y++,l=o,s=[],g=de();g!==n;)s.push(g),g=de();return g=ca(),g!==n?(h=o,t.charCodeAt(o)===91?(w=v,o++):(w=n,y===0&&x(Pt)),w!==n?(C=fa(),t.charCodeAt(o)===93?(E=m,o++):(E=n,y===0&&x(Ct)),E!==n?(j=P(),A=h,h=_r(s,g,C)):(o=h,h=n)):(o=h,h=n),h===n&&(h=null),w=o,t.charCodeAt(o)===58?(C=p,o++):(C=n,y===0&&x(Ot)),C!==n?(E=P(),j=$a(),j!==n?(N=P(),A=w,w=Fr(s,g,h,j)):(o=w,w=n)):(o=w,w=n),w===n&&(w=null),t.charCodeAt(o)===59?(C=f,o++):(C=n,y===0&&x(Z)),C!==n?(A=l,l=Tr(s,g,h,w)):(o=l,l=n)):(o=l,l=n),y--,l===n&&(s=n,y===0&&x(Fl)),l}function ca(){var l,s,g,h,w,C,E,j;return l=o,s=P(),g=re(),g!==n?(h=P(),w=ga(),w!==n?(C=P(),E=re(),E!==n?(j=P(),A=l,l=Rr(g,E)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,s=P(),g=re(),g!==n?(h=P(),w=ya(),w!==n?(C=P(),E=re(),E!==n?(j=P(),A=l,l=Br(g,E)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n)),l}function fa(){var l,s;for(y++,l=[],s=Jt();s!==n;)l.push(s),s=Jt();return y--,s=n,y===0&&x(Tl),l}function Jt(){var l,s,g,h,w,C,E,j;return y++,l=o,s=P(),g=ma(),g!==n?(h=P(),t.charCodeAt(o)===61?(w=u,o++):(w=n,y===0&&x(X)),w!==n?(C=P(),E=le(),E!==n?(j=P(),A=l,l=Hr(g,E)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,s=P(),g=Gt(),g!==n?(h=P(),t.charCodeAt(o)===61?(w=u,o++):(w=n,y===0&&x(X)),w!==n?(C=P(),E=Qt(),E!==n?(j=P(),A=l,l=qr(g,E)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,s=P(),g=pa(),g!==n?(h=P(),t.charCodeAt(o)===61?(w=u,o++):(w=n,y===0&&x(X)),w!==n?(C=P(),E=ha(),E!==n?(j=P(),A=l,l=Dr(g,E)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n),l===n&&(l=o,s=P(),g=da(),g!==n?(h=P(),t.charCodeAt(o)===61?(w=u,o++):(w=n,y===0&&x(X)),w!==n?(C=P(),E=va(),E!==n?(j=P(),A=l,l=Ir(g,E)):(o=l,l=n)):(o=l,l=n)):(o=l,l=n)))),y--,l===n&&(s=n,y===0&&x(Rl)),l}function ma(){var l,s;return y++,l=o,t.substr(o,5).toLowerCase()===$?(s=t.substr(o,5),o+=5):(s=n,y===0&&x(Et)),s!==n&&(A=l,s=Lr(s)),l=s,y--,l===n&&(s=n,y===0&&x(Bl)),l}function pa(){var l,s;return y++,l=o,t.substr(o,4).toLowerCase()===Je?(s=t.substr(o,4),o+=4):(s=n,y===0&&x(jt)),s!==n&&(A=l,s=Nr(s)),l=s,y--,l===n&&(s=n,y===0&&x(Hl)),l}function da(){var l,s;return y++,l=o,t.substr(o,5).toLowerCase()===el?(s=t.substr(o,5),o+=5):(s=n,y===0&&x(Dl)),s!==n&&(A=l,s=Vr(s)),l=s,y--,l===n&&(s=n,y===0&&x(ql)),l}function ha(){var l,s;return y++,t.substr(o,8)===ot?(l=ot,o+=8):(l=n,y===0&&x(Ll)),l===n&&(t.substr(o,8)===st?(l=st,o+=8):(l=n,y===0&&x(Nl))),y--,l===n&&(s=n,y===0&&x(Il)),l}function ga(){var l,s;return y++,t.substr(o,2)===it?(l=it,o+=2):(l=n,y===0&&x(Sl)),l===n&&(t.substr(o,3)===ut?(l=ut,o+=3):(l=n,y===0&&x(zl)),l===n&&(t.substr(o,2)===ct?(l=ct,o+=2):(l=n,y===0&&x(Ul)),l===n&&(t.substr(o,2)===ft?(l=ft,o+=2):(l=n,y===0&&x(Gl)),l===n&&(t.substr(o,2)===mt?(l=mt,o+=2):(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)))))))),y--,l===n&&(s=n,y===0&&x(Vl)),l}function ya(){var l,s;return y++,t.substr(o,2)===ht?(l=ht,o+=2):(l=n,y===0&&x(Yl)),l===n&&(t.substr(o,3)===gt?(l=gt,o+=3):(l=n,y===0&&x(Zl)),l===n&&(t.substr(o,2)===yt?(l=yt,o+=2):(l=n,y===0&&x(Kl)),l===n&&(t.substr(o,2)===vt?(l=vt,o+=2):(l=n,y===0&&x(Ml)),l===n&&(t.substr(o,2)===bt?(l=bt,o+=2):(l=n,y===0&&x(er)))))),y--,l===n&&(s=n,y===0&&x(Wl)),l}function de(){var l,s,g,h,w;if(l=o,s=P(),t.charCodeAt(o)===35?(g=tl,o++):(g=n,y===0&&x(tr)),g!==n){for(h=[],w=he();w!==n;)h.push(w),w=he();A=l,l=Sr(h)}else o=l,l=n;return l}function va(){var l;return l=ba(),l===n&&(l=Pe()),l}function ba(){var l,s,g,h,w;return l=o,s=o,g=Pe(),g!==n?(t.charCodeAt(o)===46?(h=nl,o++):(h=n,y===0&&x(nr)),h!==n?(w=Pe(),w!==n?(g=[g,h,w],s=g):(o=s,s=n)):(o=s,s=n)):(o=s,s=n),s!==n&&(A=l,s=zr(s)),l=s,l}function Pe(){var l,s,g;if(l=o,s=[],kt.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(_t)),g!==n)for(;g!==n;)s.push(g),kt.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(_t));else s=n;return s!==n&&(A=l,s=Ur(s)),l=s,l}function $a(){var l;return l=le(),l===n&&(l=Aa()),l}function xa(){var l;return l=le(),l===n&&(l=Pa()),l}function le(){var l,s,g,h;return y++,l=o,t.charCodeAt(o)===34?(s=S,o++):(s=n,y===0&&x(z)),s!==n?(g=ka(),t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(z)),h!==n?(A=l,l=Gr(g)):(o=l,l=n)):(o=l,l=n),y--,l===n&&(s=n,y===0&&x(lr)),l}function ka(){var l,s,g,h;for(l=[],s=o,g=o,y++,t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(z)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.substr(o,2)===ue?(h=ue,o+=2):(h=n,y===0&&x(Ft)),h===n&&(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(J))),h!==n?(A=s,s=qt(h)):(o=s,s=n)):(o=s,s=n);s!==n;)l.push(s),s=o,g=o,y++,t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(z)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(t.substr(o,2)===ue?(h=ue,o+=2):(h=n,y===0&&x(Ft)),h===n&&(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&x(J))),h!==n?(A=s,s=qt(h)):(o=s,s=n)):(o=s,s=n);return l}function Qt(){var l,s,g,h;return y++,l=o,t.charCodeAt(o)===34?(s=S,o++):(s=n,y===0&&x(z)),s!==n?(g=wa(),t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(z)),h!==n?(A=l,l=Xr(g)):(o=l,l=n)):(o=l,l=n),y--,l===n&&(s=n,y===0&&x(rr)),l}function wa(){var l,s,g,h;for(l=[],s=o,g=o,y++,t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(z)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(wt.test(t.charAt(o))?(h=t.charAt(o),o++):(h=n,y===0&&x(Tt)),h!==n?(A=s,s=Dt(h)):(o=s,s=n)):(o=s,s=n);s!==n;)l.push(s),s=o,g=o,y++,t.charCodeAt(o)===34?(h=S,o++):(h=n,y===0&&x(z)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(wt.test(t.charAt(o))?(h=t.charAt(o),o++):(h=n,y===0&&x(Tt)),h!==n?(A=s,s=Dt(h)):(o=s,s=n)):(o=s,s=n);return l}function Aa(){var l,s;return l=o,s=Oa(),A=l,s=Jr(s),l=s,l}function Pa(){var l,s;return l=o,s=Ca(),A=l,s=Qr(s),l=s,l}function Ca(){var l,s,g,h;for(l=[],s=o,g=o,y++,t.charCodeAt(o)===44?(h=i,o++):(h=n,y===0&&x(fe)),h===n&&(t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(Z)),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(J)),h!==n?(A=s,s=It(h)):(o=s,s=n)):(o=s,s=n);s!==n;)l.push(s),s=o,g=o,y++,t.charCodeAt(o)===44?(h=i,o++):(h=n,y===0&&x(fe)),h===n&&(t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(Z)),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(J)),h!==n?(A=s,s=It(h)):(o=s,s=n)):(o=s,s=n);return l}function Oa(){var l,s,g,h;for(l=[],s=o,g=o,y++,t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(Z)),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(J)),h!==n?(A=s,s=Lt(h)):(o=s,s=n)):(o=s,s=n);s!==n;)l.push(s),s=o,g=o,y++,t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&x(Z)),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(J)),h!==n?(A=s,s=Lt(h)):(o=s,s=n)):(o=s,s=n);return l}function re(){var l,s,g;if(y++,l=o,s=[],At.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(Rt)),g!==n)for(;g!==n;)s.push(g),At.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&x(Rt));else s=n;return s!==n&&(A=l,s=Wr(s)),l=s,l===n&&(l=le()),y--,l===n&&(s=n,y===0&&x(ar)),l}function Wt(){var l,s;return y++,l=o,ll.test(t.charAt(o))?(s=t.charAt(o),o++):(s=n,y===0&&x(sr)),s!==n&&(A=l,s=Yr(s)),l=s,y--,l===n&&(s=n,y===0&&x(or)),l}function Yt(){var l,s;return y++,l=o,rl.test(t.charAt(o))?(s=t.charAt(o),o++):(s=n,y===0&&x(ur)),s!==n&&(A=l,s=Zr(s)),l=s,y--,l===n&&(s=n,y===0&&x(ir)),l}function Ea(){var l;return t.substr(o,2)===$t?(l=$t,o+=2):(l=n,y===0&&x(cr)),l}function ja(){var l;return t.substr(o,2)===ce?(l=ce,o+=2):(l=n,y===0&&x(Bt)),l}function Zt(){var l,s,g;return l=o,s=o,y++,t.substr(o,2)===ce?(g=ce,o+=2):(g=n,y===0&&x(Bt)),y--,g===n?s=void 0:(o=s,s=n),s!==n?(t.length>o?(g=t.charAt(o),o++):(g=n,y===0&&x(J)),g!==n?(A=l,l=Kr(g)):(o=l,l=n)):(o=l,l=n),l}function _a(){var l,s,g,h;if(l=o,s=Ea(),s!==n){for(g=[],h=Zt();h!==n;)g.push(h),h=Zt();h=ja(),h!==n?(A=l,l=Mr(s,g,h)):(o=l,l=n)}else o=l,l=n;return l}function Fa(){var l;return t.substr(o,2)===xt?(l=xt,o+=2):(l=n,y===0&&x(fr)),l}function he(){var l;return al.test(t.charAt(o))?(l=t.charAt(o),o++):(l=n,y===0&&x(mr)),l}function Ta(){var l,s,g,h;if(l=o,s=Fa(),s!==n){for(g=[],h=he();h!==n;)g.push(h),h=he();A=l,l=ea(s,g)}else o=l,l=n;return l}function Kt(){var l,s;return y++,l=Ta(),l===n&&(l=_a()),y--,l===n&&(s=n,y===0&&x(pr)),l}function P(){var l,s;for(l=[],s=Wt(),s===n&&(s=Yt(),s===n&&(s=Kt()));s!==n;)l.push(s),s=Wt(),s===n&&(s=Yt(),s===n&&(s=Kt()));return l}if(pe=c(),pe!==n&&o===t.length)return pe;throw pe!==n&&o<t.length&&x(na()),Vt(we,L<t.length?t.charAt(L):null,L<t.length?ne(L,L+1):ne(L,L))}var Fe=R(require("fast-xml-parser"),1),Y=R(require("he"),1),ve=R(require("lodash/castArray.js"),1);function to(t,e,n){let d="";return t&&(d+=t),e&&(d+=` [${e}]`),n&&(d+=`/ ${n}`),d.trim()}var ye={formatLabel:to};var ae=R(require("lodash/castArray.js"),1);function no(t,e){let n={id:e?`${e}.initial`:"initial"};return t.transition&&Object.assign(n,{transition:[t.transition]}),n}function lo(t){return{id:"initial",transition:[{target:t}]}}function ro(t){let e=[];return t.initial&&(typeof t.initial=="string"?e.push(lo(t.initial)):e.push(no(t.initial,t.id))),e}function pn(t){return{...t,initial:ro(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 ao=ye.formatLabel;function dn(t,e){return(0,ve.default)(t[e]).map(n=>({type:e==="onexit"?"exit":"entry",body:Y.default.decode(n).trim()}))}function oo(t){return(0,ve.default)(t).map(e=>({type:"activity",body:Y.default.decode(e.id||"").trim()||Y.default.decode(e||"").trim()}))}function so(t){let e=[];return t.onentry&&(e=e.concat(dn(t,"onentry"))),t.invoke&&(e=e.concat(oo(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 T.getStateType(e.id)!==n.type&&(n.typeExplicitlySet=!0),(e.onentry||e.onexit||e.invoke)&&(n.actions=so(e)),Object.keys(e).some(d=>["initial","state","history","parallel","final"].includes(d))&&(n.statemachine=hn(e)),n}}function uo(t){let e={};return t.event&&(e.event=t.event.split(/\s+/).join(`
76
- `)),t.cond&&(e.cond=t.cond),t["#text"]&&(e.action=Y.default.decode(t["#text"]).trim()),t.type&&(e.type=t.type),e}function co(t){let e={};typeof t=="string"?e.action=Y.default.decode(t).trim():Object.assign(e,uo(t));let n=ao(e.event,e.cond,e.action);return n&&(e.label=n),e}function fo(t){return(e,n)=>{let d=((n==null?void 0:n.target)??t.id).split(/\s+/),r=co(n);return e.concat(d.map(c=>({from:t.id,to:c,...r})))}}function _e(t){return t.filter(e=>Object.prototype.hasOwnProperty.call(e,"transition")).reduce((e,n)=>e.concat((0,ve.default)(n.transition).reduce(fo(n),[])),[])}function hn(t){let e=pn(t),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")))},d=_e(e.initial).concat(_e(e.state)).concat(_e(e.parallel));return d.length>0&&(n.transitions=d),n}function gn(t){let e=t.trim();if(Fe.default.validate(e)===!0){let n=Fe.default.parse(e,{attributeNamePrefix:"",ignoreAttributes:!1,tagValueProcessor:d=>Y.default.decode(d),stopNodes:["onentry","onexit","transition"]});return hn((n==null?void 0:n.scxml)??{xmlns:"http://www.w3.org/2005/07/scxml",version:"1.0"})}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 mo(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=mn(t):H.getOptionValue(e,"inputType")==="scxml"?n=gn(t):typeof t=="string"&&(n=JSON.parse(t)),mo(yn,n),n}};var Re=R(require("lodash/cloneDeep.js"),1),Te=R(require("lodash/reject.js"),1);function po(t,e,n){return t?`${t}${n}${e}`:e}function ho(t,e){let n={...t,...e,from:t.from,to:e.to};return e.action&&(n.action=po(t.action,e.action,`
79
- `)),(n.event||n.cond||n.action)&&(n.label=ye.formatLabel(n.event,n.cond,n.action)),n}function go(t,e,n){return t.reduce((d,r)=>(e.forEach((c,i)=>{c===r.to&&n[c]?d=d.concat(n[c].map(f=>ho(r,f))):d=i===0?d.concat(r):d}),d),[])}function xn(t,e,n){let d=(0,Re.default)(t);return d.transitions&&e.length>0&&(d.transitions=go(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,Re.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(({name:i})=>i),r=d.reduce((i,f)=>(i[f]=n.findTransitionsByFrom(f),i),{}),c=xn(t,d,r);return kn(c,d)};var Qn=R(require("lodash/has.js"),1),Wn=R(En(),1);var Hn=R(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"}]},_o=[{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"}],Fo=[{name:"fontname",value:"Helvetica"},{name:"fontsize",value:10}];function qe(t){return`${t.name}=${t.value}`}var be={buildGraphAttributes:(t,e,n)=>Oo.concat(Eo[t]||[]).concat(jo[e]||[]).concat(n||[]).map(qe).join(" "),buildNodeAttributes:t=>_o.concat(t||[]).map(qe).join(" "),buildEdgeAttributes:t=>Fo.concat(t||[]).map(qe).join(" ")};var jn=R(require("lodash/cloneDeep.js"),1);function To(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 Bo(t){let e=t||"top-down";return e==="top-down"||e==="bottom-top"}function Ho(t,e){return e.from===e.to&&t.findStateByName(e.from).statemachine&&e.type!=="internal"}var V={escapeString:To,escapeLabelString:Ro,isVertical:Bo,isCompositeSelf:Ho};function _n(t){return e=>e.type===t}function De(t){return e=>t.includes(e.type)}function qo(t){let e=(0,jn.default)(t);return e.label=t.label||t.name,e}function Do(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 Lo(t){return t==="activity"?"":`${t}/ `}function No(t){let e={...t};return t.actions&&(e.actions=t.actions.map(n=>`${Lo(n.type)}${n.body}`)),e}function Vo(t){return Object.prototype.hasOwnProperty.call(t,"note")&&(t.noteFlattened=t.note.join("")),t}function So(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 zo(t){return t.note&&(t.note=t.note.map(V.escapeString)),t}function Uo(t){return e=>De(["fork","join","forkjoin"])(e)?{sizingExtras:V.isVertical(t)?"height=0.1":"width=0.1",...e}:e}function Go(t){return t.type==="parallel"&&t.statemachine&&t.statemachine.states&&(t.statemachine.states=t.statemachine.states.map(e=>_n("regular")(e)?{...e,parentIsParallel:!0}:e)),t}var F={isType:_n,isOneOfTypes:De,setLabel:qo,classifyState:Io,nameNote:Do,flattenActions:No,flattenNote:Vo,recolor:So,escapeStateStrings:zo,tipForkJoinStates:Uo,flagParallelChildren:Go};function Xo(t){return t.note&&(t.note=t.note.map(V.escapeString)),t.label&&(t.label=V.escapeLabelString(t.label)),t}function Jo(t){return e=>{let n={};return e.isCompositeSelf&&(V.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 Qo(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:Xo,addPorts:Jo,classifyTransition:Qo};var se=class{constructor(){this.reset()}reset(){this.COUNTER=0}next(){return++this.COUNTER}nextAsString(){return this.next().toString(10)}};var qn=R(Bn(),1);var Dn={};function ts(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(ts(d))}function ns(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 ls(t){return e=>(t.findStateByName(e.from).statemachine&&(e.fromComposite=!0),t.findStateByName(e.to).statemachine&&(e.toComposite=!0),e)}function rs(t){return e=>{let n={};return V.isCompositeSelf(t,e)&&(t.findStateByName(e.from).hasParent?n={hasParent:!0,isCompositeSelf:!0}:n={isCompositeSelf:!0}),{...e,...n}}}function as(t){return t.name=`tr_${t.from}_${t.to}_${Dn.nextAsString()}`,Boolean(t.note)&&(t.noteName=`note_${t.name}`),t}function os(t,e){return t.flattenedTransitions.map(as).map($e.escapeTransitionStrings).map($e.classifyTransition).map(F.flattenNote).map(ls(t)).map(rs(t)).map($e.addPorts(e))}var xe=(t,e)=>{e=e||{},Dn=new se;let n=(0,Hn.default)(t),d=new q(n);return n.transitions=os(d,e.direction),n.states=In(n.states,e.direction,e.dotNodeAttrs,d),n=ns(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,qn.default)(n)};var Ln=R(require("viz.js"),1);var ss={oldsvg:"svg",oldps2:"ps2",oldeps:"eps"},Ne=(t,e)=>(0,Ln.default)(xe(t,e),{engine:H.getOptionValue(e,"engine"),format:ss[H.getOptionValue(e,"outputType")]||"svg"});var is=/[\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,us=/[-|.|0-9|\u00B7|\u0300-\u036F|\u203F-\u2040]/g;function Nn(t){return t.replace(is,"_")}function cs(t){let e=Nn(t);return e.match(us)&&(e=`_${t}`),e}var ke=t=>(t=t||"",t.length===0?"__empty":cs(t[0]).concat(Nn(t.slice(1))));var fs=/[\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,ms=/[.]/g;function Vn(t){return t.replace(fs,"_")}function ps(t){let e=Vn(t);return e.match(ms)&&(e=`_${t}`),e}function ds(t){return t=t.replace(/\s+/g," ").trim(),ps(t[0]).concat(Vn(t.slice(1)))}var Sn=t=>(t=t||"",t.length===0?"empty":t.split(/[\n\r]+/).filter(e=>e.length>0).map(ds).join(" "));var hs={regular:"state",initial:"initial",final:"final",terminate:"final",parallel:"parallel",history:"history",deephistory:"history"};function gs(t){return hs[t]||"state"}function ys(t){let e={target:ke(t.to)};return Boolean(t.event)&&(e.event=Sn(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 vs(t,e){return t.filter(n=>n.type===e).map(n=>n.body)}function Ve(t,e,n,d){let r=vs(n,d);r.length>0&&(t[e]=(t[e]||[]).concat(r))}function bs(t,e){Boolean(e.actions)&&(Ve(t,"onentries",e.actions,"entry"),Ve(t,"onentries",e.actions,"activity"),Ve(t,"onexits",e.actions,"exit"))}function $s(t,e,n){let d=n.filter(r=>r.from===e.name).map(ys);d.length>0&&(t.transitions=d)}function xs(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 ks(t){return t=t||[],e=>{let n={kind:gs(e.type),id:ke(e.name)};return e.type==="deephistory"&&(n.type="deep"),bs(n,e),$s(n,e,t),xs(n,e,t),n}}function ws(t){let e=null,n=t.states.filter(d=>d.type==="initial");return n.length>0&&(e=n[0].name),e}function As(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=ws(t),r=As(t,d),c={states:t.states.filter(i=>r&&r!==d?i.type!=="initial":!0).map(ks(n||new q(t).flattenedTransitions))};return r&&(c.initial=ke(r)),c}var Jn=R(Xn(),1);function Ge(t){return(0,Jn.default)(ee(t))}function Xe(t){let e={smcat:Wn.default,dot:xe,svg:Ne,oldsvg:Ne,scjson:ee,scxml:Ge};return(0,Qn.default)(e,t)?e[t]:n=>n}var Yn="10.1.5";function Zn(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 Kn=Yn;function Mn(){return H.getAllowedValues()}var js={render:Zn,version:Kn,getAllowedValues:Mn};
70
+ `+l.line+" | "+v+`
71
+ `+f+" | "+Ce("",l.column-1," ")+Ce("",p,"^")}else e+=`
72
+ at `+u}return e};W.buildMessage=function(t,e){var n={literal:function(m){return'"'+l(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 l(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?'"'+l(m)+'"':"end of input"}return"Expected "+f(t)+" but "+v(e)+" found."};function fn(t,e){e=e!==void 0?e:{};var n={},d=e.grammarSource,l={program:qt},u=qt,s=",",f=";",v="[",m="]",p=":",a="{",b="}",c="=",I="label",x="color",V="class",L="active",Je="type",Xe="regular",Ge="initial",We="terminate",Qe="final",Ye="parallel",Ze="history",Ke="deephistory",et="choice",tt="forkjoin",nt="fork",rt="join",lt="junction",Kn="width",at="external",ot="internal",it="->",st="=>>",ct="=>",ut=">>",ft=":>",mt="--",pt="==",dt="<-",ht="<<=",gt="<=",yt="<<",vt="<:",er="#",tr=".",D='"',ce='\\"',bt="/*",ue="*/",xt="//",$t=/^[0-9]/,It=/^[a-zA-Z0-9_\- ]/,Et=/^[^;, "\t\n\r=\-><:{[]/,nr=/^[ \t]/,rr=/^[\r\n]/,lr=/^[^\r\n]/,ar=O("statemachine"),fe=A(",",!1),Y=A(";",!1),or=O("state"),St=A("[",!1),Tt=A("]",!1),kt=A(":",!1),te=A("{",!1),ir=A("}",!1),sr=O("extended state attributes"),cr=O("extended state attribute"),J=A("=",!1),ur=O("state attribute name"),fr=A("label",!0),At=A("color",!0),mr=O("class attribute"),pr=A("class",!0),dr=O("state flag"),hr=A("active",!0),gr=O("state type"),wt=A("type",!0),yr=O("state type type"),vr=A("regular",!1),br=A("initial",!1),xr=A("terminate",!1),$r=A("final",!1),Ir=A("parallel",!1),Er=A("history",!1),Sr=A("deephistory",!1),Tr=A("choice",!1),kr=A("forkjoin",!1),Ar=A("fork",!1),wr=A("join",!1),Cr=A("junction",!1),Or=O("transition"),Pr=O("extended transition attributes"),jr=O("extended transition attribute"),_r=O("transition attribute name"),Fr=O("transition type name"),Rr=O("numeric transition attribute name"),Nr=A("width",!0),Vr=O("transition type value"),Lr=A("external",!1),Br=A("internal",!1),Hr=O("left to right arrow"),qr=A("->",!1),Dr=A("=>>",!1),Mr=A("=>",!1),zr=A(">>",!1),Ur=A(":>",!1),Jr=A("--",!1),Xr=A("==",!1),Gr=O("right to left arrow"),Wr=A("<-",!1),Qr=A("<<=",!1),Yr=A("<=",!1),Zr=A("<<",!1),Kr=A("<:",!1),el=A("#",!1),tl=A(".",!1),Ct=Z([["0","9"]],!1,!1),nl=O("double quoted string"),M=A('"',!1),Ot=A('\\"',!1),X=ea(),rl=O("valid class string"),Pt=Z([["a","z"],["A","Z"],["0","9"],"_","-"," "],!1,!1),ll=O("identifier"),jt=Z([";",","," ",'"'," ",`
73
+ `,"\r","=","-",">","<",":","{","["],!0,!1),al=O("whitespace"),ol=Z([" "," "],!1,!1),il=O("line end"),sl=Z(["\r",`
74
+ `],!1,!1),cl=A("/*",!1),_t=A("*/",!1),ul=A("//",!1),fl=Z(["\r",`
75
+ `],!0,!1),ml=O("comment"),pl=function(r){return r.states=j.extractUndeclaredStates(r),j.classifyForkJoins(r)},dl=function(r,i){let g={};return j.setIf(g,"states",r),j.setIfNotEmpty(g,"transitions",i),g},Ft=function(r){return r},hl=function(r){return r},gl=function(r){return j.uniq(r[0].concat(r[1]),j.stateEqual)},yl=function(r,i,g){return g},vl=function(r,i,g,h){return h},bl=function(r,i,g,h,E){return E},xl=function(r,i,g,h,E){let k=j.initState(i);return(g||[]).forEach(w=>j.setIf(k,w.name,w.value)),j.setIf(k,"typeExplicitlySet",(g||[]).some(w=>w.typeExplicitlySet)),j.setIf(k,"statemachine",E),j.setIfNotEmpty(k,"note",r),Boolean(h)&&j.setIfNotEmpty(k,"actions",j.extractActions(h)),k},$l=function(r,i){return{name:r,value:i}},Il=function(r,i){return{name:r,value:i}},El=function(r){return{name:r,value:!0}},Sl=function(r,i){return{name:r,value:i,typeExplicitlySet:!0}},Tl=function(r){return r.toLowerCase()},kl=function(r){return r.toLowerCase()},Al=function(r){return r.toLowerCase()},wl=function(r){return r.toLowerCase()},Cl=function(r,i,g){return g},Ol=function(r,i,g,h){return h},Pl=function(r,i,g,h){return h&&(i.label=h,i=Object.assign(i,j.parseTransitionExpression(h))),(g||[]).forEach(E=>j.setIf(i,E.name,E.value)),j.setIfNotEmpty(i,"note",r),i},jl=function(r,i){return{from:r,to:i}},_l=function(r,i){return{from:i,to:r}},Fl=function(r,i){return{name:r,value:i}},Rl=function(r,i){return{name:r,value:i}},Nl=function(r,i){return{name:r,value:i}},Vl=function(r,i){return{name:r,value:i}},Ll=function(r){return r.toLowerCase()},Bl=function(r){return r.toLowerCase()},Hl=function(r){return r},ql=function(r){return r.join("").trim()},Dl=function(r){return parseFloat(r.join(""))},Ml=function(r){return parseInt(r.join(""),10)},zl=function(r){return r.join("").replace(/\\\"/g,'"')},Rt=function(r){return r},Ul=function(r){return r.join("")},Nt=function(r){return r},Jl=function(r){return r.join("").trim()},Xl=function(r){return r.join("").trim()},Vt=function(r){return r},Lt=function(r){return r},Gl=function(r){return r.join("")},Wl=function(r){return r},Ql=function(r){return r},Yl=function(r){return r},Zl=function(r,i,g){return r+i.join("")+g},Kl=function(r,i){return r+i.join("")},o=0,S=0,me=[{line:1,column:1}],B=0,Ee=[],y=0,pe;if("startRule"in e){if(!(e.startRule in l))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');u=l[e.startRule]}function _i(){return t.substring(S,o)}function Fi(){return S}function Ri(){return{source:d,start:S,end:o}}function Ni(){return ne(S,o)}function Vi(r,i){throw i=i!==void 0?i:ne(S,o),Ht([O(r)],t.substring(S,o),i)}function Li(r,i){throw i=i!==void 0?i:ne(S,o),na(r,i)}function A(r,i){return{type:"literal",text:r,ignoreCase:i}}function Z(r,i,g){return{type:"class",parts:r,inverted:i,ignoreCase:g}}function ea(){return{type:"any"}}function ta(){return{type:"end"}}function O(r){return{type:"other",description:r}}function Bt(r){var i=me[r],g;if(i)return i;for(g=r-1;!me[g];)g--;for(i=me[g],i={line:i.line,column:i.column};g<r;)t.charCodeAt(g)===10?(i.line++,i.column=1):i.column++,g++;return me[r]=i,i}function ne(r,i){var g=Bt(r),h=Bt(i);return{source:d,start:{offset:r,line:g.line,column:g.column},end:{offset:i,line:h.line,column:h.column}}}function $(r){o<B||(o>B&&(B=o,Ee=[]),Ee.push(r))}function na(r,i){return new W(r,null,null,i)}function Ht(r,i,g){return new W(W.buildMessage(r,i),r,i,g)}function qt(){var r,i,g,h;return r=o,i=T(),g=Dt(),h=T(),S=r,r=pl(g),r}function Dt(){var r,i,g,h;for(y++,r=o,i=ra(),i===n&&(i=null),g=[],h=Ut();h!==n;)g.push(h),h=Ut();return S=r,r=dl(i,g),y--,i=n,y===0&&$(ar),r}function ra(){var r,i,g,h,E,k;for(r=o,i=o,g=[],h=o,E=Se(),E!==n?(t.charCodeAt(o)===44?(k=s,o++):(k=n,y===0&&$(fe)),k!==n?(S=h,h=Ft(E)):(o=h,h=n)):(o=h,h=n);h!==n;)g.push(h),h=o,E=Se(),E!==n?(t.charCodeAt(o)===44?(k=s,o++):(k=n,y===0&&$(fe)),k!==n?(S=h,h=Ft(E)):(o=h,h=n)):(o=h,h=n);return h=o,E=Se(),E!==n?(t.charCodeAt(o)===59?(k=f,o++):(k=n,y===0&&$(Y)),k!==n?(S=h,h=hl(E)):(o=h,h=n)):(o=h,h=n),h!==n?(g=[g,h],i=g):(o=i,i=n),i!==n&&(S=r,i=gl(i)),r=i,r}function Se(){var r,i,g,h,E,k,w,C,H,F,G,Zt,ke,ja,Ae;for(y++,r=o,i=[],g=de();g!==n;)i.push(g),g=de();return g=T(),h=le(),h!==n?(E=T(),k=o,t.charCodeAt(o)===91?(w=v,o++):(w=n,y===0&&$(St)),w!==n?(C=la(),t.charCodeAt(o)===93?(H=m,o++):(H=n,y===0&&$(Tt)),H!==n?(S=k,k=yl(i,h,C)):(o=k,k=n)):(o=k,k=n),k===n&&(k=null),w=T(),C=o,t.charCodeAt(o)===58?(H=p,o++):(H=n,y===0&&$(kt)),H!==n?(F=T(),G=xa(),G!==n?(Zt=T(),S=C,C=vl(i,h,k,G)):(o=C,C=n)):(o=C,C=n),C===n&&(C=null),H=T(),F=o,t.charCodeAt(o)===123?(G=a,o++):(G=n,y===0&&$(te)),G!==n?(Zt=T(),ke=Dt(),ke!==n?(ja=T(),t.charCodeAt(o)===125?(Ae=b,o++):(Ae=n,y===0&&$(ir)),Ae!==n?(S=F,F=bl(i,h,k,C,ke)):(o=F,F=n)):(o=F,F=n)):(o=F,F=n),F===n&&(F=null),G=T(),S=r,r=xl(i,h,k,C,F)):(o=r,r=n),y--,r===n&&(i=n,y===0&&$(or)),r}function la(){var r,i;for(y++,r=[],i=Mt();i!==n;)r.push(i),i=Mt();return y--,i=n,y===0&&$(sr),r}function Mt(){var r,i,g,h,E,k,w,C;return y++,r=o,i=T(),g=aa(),g!==n?(h=T(),t.charCodeAt(o)===61?(E=c,o++):(E=n,y===0&&$(J)),E!==n?(k=T(),w=re(),w!==n?(C=T(),S=r,r=$l(g,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,i=T(),g=zt(),g!==n?(h=T(),t.charCodeAt(o)===61?(E=c,o++):(E=n,y===0&&$(J)),E!==n?(k=T(),w=Xt(),w!==n?(C=T(),S=r,r=Il(g,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,i=T(),g=oa(),g!==n?(h=T(),S=r,r=El(g)):(o=r,r=n),r===n&&(r=o,i=T(),g=ia(),g!==n?(h=T(),t.charCodeAt(o)===61?(E=c,o++):(E=n,y===0&&$(J)),E!==n?(k=T(),w=sa(),w!==n?(C=T(),S=r,r=Sl(g,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n)))),y--,r===n&&(i=n,y===0&&$(cr)),r}function aa(){var r,i;return y++,r=o,t.substr(o,5).toLowerCase()===I?(i=t.substr(o,5),o+=5):(i=n,y===0&&$(fr)),i===n&&(t.substr(o,5).toLowerCase()===x?(i=t.substr(o,5),o+=5):(i=n,y===0&&$(At))),i!==n&&(S=r,i=Tl(i)),r=i,y--,r===n&&(i=n,y===0&&$(ur)),r}function zt(){var r,i;return y++,r=o,t.substr(o,5).toLowerCase()===V?(i=t.substr(o,5),o+=5):(i=n,y===0&&$(pr)),i!==n&&(S=r,i=kl(i)),r=i,y--,r===n&&(i=n,y===0&&$(mr)),r}function oa(){var r,i;return y++,r=o,t.substr(o,6).toLowerCase()===L?(i=t.substr(o,6),o+=6):(i=n,y===0&&$(hr)),i!==n&&(S=r,i=Al(i)),r=i,y--,r===n&&(i=n,y===0&&$(dr)),r}function ia(){var r,i;return y++,r=o,t.substr(o,4).toLowerCase()===Je?(i=t.substr(o,4),o+=4):(i=n,y===0&&$(wt)),i!==n&&(S=r,i=wl(i)),r=i,y--,r===n&&(i=n,y===0&&$(gr)),r}function sa(){var r,i;return y++,t.substr(o,7)===Xe?(r=Xe,o+=7):(r=n,y===0&&$(vr)),r===n&&(t.substr(o,7)===Ge?(r=Ge,o+=7):(r=n,y===0&&$(br)),r===n&&(t.substr(o,9)===We?(r=We,o+=9):(r=n,y===0&&$(xr)),r===n&&(t.substr(o,5)===Qe?(r=Qe,o+=5):(r=n,y===0&&$($r)),r===n&&(t.substr(o,8)===Ye?(r=Ye,o+=8):(r=n,y===0&&$(Ir)),r===n&&(t.substr(o,7)===Ze?(r=Ze,o+=7):(r=n,y===0&&$(Er)),r===n&&(t.substr(o,11)===Ke?(r=Ke,o+=11):(r=n,y===0&&$(Sr)),r===n&&(t.substr(o,6)===et?(r=et,o+=6):(r=n,y===0&&$(Tr)),r===n&&(t.substr(o,8)===tt?(r=tt,o+=8):(r=n,y===0&&$(kr)),r===n&&(t.substr(o,4)===nt?(r=nt,o+=4):(r=n,y===0&&$(Ar)),r===n&&(t.substr(o,4)===rt?(r=rt,o+=4):(r=n,y===0&&$(wr)),r===n&&(t.substr(o,8)===lt?(r=lt,o+=8):(r=n,y===0&&$(Cr))))))))))))),y--,r===n&&(i=n,y===0&&$(yr)),r}function Ut(){var r,i,g,h,E,k,w,C,H;for(y++,r=o,i=[],g=de();g!==n;)i.push(g),g=de();return g=ca(),g!==n?(h=o,t.charCodeAt(o)===91?(E=v,o++):(E=n,y===0&&$(St)),E!==n?(k=ua(),t.charCodeAt(o)===93?(w=m,o++):(w=n,y===0&&$(Tt)),w!==n?(C=T(),S=h,h=Cl(i,g,k)):(o=h,h=n)):(o=h,h=n),h===n&&(h=null),E=o,t.charCodeAt(o)===58?(k=p,o++):(k=n,y===0&&$(kt)),k!==n?(w=T(),C=ba(),C!==n?(H=T(),S=E,E=Ol(i,g,h,C)):(o=E,E=n)):(o=E,E=n),E===n&&(E=null),t.charCodeAt(o)===59?(k=f,o++):(k=n,y===0&&$(Y)),k!==n?(S=r,r=Pl(i,g,h,E)):(o=r,r=n)):(o=r,r=n),y--,r===n&&(i=n,y===0&&$(Or)),r}function ca(){var r,i,g,h,E,k,w,C;return r=o,i=T(),g=le(),g!==n?(h=T(),E=ha(),E!==n?(k=T(),w=le(),w!==n?(C=T(),S=r,r=jl(g,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,i=T(),g=le(),g!==n?(h=T(),E=ga(),E!==n?(k=T(),w=le(),w!==n?(C=T(),S=r,r=_l(g,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n)),r}function ua(){var r,i;for(y++,r=[],i=Jt();i!==n;)r.push(i),i=Jt();return y--,i=n,y===0&&$(Pr),r}function Jt(){var r,i,g,h,E,k,w,C;return y++,r=o,i=T(),g=fa(),g!==n?(h=T(),t.charCodeAt(o)===61?(E=c,o++):(E=n,y===0&&$(J)),E!==n?(k=T(),w=re(),w!==n?(C=T(),S=r,r=Fl(g,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,i=T(),g=zt(),g!==n?(h=T(),t.charCodeAt(o)===61?(E=c,o++):(E=n,y===0&&$(J)),E!==n?(k=T(),w=Xt(),w!==n?(C=T(),S=r,r=Rl(g,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,i=T(),g=ma(),g!==n?(h=T(),t.charCodeAt(o)===61?(E=c,o++):(E=n,y===0&&$(J)),E!==n?(k=T(),w=da(),w!==n?(C=T(),S=r,r=Nl(g,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,i=T(),g=pa(),g!==n?(h=T(),t.charCodeAt(o)===61?(E=c,o++):(E=n,y===0&&$(J)),E!==n?(k=T(),w=ya(),w!==n?(C=T(),S=r,r=Vl(g,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n)))),y--,r===n&&(i=n,y===0&&$(jr)),r}function fa(){var r,i;return y++,r=o,t.substr(o,5).toLowerCase()===x?(i=t.substr(o,5),o+=5):(i=n,y===0&&$(At)),i!==n&&(S=r,i=Ll(i)),r=i,y--,r===n&&(i=n,y===0&&$(_r)),r}function ma(){var r,i;return y++,r=o,t.substr(o,4).toLowerCase()===Je?(i=t.substr(o,4),o+=4):(i=n,y===0&&$(wt)),i!==n&&(S=r,i=Bl(i)),r=i,y--,r===n&&(i=n,y===0&&$(Fr)),r}function pa(){var r,i;return y++,r=o,t.substr(o,5).toLowerCase()===Kn?(i=t.substr(o,5),o+=5):(i=n,y===0&&$(Nr)),i!==n&&(S=r,i=Hl(i)),r=i,y--,r===n&&(i=n,y===0&&$(Rr)),r}function da(){var r,i;return y++,t.substr(o,8)===at?(r=at,o+=8):(r=n,y===0&&$(Lr)),r===n&&(t.substr(o,8)===ot?(r=ot,o+=8):(r=n,y===0&&$(Br))),y--,r===n&&(i=n,y===0&&$(Vr)),r}function ha(){var r,i;return y++,t.substr(o,2)===it?(r=it,o+=2):(r=n,y===0&&$(qr)),r===n&&(t.substr(o,3)===st?(r=st,o+=3):(r=n,y===0&&$(Dr)),r===n&&(t.substr(o,2)===ct?(r=ct,o+=2):(r=n,y===0&&$(Mr)),r===n&&(t.substr(o,2)===ut?(r=ut,o+=2):(r=n,y===0&&$(zr)),r===n&&(t.substr(o,2)===ft?(r=ft,o+=2):(r=n,y===0&&$(Ur)),r===n&&(t.substr(o,2)===mt?(r=mt,o+=2):(r=n,y===0&&$(Jr)),r===n&&(t.substr(o,2)===pt?(r=pt,o+=2):(r=n,y===0&&$(Xr)))))))),y--,r===n&&(i=n,y===0&&$(Hr)),r}function ga(){var r,i;return y++,t.substr(o,2)===dt?(r=dt,o+=2):(r=n,y===0&&$(Wr)),r===n&&(t.substr(o,3)===ht?(r=ht,o+=3):(r=n,y===0&&$(Qr)),r===n&&(t.substr(o,2)===gt?(r=gt,o+=2):(r=n,y===0&&$(Yr)),r===n&&(t.substr(o,2)===yt?(r=yt,o+=2):(r=n,y===0&&$(Zr)),r===n&&(t.substr(o,2)===vt?(r=vt,o+=2):(r=n,y===0&&$(Kr)))))),y--,r===n&&(i=n,y===0&&$(Gr)),r}function de(){var r,i,g,h,E;if(r=o,i=T(),t.charCodeAt(o)===35?(g=er,o++):(g=n,y===0&&$(el)),g!==n){for(h=[],E=he();E!==n;)h.push(E),E=he();S=r,r=ql(h)}else o=r,r=n;return r}function ya(){var r;return r=va(),r===n&&(r=Te()),r}function va(){var r,i,g,h,E;return r=o,i=o,g=Te(),g!==n?(t.charCodeAt(o)===46?(h=tr,o++):(h=n,y===0&&$(tl)),h!==n?(E=Te(),E!==n?(g=[g,h,E],i=g):(o=i,i=n)):(o=i,i=n)):(o=i,i=n),i!==n&&(S=r,i=Dl(i)),r=i,r}function Te(){var r,i,g;if(r=o,i=[],$t.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&$(Ct)),g!==n)for(;g!==n;)i.push(g),$t.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&$(Ct));else i=n;return i!==n&&(S=r,i=Ml(i)),r=i,r}function ba(){var r;return r=re(),r===n&&(r=Ea()),r}function xa(){var r;return r=re(),r===n&&(r=Sa()),r}function re(){var r,i,g,h;return y++,r=o,t.charCodeAt(o)===34?(i=D,o++):(i=n,y===0&&$(M)),i!==n?(g=$a(),t.charCodeAt(o)===34?(h=D,o++):(h=n,y===0&&$(M)),h!==n?(S=r,r=zl(g)):(o=r,r=n)):(o=r,r=n),y--,r===n&&(i=n,y===0&&$(nl)),r}function $a(){var r,i,g,h;for(r=[],i=o,g=o,y++,t.charCodeAt(o)===34?(h=D,o++):(h=n,y===0&&$(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&&$(Ot)),h===n&&(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&$(X))),h!==n?(S=i,i=Rt(h)):(o=i,i=n)):(o=i,i=n);i!==n;)r.push(i),i=o,g=o,y++,t.charCodeAt(o)===34?(h=D,o++):(h=n,y===0&&$(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&&$(Ot)),h===n&&(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&$(X))),h!==n?(S=i,i=Rt(h)):(o=i,i=n)):(o=i,i=n);return r}function Xt(){var r,i,g,h;return y++,r=o,t.charCodeAt(o)===34?(i=D,o++):(i=n,y===0&&$(M)),i!==n?(g=Ia(),t.charCodeAt(o)===34?(h=D,o++):(h=n,y===0&&$(M)),h!==n?(S=r,r=Ul(g)):(o=r,r=n)):(o=r,r=n),y--,r===n&&(i=n,y===0&&$(rl)),r}function Ia(){var r,i,g,h;for(r=[],i=o,g=o,y++,t.charCodeAt(o)===34?(h=D,o++):(h=n,y===0&&$(M)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(It.test(t.charAt(o))?(h=t.charAt(o),o++):(h=n,y===0&&$(Pt)),h!==n?(S=i,i=Nt(h)):(o=i,i=n)):(o=i,i=n);i!==n;)r.push(i),i=o,g=o,y++,t.charCodeAt(o)===34?(h=D,o++):(h=n,y===0&&$(M)),y--,h===n?g=void 0:(o=g,g=n),g!==n?(It.test(t.charAt(o))?(h=t.charAt(o),o++):(h=n,y===0&&$(Pt)),h!==n?(S=i,i=Nt(h)):(o=i,i=n)):(o=i,i=n);return r}function Ea(){var r,i;return r=o,i=ka(),S=r,i=Jl(i),r=i,r}function Sa(){var r,i;return r=o,i=Ta(),S=r,i=Xl(i),r=i,r}function Ta(){var r,i,g,h;for(r=[],i=o,g=o,y++,t.charCodeAt(o)===44?(h=s,o++):(h=n,y===0&&$(fe)),h===n&&(t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&$(Y)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&$(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)),h!==n?(S=i,i=Vt(h)):(o=i,i=n)):(o=i,i=n);i!==n;)r.push(i),i=o,g=o,y++,t.charCodeAt(o)===44?(h=s,o++):(h=n,y===0&&$(fe)),h===n&&(t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&$(Y)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&$(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)),h!==n?(S=i,i=Vt(h)):(o=i,i=n)):(o=i,i=n);return r}function ka(){var r,i,g,h;for(r=[],i=o,g=o,y++,t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&$(Y)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&$(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)),h!==n?(S=i,i=Lt(h)):(o=i,i=n)):(o=i,i=n);i!==n;)r.push(i),i=o,g=o,y++,t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&$(Y)),h===n&&(t.charCodeAt(o)===123?(h=a,o++):(h=n,y===0&&$(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)),h!==n?(S=i,i=Lt(h)):(o=i,i=n)):(o=i,i=n);return r}function le(){var r,i,g;if(y++,r=o,i=[],Et.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&$(jt)),g!==n)for(;g!==n;)i.push(g),Et.test(t.charAt(o))?(g=t.charAt(o),o++):(g=n,y===0&&$(jt));else i=n;return i!==n&&(S=r,i=Gl(i)),r=i,r===n&&(r=re()),y--,r===n&&(i=n,y===0&&$(ll)),r}function Gt(){var r,i;return y++,r=o,nr.test(t.charAt(o))?(i=t.charAt(o),o++):(i=n,y===0&&$(ol)),i!==n&&(S=r,i=Wl(i)),r=i,y--,r===n&&(i=n,y===0&&$(al)),r}function Wt(){var r,i;return y++,r=o,rr.test(t.charAt(o))?(i=t.charAt(o),o++):(i=n,y===0&&$(sl)),i!==n&&(S=r,i=Ql(i)),r=i,y--,r===n&&(i=n,y===0&&$(il)),r}function Aa(){var r;return t.substr(o,2)===bt?(r=bt,o+=2):(r=n,y===0&&$(cl)),r}function wa(){var r;return t.substr(o,2)===ue?(r=ue,o+=2):(r=n,y===0&&$(_t)),r}function Qt(){var r,i,g;return r=o,i=o,y++,t.substr(o,2)===ue?(g=ue,o+=2):(g=n,y===0&&$(_t)),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)),g!==n?(S=r,r=Yl(g)):(o=r,r=n)):(o=r,r=n),r}function Ca(){var r,i,g,h;if(r=o,i=Aa(),i!==n){for(g=[],h=Qt();h!==n;)g.push(h),h=Qt();h=wa(),h!==n?(S=r,r=Zl(i,g,h)):(o=r,r=n)}else o=r,r=n;return r}function Oa(){var r;return t.substr(o,2)===xt?(r=xt,o+=2):(r=n,y===0&&$(ul)),r}function he(){var r;return lr.test(t.charAt(o))?(r=t.charAt(o),o++):(r=n,y===0&&$(fl)),r}function Pa(){var r,i,g,h;if(r=o,i=Oa(),i!==n){for(g=[],h=he();h!==n;)g.push(h),h=he();S=r,r=Kl(i,g)}else o=r,r=n;return r}function Yt(){var r,i;return y++,r=Pa(),r===n&&(r=Ca()),y--,r===n&&(i=n,y===0&&$(ml)),r}function T(){var r,i;for(r=[],i=Gt(),i===n&&(i=Wt(),i===n&&(i=Yt()));i!==n;)r.push(i),i=Gt(),i===n&&(i=Wt(),i===n&&(i=Yt()));return r}if(pe=u(),pe!==n&&o===t.length)return pe;throw pe!==n&&o<t.length&&$(ta()),Ht(Ee,B<t.length?t.charAt(B):null,B<t.length?ne(B,B+1):ne(B,B))}var Pe=_(require("fast-xml-parser"),1),Q=_(require("he"),1),ve=_(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=_(require("lodash/castArray.js"),1);function to(t,e){let n={id:e?`${e}.initial`:"initial"};return t.transition&&Object.assign(n,{transition:[t.transition]}),n}function no(t){return{id:"initial",transition:[{target:t}]}}function ro(t){let e=[];return t.initial&&(typeof t.initial=="string"?e.push(no(t.initial)):e.push(to(t.initial,t.id))),e}function mn(t){return{...t,initial:ro(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 lo=ye.formatLabel;function pn(t,e){return(0,ve.default)(t[e]).map(n=>({type:e==="onexit"?"exit":"entry",body:Q.default.decode(n).trim()}))}function ao(t){return(0,ve.default)(t).map(e=>({type:"activity",body:Q.default.decode(e.id||"").trim()||Q.default.decode(e||"").trim()}))}function oo(t){let e=[];return t.onentry&&(e=e.concat(pn(t,"onentry"))),t.invoke&&(e=e.concat(ao(t.invoke))),t.onexit&&(e=e.concat(pn(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 j.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=dn(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=Q.default.decode(t["#text"]).trim()),t.type&&(e.type=t.type),e}function co(t){let e={};typeof t=="string"?e.action=Q.default.decode(t).trim():Object.assign(e,so(t));let n=lo(e.event,e.cond,e.action);return n&&(e.label=n),e}function uo(t){return(e,n)=>{let d=((n==null?void 0:n.target)??t.id).split(/\s+/),l=co(n);return e.concat(d.map(u=>({from:t.id,to:u,...l})))}}function Oe(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 dn(t){let e=mn(t),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")))},d=Oe(e.initial).concat(Oe(e.state)).concat(Oe(e.parallel));return d.length>0&&(n.transitions=d),n}function hn(t){let e=t.trim();if(Pe.default.validate(e)===!0){let n=Pe.default.parse(e,{attributeNamePrefix:"",ignoreAttributes:!1,tagValueProcessor:d=>Q.default.decode(d),stopNodes:["onentry","onexit","transition"]});return dn((n==null?void 0:n.scxml)??{xmlns:"http://www.w3.org/2005/07/scxml",version:"1.0"})}throw new Error(`That doesn't look like valid xml ...
77
+ `)}var gn={$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 yn=new vn.default;function fo(t,e){if(!yn.validate(t,e))throw new Error(`The provided JSON is not a valid state-machine-cat AST: ${yn.errorsText()}.
78
+ `)}var bn={getAST(t,e){let n=t;return R.getOptionValue(e,"inputType")==="smcat"?n=fn(t):R.getOptionValue(e,"inputType")==="scxml"?n=hn(t):typeof t=="string"&&(n=JSON.parse(t)),fo(gn,n),n}};var _e=_(require("lodash/cloneDeep.js"),1),je=_(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,l)=>(e.forEach((u,s)=>{u===l.to&&n[u]?d=d.concat(n[u].map(f=>po(l,f))):d=s===0?d.concat(l):d}),d),[])}function xn(t,e,n){let d=(0,_e.default)(t);return d.transitions&&e.length>0&&(d.transitions=ho(d.transitions,e,n)),d.states=d.states.map(l=>l.statemachine?{...l,statemachine:xn(l.statemachine,e,n)}:l),d}function $n(t,e){let n=(0,_e.default)(t);return n.transitions&&(n.transitions=(0,je.default)(n.transitions,d=>e.some(l=>l===d.from||l===d.to))),n.states=(0,je.default)(n.states,d=>e.includes(d.name)).map(d=>d.statemachine?{...d,statemachine:$n(d.statemachine,e)}:d),n}var In=(t,e=["fork","junction","choice"])=>{let n=new N(t),d=n.findStatesByTypes(e).map(({name:s})=>s),l=d.reduce((s,f)=>(s[f]=n.findTransitionsByFrom(f),s),{}),u=xn(t,d,l);return $n(u,d)};var Xn=_(require("lodash/has.js"),1),Gn=_(An(),1);var Fn=_(require("lodash/cloneDeep.js"),1);var ko=[{name:"fontname",value:'"Helvetica"'},{name:"fontsize",value:"12"},{name:"penwidth",value:"2.0"}],Ao={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"}]},wo={"bottom-top":[{name:"rankdir",value:"BT"}],"left-right":[{name:"rankdir",value:"LR"}],"right-left":[{name:"rankdir",value:"RL"}]},Co=[{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"}],Oo=[{name:"fontname",value:"Helvetica"},{name:"fontsize",value:10}];function Ne(t){return`${t.name}=${t.value}`}var be={buildGraphAttributes:(t,e,n)=>ko.concat(Ao[t]||[]).concat(wo[e]||[]).concat(n||[]).map(Ne).join(" "),buildNodeAttributes:t=>Co.concat(t||[]).map(Ne).join(" "),buildEdgeAttributes:t=>Oo.concat(t||[]).map(Ne).join(" ")};var wn=_(require("lodash/cloneDeep.js"),1);function Po(t){return t.replace(/\\/g,"\\\\").replace(/\n\s*/g,"\\l").replace(/"/g,'\\"').concat("\\l")}function jo(t){return t.replace(/\\/g,"\\\\").replace(/\n\s*/g," \\l").replace(/"/g,'\\"').concat(" \\l")}function _o(t){let e=t||"top-down";return e==="top-down"||e==="bottom-top"}function Fo(t,e){return e.from===e.to&&t.findStateByName(e.from).statemachine&&e.type!=="internal"}var q={escapeString:Po,escapeLabelString:jo,isVertical:_o,isCompositeSelf:Fo};function Cn(t){return e=>e.type===t}function Ve(t){return e=>t.includes(e.type)}function Ro(t){let e=(0,wn.default)(t);return e.label=t.label||t.name,e}function No(t){return t.note?{noteName:`note_${t.name}`,...t}:t}function Vo(t){let e={...t},n=["state",t.type];return t.class&&n.push(t.class.trim().replace(/[ ]{2,}/g," ")),e.class=n.join(" "),e}function Lo(t){return t==="activity"?"":`${t}/ `}function Bo(t){return t.actions?{...t,actionStrings:t.actions.map(e=>`${Lo(e.type)}${e.body}`)}:t}function Ho(t){return t.note?{...t,noteFlattened:t.note.join("")}:t}function qo(t){return e=>{var d;let n=(d=(t||[]).find(l=>l.name==="color"))==null?void 0:d.value;return n&&!e.color&&Ve(["initial","fork","join","junction","forkjoin","final"])(e)&&(e.color=n),e}}function Do(t){return t.note?{...t,note:t.note.map(q.escapeString)}:t}function Mo(t){return e=>Ve(["fork","join","forkjoin"])(e)?{sizingExtras:q.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=>Cn("regular")(e)?{...e,parentIsParallel:!0}:e)),t}var P={isType:Cn,isOneOfTypes:Ve,setLabel:Ro,classifyState:Vo,nameNote:No,flattenActions:Bo,flattenNote:Ho,recolor:qo,escapeStateStrings:Do,tipForkJoinStates:Mo,flagParallelChildren:zo};function Uo(t){let e={...t};return e.note&&(e.note=e.note.map(q.escapeString)),e.label&&(e.label=q.escapeLabelString(e.label)),e}function Jo(t){return e=>{let n={};return e.isCompositeSelf&&(q.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 xe={escapeTransitionStrings:Uo,addPorts:Jo,classifyTransition:Xo};var ie=class{COUNTER=0;constructor(){this.reset()}reset(){this.COUNTER=0}next(){return++this.COUNTER}nextAsString(){return this.next().toString(10)}};var Rn=_(_n(),1);function ei(t){return e=>(Object.prototype.hasOwnProperty.call(e,"statemachine")&&(e.nestedExternalSelfTransitions=t.findExternalSelfTransitions(e.name).map(n=>n.name)),e)}function Nn(t,e,n,d){return t.filter(l=>l.statemachine).forEach(l=>{l.statemachine.states=Nn(l.statemachine.states,e,n,d)}),t.map(P.setLabel).map(P.nameNote).map(P.classifyState).map(P.escapeStateStrings).map(P.flattenNote).map(P.flattenActions).map(P.flagParallelChildren).map(P.tipForkJoinStates(e)).map(P.recolor(n)).map(ei(d))}function ti(t){return t.initialStates=t.states.filter(P.isType("initial")),t.regularStates=t.states.filter(e=>P.isType("regular")(e)&&!e.statemachine),t.historyStates=t.states.filter(P.isType("history")),t.deepHistoryStates=t.states.filter(P.isType("deephistory")),t.choiceStates=t.states.filter(P.isType("choice")),t.forkjoinStates=t.states.filter(P.isOneOfTypes(["fork","join","forkjoin"])),t.junctionStates=t.states.filter(P.isType("junction")),t.terminateStates=t.states.filter(P.isType("terminate")),t.finalStates=t.states.filter(P.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 ri(t){return e=>{let n={};return q.isCompositeSelf(t,e)&&(t.findStateByName(e.from).hasParent?n={hasParent:!0,isCompositeSelf:!0}:n={isCompositeSelf:!0}),{...e,...n}}}function li(t){return e=>(e.name=`tr_${e.from}_${e.to}_${t.nextAsString()}`,Boolean(e.note)&&(e.noteName=`note_${e.name}`),e)}function ai(t,e,n){return t.flattenedTransitions.map(li(n)).map(xe.escapeTransitionStrings).map(xe.classifyTransition).map(P.flattenNote).map(ni(t)).map(ri(t)).map(xe.addPorts(e))}var $e=(t,e)=>{e=e||{};let n=(0,Fn.default)(t),d=new N(n);return n.transitions=ai(d,e.direction,new ie),n.states=Nn(n.states,e.direction,e.dotNodeAttrs,d),n=ti(n),n.graphAttributes=be.buildGraphAttributes(R.getOptionValue(e,"engine"),R.getOptionValue(e,"direction"),e.dotGraphAttrs),n.nodeAttributes=be.buildNodeAttributes(e.dotNodeAttrs),n.edgeAttributes=be.buildEdgeAttributes(e.dotEdgeAttrs),(0,Rn.default)(n)};var Vn=_(require("viz.js"),1);var oi={oldsvg:"svg",oldps2:"ps2",oldeps:"eps"},ii=(t,e)=>(0,Vn.default)($e(t,e),{engine:R.getOptionValue(e,"engine"),format:oi[R.getOptionValue(e,"outputType")]||"svg"}),He=ii;var si=/[\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,ci=/[-|.|0-9|\u00B7|\u0300-\u036F|\u203F-\u2040]/g;function Ln(t){return t.replace(si,"_")}function ui(t){let e=Ln(t);return e.match(ci)&&(e=`_${t}`),e}var Ie=t=>(t=t||"",t.length===0?"__empty":ui(t[0]).concat(Ln(t.slice(1))));var fi=/[\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,mi=/[.]/g;function Bn(t){return t.replace(fi,"_")}function pi(t){let e=Bn(t);return e.match(mi)&&(e=`_${t}`),e}function di(t){return t=t.replace(/\s+/g," ").trim(),pi(t[0]).concat(Bn(t.slice(1)))}var Hn=t=>{let e=t||"";return e.length===0?"empty":e.split(/[\n\r]+/).filter(n=>n.length>0).map(di).join(" ")};var hi={regular:"state",initial:"initial",final:"final",terminate:"final",parallel:"parallel",history:"history",deephistory:"history"};function gi(t){return hi[t]||"state"}function yi(t){let e={target:Ie(t.to)};return t.event&&(e.event=Hn(t.event)),t.cond&&(e.cond=t.cond),t.action&&(e.action=t.action),t.type&&(e.type=t.type),e}function vi(t,e){return t.filter(n=>n.type===e).map(n=>n.body)}function qe(t,e,n,d){let l=vi(n,d);l.length>0&&(t[e]=(t[e]||[]).concat(l))}function bi(t,e){e.actions&&(qe(t,"onentries",e.actions,"entry"),qe(t,"onentries",e.actions,"activity"),qe(t,"onexits",e.actions,"exit"))}function xi(t,e,n){let d=n.filter(l=>l.from===e.name).map(yi);d.length>0&&(t.transitions=d)}function $i(t,e,n){if(e.statemachine){let d=ee(e.statemachine,void 0,n);t.states=(t.states||[]).concat(d.states),d.initial&&(t.initial=d.initial)}}function Ii(t){return t=t||[],e=>{let n={kind:gi(e.type),id:Ie(e.name)};return e.type==="deephistory"&&(n.type="deep"),bi(n,e),xi(n,e,t),$i(n,e,t),n}}function Ei(t){let e=t.states.filter(n=>n.type==="initial");if(e.length>0)return e[0].name}function Si(t,e){let n=e;if(e&&t.transitions){let d=t.transitions.filter(l=>l.from===e);d.length>0&&!d[0].action&&(n=d[0].to)}return n}function ee(t,e,n){let d=Ei(t),l=Si(t,d),u={states:t.states.filter(s=>l&&l!==d?s.type!=="initial":!0).map(Ii(n||new N(t).flattenedTransitions))};return l&&(u.initial=Ie(l)),u}var Un=_(zn(),1),Ci=t=>(0,Un.default)(ee(t)),Jn=Ci;var Oi=Gn.default;function Ue(t){let e={smcat:Oi,dot:$e,svg:He,oldsvg:He,scjson:ee,scxml:Jn};return(0,Xn.default)(e,t)?e[t]:n=>n}var Wn="10.1.7";function Qn(t,e){let n=bn.getAST(t,e),d=R.getOptionValue(e,"desugar");return Ue(R.getOptionValue(e,"outputType"))(d?In(n):n,e)}var Yn=Wn;function Zn(){return R.getAllowedValues()}var Pi={render:Qn,version:Yn,getAllowedValues:Zn};