forked from wavedrom/wavedrom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwavedrom.min.js
3 lines (2 loc) · 33.5 KB
/
wavedrom.min.js
1
2
3
/*! wavedrom 2019-02-24 */
!function a(o,i,l){function c(t,e){if(!i[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(u)return u(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var s=i[t]={exports:{}};o[t][0].call(s.exports,function(e){return c(o[t][1][e]||e)},s,s.exports,a,o,i,l)}return i[t].exports}for(var u="function"==typeof require&&require,e=0;e<l.length;e++)c(l[e]);return c}({1:[function(e,t,r){"use strict";t.exports=function(i,l){var c,u;function d(e){var t=parseInt(u.style.left,10),r=parseInt(u.style.top,10);(e.x<t||e.x>t+u.offsetWidth||e.y<r||e.y>r+u.offsetHeight)&&(u.parentNode.removeChild(u),document.body.removeEventListener("mousedown",d,!1))}(c=document.getElementById(l+i)).childNodes[0].addEventListener("contextmenu",function(e){var t,r,n;(u=document.createElement("div")).className="wavedromMenu",u.style.top=e.y+"px",u.style.left=e.x+"px",t=document.createElement("ul"),(r=document.createElement("li")).innerHTML="Save as PNG",t.appendChild(r),(n=document.createElement("li")).innerHTML="Save as SVG",t.appendChild(n),u.appendChild(t),document.body.appendChild(u),r.addEventListener("click",function(){var e,t,r,n,s,a,o;e="",0!==i&&(e+=(t=document.getElementById(l+0)).innerHTML.substring(166,t.innerHTML.indexOf('<g id="waves_0">'))),e=[c.innerHTML.slice(0,166),e,c.innerHTML.slice(166)].join(""),r="data:image/svg+xml;base64,"+btoa(e),(n=new Image).src=r,(s=document.createElement("canvas")).width=n.width,s.height=n.height,s.getContext("2d").drawImage(n,0,0),a=s.toDataURL("image/png"),(o=document.createElement("a")).href=a,o.download="wavedrom.png",o.click(),u.parentNode.removeChild(u),document.body.removeEventListener("mousedown",d,!1)},!1),n.addEventListener("click",function(){var e,t,r,n;e="",0!==i&&(e+=(t=document.getElementById(l+0)).innerHTML.substring(166,t.innerHTML.indexOf('<g id="waves_0">'))),e=[c.innerHTML.slice(0,166),e,c.innerHTML.slice(166)].join(""),r="data:image/svg+xml;base64,"+btoa(e),(n=document.createElement("a")).href=r,n.download="wavedrom.svg",n.click(),u.parentNode.removeChild(u),document.body.removeEventListener("mousedown",d,!1)},!1),u.addEventListener("contextmenu",function(e){e.preventDefault()},!1),document.body.addEventListener("mousedown",d,!1),e.preventDefault()},!1)}},{}],2:[function(e,t,r){"use strict";var n=e("./jsonml-parse");t.exports=n},{"./jsonml-parse":14}],3:[function(e,t,r){"use strict";var n=e("./eva"),s=e("./render-wave-form");t.exports=function(){s(0,n("InputJSON_0"),"WaveDrom_Display_")}},{"./eva":4,"./render-wave-form":29}],4:[function(require,module,exports){"use strict";function eva(id){var TheTextBox,source;function erra(e){return{signal:[{name:["tspan",["tspan",{class:"error h5"},"Error: "],e.message]}]}}if(TheTextBox=document.getElementById(id),TheTextBox.type&&"textarea"===TheTextBox.type)try{source=eval("("+TheTextBox.value+")")}catch(e){return erra(e)}else try{source=eval("("+TheTextBox.innerHTML+")")}catch(e){return erra(e)}if("[object Object]"!==Object.prototype.toString.call(source))return erra({message:'[Semantic]: The root has to be an Object: "{signal:[...]}"'});if(source.signal){if("[object Array]"!==Object.prototype.toString.call(source.signal))return erra({message:'[Semantic]: "signal" object has to be an Array "signal:[]"'})}else if(source.assign){if("[object Array]"!==Object.prototype.toString.call(source.assign))return erra({message:'[Semantic]: "assign" object hasto be an Array "assign:[]"'})}else if(!source.reg)return erra({message:'[Semantic]: "signal:[...]" or "assign:[...]" property is missing inside the root Object'});return source}module.exports=eva},{}],5:[function(e,t,r){"use strict";t.exports=function(e){var t=0,r=0,n=[];return e.forEach(function(e){"vvv-2"===e||"vvv-3"===e||"vvv-4"===e||"vvv-5"===e?r+=1:0!==r&&(n.push(t-(r+1)/2),r=0),t+=1}),0!==r&&n.push(t-(r+1)/2),n}},{}],6:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,s,a=[];if(4===e.length){for(s=0;s<r;s+=1){for(a.push(e[0]),n=0;n<t;n+=1)a.push(e[1]);for(a.push(e[2]),n=0;n<t;n+=1)a.push(e[3])}return a}for(1===e.length&&e.push(e[0]),a.push(e[0]),n=0;n<r*(2*(t+1))-1;n+=1)a.push(e[1]);return a}},{}],7:[function(e,t,r){"use strict";var s=e("./gen-brick");t.exports=function(e,t,r){var n;switch(n=[],e){case"p":n=s(["pclk","111","nclk","000"],t,r);break;case"n":n=s(["nclk","000","pclk","111"],t,r);break;case"P":n=s(["Pclk","111","nclk","000"],t,r);break;case"N":n=s(["Nclk","000","pclk","111"],t,r);break;case"l":case"L":case"0":n=s(["000"],t,r);break;case"h":case"H":case"1":n=s(["111"],t,r);break;case"=":case"2":n=s(["vvv-2"],t,r);break;case"3":n=s(["vvv-3"],t,r);break;case"4":n=s(["vvv-4"],t,r);break;case"5":n=s(["vvv-5"],t,r);break;case"d":n=s(["ddd"],t,r);break;case"u":n=s(["uuu"],t,r);break;case"z":n=s(["zzz"],t,r);break;default:n=s(["xxx"],t,r)}return n}},{"./gen-brick":6}],8:[function(e,t,r){"use strict";var g=e("./gen-brick");t.exports=function(e,t,r){var n,s,a,o,i,l,c,u,d,f,h,m,p,x;return n={p:"pclk",n:"nclk",P:"Pclk",N:"Nclk",h:"pclk",l:"nclk",H:"Pclk",L:"Nclk"},s={0:"0",1:"1",x:"x",d:"d",u:"u",z:"z","=":"v",2:"v",3:"v",4:"v",5:"v"},a={0:"",1:"",x:"",d:"",u:"",z:"","=":"-2",2:"-2",3:"-3",4:"-4",5:"-5"},o={p:"0",n:"1",P:"0",N:"1",h:"1",l:"0",H:"1",L:"0",0:"0",1:"1",x:"x",d:"d",u:"u",z:"z","=":"v",2:"v",3:"v",4:"v",5:"v"},i={p:"",n:"",P:"",N:"",h:"",l:"",H:"",L:"",0:"",1:"",x:"",d:"",u:"",z:"","=":"-2",2:"-2",3:"-3",4:"-4",5:"-5"},l={p:"nclk",n:"pclk",P:"nclk",N:"pclk"},c={p:"000",n:"111",P:"000",N:"111"},u={hp:"111",Hp:"111",ln:"000",Ln:"000",nh:"111",Nh:"111",pl:"000",Pl:"000"},f={p:"111",n:"000",P:"111",N:"000",h:"111",l:"000",H:"111",L:"000",0:"000",1:"111",x:"xxx",d:"ddd",u:"uuu",z:"zzz","=":"vvv-2",2:"vvv-2",3:"vvv-3",4:"vvv-4",5:"vvv-5"}[(d=e.split(""))[1]],void 0===(h=n[d[1]])?void 0===(m=s[d[1]])?g(["xxx"],t,r):(p=o[d[0]],g(void 0===p?["xxx"]:[p+"m"+m+i[d[0]]+a[d[1]],f],t,r)):(void 0!==(x=u[e])&&(h=x),m=l[d[1]],g(void 0===m?[h,f]:[h,f,m,c[d[1]]],t,r))}},{"./gen-brick":6}],9:[function(e,t,r){"use strict";var s=e("./create-element"),a=e("./w3");t.exports=function(e,t){for(var r,n;t.childNodes.length;)t.removeChild(t.childNodes[0]);n=["svg",{id:"svgcontent_"+e,xmlns:a.svg,"xmlns:xlink":a.xlink,overflow:"hidden"},["style",".pinname {font-size:12px; font-style:normal; font-variant:normal; font-weight:500; font-stretch:normal; text-align:center; text-anchor:end; font-family:Helvetica} .wirename {font-size:12px; font-style:normal; font-variant:normal; font-weight:500; font-stretch:normal; text-align:center; text-anchor:start; font-family:Helvetica} .wirename:hover {fill:blue} .gate {color:#000; fill:#ffc; fill-opacity: 1;stroke:#000; stroke-width:1; stroke-opacity:1} .gate:hover {fill:red !important; } .wire {fill:none; stroke:#000; stroke-width:1; stroke-opacity:1} .grid {fill:#fff; fill-opacity:1; stroke:none}"]],r=s(n),t.insertBefore(r,null)}},{"./create-element":2,"./w3":31}],10:[function(e,t,r){"use strict";var l=e("./create-element"),c=e("./w3");t.exports=function(e,t,r,n,s){for(var a,o,i;t.childNodes.length;)t.removeChild(t.childNodes[0]);for(o in s)break;i=s.default||s[o],r&&r.config&&r.config.skin&&s[r.config.skin]&&(i=s[r.config.skin]),0===e?(n.xs=Number(i[3][1][2][1].width),n.ys=Number(i[3][1][2][1].height),n.xlabel=Number(i[3][1][2][1].x),n.ym=Number(i[3][1][2][1].y)):i=["svg",{id:"svg",xmlns:c.svg,"xmlns:xlink":c.xlink,height:"0"},["g",{id:"waves"},["g",{id:"lanes"}],["g",{id:"groups"}]]],i[i.length-1][1].id="waves_"+e,i[i.length-1][2][1].id="lanes_"+e,i[i.length-1][3][1].id="groups_"+e,i[1].id="svgcontent_"+e,i[1].height=0,a=l(i),t.insertBefore(a,null)}},{"./create-element":2,"./w3":31}],11:[function(e,t,r){"use strict";var a={rowspan:"rowSpan",colspan:"colSpan",cellpadding:"cellPadding",cellspacing:"cellSpacing",tabindex:"tabIndex",accesskey:"accessKey",hidefocus:"hideFocus",usemap:"useMap",maxlength:"maxLength",readonly:"readOnly",contenteditable:"contentEditable"},o={enctype:"encoding",onscroll:"DOMMouseScroll"},i=function(e){for(var t,r={};e.length;)r["on"+(t=e.shift()).toLowerCase()]=t;return r}("blur,change,click,dblclick,error,focus,keydown,keypress,keyup,load,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,resize,scroll,select,submit,unload".split(","));function l(e,t,r){"string"==typeof r&&(r=new Function("event",r)),"function"==typeof r&&(e[t]=r)}t.exports=function(e,t){if(t.name&&document.attachEvent){var r=document.createElement("<"+e.tagName+" name='"+t.name+"'>");e.tagName===r.tagName&&(e=r)}for(var n in t)if(t.hasOwnProperty(n)){var s=t[n];n&&null!=s&&("style"===(n=a[n.toLowerCase()]||n)?void 0!==e.style.cssText?e.style.cssText=s:e.style=s:i[n]?(l(e,n,s),o[n]&&l(e,o[n],s)):"string"==typeof s||"number"==typeof s||"boolean"==typeof s?(e.setAttribute(n,s),o[n]&&e.setAttribute(o[n],s)):(e[n]=s,o[n]&&(e[o[n]]=s)))}return e}},{}],12:[function(e,t,r){"use strict";t.exports=function(e,t){t&&(e.tagName&&"style"===e.tagName.toLowerCase()&&document.createStyleSheet?e.cssText=t:!1!==e.canHaveChildren&&e.appendChild(t))}},{}],13:[function(e,t,r){"use strict";var n=e("./jsonml-trim-whitespace");t.exports=function(e){var t=document.createElement("div");if(t.innerHTML=e,n(t),1===t.childNodes.length)return t.firstChild;for(var r=document.createDocumentFragment?document.createDocumentFragment():document.createElement("");t.firstChild;)r.appendChild(t.firstChild);return r}},{"./jsonml-trim-whitespace":15}],14:[function(e,t,r){"use strict";var i,l,c=e("./jsonml-hydrate"),u=e("./w3"),d=e("./jsonml-append-child"),s=e("./jsonml-add-attributes"),f=e("./jsonml-trim-whitespace");function h(e,t,r){return document.createTextNode("["+e+"-"+r+"]")}i=function(e,t,r){for(var n=1;n<t.length;n++)t[n]instanceof Array||"string"==typeof t[n]?d(e,l(t[n],r)):t[n]&&t[n].value?d(e,c(t[n].value)):"object"==typeof t[n]&&null!==t[n]&&1===e.nodeType&&(e=s(e,t[n]));return e},l=function(t,r){var e,n;try{if(!t)return null;if("string"==typeof t)return document.createTextNode(t);if(t&&t.value)return c(t.value);if(!((n=t)instanceof Array&&"string"==typeof n[0]))throw new SyntaxError("invalid JsonML");var s=t[0];if(s)return"style"===s.toLowerCase()&&document.createStyleSheet?(i(document.createStyleSheet(),t,r),null):(e=i(document.createElementNS(u.svg,s),t,r),f(e),e);for(var a=document.createDocumentFragment?document.createDocumentFragment():document.createElement(""),o=2;o<t.length;o++)d(a,l(t[o],r));return f(a),1===a.childNodes.length?a.firstChild:a}catch(e){try{return h(e,t,r)}catch(e){return document.createTextNode("["+e+"]")}}},t.exports=l},{"./jsonml-add-attributes":11,"./jsonml-append-child":12,"./jsonml-hydrate":13,"./jsonml-trim-whitespace":15,"./w3":31}],15:[function(e,t,r){"use strict";function n(e){return e&&3===e.nodeType&&(!e.nodeValue||!/\S/.exec(e.nodeValue))}t.exports=function(e){if(e){for(;n(e.firstChild);)e.removeChild(e.firstChild);for(;n(e.lastChild);)e.removeChild(e.lastChild)}}},{}],16:[function(e,t,r){"use strict";t.exports={xs:20,ys:20,xg:120,yh0:0,yh1:0,yf0:0,yf1:0,y0:5,yo:30,tgo:-10,ym:15,xlabel:6,xmax:1,scale:1,head:{},foot:{}}},{}],17:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n;t.hscale=1,t.hscale0&&(t.hscale=t.hscale0),e&&e.config&&e.config.hscale&&0<(r=Math.round(0<(n=e.config.hscale)?Math.round(n):1))&&(100<r&&(r=100),t.hscale=r),t.yh0=0,t.yh1=0,t.head=e.head,t.xmin_cfg=0,t.xmax_cfg=1e12,e&&e.config&&e.config.hbounds&&2==e.config.hbounds.length&&(e.config.hbounds[0]=Math.floor(e.config.hbounds[0]),e.config.hbounds[1]=Math.ceil(e.config.hbounds[1]),e.config.hbounds[0]<e.config.hbounds[1]&&(t.xmin_cfg=2*Math.floor(e.config.hbounds[0]),t.xmax_cfg=2*Math.floor(e.config.hbounds[1]))),e&&e.head&&((e.head.tick||0===e.head.tick||e.head.tock||0===e.head.tock)&&(t.yh0=20),(e.head.tick||0===e.head.tick)&&(e.head.tick=e.head.tick+t.xmin_cfg/2),(e.head.tock||0===e.head.tock)&&(e.head.tock=e.head.tock+t.xmin_cfg/2),e.head.text&&(t.yh1=46,t.head.text=e.head.text)),t.yf0=0,t.yf1=0,t.foot=e.foot,e&&e.foot&&((e.foot.tick||0===e.foot.tick||e.foot.tock||0===e.foot.tock)&&(t.yf0=20),(e.foot.tick||0===e.foot.tick)&&(e.foot.tick=e.foot.tick+t.xmin_cfg/2),(e.foot.tock||0===e.foot.tock)&&(e.foot.tock=e.foot.tock+t.xmin_cfg/2),e.foot.text&&(t.yf1=46,t.foot.text=e.foot.text))}},{}],18:[function(e,t,r){"use strict";var f=e("./gen-first-wave-brick"),h=e("./gen-wave-brick"),m=e("./find-lane-markers");t.exports=function(e,t,r){var n,s,a,o,i,l,c=[],u=[],d=[];for(a=(c=e.split("")).shift(),i=!1,n=1;"."===c[0]||"|"===c[0];)c.shift(),n+=1;for(u=u.concat(f(a,t,n));c.length;){for(s=a,"<"===(a=c.shift())&&(i=!0,a=c.shift()),">"===a&&(i=!1,a=c.shift()),n=1;"."===c[0]||"|"===c[0];)c.shift(),n+=1;u=i?u.concat(h(s+a,0,n-r.period)):u.concat(h(s+a,t,n))}for(o=0;o<r.phase;o+=1)d.push(u.shift());return 0<d.length?(l=m(d).length,1==m([d[d.length-1]]).length&&1==m([u[0]]).length&&(l-=1)):l=0,[u,l]}},{"./find-lane-markers":5,"./gen-first-wave-brick":7,"./gen-wave-brick":8}],19:[function(e,t,r){"use strict";var d=e("./parse-wave-lane");t.exports=function(e,t){var r,n,s,a,o,i,l,c=[],u=[];for(r in e)n=e[r],t.period=n.period?n.period:1,t.phase=(n.phase?2*n.phase:0)+t.xmin_cfg,c.push([]),u[0]=n.name||" ",u[1]=(n.phase||0)+t.xmin_cfg/2,n.wave?(s=(a=d(n.wave,t.period*t.hscale-1,t))[0],o=a[1]):s=null,c[c.length-1][0]=u.slice(0),c[c.length-1][1]=s,c[c.length-1][2]=(i=o,(l=void 0)===(l=n.data)?null:("string"==typeof l&&(l=l.split(" ")),l=l.slice(i)));return c}},{"./parse-wave-lane":18}],20:[function(e,t,r){"use strict";var s=e("./eva"),a=e("./append-save-as-dialog"),o=e("./render-wave-form");t.exports=function(){var e,t,r,n;for(r=0,e=document.querySelectorAll("*"),t=0;t<e.length;t++)e.item(t).type&&"WaveDrom"===e.item(t).type&&(e.item(t).setAttribute("id","InputJSON_"+r),(n=document.createElement("div")).id="WaveDrom_Display_"+r,e.item(t).parentNode.insertBefore(n,e.item(t)),r+=1);for(t=0;t<r;t+=1)o(t,s("InputJSON_"+t),"WaveDrom_Display_"),a(t,"WaveDrom_Display_");document.head.innerHTML+='<style type="text/css">div.wavedromMenu{position:fixed;border:solid 1pt#CCCCCC;background-color:white;box-shadow:0px 10px 20px #808080;cursor:default;margin:0px;padding:0px;}div.wavedromMenu>ul{margin:0px;padding:0px;}div.wavedromMenu>ul>li{padding:2px 10px;list-style:none;}div.wavedromMenu>ul>li:hover{background-color:#b5d5ff;}</style>'}},{"./append-save-as-dialog":1,"./eva":4,"./render-wave-form":29}],21:[function(e,t,r){"use strict";t.exports=function e(t,r){var n,s,a={},o={x:10};for("string"!=typeof t[0]&&"number"!=typeof t[0]||(s=t[0],o.x=25),r.x+=o.x,n=0;n<t.length;n++)"object"==typeof t[n]&&("[object Array]"===Object.prototype.toString.call(t[n])?(a.y=r.y,(r=e(t[n],r)).groups.push({x:r.xx,y:a.y,height:r.y-a.y,name:r.name})):(r.lanes.push(t[n]),r.width.push(r.x),r.y+=1));return r.xx=r.x,r.x-=o.x,r.name=s,r}},{}],22:[function(e,t,r){"use strict";var N=e("tspan"),M=e("./create-element"),_=e("./w3");t.exports=function(e,t,r,n,s){var a,o,i,l,c,u,d,f,h,m,p,x,g,v,y,b,w=[],k={words:[],from:0,shape:"",to:0,label:""},A={};if(t){for(o in t)if(s.period=t[o].period?t[o].period:1,s.phase=(t[o].phase?2*t[o].phase:0)+s.xmin_cfg,l=t[o].node)for(w=l.split(""),c=0;w.length;)"."!==(u=w.shift())&&(A[u]={x:s.xs*(2*c*s.period*s.hscale-s.phase)+s.xlabel,y:o*s.yo+s.y0+.5*s.ys}),c+=1;if((a=document.createElementNS(_.svg,"g")).id="wavearcs_"+r,e.insertBefore(a,null),n.edge)for(o in n.edge)if(k.words=n.edge[o].split(" "),k.label=n.edge[o].substring(k.words[0].length),k.label=k.label.substring(1),k.from=k.words[0].substr(0,1),k.to=k.words[0].substr(-1,1),k.shape=k.words[0].slice(1,-1),h=A[k.from],m=A[k.to],h&&m&&((y=document.createElementNS(_.svg,"path")).id="gmark_"+k.from+"_"+k.to,y.setAttribute("d","M "+h.x+","+h.y+" "+m.x+","+m.y),y.setAttribute("style","fill:none;stroke:#00F;stroke-width:1"),a.insertBefore(y,null)),h&&m){switch(k.label&&((d=N.parse(k.label)).unshift("text",{style:"font-size:10px;","text-anchor":"middle","xml:space":"preserve"}),d=M(d),f=M(["rect",{height:9,style:"fill:#FFF;"}]),a.insertBefore(f,null),a.insertBefore(d,null),b=d.getBBox().width,f.setAttribute("width",b)),p=m.x-h.x,x=m.y-h.y,g=(h.x+m.x)/2,v=(h.y+m.y)/2,k.shape){case"-":break;case"~":y.setAttribute("d","M "+h.x+","+h.y+" c "+.7*p+", 0 "+.3*p+", "+x+" "+p+", "+x);break;case"-~":y.setAttribute("d","M "+h.x+","+h.y+" c "+.7*p+", 0 "+p+", "+x+" "+p+", "+x),k.label&&(g=h.x+.75*(m.x-h.x));break;case"~-":y.setAttribute("d","M "+h.x+","+h.y+" c 0, 0 "+.3*p+", "+x+" "+p+", "+x),k.label&&(g=h.x+.25*(m.x-h.x));break;case"-|":y.setAttribute("d","m "+h.x+","+h.y+" "+p+",0 0,"+x),k.label&&(g=m.x);break;case"|-":y.setAttribute("d","m "+h.x+","+h.y+" 0,"+x+" "+p+",0"),k.label&&(g=h.x);break;case"-|-":y.setAttribute("d","m "+h.x+","+h.y+" "+p/2+",0 0,"+x+" "+p/2+",0");break;case"->":y.setAttribute("style","marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none");break;case"~>":y.setAttribute("style","marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none"),y.setAttribute("d","M "+h.x+","+h.y+" c "+.7*p+", 0 "+.3*p+", "+x+" "+p+", "+x);break;case"-~>":y.setAttribute("style","marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none"),y.setAttribute("d","M "+h.x+","+h.y+" c "+.7*p+", 0 "+p+", "+x+" "+p+", "+x),k.label&&(g=h.x+.75*(m.x-h.x));break;case"~->":y.setAttribute("style","marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none"),y.setAttribute("d","M "+h.x+","+h.y+" c 0, 0 "+.3*p+", "+x+" "+p+", "+x),k.label&&(g=h.x+.25*(m.x-h.x));break;case"-|>":y.setAttribute("style","marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none"),y.setAttribute("d","m "+h.x+","+h.y+" "+p+",0 0,"+x),k.label&&(g=m.x);break;case"|->":y.setAttribute("style","marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none"),y.setAttribute("d","m "+h.x+","+h.y+" 0,"+x+" "+p+",0"),k.label&&(g=h.x);break;case"-|->":y.setAttribute("style","marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none"),y.setAttribute("d","m "+h.x+","+h.y+" "+p/2+",0 0,"+x+" "+p/2+",0");break;case"<->":y.setAttribute("style","marker-end:url(#arrowhead);marker-start:url(#arrowtail);stroke:#0041c4;stroke-width:1;fill:none");break;case"<~>":y.setAttribute("style","marker-end:url(#arrowhead);marker-start:url(#arrowtail);stroke:#0041c4;stroke-width:1;fill:none"),y.setAttribute("d","M "+h.x+","+h.y+" c "+.7*p+", 0 "+.3*p+", "+x+" "+p+", "+x);break;case"<-~>":y.setAttribute("style","marker-end:url(#arrowhead);marker-start:url(#arrowtail);stroke:#0041c4;stroke-width:1;fill:none"),y.setAttribute("d","M "+h.x+","+h.y+" c "+.7*p+", 0 "+p+", "+x+" "+p+", "+x),k.label&&(g=h.x+.75*(m.x-h.x));break;case"<-|>":y.setAttribute("style","marker-end:url(#arrowhead);marker-start:url(#arrowtail);stroke:#0041c4;stroke-width:1;fill:none"),y.setAttribute("d","m "+h.x+","+h.y+" "+p+",0 0,"+x),k.label&&(g=m.x);break;case"<-|->":y.setAttribute("style","marker-end:url(#arrowhead);marker-start:url(#arrowtail);stroke:#0041c4;stroke-width:1;fill:none"),y.setAttribute("d","m "+h.x+","+h.y+" "+p/2+",0 0,"+x+" "+p/2+",0");break;default:y.setAttribute("style","fill:none;stroke:#F00;stroke-width:1")}k.label&&(d.setAttribute("x",g),d.setAttribute("y",v+3),f.setAttribute("x",g-b/2),f.setAttribute("y",v-5))}for(i in A)i===i.toLowerCase()&&0<A[i].x&&(f=M(["rect",{y:A[i].y-4,height:8,style:"fill:#FFF;"}]),d=M(["text",{style:"font-size:8px;",x:A[i].x,y:A[i].y+2,"text-anchor":"middle"},i+""]),a.insertBefore(f,null),a.insertBefore(d,null),b=d.getBBox().width+2,f.setAttribute("x",A[i].x-b/2),f.setAttribute("width",b))}}},{"./create-element":2,"./w3":31,tspan:34}],23:[function(e,t,r){"use strict";var m=e("./create-element");function p(e,t){var r,n,s;for(t.xmax=Math.max(t.xmax,t.x),r=t.y,s=e.length,n=1;n<s;n++)"[object Array]"===Object.prototype.toString.call(e[n])?t=p(e[n],{x:t.x+1,y:t.y,xmax:t.xmax}):(e[n]={name:e[n],x:t.x+1,y:t.y},t.y+=2);return e[0]={name:e[0],x:t.x,y:Math.round((r+(t.y-2))/2)},t.x--,t}function x(e,t){var r,n,s,a,o,i=["g"],l=[];if("[object Array]"===Object.prototype.toString.call(e)){for(n=e.length,l.push(e[0].name),l.push([32*(t-e[0].x),8*e[0].y]),r=1;r<n;r++)"[object Array]"===Object.prototype.toString.call(e[r])?l.push([32*(t-e[r][0].x),8*e[r][0].y]):l.push([32*(t-e[r].x),8*e[r].y]);for(i.push(function(e){var t,r,n,s,a,o,i,l,c,u=["g"],d=[],f=e.length;for(t=2;t<f;t++)d.push(e[t][1]);for(r=Math.min.apply(null,d),n=Math.max.apply(null,d),u.push(["g",{transform:"translate(16,0)"},["path",{d:"M "+e[2][0]+","+r+" "+e[2][0]+","+n,class:"wire"}]]),t=2;t<f;t++)u.push(["g",["path",{d:"m "+e[t][0]+","+e[t][1]+" 16,0",class:"wire"}]]);return u.push(["g",{transform:"translate("+e[1][0]+","+e[1][1]+")"},["title",e[0]],(s=e[0],a=r-e[1][1],o=n-e[1][1],c=" M 4,0 C 4,1.1 3.1,2 2,2 0.9,2 0,1.1 0,0 c 0,-1.1 0.9,-2 2,-2 1.1,0 2,0.9 2,2 z",o===a&&(a=-(o=4)),l={BUF:1,INV:1,AND:"&",NAND:"&",OR:"≥1",NOR:"≥1",XOR:"=1",XNOR:"=1",box:""}[s],(i={"~":"M -11,-6 -11,6 0,0 z m -5,6 5,0"+c,"=":"M -11,-6 -11,6 0,0 z m -5,6 5,0","&":"m -16,-10 5,0 c 6,0 11,4 11,10 0,6 -5,10 -11,10 l -5,0 z","~&":"m -16,-10 5,0 c 6,0 11,4 11,10 0,6 -5,10 -11,10 l -5,0 z"+c,"|":"m -18,-10 4,0 c 6,0 12,5 14,10 -2,5 -8,10 -14,10 l -4,0 c 2.5,-5 2.5,-15 0,-20 z","~|":"m -18,-10 4,0 c 6,0 12,5 14,10 -2,5 -8,10 -14,10 l -4,0 c 2.5,-5 2.5,-15 0,-20 z"+c,"^":"m -21,-10 c 1,3 2,6 2,10 m 0,0 c 0,4 -1,7 -2,10 m 3,-20 4,0 c 6,0 12,5 14,10 -2,5 -8,10 -14,10 l -4,0 c 1,-3 2,-6 2,-10 0,-4 -1,-7 -2,-10 z","~^":"m -21,-10 c 1,3 2,6 2,10 m 0,0 c 0,4 -1,7 -2,10 m 3,-20 4,0 c 6,0 12,5 14,10 -2,5 -8,10 -14,10 l -4,0 c 1,-3 2,-6 2,-10 0,-4 -1,-7 -2,-10 z"+c,"+":"m -8,5 0,-10 m -5,5 10,0 m 3,0 c 0,4.418278 -3.581722,8 -8,8 -4.418278,0 -8,-3.581722 -8,-8 0,-4.418278 3.581722,-8 8,-8 4.418278,0 8,3.581722 8,8 z","*":"m -4,4 -8,-8 m 0,8 8,-8 m 4,4 c 0,4.418278 -3.581722,8 -8,8 -4.418278,0 -8,-3.581722 -8,-8 0,-4.418278 3.581722,-8 8,-8 4.418278,0 8,3.581722 8,8 z"}[s])?["path",{class:"gate",d:i}]:l?["g",["path",{class:"gate",d:"m -16,"+(a-3)+" 16,0 0,"+(o-a+6)+" -16,0 z"+({INV:1,NAND:1,NOR:1,XNOR:1}[s]?c:"")}],["text",["tspan",{x:"-14",y:"4",class:"wirename"},l+""]]]:["text",["tspan",{x:"-14",y:"4",class:"wirename"},s+""]])]),u}(l)),r=1;r<n;r++)i.push(x(e[r],t))}else o=e.name,s=32*(t-e.x),a=8*e.y,i.push(["g",{transform:"translate("+s+","+a+")"},["title",o],["path",{d:"M 2,0 a 2,2 0 1 1 -4,0 2,2 0 1 1 4,0 z"}],["text",["tspan",{x:"-4",y:"4",class:"pinname"},o]]]);return i}t.exports=function(e,t){var r,n,s,a,o,i,l,c,u,d,f=["g"],h=["g"];for(c=t.assign.length,n={x:0,y:2,xmax:0},r=t.assign,l=0;l<c;l++)(n=p(r[l],n)).x++;for(s=n.xmax+3,l=0;l<c;l++)f.push(x(r[l],s));for(o=32*(s+1)+1,i=8*(n.y+1)-7,c=4*(s+1),d=n.y+1,l=0;l<=c;l++)for(u=0;u<=d;u++)h.push(["rect",{height:1,width:1,x:8*l-.5,y:8*u-.5,class:"grid"}]);(a=document.getElementById("svgcontent_"+e)).setAttribute("viewBox","0 0 "+o+" "+i),a.setAttribute("width",o),a.setAttribute("height",i),a.insertBefore(m(["g",{transform:"translate(0.5, 0.5)"},h,f]),null)}},{"./create-element":2}],24:[function(e,t,r){"use strict";var h=e("./w3");t.exports=function(e,t,r,n){var s,a,o,i,l,c,u,d,f=[];if(t)for(s in(a=document.createElementNS(h.svg,"g")).id="wavegaps_"+r,e.insertBefore(a,null),u=!1,t)if(n.period=t[s].period?t[s].period:1,n.phase=(t[s].phase?2*t[s].phase:0)+n.xmin_cfg,(o=document.createElementNS(h.svg,"g")).id="wavegap_"+s+"_"+r,o.setAttribute("transform","translate(0,"+(n.y0+s*n.yo)+")"),a.insertBefore(o,null),c=t[s].wave)for(f=c.split(""),l=0;f.length;)"<"===(d=f.shift())&&(u=!0,d=f.shift()),">"===d&&(u=!1,d=f.shift()),l+=u?1:2*n.period,"|"===d&&((i=document.createElementNS(h.svg,"use")).setAttributeNS(h.xlink,"xlink:href","#gap"),i.setAttribute("transform","translate("+n.xs*((l-(u?0:n.period))*n.hscale-n.phase)+")"),o.insertBefore(i,null))}},{"./w3":31}],25:[function(e,t,r){"use strict";var l=e("tspan");t.exports=function(e,r,n){var s,a,o,i=["g"];return e.forEach(function(e,t){i.push(["path",{id:"group_"+t+"_"+r,d:"m "+(e.x+.5)+","+(e.y*n.yo+3.5+n.yh0+n.yh1)+" c -3,0 -5,2 -5,5 l 0,"+(e.height*n.yo-16)+" c 0,3 2,5 5,5",style:"stroke:#0041c4;stroke-width:1;fill:none"}]),void 0!==e.name&&(s=e.x-10,a=n.yo*(e.y+e.height/2)+n.yh0+n.yh1,(o=l.parse(e.name)).unshift("text",{"text-anchor":"middle",class:"info","xml:space":"preserve"}),i.push(["g",{transform:"translate("+s+","+a+")"},["g",{transform:"rotate(270)"},o]]))}),i}},{tspan:34}],26:[function(e,t,r){"use strict";var x=e("tspan"),g=e("./create-element");t.exports=function(e,t,r,n){var m,p,s,a,o,i;function l(e,t,r){var n;e[t]&&e[t].text&&((n=x.parse(e[t].text)).unshift("text",{x:e.xmax*e.xs/2,y:r,"text-anchor":"middle",fill:"#000","xml:space":"preserve"}),n=g(n),p.insertBefore(n,null))}function c(e,t,r,n,s,a,o){var i,l,c,u,d=1,f=0,h=[];if(void 0!==e[t]&&void 0!==e[t][r]){if("string"==typeof(c=e[t][r]))c=c.split(" ");else if("number"==typeof c||"boolean"==typeof c)for(l=Number(c),c=[],m=0;m<o;m+=1)c.push(m+l);if("[object Array]"===Object.prototype.toString.call(c)&&0!==c.length){if(1===c.length)if(l=Number(c[0]),isNaN(l))h=c;else for(m=0;m<o;m+=1)h[m]=m+l;else if(2===c.length)if(l=Number(c[0]),d=Number(c[1]),2===(u=c[1].split(".")).length&&(f=u[1].length),isNaN(l)||isNaN(d))h=c;else for(l*=d,m=0;m<o;m+=1)h[m]=(d*m+l).toFixed(f);else h=c;for(m=0;m<o;m+=1)u=h[m],(i=x.parse(u)).unshift("text",{x:m*s+n,y:a,"text-anchor":"middle",class:"muted","xml:space":"preserve"}),i=g(i),p.insertBefore(i,null)}}}for(o=(a=2*n.hscale)*n.xs,s=n.xmax/a,i=t.length*n.yo,p=g(["g",{id:"gmarks_"+r}]),e.insertBefore(p,e.firstChild),m=0;m<s+1;m+=1)p.insertBefore(g(["path",{id:"gmark_"+m+"_"+r,d:"m "+m*o+",0 0,"+i,style:"stroke:#888;stroke-width:0.5;stroke-dasharray:1,3"}]),null);l(n,"head",n.yh0?-33:-13),l(n,"foot",i+(n.yf0?45:25)),c(n,"head","tick",0,o,-5,s+1),c(n,"head","tock",o/2,o,-5,s),c(n,"foot","tick",0,o,i+15,s+1),c(n,"foot","tock",o/2,o,i+15,s)}},{"./create-element":2,tspan:34}],27:[function(e,t,r){"use strict";var a=e("./create-element"),o=e("bit-field/lib/render");t.exports=function(e,t,r){for(;r.childNodes.length;)r.removeChild(r.childNodes[0]);var n=o(t.reg,t.config),s=a(n);r.insertBefore(s,null)}},{"./create-element":2,"bit-field/lib/render":33}],28:[function(e,t,r){"use strict";var h=e("./rec"),m=e("./lane"),p=e("./create-element"),x=e("./parse-config"),g=e("./parse-wave-lanes"),v=e("./render-marks"),y=e("./render-gaps"),b=e("./render-groups"),w=e("./render-wave-lane"),k=e("./render-assign"),A=e("./render-reg"),N=e("./render-arcs"),M=e("./insert-svg-template"),_=e("./insert-svg-template-assign");t.exports=function(e,t,r,n){if(t.signal){M(e,r,t,m,n),x(t,m);var s=h(t.signal,{x:0,y:0,xmax:0,width:[],lanes:[],groups:[]}),a=r.children[0],o=function(e,t){var r,n=e.children,s=n.length;for(r=0;r<s;r++)if(n[r].tagName===t)return n[r]}(a,"g"),i=o.children[0],l=o.children[1],c=g(s.lanes,m),u=w(i,c,e,m).reduce(function(e,t,r){return Math.max(e,t+s.width[r])},0);v(i,c,e,m),N(i,s.lanes,e,t,m),y(i,s.lanes,e,m),l.insertBefore(p(b(s.groups,e,m)),null),m.xg=Math.ceil((u-m.tgo)/m.xs)*m.xs;var d=m.xg+m.xs*(m.xmax+1),f=c.length*m.yo+m.yh0+m.yh1+m.yf0+m.yf1;a.setAttribute("viewBox","0 0 "+d+" "+f),a.setAttribute("width",d),a.setAttribute("height",f),a.setAttribute("overflow","hidden"),i.setAttribute("transform","translate("+(m.xg+.5)+", "+(m.yh0+m.yh1+.5)+")")}else t.assign?(_(e,r,t),k(e,t)):t.reg&&A(e,t,r)}},{"./create-element":2,"./insert-svg-template":10,"./insert-svg-template-assign":9,"./lane":16,"./parse-config":17,"./parse-wave-lanes":19,"./rec":21,"./render-arcs":22,"./render-assign":23,"./render-gaps":24,"./render-groups":25,"./render-marks":26,"./render-reg":27,"./render-wave-lane":30}],29:[function(e,t,r){"use strict";var n=e("./render-wave-element");t.exports=function(e,t,r){n(e,t,document.getElementById(r+e),window.WaveSkin)}},{"./render-wave-element":28}],30:[function(e,t,r){"use strict";var x=e("tspan"),g=e("./create-element"),v=e("./w3"),y=e("./find-lane-markers");t.exports=function(e,t,r,n){var s,a,o,i,l,c,u,d,f,h=[1],m=0,p=[];for(a=0;a<t.length;a+=1)if((d=t[a][0][0])&&(i=g(["g",{id:"wavelane_"+a+"_"+r,transform:"translate(0,"+(n.y0+a*n.yo)+")"}]),e.insertBefore(i,null),(c=x.parse(d)).unshift("text",{x:n.tgo,y:n.ym,class:"info","text-anchor":"end","xml:space":"preserve"}),c=g(c),i.insertBefore(c,null),p.push(c.getBBox().width),f=0<(f=t[a][0][1])?Math.ceil(2*f)-2*f:-2*f,l=g(["g",{id:"wavelane_draw_"+a+"_"+r,transform:"translate("+f*n.xs+", 0)"}]),i.insertBefore(l,null),t[a][1])){for(s=0;s<t[a][1].length;s+=1)(u=document.createElementNS(v.svg,"use")).setAttributeNS(v.xlink,"xlink:href","#"+t[a][1][s]),u.setAttribute("transform","translate("+s*n.xs+")"),l.insertBefore(u,null);if(t[a][2]&&t[a][2].length&&0!==(h=y(t[a][1])).length)for(o in h)t[a][2]&&void 0!==t[a][2][o]&&((c=x.parse(t[a][2][o])).unshift("text",{x:h[o]*n.xs+n.xlabel,y:n.ym,"text-anchor":"middle","xml:space":"preserve"}),c=g(c),l.insertBefore(c,null));t[a][1].length>m&&(m=t[a][1].length)}return n.xmax=Math.min(m,n.xmax_cfg-n.xmin_cfg),n.xg=20,p}},{"./create-element":2,"./find-lane-markers":5,"./w3":31,tspan:34}],31:[function(e,t,r){"use strict";t.exports={svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/XML/1998/namespace"}},{}],32:[function(e,t,r){"use strict";window.WaveDrom=window.WaveDrom||{};var n=e("./process-all"),s=e("./eva"),a=e("./render-wave-form"),o=e("./editor-refresh");window.WaveDrom.ProcessAll=n,window.WaveDrom.RenderWaveForm=a,window.WaveDrom.EditorRefresh=o,window.WaveDrom.eva=s},{"./editor-refresh":3,"./eva":4,"./process-all":20,"./render-wave-form":29}],33:[function(e,t,r){"use strict";var s=e("tspan"),v={2:0,3:80,4:170,5:45,6:126,7:215};function l(e,t){return"translate("+e+","+t+")"}function y(e,t,r){var n={};return t&&(n.x=t),r&&(n.y=r),["text",n].concat(s.parse(e))}function c(e,t,r){return"number"==typeof e&&t<e?0|e:r}function u(e,t,r){var n={};return n.x2=t?(n.x1=t)+e:e,r&&(n.y1=r,n.y2=r),["line",n]}function d(e,t,r){var n={};return t&&(n.x1=t,n.x2=t),n.y2=r?(n.y1=r)+e:e,["line",n]}function b(e,t,r,n,s){var a,o=["g",{}];if("number"!=typeof e)return y(e,t,r);for(a=0;a<s;a++)o.push(y(e>>a&1,t+n*(s/2-a-.5),r));return o}function n(e,f){var h=f.hspace/f.mod,m=["g",{transform:l(h/2,f.vspace/5)}],p=["g",{transform:l(h/2,f.vspace/2+4)}],x=["g",{transform:l(h/2,f.vspace)}],g=["g",{transform:l(0,f.vspace/4)}];return e.forEach(function(e){var t,r,n,s,a,o,i,l,c,u,d;if(t=0,r=f.mod-1,n=f.index*f.mod,s=(f.index+1)*f.mod-1,e.lsb/f.mod>>0===f.index)t=e.lsbm,n=e.lsb,e.msb/f.mod>>0===f.index&&(s=e.msb,r=e.msbm);else{if(e.msb/f.mod>>0!==f.index)return;s=e.msb,r=e.msbm}m.push(y(n,h*(f.mod-t-1))),t!==r&&m.push(y(s,h*(f.mod-r-1))),e.name&&p.push(b(e.name,h*(f.mod-(r+t)/2-1),0,h,e.bits)),void 0!==e.name&&void 0===e.type||g.push(["rect",{style:"fill-opacity:0.1"+(a=e.type,o=v[a],void 0!==o?";fill:hsl("+o+",100%,50%)":""),x:h*(f.mod-r-1),y:0,width:h*(r-t+1),height:f.vspace/2}]),void 0!==e.attr&&x.push((i=e,c=t,u=r,d=(l=h)*(f.mod-(u+c)/2-1),Array.isArray(i.attr)?i.attr.reduce(function(e,t,r){return null==t?e:e.concat([b(t,d,16*r,l,i.bits)])},["g",{}]):b(i.attr,d,0,l,i.bits)))}),["g",g,m,p,x]}function f(e,t){return["g",{transform:l(4.5,(t.lanes-t.index-1)*t.vspace+.5),"text-anchor":"middle","font-size":t.fontsize,"font-family":t.fontfamily||"sans-serif","font-weight":t.fontweight||"normal"},function(e,t){var r=t.hspace,n=t.vspace,s=t.mod,a=["g",{transform:l(0,n/4),stroke:"black","stroke-width":1,"stroke-linecap":"round"}];a.push(u(r)),a.push(d(n/2)),a.push(u(r,0,n/2));for(var o=t.index*t.mod,i=t.mod;i===t.mod||e.some(function(e){return e.lsb===o})?a.push(d(n/2,i*(r/s))):(a.push(d(n/16,i*(r/s))),a.push(d(n/16,i*(r/s),7*n/16))),o++,--i;);return a}(e,t),n(e,t)]}t.exports=function(e,t){(t="object"==typeof t?t:{}).vspace=c(t.vspace,19,80),t.hspace=c(t.hspace,39,640),t.lanes=c(t.lanes,0,2),t.bits=c(t.bits,4,32),t.fontsize=c(t.fontsize,5,14),t.bigendian=t.bigendian||!1;var r,n,s,a=16*e.reduce(function(e,t){return Math.max(e,Array.isArray(t.attr)?t.attr.length:0)},0),o=(r=t.hspace+9,n=(t.vspace+a)*t.lanes+5,["svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:n,viewBox:[0,0,r,n].join(" ")}]),i=0,l=t.bits/t.lanes;for(t.mod=0|l,e.forEach(function(e){e.lsb=i,e.lsbm=i%l,i+=e.bits,e.msb=i-1,e.msbm=e.msb%l}),s=0;s<t.lanes;s++)t.index=s,o.push(f(e,t));return o}},{tspan:34}],34:[function(e,t,r){"use strict";var n=e("./parse"),s=e("./reparse");r.parse=n,r.reparse=s},{"./parse":35,"./reparse":36}],35:[function(e,t,r){"use strict";var o=/<o>|<ins>|<s>|<sub>|<sup>|<b>|<i>|<tt>|<\/o>|<\/ins>|<\/s>|<\/sub>|<\/sup>|<\/b>|<\/i>|<\/tt>/;function i(r,e){e.add&&e.add.split(";").forEach(function(e){var t=e.split(" ");r[t[0]][t[1]]=!0}),e.del&&e.del.split(";").forEach(function(e){var t=e.split(" ");delete r[t[0]][t[1]]})}var l={"<o>":{add:"text-decoration overline"},"</o>":{del:"text-decoration overline"},"<ins>":{add:"text-decoration underline"},"</ins>":{del:"text-decoration underline"},"<s>":{add:"text-decoration line-through"},"</s>":{del:"text-decoration line-through"},"<b>":{add:"font-weight bold"},"</b>":{del:"font-weight bold"},"<i>":{add:"font-style italic"},"</i>":{del:"font-style italic"},"<sub>":{add:"baseline-shift sub;font-size .7em"},"</sub>":{del:"baseline-shift sub;font-size .7em"},"<sup>":{add:"baseline-shift super;font-size .7em"},"</sup>":{del:"baseline-shift super;font-size .7em"},"<tt>":{add:"font-family monospace"},"</tt>":{del:"font-family monospace"}};function c(n){return Object.keys(n).reduce(function(e,t){var r=Object.keys(n[t]);return 0<r.length&&(e[t]=r.join(" ")),e},{})}t.exports=function(e){var t,r,n,s,a;if(void 0===e)return[];if("number"==typeof e)return[e+""];if("string"!=typeof e)return[e];for(r=[],t={"text-decoration":{},"font-weight":{},"font-style":{},"baseline-shift":{},"font-size":{},"font-family":{}};;){if(-1===(n=e.search(o)))return r.push(["tspan",c(t),e]),r;if(0<n&&(a=e.slice(0,n),r.push(["tspan",c(t),a])),s=e.match(o)[0],i(t,l[s]),0===(e=e.slice(n+s.length)).length)return r}}},{}],36:[function(e,t,r){"use strict";var n=e("./parse");t.exports=function(e){var o=e.createElement;function t(e,t){var r=e[0],s=e[1],n=Object.keys(s).reduce(function(e,t){var r,n;return e[null===(n=(r=t).match(/(\w+)-(\w)(\w+)/))?r:n[1]+n[2].toUpperCase()+n[3]]=s[t],e},{}),a=e[2];return n.key=t,o(r,n,a)}return function(e){return n(e).map(t)}}},{"./parse":35}]},{},[32]);