
'use strict';require('earlgrey-runtime/6');let $targ$0;let $targ$1;let $targ$2;let $targ$7;let path$0;let dom$0;let jq$0;let elements$0;let BucheElement$0;let BucheInput$0;let buche__minus__install$0;if((typeof(document)==="undefined")){$targ$0=undefined;(global["document"]=$targ$0);(void 0);}if((typeof(HTMLElement)==="undefined")){$targ$1=undefined;(global["HTMLElement"]=$targ$1);(void 0);}if((typeof(customElements)==="undefined")){$targ$2=undefined;(global["custom-elements"]=$targ$2);(void 0);}path$0=require("path");dom$0=require("earlgrey-runtime/std/dom");jq$0=require("jquery");elements$0=require("../../elements");BucheElement$0=getProperty(elements$0,"BucheElement","elements");BucheInput$0=(class BucheInput extends BucheElement$0{ setup(config$0,children$0){let accum$0;let accum$1;let $targ$3;let $targ$4;let $targ$5;let __at___$0;let self$0;__at___$0=this;self$0=this;$targ$3=0;(__at___$0["current"]=$targ$3);$targ$4=[];(__at___$0["history"]=$targ$4);if((children$0.length>0)){throw Error("No children allowed for buche-input");}$targ$5=dom$0(ENode(["input"],__amp____colon__(((accum$0=({})),(accum$0["onkeydown"]=(function onkeydown(temp$0$0){let t0$0;let code$0;let t0$1;let bridge$$3779$0;let event$0;let ph$0$0;t0$0=temp$0$0;event$0=t0$0;ph$0$0=event$0.keyCode;t0$1=ph$0$0;code$0=t0$1;bridge$$3779$0=t0$1;if(((bridge$$3779$0===38)||(bridge$$3779$0===40))){event$0.preventDefault();return __at___$0.bucheSend(event$0,({"eventType":"keyup","which":(equal(code$0,38)?"Up":"Down"),"value":event$0.target.value}));}else{return undefined;}})),accum$0),((accum$1=({})),(accum$1["onkeyup"]=(function onkeyup(temp$1$0){let t0$2;let code$1;let event$1;let ph$1$0;t0$2=temp$1$0;event$1=t0$2;ph$1$0=event$1.keyCode;if((ph$1$0===13)){event$1.preventDefault();return __at___$0.bucheSend(event$1,({"eventType":"submit","which":undefined,"value":event$1.target.value}));}else{code$1=ph$1$0;return undefined;}})),accum$1)),[]));(__at___$0["_input"]=$targ$5);return __at___$0._appendChild(__at___$0._input);} command_set(temp$2$0,temp$3$0,data$0){let $targ$6;let __at___$1;let self$1;__at___$1=this;self$1=this;$targ$6=(data$0.value||"");(__at___$1._input["value"]=$targ$6);return (void 0);} command_append(temp$4$0,temp$5$0,data$1){let __at___$2;let self$2;__at___$2=this;self$2=this;return (__at___$2._input["value"]=(__at___$2._input.value+(data$1.value||"")));} command_focus(temp$6$0,temp$7$0,data$2){let __at___$3;let self$3;__at___$3=this;self$3=this;return __at___$3._input.focus();}});buche__minus__install$0=(function bucheInstall(){customElements.define("buche-input",BucheInput$0);return document.head.appendChild(dom$0(ENode(["link"],({"type":"text/css","rel":"stylesheet","href":path$0.join(__dirname,"style.css")}),[])));});$targ$7=buche__minus__install$0;(exports["bucheInstall"]=$targ$7);(void 0);
//# sourceMappingURL=index.js.map

