{
  "pages": {
    "start": [
      {
        "if": {
          "condition": "!window.EvaluateInString /* MPEM::EvaluateInString v1.0.0 */",
          "commands": [
            {
              "eval": {
                "script": "/********************\r\n * EvaluateInString\r\n * ******************\r\n * MPED--author::fapnip\r\n * MPED--description::\r\n * Function to parse, optionally execute, and strip JavaScript\r\n * embedded in <eval>...</eval> tags from a string.\r\n * ::--description\r\n * \r\n */\r\n\r\n;(function(){\r\n  var fns = {}\r\n  EvaluateInString = function(s, noExecute) {\r\n    s = (s || '') + ''\r\n    var js = s.match(/<eval>(.*?)<\\/eval>/)\r\n    while (js) {\r\n      var result\r\n      if (!noExecute) {\r\n        var script = js[1].trim()\r\n        var fn = fns[script]\r\n        if (!fn) {\r\n          try {\r\n            fn = Function(script)\r\n            fns[script] = fn\r\n          } catch (e) {\r\n            console.error('Unable to parse javascript from string', js[1])\r\n          }\r\n        }\r\n        if (fn) {\r\n          try {\r\n            result = fn.call(this)\r\n          } catch (e) {\r\n            console.error('Unable to execute javascript frm string', js[1])\r\n          }\r\n        }\r\n      } else {\r\n        console.warn('Stripping code:', js[0])\r\n      }\r\n      result = (result === undefined || result == null) ? '' : result\r\n      s = s.replace(js[0], result + '')\r\n      js = s.match(/<eval>(.*?)<\\/eval>/)\r\n    }\r\n    return s\r\n  }\r\n  window.EvaluateInString = EvaluateInString\r\n})()"
              }
            }
          ]
        }
      },
      {
        "if": {
          "condition": "!window.ElizaBot /* MPEM::ElizaBot v1.1.0 */",
          "commands": [
            {
              "eval": {
                "script": "/*\r\n\r\nMPED--author::Norbert Landsteiner\r\nMPED--description::\r\n  elizabot.js v.1.1 - ELIZA JS library (N.Landsteiner 2005)\r\n  Eliza is a mock Rogerian psychotherapist.\r\n  Original program by Joseph Weizenbaum in MAD-SLIP for \"Project MAC\" at MIT.\r\n  cf: Weizenbaum, Joseph \"ELIZA - A Computer Program For the Study of Natural Language\r\n      Communication Between Man and Machine\"\r\n      in: Communications of the ACM; Volume 9 , Issue 1 (January 1966): p 36-45.\r\n  JavaScript implementation by Norbert Landsteiner 2005; <http://www.masserk.at>\r\n::--description\r\n\r\n  synopsis:\r\n\r\n         new ElizaBot( <random-choice-disable-flag> )\r\n         ElizaBot.prototype.transform( <inputstring> )\r\n         ElizaBot.prototype.getInitial()\r\n         ElizaBot.prototype.getFinal()\r\n         ElizaBot.prototype.reset()\r\n\r\n  usage: var eliza = new ElizaBot();\r\n         var initial = eliza.getInitial();\r\n         var reply = eliza.transform(inputstring);\r\n         if (eliza.quit) {\r\n             // last user input was a quit phrase\r\n         }\r\n\r\n         // method `transform()' returns a final phrase in case of a quit phrase\r\n         // but you can also get a final phrase with:\r\n         var final = eliza.getFinal();\r\n\r\n         // other methods: reset memory and internal state\r\n         eliza.reset();\r\n\r\n         // to set the internal memory size override property `memSize':\r\n         eliza.memSize = 100; // (default: 20)\r\n\r\n         // to reproduce the example conversation given by J. Weizenbaum\r\n         // initialize with the optional random-choice-disable flag\r\n         var originalEliza = new ElizaBot(true);\r\n\r\n  `ElizaBot' is also a general chatbot engine that can be supplied with any rule set.\r\n  (for required data structures cf. \"elizadata.js\" and/or see the documentation.)\r\n  data is parsed and transformed for internal use at the creation time of the\r\n  first instance of the `ElizaBot' constructor.\r\n\r\n  vers 1.1: lambda functions in RegExps are currently a problem with too many browsers.\r\n            changed code to work around.\r\n*/\r\n\r\n\r\nfunction ElizaBot(noRandomFlag) {\r\n\tthis.noRandom= (noRandomFlag)? true:false;\r\n\tthis.capitalizeFirstLetter=true;\r\n\tthis.debug=false;\r\n\tthis.memSize=20;\r\n\tthis.version=\"1.1 (original)\";\r\n\tif (!this._dataParsed) this._init();\r\n\tthis.reset();\r\n}\r\n\r\nElizaBot.prototype.reset = function() {\r\n\tthis.quit=false;\r\n\tthis.mem=[];\r\n\tthis.lastchoice=[];\r\n\tfor (var k=0; k<elizaKeywords.length; k++) {\r\n\t\tthis.lastchoice[k]=[];\r\n\t\tvar rules=elizaKeywords[k][2];\r\n\t\tfor (var i=0; i<rules.length; i++) this.lastchoice[k][i]=-1;\r\n\t}\r\n}\r\n\r\nElizaBot.prototype._dataParsed = false;\r\n\r\nElizaBot.prototype._init = function() {\r\n\t// install ref to global object\r\n\tvar global=ElizaBot.prototype.global=self;\r\n\t// parse data and convert it from canonical form to internal use\r\n\t// prodoce synonym list\r\n\tvar synPatterns={};\r\n\tif ((global.elizaSynons) && (typeof elizaSynons == 'object')) {\r\n\t\tfor (var i in elizaSynons) synPatterns[i]='('+i+'|'+elizaSynons[i].join('|')+')';\r\n\t}\r\n\t// check for keywords or install empty structure to prevent any errors\r\n\tif ((!global.elizaKeywords) || (typeof elizaKeywords.length == 'undefined')) {\r\n\t\telizaKeywords=[['###',0,[['###',[]]]]];\r\n\t}\r\n\t// 1st convert rules to regexps\r\n\t// expand synonyms and insert asterisk expressions for backtracking\r\n\tvar sre=/@(\\S+)/;\r\n\tvar are=/(\\S)\\s*\\*\\s*(\\S)/;\r\n\tvar are1=/^\\s*\\*\\s*(\\S)/;\r\n\tvar are2=/(\\S)\\s*\\*\\s*$/;\r\n\tvar are3=/^\\s*\\*\\s*$/;\r\n\tvar wsre=/\\s+/g;\r\n\tfor (var k=0; k<elizaKeywords.length; k++) {\r\n\t\tvar rules=elizaKeywords[k][2];\r\n\t\telizaKeywords[k][3]=k; // save original index for sorting\r\n\t\tfor (var i=0; i<rules.length; i++) {\r\n\t\t\tvar r=rules[i];\r\n\t\t\t// check mem flag and store it as decomp's element 2\r\n\t\t\tif (r[0].charAt(0)=='$') {\r\n\t\t\t\tvar ofs=1;\r\n\t\t\t\twhile (r[0].charAt[ofs]==' ') ofs++;\r\n\t\t\t\tr[0]=r[0].substring(ofs);\r\n\t\t\t\tr[2]=true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tr[2]=false;\r\n\t\t\t}\r\n\t\t\t// expand synonyms (v.1.1: work around lambda function)\r\n\t\t\tvar m=sre.exec(r[0]);\r\n\t\t\twhile (m) {\r\n\t\t\t\tvar sp=(synPatterns[m[1]])? synPatterns[m[1]]:m[1];\r\n\t\t\t\tr[0]=r[0].substring(0,m.index)+sp+r[0].substring(m.index+m[0].length);\r\n\t\t\t\tm=sre.exec(r[0]);\r\n\t\t\t}\r\n\t\t\t// expand asterisk expressions (v.1.1: work around lambda function)\r\n\t\t\tif (are3.test(r[0])) {\r\n\t\t\t\tr[0]='\\\\s*(.*)\\\\s*';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tm=are.exec(r[0]);\r\n\t\t\t\tif (m) {\r\n\t\t\t\t\tvar lp='';\r\n\t\t\t\t\tvar rp=r[0];\r\n\t\t\t\t\twhile (m) {\r\n\t\t\t\t\t\tlp+=rp.substring(0,m.index+1);\r\n\t\t\t\t\t\tif (m[1]!=')') lp+='\\\\b';\r\n\t\t\t\t\t\tlp+='\\\\s*(.*)\\\\s*';\r\n\t\t\t\t\t\tif ((m[2]!='(') && (m[2]!='\\\\')) lp+='\\\\b';\r\n\t\t\t\t\t\tlp+=m[2];\r\n\t\t\t\t\t\trp=rp.substring(m.index+m[0].length);\r\n\t\t\t\t\t\tm=are.exec(rp);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tr[0]=lp+rp;\r\n\t\t\t\t}\r\n\t\t\t\tm=are1.exec(r[0]);\r\n\t\t\t\tif (m) {\r\n\t\t\t\t\tvar lp='\\\\s*(.*)\\\\s*';\r\n\t\t\t\t\tif ((m[1]!=')') && (m[1]!='\\\\')) lp+='\\\\b';\r\n\t\t\t\t\tr[0]=lp+r[0].substring(m.index-1+m[0].length);\r\n\t\t\t\t}\r\n\t\t\t\tm=are2.exec(r[0]);\r\n\t\t\t\tif (m) {\r\n\t\t\t\t\tvar lp=r[0].substring(0,m.index+1);\r\n\t\t\t\t\tif (m[1]!='(') lp+='\\\\b';\r\n\t\t\t\t\tr[0]=lp+'\\\\s*(.*)\\\\s*';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// expand white space\r\n\t\t\tr[0]=r[0].replace(wsre, '\\\\s+');\r\n\t\t\twsre.lastIndex=0;\r\n\t\t}\r\n\t}\r\n\t// now sort keywords by rank (highest first)\r\n\telizaKeywords.sort(this._sortKeywords);\r\n\t// and compose regexps and refs for pres and posts\r\n\tElizaBot.prototype.pres={};\r\n\tElizaBot.prototype.posts={};\r\n\tif ((global.elizaPres) && (elizaPres.length)) {\r\n\t\tvar a=new Array();\r\n\t\tfor (var i=0; i<elizaPres.length; i+=2) {\r\n\t\t\ta.push(elizaPres[i]);\r\n\t\t\tElizaBot.prototype.pres[elizaPres[i]]=elizaPres[i+1];\r\n\t\t}\r\n\t\tElizaBot.prototype.preExp = new RegExp('\\\\b('+a.join('|')+')\\\\b');\r\n\t}\r\n\telse {\r\n\t\t// default (should not match)\r\n\t\tElizaBot.prototype.preExp = /####/;\r\n\t\tElizaBot.prototype.pres['####']='####';\r\n\t}\r\n\tif ((global.elizaPosts) && (elizaPosts.length)) {\r\n\t\tvar a=new Array();\r\n\t\tfor (var i=0; i<elizaPosts.length; i+=2) {\r\n\t\t\ta.push(elizaPosts[i]);\r\n\t\t\tElizaBot.prototype.posts[elizaPosts[i]]=elizaPosts[i+1];\r\n\t\t}\r\n\t\tElizaBot.prototype.postExp = new RegExp('\\\\b('+a.join('|')+')\\\\b');\r\n\t}\r\n\telse {\r\n\t\t// default (should not match)\r\n\t\tElizaBot.prototype.postExp = /####/;\r\n\t\tElizaBot.prototype.posts['####']='####';\r\n\t}\r\n\t// check for elizaQuits and install default if missing\r\n\tif ((!global.elizaQuits) || (typeof elizaQuits.length == 'undefined')) {\r\n\t\telizaQuits=[];\r\n\t}\r\n\t// done\r\n\tElizaBot.prototype._dataParsed=true;\r\n}\r\n\r\nElizaBot.prototype._sortKeywords = function(a,b) {\r\n\t// sort by rank\r\n\tif (a[1]>b[1]) return -1\r\n\telse if (a[1]<b[1]) return 1\r\n\t// or original index\r\n\telse if (a[3]>b[3]) return 1\r\n\telse if (a[3]<b[3]) return -1\r\n\telse return 0;\r\n}\r\n\r\nElizaBot.prototype.transform = function(text) {\r\n\tvar rpl='';\r\n\tthis.quit=false;\r\n\t// unify text string\r\n\ttext=text.toLowerCase();\r\n\ttext=text.replace(/@#\\$%\\^&\\*\\(\\)_\\+=~`\\{\\[\\}\\]\\|:;<>\\/\\\\\\t/g, ' ');\r\n\ttext=text.replace(/\\s+-+\\s+/g, '.');\r\n\ttext=text.replace(/\\s*[,\\.\\?!;]+\\s*/g, '.');\r\n\ttext=text.replace(/\\s*\\bbut\\b\\s*/g, '.');\r\n\ttext=text.replace(/\\s{2,}/g, ' ');\r\n\t// split text in part sentences and loop through them\r\n\tvar parts=text.split('.');\r\n\tfor (var i=0; i<parts.length; i++) {\r\n\t\tvar part=parts[i];\r\n\t\tif (part!='') {\r\n\t\t\t// check for quit expression\r\n\t\t\tfor (var q=0; q<elizaQuits.length; q++) {\r\n\t\t\t\tif (elizaQuits[q]==part) {\r\n\t\t\t\t\tthis.quit=true;\r\n\t\t\t\t\treturn this.getFinal();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// preprocess (v.1.1: work around lambda function)\r\n\t\t\tvar m=this.preExp.exec(part);\r\n\t\t\tif (m) {\r\n\t\t\t\tvar lp='';\r\n\t\t\t\tvar rp=part;\r\n\t\t\t\twhile (m) {\r\n\t\t\t\t\tlp+=rp.substring(0,m.index)+this.pres[m[1]];\r\n\t\t\t\t\trp=rp.substring(m.index+m[0].length);\r\n\t\t\t\t\tm=this.preExp.exec(rp);\r\n\t\t\t\t}\r\n\t\t\t\tpart=lp+rp;\r\n\t\t\t}\r\n\t\t\tthis.sentence=part;\r\n\t\t\t// loop trough keywords\r\n\t\t\tfor (var k=0; k<elizaKeywords.length; k++) {\r\n\t\t\t\tif (part.search(new RegExp('\\\\b'+elizaKeywords[k][0]+'\\\\b', 'i'))>=0) {\r\n\t\t\t\t\trpl = this._execRule(k);\r\n\t\t\t\t}\r\n\t\t\t\tif (rpl!='') return rpl;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// nothing matched try mem\r\n\trpl=this._memGet();\r\n\t// if nothing in mem, so try xnone\r\n\tif (rpl=='') {\r\n\t\tthis.sentence=' ';\r\n\t\tvar k=this._getRuleIndexByKey('xnone');\r\n\t\tif (k>=0) rpl=this._execRule(k);\r\n\t}\r\n\t// return reply or default string\r\n\treturn (rpl!='')? rpl : 'I am at a loss for words.';\r\n}\r\n\r\nElizaBot.prototype._execRule = function(k) {\r\n\tvar rule=elizaKeywords[k];\r\n\tvar decomps=rule[2];\r\n\tvar paramre=/\\(([0-9]+)\\)/;\r\n\tfor (var i=0; i<decomps.length; i++) {\r\n\t\tvar m=this.sentence.match(decomps[i][0]);\r\n\t\tif (m!=null) {\r\n\t\t\tvar reasmbs=decomps[i][1];\r\n\t\t\tvar memflag=decomps[i][2];\r\n\t\t\tvar ri= (this.noRandom)? 0 : Math.floor(Math.random()*reasmbs.length);\r\n\t\t\tif (((this.noRandom) && (this.lastchoice[k][i]>ri)) || (this.lastchoice[k][i]==ri)) {\r\n\t\t\t\tri= ++this.lastchoice[k][i];\r\n\t\t\t\tif (ri>=reasmbs.length) {\r\n\t\t\t\t\tri=0;\r\n\t\t\t\t\tthis.lastchoice[k][i]=-1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.lastchoice[k][i]=ri;\r\n\t\t\t}\r\n\t\t\tvar rpl=reasmbs[ri];\r\n\t\t\tif (this.debug) alert('match:\\nkey: '+elizaKeywords[k][0]+\r\n\t\t\t\t'\\nrank: '+elizaKeywords[k][1]+\r\n\t\t\t\t'\\ndecomp: '+decomps[i][0]+\r\n\t\t\t\t'\\nreasmb: '+rpl+\r\n\t\t\t\t'\\nmemflag: '+memflag);\r\n\t\t\tif (rpl.search('^goto ', 'i')==0) {\r\n\t\t\t\tki=this._getRuleIndexByKey(rpl.substring(5));\r\n\t\t\t\tif (ki>=0) return this._execRule(ki);\r\n\t\t\t}\r\n\t\t\t// substitute positional params (v.1.1: work around lambda function)\r\n\t\t\tvar m1=paramre.exec(rpl);\r\n\t\t\tif (m1) {\r\n\t\t\t\tvar lp='';\r\n\t\t\t\tvar rp=rpl;\r\n\t\t\t\twhile (m1) {\r\n\t\t\t\t\tvar param = m[parseInt(m1[1])];\r\n\t\t\t\t\t// postprocess param\r\n\t\t\t\t\tvar m2=this.postExp.exec(param);\r\n\t\t\t\t\tif (m2) {\r\n\t\t\t\t\t\tvar lp2='';\r\n\t\t\t\t\t\tvar rp2=param;\r\n\t\t\t\t\t\twhile (m2) {\r\n\t\t\t\t\t\t\tlp2+=rp2.substring(0,m2.index)+this.posts[m2[1]];\r\n\t\t\t\t\t\t\trp2=rp2.substring(m2.index+m2[0].length);\r\n\t\t\t\t\t\t\tm2=this.postExp.exec(rp2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tparam=lp2+rp2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlp+=rp.substring(0,m1.index)+param;\r\n\t\t\t\t\trp=rp.substring(m1.index+m1[0].length);\r\n\t\t\t\t\tm1=paramre.exec(rp);\r\n\t\t\t\t}\r\n\t\t\t\trpl=lp+rp;\r\n\t\t\t}\r\n\t\t\trpl=this._postTransform(rpl);\r\n\t\t\tif (memflag) this._memSave(rpl)\r\n\t\t\telse return rpl;\r\n\t\t}\r\n\t}\r\n\treturn '';\r\n}\r\n\r\nElizaBot.prototype._postTransform = function(s) {\r\n\t// final cleanings\r\n\ts=s.replace(/\\s{2,}/g, ' ');\r\n\ts=s.replace(/\\s+\\./g, '.');\r\n\tif ((this.global.elizaPostTransforms) && (elizaPostTransforms.length)) {\r\n\t\tfor (var i=0; i<elizaPostTransforms.length; i+=2) {\r\n\t\t\ts=s.replace(elizaPostTransforms[i], elizaPostTransforms[i+1]);\r\n\t\t\telizaPostTransforms[i].lastIndex=0;\r\n\t\t}\r\n\t}\r\n\t// capitalize first char (v.1.1: work around lambda function)\r\n\tif (this.capitalizeFirstLetter) {\r\n\t\tvar re=/^([a-z])/;\r\n\t\tvar m=re.exec(s);\r\n\t\tif (m) s=m[0].toUpperCase()+s.substring(1);\r\n\t}\r\n\treturn s;\r\n}\r\n\r\nElizaBot.prototype._getRuleIndexByKey = function(key) {\r\n\tfor (var k=0; k<elizaKeywords.length; k++) {\r\n\t\tif (elizaKeywords[k][0]==key) return k;\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nElizaBot.prototype._memSave = function(t) {\r\n\tthis.mem.push(t);\r\n\tif (this.mem.length>this.memSize) this.mem.shift();\r\n}\r\n\r\nElizaBot.prototype._memGet = function() {\r\n\tif (this.mem.length) {\r\n\t\tif (this.noRandom) return this.mem.shift();\r\n\t\telse {\r\n\t\t\tvar n=Math.floor(Math.random()*this.mem.length);\r\n\t\t\tvar rpl=this.mem[n];\r\n\t\t\tfor (var i=n+1; i<this.mem.length; i++) this.mem[i-1]=this.mem[i];\r\n\t\t\tthis.mem.length--;\r\n\t\t\treturn rpl;\r\n\t\t}\r\n\t}\r\n\telse return '';\r\n}\r\n\r\nElizaBot.prototype.getFinal = function() {\r\n\tif (!ElizaBot.prototype.global.elizaFinals) return '';\r\n\treturn elizaFinals[Math.floor(Math.random()*elizaFinals.length)];\r\n}\r\n\r\nElizaBot.prototype.getInitial = function() {\r\n\tif (!ElizaBot.prototype.global.elizaInitials) return '';\r\n\treturn elizaInitials[Math.floor(Math.random()*elizaInitials.length)];\r\n}\r\n\r\n\r\n// fix array.prototype methods (push, shift) if not implemented (MSIE fix)\r\nif (typeof Array.prototype.push == 'undefined') {\r\n\tArray.prototype.push=function(v) { return this[this.length]=v; };\r\n}\r\nif (typeof Array.prototype.shift == 'undefined') {\r\n\tArray.prototype.shift=function() {\r\n\t\tif (this.length==0) return null;\r\n\t\tvar e0=this[0];\r\n\t\tfor (var i=1; i<this.length; i++) this[i-1]=this[i];\r\n\t\tthis.length--;\r\n\t\treturn e0;\r\n\t};\r\n}\r\n\r\n// eof"
              }
            }
          ]
        }
      },
      {
        "if": {
          "condition": "!window.elizaInitials /* MPEM::botData v0.0.5 */",
          "commands": [
            {
              "eval": {
                "script": "\r\n// data for elizabot.js\r\n// entries prestructured as layed out in Weizenbaum's description \r\n// [cf: Communications of the ACM, Vol. 9, #1 (January 1966): p 36-45.]\r\n\r\nvar elizaInitials = [\r\n\"Hi! Tell me about your sex life.\",\r\n\"Please tell me something embarassing.\",\r\n];\r\n\r\nvar elizaFinals = [\r\n\"Goodbye.  It was nice talking to you.\",\r\n// additions (not original)\r\n\"Goodbye.  This was really a nice talk.\",\r\n\"Goodbye.  I'm looking forward to our next session.\",\r\n\"This was a good session, wasn't it -- but time is over now.   Goodbye.\",\r\n\"Maybe we could discuss this moreover in our next session ?   Goodbye.\"\r\n];\r\n\r\nvar elizaQuits = [\r\n\"bye\",\r\n\"goodbye\",\r\n\"done\",\r\n\"exit\",\r\n\"quit\",\r\n\"fuck off\",\r\n];\r\n\r\nvar elizaPres = [\r\n\"dont\", \"don't\",\r\n\"cant\", \"can't\",\r\n\"wont\", \"won't\",\r\n\"recollect\", \"remember\",\r\n\"recall\", \"remember\",\r\n\"dreamt\", \"dreamed\",\r\n\"dreams\", \"dream\",\r\n\"maybe\", \"perhaps\",\r\n\"certainly\", \"yes\",\r\n\"machine\", \"computer\",\r\n\"machines\", \"computer\",\r\n\"computers\", \"computer\",\r\n\"were\", \"was\",\r\n\"you're\", \"you are\",\r\n\"you're\", \"you are\",\r\n\"youre\", \"you are\",\r\n\"i'm\", \"i am\",\r\n\"im\", \"i am\",\r\n\"i've\", \"i have\",\r\n\"same\", \"alike\",\r\n\"identical\", \"alike\",\r\n\"equivalent\", \"alike\",\r\n];\r\n\r\nvar elizaPosts = [\r\n\"am\", \"are\",\r\n\"your\", \"my\",\r\n\"me\", \"you\",\r\n\"myself\", \"yourself\",\r\n\"yourself\", \"myself\",\r\n\"i\", \"you\",\r\n\"you\", \"I\",\r\n\"my\", \"your\",\r\n\"i'm\", \"you are\"\r\n];\r\n\r\nvar elizaSynons = {\r\n\"be\": [\"am\", \"is\", \"are\", \"was\"],\r\n\"belief\": [\"feel\", \"think\", \"believe\", \"wish\"],\r\n\"cannot\": [\"can't\"],\r\n\"desire\": [\"want\", \"need\"],\r\n\"everyone\": [\"everybody\", \"nobody\", \"noone\"],\r\n\"family\": [\"mother\", \"mom\", \"father\", \"dad\", \"sister\", \"brother\", \"wife\", \"children\", \"child\"],\r\n\"happy\": [\"elated\", \"glad\", \"better\"],\r\n\"sad\": [\"unhappy\", \"depressed\", \"sick\"],\r\n\"sex\": [\"fuck\", \"bone\", \"pound\", \"intercourse\"],\r\n\"masterbate\": [\"wank\", \"fap\"],\r\n\"horny\": [\"arounsed\", \"hard on\", \"hard-on\", \"erect\", \"wood\"],\r\n\"cock\": [\"dick\", \"penis\", \"willy\", \"fuck stick\"],\r\n\"pussy\": [\"cunt\", \"vagina\", \"beaver\", \"twat\"],\r\n\"breasts\": [\"tits\", \"tatas\", \"jugs\", \"melons\"],\r\n\"ass\": [\"butt\", \"rump\", \"back-side\"],\r\n\"anal\": [\"anus\", \"poop-chute\", \"rear-entry\"],\r\n};\r\n\r\nvar elizaKeywords = [\r\n\r\n/*\r\n  Array of\r\n  [\"<key>\", <rank>, [\r\n    [\"<decomp>\", [\r\n      \"<reasmb>\",\r\n      \"<reasmb>\",\r\n      \"<reasmb>\"\r\n    ]],\r\n    [\"<decomp>\", [\r\n      \"<reasmb>\",\r\n      \"<reasmb>\",\r\n      \"<reasmb>\"\r\n    ]]\r\n  ]]\r\n*/\r\n\r\n[\"xnone\", 0, [\r\n [\"*\", [\r\n     \"I'm not sure I understand you fully.\",\r\n     \"Please go on.\",\r\n     \"What does that suggest to you ?\",\r\n     \"Do you feel strongly about discussing such things ?\",\r\n     \"That is interesting.  Please continue.\",\r\n     \"Tell me more about that.\",\r\n     \"Does talking about this bother you ?\"\r\n  ]]\r\n]],\r\n[\"sorry\", 0, [\r\n [\"*\", [\r\n     \"Please don't apologise.\",\r\n     \"Apologies are not necessary.\",\r\n     \"I've told you that apologies are not required.\",\r\n     \"It did not bother me.  Please continue.\"\r\n  ]]\r\n]],\r\n[\"apologise\", 0, [\r\n [\"*\", [\r\n     \"goto sorry\"\r\n  ]]\r\n]],\r\n[\"remember\", 5, [\r\n [\"* i remember *\", [\r\n     \"Do you often think of (2) ?\",\r\n     \"Does thinking of (2) bring anything else to mind ?\",\r\n     \"What else do you recollect ?\",\r\n     \"Why do you remember (2) just now ?\",\r\n     \"What in the present situation reminds you of (2) ?\",\r\n     \"What is the connection between me and (2) ?\",\r\n     \"What else does (2) remind you of ?\"\r\n  ]],\r\n [\"* do you remember *\", [\r\n     \"Did you think I would forget (2) ?\",\r\n     \"Why do you think I should recall (2) now ?\",\r\n     \"What about (2) ?\",\r\n     \"goto what\",\r\n     \"You mentioned (2) ?\"\r\n  ]],\r\n [\"* you remember *\", [\r\n     \"How could I forget (2) ?\",\r\n     \"What about (2) should I remember ?\",\r\n     \"goto you\"\r\n  ]]\r\n]],\r\n[\"forget\", 5, [\r\n [\"* i forget *\", [\r\n     \"Can you think of why you might forget (2) ?\",\r\n     \"Why can't you remember (2) ?\",\r\n     \"How often do you think of (2) ?\",\r\n     \"Does it bother you to forget that ?\",\r\n     \"Could it be a mental block ?\",\r\n     \"Are you generally forgetful ?\",\r\n     \"Do you think you are suppressing (2) ?\"\r\n  ]],\r\n [\"* did you forget *\", [\r\n     \"Why do you ask ?\",\r\n     \"Are you sure you told me ?\",\r\n     \"Would it bother you if I forgot (2) ?\",\r\n     \"Why should I recall (2) just now ?\",\r\n     \"goto what\",\r\n     \"Tell me more about (2).\"\r\n  ]]\r\n]],\r\n[\"if\", 3, [\r\n [\"* if *\", [\r\n     \"Do you think it's likely that (2) ?\",\r\n     \"Do you wish that (2) ?\",\r\n     \"What do you know about (2) ?\",\r\n     \"Really, if (2) ?\",\r\n     \"What would you do if (2) ?\",\r\n     \"But what are the chances that (2) ?\",\r\n     \"What does this speculation lead to ?\"\r\n  ]]\r\n]],\r\n[\"dreamed\", 4, [\r\n [\"* i dreamed *\", [\r\n     \"Really, (2) ?\",\r\n     \"Have you ever fantasized (2) while you were awake ?\",\r\n     \"Have you ever dreamed (2) before ?\",\r\n     \"goto dream\"\r\n  ]]\r\n]],\r\n[\"dream\", 3, [\r\n [\"*\", [\r\n     \"What does that dream suggest to you ?\",\r\n     \"Do you dream often ?\",\r\n     \"What persons appear in your dreams ?\",\r\n     \"Do you believe that dreams have something to do with your problem ?\"\r\n  ]]\r\n]],\r\n[\"perhaps\", 0, [\r\n [\"*\", [\r\n     \"You don't seem quite certain.\",\r\n     \"Why the uncertain tone ?\",\r\n     \"Can't you be more positive ?\",\r\n     \"You aren't sure ?\",\r\n     \"Don't you know ?\",\r\n     \"How likely, would you estimate ?\"\r\n  ]]\r\n]],\r\n[\"name\", 15, [\r\n [\"*\", [\r\n     \"I am not interested in names.\",\r\n     \"I've told you before, I don't care about names -- please continue.\"\r\n  ]]\r\n]],\r\n[\"deutsch\", 0, [\r\n [\"*\", [\r\n     \"goto xforeign\",\r\n     \"I told you before, I don't understand German.\"\r\n  ]]\r\n]],\r\n[\"francais\", 0, [\r\n [\"*\", [\r\n     \"goto xforeign\",\r\n     \"I told you before, I don't understand French.\"\r\n  ]]\r\n]],\r\n[\"italiano\", 0, [\r\n [\"*\", [\r\n     \"goto xforeign\",\r\n     \"I told you before, I don't understand Italian.\"\r\n  ]]\r\n]],\r\n[\"espanol\", 0, [\r\n [\"*\", [\r\n     \"goto xforeign\",\r\n     \"I told you before, I don't understand Spanish.\"\r\n  ]]\r\n]],\r\n[\"xforeign\", 0, [\r\n [\"*\", [\r\n     \"I speak only English.\"\r\n  ]]\r\n]],\r\n[\"hello\", 0, [\r\n [\"*\", [\r\n     \"How do you do.  Please state your problem.\",\r\n     \"Hi.  What seems to be your problem ?\"\r\n  ]]\r\n]],\r\n[\"computer\", 50, [\r\n [\"*\", [\r\n     \"Do computers worry you ?\",\r\n     \"Why do you mention computers ?\",\r\n     \"What do you think machines have to do with your problem ?\",\r\n     \"Don't you think computers can help people ?\",\r\n     \"What about machines worries you ?\",\r\n     \"What do you think about machines ?\",\r\n     \"You don't think I am a computer program, do you ?\"\r\n  ]]\r\n]],\r\n[\"am\", 0, [\r\n [\"* am i *\", [\r\n     \"Do you believe you are (2) ?\",\r\n     \"Would you want to be (2) ?\",\r\n     \"Do you wish I would tell you you are (2) ?\",\r\n     \"What would it mean if you were (2) ?\",\r\n     \"goto what\"\r\n  ]],\r\n [\"* i am *\", [\r\n     \"goto i\"\r\n  ]],\r\n [\"* i have *\", [\r\n     \"goto i\"\r\n  ]],\r\n [\"*\", [\r\n     \"Why do you say 'am' ?\",\r\n     \"I don't understand that.\"\r\n  ]]\r\n]],\r\n[\"are\", 0, [\r\n [\"* are you *\", [\r\n     \"Why are you interested in whether I am (2) or not ?\",\r\n     \"Would you prefer if I weren't (2) ?\",\r\n     \"Perhaps I am (2) in your fantasies.\",\r\n     \"Do you sometimes think I am (2) ?\",\r\n     \"goto what\",\r\n     \"Would it matter to you ?\",\r\n     \"What if I were (2) ?\"\r\n  ]],\r\n [\"* you are *\", [\r\n     \"goto you\"\r\n  ]],\r\n [\"* are *\", [\r\n     \"Did you think they might not be (2) ?\",\r\n     \"Would you like it if they were not (2) ?\",\r\n     \"What if they were not (2) ?\",\r\n     \"Are they always (2) ?\",\r\n     \"Possibly they are (2).\",\r\n     \"Are you positive they are (2) ?\"\r\n  ]]\r\n]],\r\n[\"your\", 0, [\r\n [\"* your *\", [\r\n     \"Why are you interested in my (2) ?\",\r\n     \"What about your own (2) ?\",\r\n     \"What about my (2) makes you feel this way ?\",\r\n     \"Are you thinking about someone else's (2) ?\",\r\n     \"Really, my (2) ?\",\r\n     \"What makes you think of my (2) ?\",\r\n     \"Why my (2) ?\",\r\n     \"Does thinking about my (2) excite you ?\",\r\n     \"Do you like my (2) ?\"\r\n  ]]\r\n]],\r\n[\"was\", 2, [\r\n [\"* was i *\", [\r\n     \"What if you were (2) ?\",\r\n     \"Do you think you were (2) ?\",\r\n     \"Were you (2) ?\",\r\n     \"What would it mean if you were (2) ?\",\r\n     \"What does ' (2) ' suggest to you ?\",\r\n     \"goto what\"\r\n  ]],\r\n [\"* i was *\", [\r\n     \"Were you really ?\",\r\n     \"Why do you tell me you were (2) now ?\",\r\n     \"Perhaps I already know you were (2).\"\r\n  ]],\r\n [\"* was you *\", [\r\n     \"Would you like to believe I was (2) ?\",\r\n     \"What suggests that I was (2) ?\",\r\n     \"What do you think ?\",\r\n     \"Perhaps I was (2).\",\r\n     \"What if I had been (2) ?\"\r\n  ]]\r\n]],\r\n[\"i\", 0, [\r\n [\"* i @desire *\", [\r\n     \"What would it mean to you if you got (3) ?\",\r\n     \"Why do you want (3) ?\",\r\n     \"Suppose you got (3) soon.\",\r\n     \"What if you never got (3) ?\",\r\n     \"What would getting (3) mean to you ?\",\r\n     \"What does wanting (3) have to do with this discussion ?\"\r\n  ]],\r\n [\"* i am* @sad *\", [\r\n     \"I am sorry to hear that you are (3).\",\r\n     \"Do you think coming here will help you not to be (3) ?\",\r\n     \"I'm sure it's not pleasant to be (3).\",\r\n     \"Can you explain what made you (3) ?\"\r\n  ]],\r\n [\"* i am* @happy *\", [\r\n     \"How have I helped you to be (3) ?\",\r\n     \"Has your treatment made you (3) ?\",\r\n     \"What makes you (3) just now ?\",\r\n     \"Can you explain why you are suddenly (3) ?\"\r\n  ]],\r\n [\"* i was *\", [\r\n     \"goto was\"\r\n  ]],\r\n [\"* i @belief i *\", [\r\n     \"Do you really think so ?\",\r\n     \"But you are not sure you (3).\",\r\n     \"Do you really doubt you (3) ?\"\r\n  ]],\r\n [\"* i* @belief *you *\", [\r\n     \"goto you\"\r\n  ]],\r\n [\"* i am *\", [\r\n     \"Is it because you are (2) that you came to me ?\",\r\n     \"How long have you been (2) ?\",\r\n     \"Do you believe it is normal to be (2) ?\",\r\n     \"Do you enjoy being (2) ?\",\r\n     \"Do you know anyone else who is (2) ?\"\r\n  ]],\r\n [\"* i @cannot *\", [\r\n     \"How do you know that you can't (3) ?\",\r\n     \"Have you tried ?\",\r\n     \"Perhaps you could (3) now.\",\r\n     \"Do you really want to be able to (3) ?\",\r\n     \"What if you could (3) ?\"\r\n  ]],\r\n [\"* i don't *\", [\r\n     \"Don't you really (2) ?\",\r\n     \"Why don't you (2) ?\",\r\n     \"Do you wish to be able to (2) ?\",\r\n     \"Does that trouble you ?\"\r\n  ]],\r\n [\"* i feel *\", [\r\n     \"Tell me more about such feelings.\",\r\n     \"Do you often feel (2) ?\",\r\n     \"Do you enjoy feeling (2) ?\",\r\n     \"Of what does feeling (2) remind you ?\"\r\n  ]],\r\n [\"* i * you *\", [\r\n     \"Perhaps in your fantasies we (2) each other.\",\r\n     \"Do you wish to (2) me ?\",\r\n     \"You seem to need to (2) me.\",\r\n     \"Do you (2) anyone else ?\"\r\n  ]],\r\n [\"*\", [\r\n     \"You say (1) ?\",\r\n     \"Can you elaborate on that ?\",\r\n     \"Do you say (1) for some special reason ?\",\r\n     \"That's quite interesting.\"\r\n  ]]\r\n]],\r\n[\"you\", 0, [\r\n [\"* you remind me of *\", [\r\n     \"goto alike\"\r\n  ]],\r\n [\"* you are *\", [\r\n     \"What makes you think I am (2) ?\",\r\n     \"Does it please you to believe I am (2) ?\",\r\n     \"Do you sometimes wish you were (2) ?\",\r\n     \"Perhaps you would like to be (2).\"\r\n  ]],\r\n [\"* you* me *\", [\r\n     \"Why do you think I (2) you ?\",\r\n     \"You like to think I (2) you -- don't you ?\",\r\n     \"What makes you think I (2) you ?\",\r\n     \"Really, I (2) you ?\",\r\n     \"Do you wish to believe I (2) you ?\",\r\n     \"Suppose I did (2) you -- what would that mean ?\",\r\n     \"Does someone else believe I (2) you ?\"\r\n  ]],\r\n [\"* you *\", [\r\n     \"We were discussing you -- not me.\",\r\n     \"Oh, I (2) ?\",\r\n     \"You're not really talking about me -- are you ?\",\r\n     \"What are your feelings now ?\",\r\n     \"Why do you say that ?\"\r\n  ]]\r\n]],\r\n[\"yes\", 0, [\r\n [\"*\", [\r\n     \"You seem to be quite positive.  Why?\",\r\n     \"You seem sure.  Are you?\",\r\n     \"I see.  Anything else?\",\r\n     \"I understand. Is there more?\"\r\n  ]]\r\n]],\r\n[\"no\", 0, [\r\n [\"* no one *\", [\r\n     \"Are you sure, no one (2) ?\",\r\n     \"Surely someone (2) .\",\r\n     \"Can you think of anyone at all ?\",\r\n     \"Are you thinking of a very special person ?\",\r\n     \"Who, may I ask ?\",\r\n     \"You have a particular person in mind, don't you ?\",\r\n     \"Who do you think you are talking about ?\"\r\n  ]],\r\n [\"*\", [\r\n     \"Are you saying no just to be negative?\",\r\n     \"You are being a bit negative.\",\r\n     \"Why not ?\",\r\n     \"Why 'no' ?\"\r\n  ]]\r\n]],\r\n[\"my\", 2, [\r\n [\"$ * my *\", [\r\n     \"Does that have anything to do with the fact that your (2) ?\",\r\n     \"Lets discuss further why your (2).\",\r\n     \"Earlier you said your (2).\",\r\n     \"But your (2).\"\r\n  ]],\r\n [\"* my* @family *\", [\r\n     \"Tell me more about your family.\",\r\n     \"Who else in your family (4) ?\",\r\n     \"Your (3) ?\",\r\n     \"What else comes to your mind when you think of your (3) ?\"\r\n  ]],\r\n [\"* my *\", [\r\n     \"Your (2) ?\",\r\n     \"Why do you say your (2) ?\",\r\n     \"Does that suggest anything else which belongs to you ?\",\r\n     \"Is it important to you that your (2) ?\"\r\n  ]]\r\n]],\r\n[\"can\", 0, [\r\n [\"* can you *\", [\r\n     \"You believe I can (2) don't you ?\",\r\n     \"goto what\",\r\n     \"You want me to be able to (2).\",\r\n     \"Perhaps you would like to be able to (2) yourself.\"\r\n  ]],\r\n [\"* can i *\", [\r\n     \"Whether or not you can (2) depends on you more than on me.\",\r\n     \"Do you want to be able to (2) ?\",\r\n     \"Perhaps you don't want to (2).\",\r\n     \"goto what\"\r\n  ]]\r\n]],\r\n[\"what\", 0, [\r\n [\"*\", [\r\n     \"Why do you ask ?\",\r\n     \"Does that question interest you ?\",\r\n     \"What is it you really want to know ?\",\r\n     \"Are such questions much on your mind ?\",\r\n     \"What answer would please you most ?\",\r\n     \"What do you think ?\",\r\n     \"What comes to mind when you ask that ?\",\r\n     \"Have you asked such questions before ?\",\r\n     \"Have you asked anyone else ?\"\r\n  ]]\r\n]],\r\n[\"who\", 0, [\r\n [\"who *\", [\r\n     \"goto what\"\r\n  ]]\r\n]],\r\n[\"when\", 0, [\r\n [\"when *\", [\r\n     \"goto what\"\r\n  ]]\r\n]],\r\n[\"where\", 0, [\r\n [\"where *\", [\r\n     \"goto what\"\r\n  ]]\r\n]],\r\n[\"how\", 0, [\r\n [\"how *\", [\r\n     \"goto what\"\r\n  ]]\r\n]],\r\n[\"because\", 0, [\r\n [\"*\", [\r\n     \"Is that the real reason ?\",\r\n     \"Don't any other reasons come to mind ?\",\r\n     \"Does that reason seem to explain anything else ?\",\r\n     \"What other reasons might there be ?\"\r\n  ]]\r\n]],\r\n[\"why\", 0, [\r\n [\"* why don't you *\", [\r\n     \"Do you believe I don't (2) ?\",\r\n     \"Perhaps I will (2) in good time.\",\r\n     \"Should you (2) yourself ?\",\r\n     \"You want me to (2) ?\",\r\n     \"goto what\"\r\n  ]],\r\n [\"* why can't i *\", [\r\n     \"Do you think you should be able to (2) ?\",\r\n     \"Do you want to be able to (2) ?\",\r\n     \"Do you believe this will help you to (2) ?\",\r\n     \"Have you any idea why you can't (2) ?\",\r\n     \"goto what\"\r\n  ]],\r\n [\"*\", [\r\n     \"goto what\"\r\n  ]]\r\n]],\r\n[\"everyone\", 2, [\r\n [\"* @everyone *\", [\r\n     \"Really, (2) ?\",\r\n     \"Surely not (2).\",\r\n     \"Can you think of anyone in particular ?\",\r\n     \"Who, for example?\",\r\n     \"Are you thinking of a very special person ?\",\r\n     \"Who, may I ask ?\",\r\n     \"Someone special perhaps ?\",\r\n     \"You have a particular person in mind, don't you ?\",\r\n     \"Who do you think you're talking about ?\"\r\n  ]]\r\n]],\r\n[\"everybody\", 2, [\r\n [\"*\", [\r\n     \"goto everyone\"\r\n  ]]\r\n]],\r\n[\"nobody\", 2, [\r\n [\"*\", [\r\n     \"goto everyone\"\r\n  ]]\r\n]],\r\n[\"noone\", 2, [\r\n [\"*\", [\r\n     \"goto everyone\"\r\n  ]]\r\n]],\r\n[\"always\", 1, [\r\n [\"*\", [\r\n     \"Can you think of a specific example ?\",\r\n     \"When ?\",\r\n     \"What incident are you thinking of ?\",\r\n     \"Really, always ?\"\r\n  ]]\r\n]],\r\n[\"alike\", 10, [\r\n [\"*\", [\r\n     \"In what way ?\",\r\n     \"What resemblence do you see ?\",\r\n     \"What does that similarity suggest to you ?\",\r\n     \"What other connections do you see ?\",\r\n     \"What do you suppose that resemblence means ?\",\r\n     \"What is the connection, do you suppose ?\",\r\n     \"Could there really be some connection ?\",\r\n     \"How ?\"\r\n  ]]\r\n]],\r\n[\"like\", 10, [\r\n [\"* @be *like *\", [\r\n     \"goto alike\"\r\n  ]]\r\n]],\r\n[\"different\", 0, [\r\n [\"*\", [\r\n     \"How is it different ?\",\r\n     \"What differences do you see ?\",\r\n     \"What does that difference suggest to you ?\",\r\n     \"What other distinctions do you see ?\",\r\n     \"What do you suppose that disparity means ?\",\r\n     \"Could there be some connection, do you suppose ?\",\r\n     \"How ?\"\r\n  ]]\r\n]]\r\n\r\n];\r\n\r\n// regexp/replacement pairs to be performed as final cleanings\r\n// here: cleanings for multiple bots talking to each other\r\nvar elizaPostTransforms = [\r\n\t/(?<!([\\^\\.\\,\\!\\?]\\s*|[\\^\\.\\,\\!\\?]\\s*\\w|^\\s*\\w|What if|belive|think|wish)) I *(\\?|\\.|$)/, \" me$2\",\r\n\t/(?<!([\\^\\.\\,\\!\\?]\\s*|[\\^\\.\\,\\!\\?]\\s*\\w|^\\s*\\w|What if|belive|think|wish)) I +(will|may|want|in|soon|later|after|before|over|under|on|inside|[a-zA-Z]+ (to|in|with) )/, \" me $2\",\r\n\t/(?<!([\\^\\.\\,\\!\\?]\\s*|[\\^\\.\\,\\!\\?]\\s*\\w|^\\s*\\w|What if|belive|think|wish)) I +(\\w)/, \" my $2\",\r\n\t/ old old/g, \" old\",\r\n\t/\\bthey were( not)? me\\b/g, \"it was$1 me\",\r\n\t/\\bthey are( not)? me\\b/g, \"it is$1 me\",\r\n\t/Are they( always)? me\\b/, \"it is$1 me\",\r\n\t/\\bthat your( own)? (\\w+)( now)? \\?/, \"that you have your$1 $2 ?\",\r\n\t/\\bI to have (\\w+)/, \"I have $1\",\r\n\t/Earlier you said your( own)? (\\w+)( now)?\\./, \"Earlier you talked about your $2.\"\r\n];\r\n\r\n"
              }
            }
          ]
        }
      },
      {
        "if": {
          "condition": "!window.bot",
          "commands": [
            {
              "eval": {
                "script": "var botHistory = []\r\nvar userHistory = []\r\n\r\nvar bot = new ElizaBot()\r\nbotHistory.unshift(EvaluateInString(bot.getInitial()))\r\n"
              }
            }
          ]
        }
      },
      {
        "goto": {
          "target": "chat"
        }
      }
    ],
    "chat": [
      {
        "image": {
          "locator": "gallery:c645b372-13ef-4494-aac7-fd7bf4dc5965/*"
        }
      },
      {
        "if": {
          "condition": "userHistory[2]",
          "commands": [
            {
              "say": {
                "label": "<p><em>️ </em><em><eval>userHistory[2]</eval></em></p>",
                "mode": "instant"
              }
            }
          ]
        }
      },
      {
        "if": {
          "condition": "botHistory[2]",
          "commands": [
            {
              "say": {
                "label": "<p>👩‍⚕️ <eval>botHistory[2]</eval></p>",
                "mode": "instant"
              }
            }
          ]
        }
      },
      {
        "if": {
          "condition": "userHistory[1]",
          "commands": [
            {
              "say": {
                "label": "<p><em>️ </em><em><eval>userHistory[1]</eval></em></p>",
                "mode": "instant"
              }
            }
          ]
        }
      },
      {
        "if": {
          "condition": "botHistory[1]",
          "commands": [
            {
              "say": {
                "label": "<p>👩‍⚕️ <eval>botHistory[1]</eval></p>",
                "mode": "instant"
              }
            }
          ]
        }
      },
      {
        "if": {
          "condition": "userHistory[0]",
          "commands": [
            {
              "say": {
                "label": "<p><em>️ </em><em><eval>userHistory[0]</eval></em></p>",
                "mode": "instant"
              }
            }
          ]
        }
      },
      {
        "if": {
          "condition": "botHistory[0]",
          "commands": [
            {
              "say": {
                "label": "<p>👩‍⚕️ <eval>botHistory[0]</eval></p>",
                "mode": "instant"
              }
            }
          ]
        }
      },
      {
        "prompt": {
          "variable": "userInput"
        }
      },
      {
        "eval": {
          "script": "userInput = EvaluateInString(userInput, true) // Strip any \"evals\" from input\r\nvar __chatPage = pages.getCurrentPageId()\r\nuserHistory.unshift(userInput)\r\nbotHistory.unshift(EvaluateInString(bot.transform(userInput)))\r\nif(pages.getCurrentPageId() === __chatPage) {\r\n  // we're still on our chat page\r\n  if (bot.quit) {\r\n    pages.goto('end')\r\n  } else {\r\n    pages.goto(__chatPage)\r\n  }\r\n} else {\r\n  // An eval probably sent us to a different page.\r\n}"
        }
      }
    ],
    "end": [
      {
        "if": {
          "condition": "userHistory[0]",
          "commands": [
            {
              "say": {
                "label": "<p><em>️ </em><em><eval>userHistory[0]</eval></em></p>",
                "mode": "instant"
              }
            }
          ]
        }
      },
      {
        "if": {
          "condition": "botHistory[0]",
          "commands": [
            {
              "say": {
                "label": "<p>👩‍⚕️ <eval>botHistory[0]</eval></p>",
                "mode": "autoplay"
              }
            }
          ]
        }
      },
      {
        "end": {}
      }
    ]
  },
  "init": "",
  "modules": {
    "notification": {},
    "audio": {},
    "storage": {}
  },
  "galleries": {
    "c645b372-13ef-4494-aac7-fd7bf4dc5965": {
      "name": "bot",
      "images": [
        {
          "id": 1496717,
          "hash": "2cec4488a40d125a12303ce6f90404ff897e45f4",
          "size": 183589,
          "width": 987,
          "height": 768
        },
        {
          "id": 1496718,
          "hash": "cb4adef7984ca5c028b2af2bf2fc4f55358f3994",
          "size": 109722,
          "width": 576,
          "height": 768
        },
        {
          "id": 1496719,
          "hash": "0c430eb9f103367f104ad72a9f31b3844c968ee4",
          "size": 195833,
          "width": 1024,
          "height": 756
        },
        {
          "id": 1496720,
          "hash": "69fdc8540fd48753defb597cdb21013bbce9a509",
          "size": 106812,
          "width": 511,
          "height": 768
        },
        {
          "id": 1496721,
          "hash": "cf3896307004d4440accdd9f18d5536d394b2af1",
          "size": 119706,
          "width": 535,
          "height": 768
        },
        {
          "id": 1496722,
          "hash": "68d6c0e469a94345919b68b73d142da8810a8302",
          "size": 310569,
          "width": 800,
          "height": 504
        },
        {
          "id": 1496723,
          "hash": "ac5593f9c0aa0f5587b6444377622ea0bc286d52",
          "size": 293531,
          "width": 800,
          "height": 533
        },
        {
          "id": 1496724,
          "hash": "e3529abe6bd91463da23868e47a750317de0e37a",
          "size": 234518,
          "width": 533,
          "height": 800
        },
        {
          "id": 1496725,
          "hash": "fc2e0292373adb42c16f7f07191fe6327a8344d1",
          "size": 102668,
          "width": 450,
          "height": 600
        },
        {
          "id": 1496726,
          "hash": "c0fa0535309a004ca6b74e9e99103cf342daefe2",
          "size": 166901,
          "width": 600,
          "height": 800
        },
        {
          "id": 1496727,
          "hash": "dfd7a6b436e5d212995049955b2fa612a9b2e0bf",
          "size": 119111,
          "width": 450,
          "height": 600
        },
        {
          "id": 1496728,
          "hash": "463c3670681d4b38ae7664ae88a94910063f9ae6",
          "size": 145997,
          "width": 800,
          "height": 534
        },
        {
          "id": 1496729,
          "hash": "cf3f19a4b395b3319bb2f4f4f2d2d0ec7bbcecbc",
          "size": 212391,
          "width": 800,
          "height": 534
        },
        {
          "id": 1496730,
          "hash": "00fe78ad294cfaf2311a9ed27f94055e4918c044",
          "size": 142090,
          "width": 800,
          "height": 534
        },
        {
          "id": 1496731,
          "hash": "1719c043c38e2b20cdbc6305db126e4c6acdfbdf",
          "size": 164983,
          "width": 800,
          "height": 533
        },
        {
          "id": 1496732,
          "hash": "cc63baa828dc4b30b927d69e0da432568369cf64",
          "size": 225045,
          "width": 533,
          "height": 800
        }
      ]
    }
  },
  "editor": {
    "recentImages": [
      {
        "type": "gallery",
        "mimeType": "image/jpeg",
        "galleryId": "c645b372-13ef-4494-aac7-fd7bf4dc5965",
        "url": "gallery:c645b372-13ef-4494-aac7-fd7bf4dc5965/*"
      }
    ]
  },
  "files": {}
}