{"version":3,"sources":["https://lively-kernel.org/lively4/lively4-livelyenergy/src/components/demo/lively-simulation-code-view.js"],"names":["Morph","LivelySimulationCodeView","get","selector","shadowRoot","querySelector","getState","setState","state","getSnippet","execute","scope","isFocused","initializeState","initializeSnippet","snippet","getCell","getRootNode","highlight","cellRef","preCompile","code"],"mappings":"AAAA;;;;AAIA;;;;;;;;;;;;;;;;AAEOA,W;;;;;;;;;;;;;;;;;;;;;AAEQ,YAAMC,wBAAN,SAAuCD,KAAvC,CAA6C;;AAE1D;AACAE,YAAIC,QAAJ,EAAc;AAAA;;AACZ,gBAAM,EAAEC,UAAF,KAAiB,IAAvB;AACA,uGAAO,sGAAWC,aAAX,uFAAyBF,QAAzB,EAAP;AACD;;AAEDG,mBAAW;AACT,0GAAO,KAAKJ,GAAL,CAAS,QAAT,CAAP;AACD;;AAEDK,iBAASC,KAAT,EAAgB;AAAA;;AACd,0GAAO,KAAKN,GAAL,CAAS,QAAT,CAAP,gGAAmCM,KAAnC;AACD;;AAEDC,qBAAa;AACX,0GAAO,KAAKP,GAAL,CAAS,OAAT,CAAP;AACD;;AAEDQ,gBAAQC,KAAR,EAAe;AAAA;;AACb,0GAAO,KAAKT,GAAL,CAAS,OAAT,CAAP,+FAAiCS,KAAjC;AACD;;AAEDC,oBAAY;AACV,iBAAO,8FAAKV,GAAL,CAAS,QAAT,iHAAkC,KAAKA,GAAL,CAAS,OAAT,CAAlC,mBAAP;AACD;;AAEDW,wBAAgBL,KAAhB,EAAuB;AAAA;;AACrB,0GAAO,KAAKN,GAAL,CAAS,QAAT,CAAP,uGAA0CM,KAA1C;AACD;;AAEDM,0BAAkBC,OAAlB,EAA2B;AAAA;;AACzB,0GAAO,KAAKb,GAAL,CAAS,OAAT,CAAP,6GAA2Ca,OAA3C;AACD;;AAEDC,kBAAU;AACR,2GAAO,KAAKC,WAAL,EAAP;AACD;;AAEDC,kBAAUC,OAAV,EAAmB;AAAA;;AACjB,0GAAO,KAAKjB,GAAL,CAAS,OAAT,CAAP,qGAAmCiB,OAAnC;AACD;;AAEDC,qBAAa;AAAA;;AACX,gBAAMC,8EAAO,KAAKnB,GAAL,CAAS,OAAT,CAAP,CAAN;AACA,iBAAO,+LAAmB,oFAAKkB,UAAL,EAAnB,CAAP;AACD;;AA/CyD;;yBAAvCnB,wB","file":"lively-simulation-code-view.js","sourcesContent":["/*MD\n  ![](https://lively-kernel.org/lively4/lively4-core/demos/lively-simulation/screenshots/code-view.png){width=500px}\nMD*/\n\n\"enable aexpr\";\n\nimport Morph from 'src/components/widgets/lively-morph.js';\n\nexport default class LivelySimulationCodeView extends Morph {\n  \n  // other\n  get(selector) {\n    const { shadowRoot } = this;\n    return shadowRoot.querySelector(selector);\n  }\n  \n  getState() {\n    return this.get('#state').getState();\n  }\n  \n  setState(state) {\n    return this.get('#state').setState(state);\n  }\n  \n  getSnippet() {\n    return this.get('#code').getSnippet();\n  }\n  \n  execute(scope) {\n    return this.get('#code').execute(scope);\n  }\n  \n  isFocused() {\n    return this.get('#state').isFocused() || this.get('#code').isFocused();\n  }\n  \n  initializeState(state) {\n    return this.get('#state').initializeState(state);\n  }\n  \n  initializeSnippet(snippet) {\n    return this.get('#code').initializeSnippet(snippet);\n  }\n  \n  getCell() {\n    return this.getRootNode().host;\n  }\n  \n  highlight(cellRef) {\n    return this.get('#code').highlight(cellRef);\n  }\n  \n  preCompile() {\n    const code = this.get('#code');\n    return code.preCompile && code.preCompile();\n  }\n  \n}"]}