{"version":3,"sources":["https://lively-kernel.org/lively4/lively4-livelyenergy/src/components/demo/lively-petrinet-transition.js"],"names":["Morph","Helper","LivelyPetrinetTransition","initialize","componentId","getRandomId","windowTitle","registerButtons","inputLabel","get","addEventListener","evt","onLabelChange","label","value","parentTransition","lively","allParents","getAttribute","textLabel","setAttribute","graphicElement"],"mappings":";;;;;;AAAOA,W;;AACCC,Y,4CAAAA,M;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,YAAMC,wBAAN,SAAuCF,KAAvC,CAA6C;;AAG1DG,qBAAa;AACX,eAAKC,WAAL,GAAmBH,OAAOI,WAAP,EAAnB;AACA,eAAKC,WAAL,GAAmB,0BAAnB;AACA,eAAKC,eAAL;;AAEA,gBAAMC,aAAa,KAAKC,GAAL,CAAS,aAAT,CAAnB;;AAEA;;AAEAD,qBAAWE,gBAAX,CAA4B,QAA5B,EAAuCC,GAAD,IAAS,KAAKC,aAAL,CAAmBD,GAAnB,CAA/C;;AAEA;;AAEA,cAAI,KAAKE,KAAT,EAAgB;AACdL,uBAAWM,KAAX,GAAmB,KAAKD,KAAxB;AACD;AACF;;AAED,YAAIE,gBAAJ,GAAuB;AACrB,iBAAOC,OAAOC,UAAP,CAAkB,IAAlB,EAAwB,EAAxB,EAA4B,IAA5B,EAAkC,CAAlC,CAAP;AACD;;AAED,YAAIJ,KAAJ,GAAY;AACV,iBAAO,KAAKE,gBAAL,CAAsBG,YAAtB,CAAmC,OAAnC,CAAP;AACD;;AAED,YAAIL,KAAJ,CAAUM,SAAV,EAAqB;AACnB,eAAKJ,gBAAL,CAAsBK,YAAtB,CAAmC,OAAnC,EAA4CD,SAA5C;AACD;;AAEDP,sBAAcD,GAAd,EAAmB;AACjB,eAAKE,KAAL,GAAa,KAAKJ,GAAL,CAAS,aAAT,EAAwBK,KAArC;AACD;;AAMDO,yBAAiB;AACf,iBAAO,KAAKZ,GAAL,CAAS,aAAT,CAAP;AACD;;AA3CyD;;yBAAvCP,wB","file":"lively-petrinet-transition.js","sourcesContent":["import Morph from \"src/components/widgets/lively-morph.js\"\nimport {Helper} from \"src/components/demo/lively-petrinet-helper.js\"\n\nexport default class LivelyPetrinetTransition extends Morph {\n  \n\n  initialize() {\n    this.componentId = Helper.getRandomId();\n    this.windowTitle = \"LivelyPetrinetTransition\";\n    this.registerButtons();\n    \n    const inputLabel = this.get(\"#inputLabel\");\n    \n    // Register Listeners\n    \n    inputLabel.addEventListener(\"change\", (evt) => this.onLabelChange(evt));\n    \n    // Initialize Displayed Values\n        \n    if (this.label) {\n      inputLabel.value = this.label;\n    }\n  } \n  \n  get parentTransition() {\n    return lively.allParents(this, [], true)[2]\n  }\n  \n  get label() {\n    return this.parentTransition.getAttribute(\"label\");\n  }\n  \n  set label(textLabel) {\n    this.parentTransition.setAttribute(\"label\", textLabel);\n  }\n  \n  onLabelChange(evt) {\n    this.label = this.get(\"#inputLabel\").value;\n  }\n  \n  \n  \n  \n  \n  graphicElement() {\n    return this.get(\"#transition\");\n  }\n  \n}"]}