{"version":3,"sources":["https://lively-kernel.org/lively4/lively4-core/src/client/utils/callable.js"],"names":["Callable","Function","constructor","_bound","bind","__call__","args","Error"],"mappings":";;;;;;;;;AACA;AACe,YAAMA,QAAN,SAAuBC,QAAvB,CAAgC;AAC7CC,sBAAc;AACZ;AACA,gBAAM,SAAN,EAAiB,sCAAjB;AACA,eAAKC,MAAL,GAAc,KAAKC,IAAL,CAAU,IAAV,CAAd;AACA,iBAAO,KAAKD,MAAZ;AACD;AACDE,iBAAS,GAAGC,IAAZ,EAAkB;AAChB,gBAAM,IAAIC,KAAJ,CAAU,yBAAV,CAAN;AACD;AAT4C;;yBAA1BP,Q;;;;;;;;6BAAAA,yC","file":"callable.js","sourcesContent":["\n/*MD # Callable MD*/\nexport default class Callable extends Function {\n  constructor() {\n    // there are various ways to do this, see https://hackernoon.com/creating-callable-objects-in-javascript-d21l3te1\n    super('...args', 'return this._bound.__call__(...args)');\n    this._bound = this.bind(this);\n    return this._bound;\n  }\n  __call__(...args) {\n    throw new Error('subclass responsibility')\n  }\n}\n"]}