/*! wavedrom 3.5.0 2024-2-22 PDT */ !function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,(function(r){return o(e[i][1][r]||r)}),p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;ileft+menu.offsetWidth||e.ytop+menu.offsetHeight)&&(menu.parentNode.removeChild(menu),document.body.removeEventListener("mousedown",closeMenu,!1))}const div=document.getElementById(output+index);div.childNodes[0].addEventListener("contextmenu",(function(e){menu=document.createElement("div"),menu.className="wavedromMenu",menu.style.top=e.y+"px",menu.style.left=e.x+"px";const list=document.createElement("ul"),savePng=document.createElement("li");savePng.innerHTML="Save as PNG",list.appendChild(savePng);const saveSvg=document.createElement("li");saveSvg.innerHTML="Save as SVG",list.appendChild(saveSvg),menu.appendChild(list),document.body.appendChild(menu),savePng.addEventListener("click",(function(){let html="";if(0!==index){const firstDiv=document.getElementById(output+0);html+=firstDiv.innerHTML.substring(166,firstDiv.innerHTML.indexOf(''))}html=[div.innerHTML.slice(0,166),html,div.innerHTML.slice(166)].join("");const svgdata="data:image/svg+xml;base64,"+btoa(html),img=new Image;img.src=svgdata;const canvas=document.createElement("canvas");canvas.width=img.width,canvas.height=img.height;canvas.getContext("2d").drawImage(img,0,0);const pngdata=canvas.toDataURL("image/png"),a=document.createElement("a");a.href=pngdata,a.download="wavedrom.png",a.click(),menu.parentNode.removeChild(menu),document.body.removeEventListener("mousedown",closeMenu,!1)}),!1),saveSvg.addEventListener("click",(function(){let html="";if(0!==index){const firstDiv=document.getElementById(output+0);html+=firstDiv.innerHTML.substring(166,firstDiv.innerHTML.indexOf(''))}html=[div.innerHTML.slice(0,166),html,div.innerHTML.slice(166)].join("");const svgdata="data:image/svg+xml;base64,"+btoa(html),a=document.createElement("a");a.href=svgdata,a.download="wavedrom.svg",a.click(),menu.parentNode.removeChild(menu),document.body.removeEventListener("mousedown",closeMenu,!1)}),!1),menu.addEventListener("contextmenu",(function(ee){ee.preventDefault()}),!1),document.body.addEventListener("mousedown",closeMenu,!1),e.preventDefault()}),!1)}},{}],2:[function(require,module,exports){"use strict";module.exports=function(Edge,from,to){const dx=to.x-from.x,dy=to.y-from.y;let lx=(from.x+to.x)/2;const ly=(from.y+to.y)/2;let d,style;switch(Edge.shape){case"-":break;case"~":d="M "+from.x+","+from.y+" c "+.7*dx+", 0 "+.3*dx+", "+dy+" "+dx+", "+dy;break;case"-~":d="M "+from.x+","+from.y+" c "+.7*dx+", 0 "+dx+", "+dy+" "+dx+", "+dy,Edge.label&&(lx=from.x+.75*(to.x-from.x));break;case"~-":d="M "+from.x+","+from.y+" c 0, 0 "+.3*dx+", "+dy+" "+dx+", "+dy,Edge.label&&(lx=from.x+.25*(to.x-from.x));break;case"-|":d="m "+from.x+","+from.y+" "+dx+",0 0,"+dy,Edge.label&&(lx=to.x);break;case"|-":d="m "+from.x+","+from.y+" 0,"+dy+" "+dx+",0",Edge.label&&(lx=from.x);break;case"-|-":d="m "+from.x+","+from.y+" "+dx/2+",0 0,"+dy+" "+dx/2+",0";break;case"->":style="marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none";break;case"~>":style="marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none",d="M "+from.x+","+from.y+" c "+.7*dx+", 0 "+.3*dx+", "+dy+" "+dx+", "+dy;break;case"-~>":style="marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none",d="M "+from.x+","+from.y+" c "+.7*dx+", 0 "+dx+", "+dy+" "+dx+", "+dy,Edge.label&&(lx=from.x+.75*(to.x-from.x));break;case"~->":style="marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none",d="M "+from.x+","+from.y+" c 0, 0 "+.3*dx+", "+dy+" "+dx+", "+dy,Edge.label&&(lx=from.x+.25*(to.x-from.x));break;case"-|>":style="marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none",d="m "+from.x+","+from.y+" "+dx+",0 0,"+dy,Edge.label&&(lx=to.x);break;case"|->":style="marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none",d="m "+from.x+","+from.y+" 0,"+dy+" "+dx+",0",Edge.label&&(lx=from.x);break;case"-|->":style="marker-end:url(#arrowhead);stroke:#0041c4;stroke-width:1;fill:none",d="m "+from.x+","+from.y+" "+dx/2+",0 0,"+dy+" "+dx/2+",0";break;case"<->":style="marker-end:url(#arrowhead);marker-start:url(#arrowtail);stroke:#0041c4;stroke-width:1;fill:none";break;case"<~>":style="marker-end:url(#arrowhead);marker-start:url(#arrowtail);stroke:#0041c4;stroke-width:1;fill:none",d="M "+from.x+","+from.y+" c "+.7*dx+", 0 "+.3*dx+", "+dy+" "+dx+", "+dy;break;case"<-~>":style="marker-end:url(#arrowhead);marker-start:url(#arrowtail);stroke:#0041c4;stroke-width:1;fill:none",d="M "+from.x+","+from.y+" c "+.7*dx+", 0 "+dx+", "+dy+" "+dx+", "+dy,Edge.label&&(lx=from.x+.75*(to.x-from.x));break;case"<-|>":style="marker-end:url(#arrowhead);marker-start:url(#arrowtail);stroke:#0041c4;stroke-width:1;fill:none",d="m "+from.x+","+from.y+" "+dx+",0 0,"+dy,Edge.label&&(lx=to.x);break;case"<-|->":style="marker-end:url(#arrowhead);marker-start:url(#arrowtail);stroke:#0041c4;stroke-width:1;fill:none",d="m "+from.x+","+from.y+" "+dx/2+",0 0,"+dy+" "+dx/2+",0";break;case"+":style="marker-end:url(#tee);marker-start:url(#tee);fill:none;stroke:#00F;stroke-width:1";break;default:style="fill:none;stroke:#F00;stroke-width:1"}return{lx:lx,ly:ly,d:d,style:style}}},{}],3:[function(require,module,exports){module.exports={chars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,47,74,74,118,89,25,44,44,52,78,37,44,37,37,74,74,74,74,74,74,74,74,74,74,37,37,78,78,78,74,135,89,89,96,96,89,81,103,96,37,67,89,74,109,96,103,89,103,96,89,81,96,89,127,89,87,81,37,37,37,61,74,44,74,74,67,74,74,37,74,74,30,30,67,30,112,74,74,74,74,44,67,37,74,67,95,66,65,67,44,34,44,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,43,74,74,74,74,34,74,44,98,49,74,78,0,98,73,53,73,44,44,44,77,71,37,44,44,49,74,111,111,111,81,89,89,89,89,89,89,133,96,89,89,89,89,37,37,37,37,96,96,103,103,103,103,103,78,103,96,96,96,96,87,89,81,74,74,74,74,74,74,118,67,74,74,74,74,36,36,36,36,74,74,74,74,74,74,74,73,81,74,74,74,74,65,74,65,89,74,89,74,89,74,96,67,96,67,96,67,96,67,96,82,96,74,89,74,89,74,89,74,89,74,89,74,103,74,103,74,103,74,103,74,96,74,96,74,37,36,37,36,37,36,37,30,37,36,98,59,67,30,89,67,67,74,30,74,30,74,39,74,44,74,30,96,74,96,74,96,74,80,96,74,103,74,103,74,103,74,133,126,96,44,96,44,96,44,89,67,89,67,89,67,89,67,81,38,81,50,81,37,96,74,96,74,96,74,96,74,96,74,96,74,127,95,87,65,87,81,67,81,67,81,67,30,84,97,91,84,91,84,94,92,73,104,109,91,84,81,84,100,82,76,74,103,91,131,47,40,99,77,37,79,130,100,84,104,114,87,126,101,87,84,93,84,69,84,46,52,82,52,82,114,89,102,96,100,98,91,70,88,88,77,70,85,89,77,67,84,39,65,61,39,189,173,153,111,105,61,123,123,106,89,74,37,30,103,74,96,74,96,74,96,74,96,74,96,74,81,91,81,91,81,130,131,102,84,103,84,87,78,104,81,104,81,88,76,37,189,173,153,103,84,148,90,100,84,89,74,133,118,103,81],other:114}},{}],4:[function(require,module,exports){"use strict";const stringify=require("onml/stringify.js"),w3=require("./w3.js");module.exports=function(arr){arr[1].xmlns=w3.svg,arr[1]["xmlns:xlink"]=w3.xlink;const s1=stringify(arr);return(new DOMParser).parseFromString(s1,"image/svg+xml").firstChild}},{"./w3.js":33,"onml/stringify.js":42}],5:[function(require,module,exports){"use strict";const eva=require("./eva.js"),renderWaveForm=require("./render-wave-form.js");module.exports=function(){renderWaveForm(0,eva("InputJSON_0"),"WaveDrom_Display_")}},{"./eva.js":6,"./render-wave-form.js":30}],6:[function(require,module,exports){"use strict";function erra(e){console.log("Error in WaveJS: ",e);const msg=["tspan",["tspan",{class:"error h5"},"Error: "],e.message];return msg.textWidth=1e3,{signal:[{name:msg}]}}function eva(id){const TheTextBox=document.getElementById(id);let source;if(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(!Array.isArray(source.signal))return erra({message:'[Semantic]: "signal" object has to be an Array "signal:[]"'})}else if(source.assign){if(!Array.isArray(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},{}],7:[function(require,module,exports){"use strict";module.exports=function(lanetext){let gcount=0,lcount=0;const ret=[];return lanetext.forEach((function(e){"vvv-2"===e||"vvv-3"===e||"vvv-4"===e||"vvv-5"===e||"vvv-6"===e||"vvv-7"===e||"vvv-8"===e||"vvv-9"===e?lcount+=1:0!==lcount&&(ret.push(gcount-(lcount+1)/2),lcount=0),gcount+=1})),0!==lcount&&ret.push(gcount-(lcount+1)/2),ret}},{}],8:[function(require,module,exports){"use strict";module.exports=(texts,extra,times)=>{const R=[];if(Array.isArray(texts)||(texts=[texts]),4===texts.length){for(let j=0;jgenBrick(lookUpTable[text]||lookUpTable.default,extra,times)},{"./gen-brick.js":8}],10:[function(require,module,exports){"use strict";const genBrick=require("./gen-brick.js");module.exports=function(text,extra,times){const x2={0:"0",1:"1",x:"x",d:"d",u:"u",z:"z","=":"v",2:"v",3:"v",4:"v",5:"v",6:"v",7:"v",8:"v",9:"v"},x3={0:"",1:"",x:"",d:"",u:"",z:"","=":"-2",2:"-2",3:"-3",4:"-4",5:"-5",6:"-6",7:"-7",8:"-8",9:"-9"},y1={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",6:"v",7:"v",8:"v",9:"v"},y2={p:"",n:"",P:"",N:"",h:"",l:"",H:"",L:"",0:"",1:"",x:"",d:"",u:"",z:"","=":"-2",2:"-2",3:"-3",4:"-4",5:"-5",6:"-6",7:"-7",8:"-8",9:"-9"},x5={p:"nclk",n:"pclk",P:"nclk",N:"pclk"},x6={p:"000",n:"111",P:"000",N:"111"},xclude={hp:"111",Hp:"111",ln:"000",Ln:"000",nh:"111",Nh:"111",pl:"000",Pl:"000"},atext=text.split(""),tmp0={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",6:"vvv-6",7:"vvv-7",8:"vvv-8",9:"vvv-9"}[atext[1]];let tmp1={p:"pclk",n:"nclk",P:"Pclk",N:"Nclk",h:"pclk",l:"nclk",H:"Pclk",L:"Nclk"}[atext[1]];if(void 0===tmp1){const tmp2=x2[atext[1]];if(void 0===tmp2)return genBrick("xxx",extra,times);{const tmp3=y1[atext[0]];return genBrick(void 0===tmp3?"xxx":[tmp3+"m"+tmp2+y2[atext[0]]+x3[atext[1]],tmp0],extra,times)}}{const tmp4=xclude[text];void 0!==tmp4&&(tmp1=tmp4);const tmp5=x5[atext[1]];return genBrick(void 0===tmp5?[tmp1,tmp0]:[tmp1,tmp0,tmp5,x6[atext[1]]],extra,times)}}},{"./gen-brick.js":8}],11:[function(require,module,exports){"use strict";const tt=require("onml/tt.js"),w3=require("./w3.js");module.exports=function(index,source,lane,waveSkin,content,lanes,groups,notFirstSignal){const waveSkinNames=Object.keys(waveSkin);let skin=waveSkin.default||waveSkin[waveSkinNames[0]];source&&source.config&&source.config.skin&&waveSkin[source.config.skin]&&(skin=waveSkin[source.config.skin]);const e=notFirstSignal?["svg",{id:"svg",xmlns:w3.svg,"xmlns:xlink":w3.xlink},["g"]]:skin,width=lane.xg+lane.xs*(lane.xmax+1),height=content.length*lane.yo+lane.yh0+lane.yh1+lane.yf0+lane.yf1,body=e[e.length-1];body[1]={id:"waves_"+index},body[2]=["rect",{width:width,height:height,style:"stroke:none;fill:white"}],body[3]=["g",tt(lane.xg+.5,lane.yh0+lane.yh1+.5,{id:"lanes_"+index})].concat(lanes),body[4]=["g",{id:"groups_"+index},groups];const head=e[1];return head.id="svgcontent_"+index,head.height=height,head.width=width,head.viewBox="0 0 "+width+" "+height,head.overflow="hidden",e}},{"./w3.js":33,"onml/tt.js":43}],12:[function(require,module,exports){"use strict";module.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:{}}},{}],13:[function(require,module,exports){"use strict";module.exports=function(source,lane){if(lane.hscale=1,lane.hscale0&&(lane.hscale=lane.hscale0),source&&source.config&&source.config.hscale){let hscale=Math.round((x=source.config.hscale)>0?Math.round(x):1);hscale>0&&(hscale>100&&(hscale=100),lane.hscale=hscale)}var x;lane.yh0=0,lane.yh1=0,lane.head=source.head,lane.xmin_cfg=0,lane.xmax_cfg=1e12,source&&source.config&&source.config.hbounds&&2==source.config.hbounds.length&&(source.config.hbounds[0]=Math.floor(source.config.hbounds[0]),source.config.hbounds[1]=Math.ceil(source.config.hbounds[1]),source.config.hbounds[0]"===Next&&(subCycle=!1,Next=Stack.shift()),Repeats=1;"."===Stack[0]||"|"===Stack[0];)Stack.shift(),Repeats+=1;R=subCycle?R.concat(genWaveBrick(Top+Next,0,Repeats-lane.period)):R.concat(genWaveBrick(Top+Next,extra,Repeats))}const unseen_bricks=[];for(let i=0;i0?(num_unseen_markers=findLaneMarkers(unseen_bricks).length,1==findLaneMarkers([unseen_bricks[unseen_bricks.length-1]]).length&&1==findLaneMarkers([R[0]]).length&&(num_unseen_markers-=1)):num_unseen_markers=0,[R,num_unseen_markers]}},{"./find-lane-markers.js":7,"./gen-first-wave-brick.js":9,"./gen-wave-brick.js":10}],15:[function(require,module,exports){"use strict";const parseWaveLane=require("./parse-wave-lane.js");module.exports=function(sig,lane){const content=[],tmp0=[];return sig.map((function(sigx){const current=[];content.push(current),lane.period=sigx.period||1,lane.phase=(sigx.phase?2*sigx.phase:0)+lane.xmin_cfg,tmp0[0]=sigx.name||" ",tmp0[1]=(sigx.phase||0)+lane.xmin_cfg/2;let num_unseen_markers,content_wave=null;if("string"==typeof sigx.wave){const parsed_wave_lane=parseWaveLane(sigx.wave,lane.period*lane.hscale-1,lane);content_wave=parsed_wave_lane[0],num_unseen_markers=parsed_wave_lane[1]}current.push(tmp0.slice(0),content_wave,function(e,num_unseen_markers){let ret_data=e.data;return void 0===ret_data?null:("string"==typeof ret_data&&(ret_data=ret_data.trim().split(/\s+/)),ret_data=ret_data.slice(num_unseen_markers),ret_data)}(sigx,num_unseen_markers),sigx)})),content}},{"./parse-wave-lane.js":14}],16:[function(require,module,exports){"use strict";const eva=require("./eva.js"),appendSaveAsDialog=require("./append-save-as-dialog.js"),renderWaveForm=require("./render-wave-form.js");module.exports=function(){let index=0;const points=document.querySelectorAll("*");for(let i=0;idiv.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;}')}},{"./append-save-as-dialog.js":1,"./eva.js":6,"./render-wave-form.js":30}],17:[function(require,module,exports){"use strict";module.exports=function rec(tmp,state){let name,deltaX=10;"string"!=typeof tmp[0]&&"number"!=typeof tmp[0]||(name=tmp[0],deltaX=25),state.x+=deltaX;for(let i=0;i(element,i)=>{const text=element.node;if(lane.period=element.period?element.period:1,lane.phase=(element.phase?2*element.phase:0)+lane.xmin_cfg,text){const stack=text.split("");let pos=0;for(;stack.length;){const eventname=stack.shift();"."!==eventname&&(Events[eventname]={x:lane.xs*(2*pos*lane.period*lane.hscale-lane.phase)+lane.xlabel,y:i*lane.yo+lane.y0+.5*lane.ys}),pos+=1}}})(lane,Events)),Array.isArray(source.edge)&&source.edge.map(((res,Events,arcFontSize)=>element=>{const words=element.trim().split(/\s+/),Edge={words:words,label:element.substring(words[0].length).substring(1),from:words[0].substr(0,1),to:words[0].substr(-1,1),shape:words[0].slice(1,-1)},from=Events[Edge.from],to=Events[Edge.to];if(from&&to){const shapeProps=arcShape(Edge,from,to),lx=shapeProps.lx,ly=shapeProps.ly;res.push(((Edge,from,to,shapeProps)=>["path",{id:"gmark_"+Edge.from+"_"+Edge.to,d:shapeProps.d||"M "+from.x+","+from.y+" "+to.x+","+to.y,style:shapeProps.style||"fill:none;stroke:#00F;stroke-width:1"}])(Edge,from,to,shapeProps)),Edge.label&&res.push(renderLabel({x:lx,y:ly},Edge.label,arcFontSize))}})(res,Events,arcFontSize)),Object.keys(Events).map((function(k){k===k.toLowerCase()&&Events[k].x>0&&res.push(renderLabel({x:Events[k].x,y:Events[k].y},k+"",arcFontSize))}))),res}},{"./arc-shape.js":2,"./render-label.js":22}],20:[function(require,module,exports){"use strict";const tt=require("onml/tt.js");function renderGapUses(text,lane){const res=[],Stack=(text||"").split("");let pos=0,subCycle=!1;for(;Stack.length;){let next=Stack.shift();"<"===next&&(subCycle=!0,next=Stack.shift()),">"===next&&(subCycle=!1,next=Stack.shift()),pos+=subCycle?1:2*lane.period,"|"===next&&res.push(["use",tt(lane.xs*((pos-(subCycle?0:lane.period))*lane.hscale-lane.phase),0,{"xlink:href":"#gap"})])}return res}module.exports=function(lanes,index,source,lane){let res=[];if(lanes){const lanesLen=lanes.length,vline=x=>["line",{x1:x,x2:x,y2:lanesLen*lane.yo,style:"stroke:#000;stroke-width:1px"}],lineStyle="fill:none;stroke:#000;stroke-width:1px",bracket={square:{left:["path",{d:"M 2 0 h -4 v "+(lanesLen*lane.yo-1)+" h 4",style:lineStyle}],right:["path",{d:"M -2 0 h 4 v "+(lanesLen*lane.yo-1)+" h -4",style:lineStyle}]},round:{left:["path",{d:"M 2 0 a 4 4 0 0 0 -4 4 v "+(lanesLen*lane.yo-9)+" a 4 4 0 0 0 4 4",style:lineStyle}],right:["path",{d:"M -2 0 a 4 4 1 0 1 4 4 v "+(lanesLen*lane.yo-9)+" a 4 4 1 0 1 -4 4",style:lineStyle}],rightLeft:["path",{d:"M -5 0 a 4 4 1 0 1 4 4 v "+(lanesLen*lane.yo-9)+" a 4 4 1 0 1 -4 4M 5 0 a 4 4 0 0 0 -4 4 v "+(lanesLen*lane.yo-9)+" a 4 4 0 0 0 4 4",style:lineStyle}],leftLeft:["path",{d:"M 2 0 a 4 4 0 0 0 -4 4 v "+(lanesLen*lane.yo-9)+" a 4 4 0 0 0 4 4M 5 1 a 3 3 0 0 0 -3 3 v "+(lanesLen*lane.yo-9)+" a 3 3 0 0 0 3 3",style:lineStyle}],rightRight:["path",{d:"M -5 1 a 3 3 1 0 1 3 3 v "+(lanesLen*lane.yo-9)+" a 3 3 1 0 1 -3 3M -2 0 a 4 4 1 0 1 4 4 v "+(lanesLen*lane.yo-9)+" a 4 4 1 0 1 -4 4",style:lineStyle}]}},backDrop=w=>["rect",{x:-w/2,width:w,height:lanesLen*lane.yo,style:"fill:#ffffffcc;stroke:none"}];if(source&&"string"==typeof source.gaps){const scale=lane.hscale*lane.xs*2,gaps=source.gaps.trim().split(/\s+/);for(let x=0;xx&&marks.push(["use",tt(2,5+lane.yo*idx,{"xlink:href":"#gap"})])}res.push(["g",tt(scale*(x+offset))].concat(marks))}}for(let idx=0;idx{if(res.push(["path",{id:"group_"+i+"_"+index,d:"m "+(e.x+.5)+","+(e.y*lane.yo+3.5+lane.yh0+lane.yh1)+" c -3,0 -5,2 -5,5 l 0,"+(e.height*lane.yo-16)+" c 0,3 2,5 5,5",style:"stroke:#0041c4;stroke-width:1;fill:none"}]),void 0===e.name)return;const x=e.x-10,y=lane.yo*(e.y+e.height/2)+lane.yh0+lane.yh1,ts=tspan.parse(e.name);res.push(["g",tt(x,y),["g",{transform:"rotate(270)"},["text",{"text-anchor":"middle",class:"info","xml:space":"preserve"}].concat(ts)]])})),res}},{"onml/tt.js":43,tspan:44}],22:[function(require,module,exports){"use strict";const tspan=require("tspan"),tt=require("onml/tt.js"),textWidth=require("./text-width.js");module.exports=function(p,text,fontSize){const w=textWidth(text,fontSize=fontSize||11)+2;return["g",tt(p.x,p.y),["rect",{x:-(w>>1),y:-(fontSize>>1),width:w,height:fontSize,style:"fill:#FFF;"}],["text",{"text-anchor":"middle",y:Math.round(.3*fontSize),style:"font-size:"+fontSize+"px;"}].concat(tspan.parse(text))]}},{"./text-width.js":32,"onml/tt.js":43,tspan:44}],23:[function(require,module,exports){"use strict";const renderMarks=require("./render-marks.js"),renderArcs=require("./render-arcs.js"),renderGaps=require("./render-gaps.js"),renderPieceWise=require("./render-piece-wise.js");module.exports=function(index,content,waveLanes,ret,source,lane){return[renderMarks(content,index,lane,source)].concat(waveLanes.res,[renderArcs(ret.lanes,index,source,lane),renderGaps(ret.lanes,index,source,lane),renderPieceWise(ret.lanes,index,lane)])}},{"./render-arcs.js":19,"./render-gaps.js":20,"./render-marks.js":24,"./render-piece-wise.js":26}],24:[function(require,module,exports){"use strict";const tspan=require("tspan");function captext(cxt,anchor,y){return cxt[anchor]&&cxt[anchor].text?[["text",{x:cxt.xmax*cxt.xs/2,y:y,fill:"#000","text-anchor":"middle","xml:space":"preserve"}].concat(tspan.parse(cxt[anchor].text))]:[]}function ticktock(cxt,ref1,ref2,x,dx,y,len){let offset,L=[];if(void 0===cxt[ref1]||void 0===cxt[ref1][ref2])return[];let val=cxt[ref1][ref2];if("string"==typeof val)val=val.trim().split(/\s+/);else if("number"==typeof val||"boolean"==typeof val){offset=Number(val),val=[];for(let i=0;i{void 0===sy&&(sy=sx);let i=0;for(;i{const wave=row.wave;Array.isArray(wave)&&res.push(renderLane(wave,idx,cfg))})),res}},{"onml/tt.js":43}],27:[function(require,module,exports){"use strict";const render=require("bit-field/lib/render.js");module.exports=function(index,source){return render(source.reg,source.config)}},{"bit-field/lib/render.js":35}],28:[function(require,module,exports){"use strict";const rec=require("./rec.js"),lane=require("./lane.js"),parseConfig=require("./parse-config.js"),parseWaveLanes=require("./parse-wave-lanes.js"),renderGroups=require("./render-groups.js"),renderLanes=require("./render-lanes.js"),renderWaveLane=require("./render-wave-lane.js"),insertSVGTemplate=require("./insert-svg-template.js");module.exports=function(index,source,waveSkin,notFirstSignal){!function(index,source,lane,waveSkin){if(0!==index)return;const waveSkinNames=Object.keys(waveSkin);if(0===waveSkinNames.length)throw new Error("no skins found");let skin=waveSkin.default||waveSkin[waveSkinNames[0]];source&&source.config&&source.config.skin&&waveSkin[source.config.skin]&&(skin=waveSkin[source.config.skin]);const socket=skin[3][1][2][1];lane.xs=Number(socket.width),lane.ys=Number(socket.height),lane.xlabel=Number(socket.x),lane.ym=Number(socket.y)}(index,source,lane,waveSkin),parseConfig(source,lane);const ret=rec(source.signal,{x:0,y:0,xmax:0,width:[],lanes:[],groups:[]}),content=parseWaveLanes(ret.lanes,lane),waveLanes=renderWaveLane(content,index,lane),waveGroups=renderGroups(ret.groups,index,lane),xmax=waveLanes.glengths.reduce(((res,len,i)=>Math.max(res,len+ret.width[i])),0);return lane.xg=Math.ceil((xmax-lane.tgo)/lane.xs)*lane.xs,insertSVGTemplate(index,source,lane,waveSkin,content,renderLanes(index,content,waveLanes,ret,source,lane),waveGroups,notFirstSignal)}},{"./insert-svg-template.js":11,"./lane.js":12,"./parse-config.js":13,"./parse-wave-lanes.js":15,"./rec.js":17,"./render-groups.js":21,"./render-lanes.js":23,"./render-wave-lane.js":31}],29:[function(require,module,exports){"use strict";const renderAny=require("./render-any.js"),createElement=require("./create-element.js");module.exports=function(index,source,outputElement,waveSkin,notFirstSignal){for(;outputElement.childNodes.length;)outputElement.removeChild(outputElement.childNodes[0]);outputElement.insertBefore(createElement(renderAny(index,source,waveSkin,notFirstSignal)),null)}},{"./create-element.js":4,"./render-any.js":18}],30:[function(require,module,exports){"use strict";const renderWaveElement=require("./render-wave-element.js");module.exports=function(index,source,output,notFirstSignal){renderWaveElement(index,source,document.getElementById(output+index),window.WaveSkin,notFirstSignal)}},{"./render-wave-element.js":29}],31:[function(require,module,exports){"use strict";const tt=require("onml/tt.js"),tspan=require("tspan"),textWidth=require("./text-width.js"),findLaneMarkers=require("./find-lane-markers.js"),renderOverUnder=require("./render-over-under.js");function renderLaneUses(cont,lane){const res=[];if(cont[1]&&(cont[1].map((function(ref,i){res.push(["use",tt(i*lane.xs,0,{"xlink:href":"#"+ref})])})),cont[2]&&cont[2].length)){const labels=findLaneMarkers(cont[1]);labels.length&&labels.map((function(label,i){cont[2]&&void 0!==cont[2][i]&&res.push(["text",{x:label*lane.xs+lane.xlabel,y:lane.ym,"text-anchor":"middle","xml:space":"preserve"}].concat(tspan.parse(cont[2][i])))}))}return res}module.exports=function(content,index,lane){let xmax=0;const glengths=[],res=[];return content.map((function(el,j){const name=el[0][0];if(name){let xoffset=el[0][1];xoffset=xoffset>0?Math.ceil(2*xoffset)-2*xoffset:-2*xoffset,res.push(["g",tt(0,lane.y0+j*lane.yo,{id:"wavelane_"+j+"_"+index})].concat([["text",{x:lane.tgo,y:lane.ym,class:"info","text-anchor":"end","xml:space":"preserve"}].concat(tspan.parse(name))]).concat([["g",tt(xoffset*lane.xs,0,{id:"wavelane_draw_"+j+"_"+index})].concat(renderLaneUses(el,lane))]).concat(renderOverUnder(el[3],"over",lane),renderOverUnder(el[3],"under",lane))),xmax=Math.max(xmax,(el[1]||[]).length),glengths.push(name.textWidth?name.textWidth:name.charCodeAt?textWidth(name,11):0)}})),lane.xmax=Math.min(xmax,lane.xmax_cfg-lane.xmin_cfg),lane.xg=20,{glengths:glengths,res:res}}},{"./find-lane-markers.js":7,"./render-over-under.js":25,"./text-width.js":32,"onml/tt.js":43,tspan:44}],32:[function(require,module,exports){"use strict";const charWidth=require("./char-width.json");module.exports=function(str,size){size=size||11;let width=0;for(let i=0;iObject.assign({transform:"translate("+x+(y?","+y:"")+")"},"object"==typeof obj?obj:{}),colors={2:"#ff0000",3:"#aaff00",4:"#00ffd5",5:"#ffbf00",6:"#00ff19",7:"#006aff"},typeStyle=t=>void 0!==colors[t]?";fill:"+colors[t]:"",norm=(obj,other)=>Object.assign(Object.keys(obj).reduce(((prev,key)=>{const val=Number(obj[key]),valInt=isNaN(val)?0:Math.round(val);return 0!==valInt&&(prev[key]=valInt),prev}),{}),other),text=(body,x,y,rotate)=>{const props={y:6};return void 0!==rotate&&(props.transform="rotate("+rotate+")"),["g",tt(round(x),round(y)),["text",props].concat(tspan.parse(body))]},hline=(len,x,y)=>["line",norm({x1:x,x2:x+len,y1:y,y2:y})],vline=(len,x,y)=>["line",norm({x1:x,x2:x,y1:y,y2:y+len})],getLabel=(val,x,y,step,len,rotate)=>{if("number"!=typeof val)return text(val,x,y,rotate);const res=["g",{}];for(let i=0;i>i&1,x+step*(len/2-i-.5),y));return res},labelArr=(desc,opt)=>{const{margin:margin,hspace:hspace,vspace:vspace,mod:mod,index:index,fontsize:fontsize,vflip:vflip,trim:trim,compact:compact,offset:offset}=opt,width=hspace-margin.left-margin.right-1,height=vspace-margin.top-margin.bottom,step=width/mod,blanks=["g"],bits=["g",tt(round(step/2),-round(.5*fontsize+4))],names=["g",tt(round(step/2),round(.5*height+.4*fontsize-6))],attrs=["g",tt(round(step/2),round(height+.7*fontsize-2))];return desc.map((e=>{let lsbm=0,msbm=mod-1,lsb=index*mod,msb=(index+1)*mod-1;if(e.lsb/mod>>0===index)lsbm=e.lsbm,lsb=e.lsb,e.msb/mod>>0===index&&(msb=e.msb,msbm=e.msbm);else if(e.msb/mod>>0===index)msb=e.msb,msbm=e.msbm;else if(!(lsb>e.lsb&&msb{if(!("string"==typeof text||text instanceof String))return text;const textWidth=text.length*charWidth;if(textWidth<=availableSpace)return text;var end=text.length-(textWidth-availableSpace)/charWidth-3;return end>0?text.substring(0,round(end))+"...":text.substring(0,1)+"..."})(e.name,step*e.bits,trim):e.name,step*(vflip?(msbm+lsbm)/2:mod-(msbm+lsbm)/2-1),0,step,e.bits,e.rotate)),void 0!==e.name&&void 0===e.type||opt.compact&&void 0===e.type||blanks.push(["rect",Object.assign({},norm({x:step*(vflip?lsbm:mod-msbm-1),width:step*(msbm-lsbm+1),height:height},{field:e.name,style:"fill-opacity:0.1"+typeStyle(e.type)}),void 0!==e.rect?e.rect:{})]),void 0!==e.attr&&attrs.push(((e,opt,step,lsbm,msbm)=>{const x=opt.vflip?step*((msbm+lsbm)/2):step*(opt.mod-(msbm+lsbm)/2-1);return Array.isArray(e.attr)?e.attr.reduce(((prev,a,i)=>null==a?prev:prev.concat([getLabel(a,x,opt.fontsize*i,step,e.bits)])),["g",{}]):getLabel(e.attr,x,0,step,e.bits)})(e,opt,step,lsbm,msbm))})),["g",blanks,bits,names,attrs]},skipField=(desc,opt,globalIndex)=>{if(!opt.compact)return!1;return-1!==desc.findIndex((e=>(e=>void 0===e.name&&void 0===e.type)(e)&&globalIndex>e.lsb&&globalIndex<=e.msb+1))},cage=(desc,opt)=>{const{hspace:hspace,vspace:vspace,mod:mod,margin:margin,index:index,vflip:vflip}=opt,width=hspace-margin.left-margin.right-1,height=vspace-margin.top-margin.bottom,res=["g",{stroke:"black","stroke-width":1,"stroke-linecap":"round"}];if(opt.sparse){opt.uneven&&opt.bits%2==1&&index===opt.lanes-1?vflip?res.push(hline(width-width/mod,0,0),hline(width-width/mod,0,height)):res.push(hline(width-width/mod,width/mod,0),hline(width-width/mod,width/mod,height)):opt.compact||res.push(hline(width,0,0),hline(width,0,height),vline(height,vflip?width:0,0))}else res.push(hline(width,0,0),vline(height,vflip?width:0,0),hline(width,0,height));let i=index*mod;const delta=vflip?1:-1;let j=vflip?0:mod;if(opt.sparse)for(let k=0;k<=mod;k++){const xj=j*(width/mod);(!skipField(desc,opt,i)&&0!==k||!skipField(desc,opt,i+1)&&k!==mod)&&(0===k||k===mod||desc.some((e=>e.msb+1===i))?res.push(vline(height,xj,0)):(res.push(vline(height>>>3,xj,0)),res.push(vline(-(height>>>3),xj,height)))),opt.compact&&0!==k&&!skipField(desc,opt,i)&&(res.push(hline(width/mod,xj,0)),res.push(hline(width/mod,xj,height))),i++,j+=delta}else for(let k=0;ke.lsb===i))?res.push(vline(height,xj,0)):res.push(vline(height>>>3,xj,0),vline(-(height>>>3),xj,height)),i++,j+=delta}return res},lane=(desc,opt)=>{const{index:index,vspace:vspace,hspace:hspace,margin:margin,hflip:hflip,lanes:lanes,compact:compact,label:label}=opt,height=vspace-margin.top-margin.bottom,width=hspace-margin.left-margin.right-1;let tx=margin.left;const idx=hflip?index:lanes-index-1;let ty=round(idx*vspace+margin.top);compact&&(ty=round(idx*height+margin.top));const res=["g",tt(tx,ty),cage(desc,opt),labelArr(desc,opt)];if(label&&void 0!==label.left){const lab=label.left;let txt=index;"string"==typeof lab?txt=lab:"number"==typeof lab?txt+=lab:"object"==typeof lab&&(txt=lab[index]||txt),res.push(["g",{"text-anchor":"end"},text(txt,-4,round(height/2))])}if(label&&void 0!==label.right){const lab=label.right;let txt=index;"string"==typeof lab?txt=lab:"number"==typeof lab?txt+=lab:"object"==typeof lab&&(txt=lab[index]||txt),res.push(["g",{"text-anchor":"start"},text(txt,width+4,round(height/2))])}return res},optDefaults=opt=>([["hspace",40,800],["lanes",1,1],["bits",1,void 0],["fontsize",6,14]].map((opt=>row=>{const[key,min,def]=row,val=Math.round(opt[key]);opt[key]="number"==typeof val&&val>=min?val:def})(opt="object"==typeof opt?opt:{})),opt.fontfamily=opt.fontfamily||"sans-serif",opt.fontweight=opt.fontweight||"normal",opt.compact=opt.compact||!1,opt.hflip=opt.hflip||!1,opt.uneven=opt.uneven||!1,opt.margin=opt.margin||{},opt.offset=opt.offset||0,opt);module.exports=(desc,opt)=>{opt=optDefaults(opt);const maxAttributes=(desc=>desc.reduce(((prev,field)=>Math.max(prev,void 0===field.attr?0:Array.isArray(field.attr)?field.attr.length:1)),0))(desc);opt.vspace=opt.vspace||(maxAttributes+4)*opt.fontsize,void 0===opt.bits&&(opt.bits=(desc=>desc.reduce(((prev,field)=>prev+(void 0===field.bits?0:field.bits)),0))(desc));const{hspace:hspace,vspace:vspace,lanes:lanes,margin:margin,compact:compact,fontsize:fontsize,bits:bits,label:label,legend:legend}=opt;void 0===margin.right&&(label&&void 0!==label.right?margin.right=round(.1*hspace):margin.right=4),void 0===margin.left&&(label&&void 0!==label.left?margin.left=round(.1*hspace):margin.left=4),void 0===margin.top?(margin.top=1.5*fontsize,void 0===margin.bottom&&(margin.bottom=fontsize*maxAttributes+4)):void 0===margin.bottom&&(margin.bottom=4);const width=hspace;let height=vspace*lanes;compact&&(height-=(lanes-1)*(margin.top+margin.bottom)),legend&&(height+=12);const res=["g",tt(.5,legend?12.5:.5,{"text-anchor":"middle","font-size":opt.fontsize,"font-family":opt.fontfamily,"font-weight":opt.fontweight})];let lsb=0;const mod=Math.ceil(1*bits/lanes);opt.mod=0|mod,desc.map((e=>{e.lsb=lsb,e.lsbm=lsb%mod,lsb+=e.bits,e.msb=lsb-1,e.msbm=e.msb%mod}));for(let i=0;i{const{hspace:hspace,margin:margin,mod:mod,fontsize:fontsize,vflip:vflip,legend:legend,offset:offset}=opt,step=(hspace-margin.left-margin.right-1)/mod,labels=["g",tt(margin.left,legend?0:-3)],mask=((desc,mod)=>{const mask=[];let idx=0;return desc.map((e=>{mask[idx%mod]=!0,idx+=e.bits,mask[(idx-1)%mod]=!0})),mask})(desc,mod);for(let i=0;i{const{hspace:hspace,margin:margin,fontsize:fontsize,legend:legend}=opt,width=hspace-margin.left-margin.right-1,items=["g",tt(margin.left,-10)];let x=width/2-Object.keys(legend).length/2*60;for(const key in legend){const value=legend[key];items.push(["rect",norm({x:x,width:12,height:12},{style:"fill-opacity:0.15; stroke: #000; stroke-width: 1.2;"+typeStyle(value)})]),x+=36,items.push(text(key,x,.1*fontsize+4)),x+=24}return items})(opt)),(w=width,h=height,["svg",{xmlns:"http://www.w3.org/2000/svg",width:w,height:h,viewBox:[0,0,w,h].join(" ")}]).concat([res]);var w,h}},{tspan:44}],36:[function(require,module,exports){"use strict";const tspan=require("tspan"),circle="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",buf1="M -11,-6 -11,6 0,0 z m -5,6 5,0",and2="m -16,-10 5,0 c 6,0 11,4 11,10 0,6 -5,10 -11,10 l -5,0 z",or2="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",xor2="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",circle2="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",gates={"=":buf1,"~":buf1+circle,"&":and2,"~&":and2+circle,"|":or2,"~|":or2+circle,"^":xor2,"~^":xor2+circle,"+":"m -8,5 0,-10 m -5,5 10,0 m 3,0"+circle2,"*":"m -4,4 -8,-8 m 0,8 8,-8 m 4,4"+circle2,"-":"m -3,0 -10,0 m 13,0"+circle2},aliasGates={add:"+",mul:"*",sub:"-",and:"&",or:"|",xor:"^",andr:"&",orr:"|",xorr:"^",input:"="};Object.keys(aliasGates).reduce(((res,key)=>(res[key]=gates[aliasGates[key]],res)),gates);const gater1_is=type=>void 0!==gates[type],gater1_render=type=>["path",{class:"gate",d:gates[type]}],iec={eq:"==",ne:"!=",slt:"<",sle:"<=",sgt:">",sge:">=",ult:"<",ule:"<=",ugt:">",uge:">=",BUF:1,INV:1,AND:"&",NAND:"&",OR:"≥1",NOR:"≥1",XOR:"=1",XNOR:"=1",box:"",MUX:"M"},circled={INV:1,NAND:1,NOR:1,XNOR:1},gater2_is=type=>void 0!==iec[type],gater2_render=(type,ymin,ymax)=>(ymin===ymax&&(ymin=-4,ymax=4),["g",["path",{class:"gate",d:"m -16,"+(ymin-3)+" 16,0 0,"+(ymax-ymin+6)+" -16,0 z"+(circled[type]?circle:"")}],["text",{x:-14,y:4,class:"wirename"}].concat(tspan.parse(iec[type]))]);module.exports=function(type,ymin,ymax){return gater1_is(type)?gater1_render(type):gater2_is(type)?gater2_render(type,ymin,ymax):["text",{x:-14,y:4,class:"wirename"}].concat(tspan.parse(type))}},{tspan:44}],37:[function(require,module,exports){"use strict";const tspan=require("tspan"),drawGate=require("./draw_gate.js");module.exports=function drawBoxes(tree,xmax){const ret=["g"],spec=[];if(Array.isArray(tree)){spec.push(tree[0].name),spec.push([32*(xmax-tree[0].x),8*tree[0].y]);for(let i=1;i0?"\n":"",indent=function(indentation){if(!(indentation>0))return txt=>txt;var space=" ".repeat(indentation);return txt=>{if("string"!=typeof txt)return txt;const arr=txt.split("\n");return 1===arr.length?space+txt:arr.map((e=>""===e.trim()?e:space+e)).join("\n")}}(indentation);return function rec(a){let res,body="",isFlat=!0;return a.some(((e,i,arr)=>{if(0===i)return res="<"+e,1===arr.length;if(1===i){if((o=e)&&"[object Object]"===Object.prototype.toString.call(o))return Object.keys(e).map((key=>{let val=e[key];Array.isArray(val)&&(val=val.join(" ")),res+=" "+key+'="'+val+'"'})),2===arr.length||void(res+=">");res+=">"}var o;switch(typeof e){case"string":case"number":case"boolean":case"undefined":return void(body+=e+cr)}isFlat=!1,body+=rec(e)}))?res+"/>"+cr:isFlat?res+body.split("\n").filter((e=>""!==e.trim())).join("\n")+""+cr:res+cr+indent(body)+""+cr}(a)}},{}],43:[function(require,module,exports){"use strict";module.exports=(x,y,obj)=>{let objt={};if(x||y){objt={transform:"translate("+[x||0].concat(y?[y]:[]).join(",")+")"}}return obj="object"==typeof obj?obj:{},Object.assign(objt,obj)}},{}],44:[function(require,module,exports){"use strict";var parse=require("./parse"),reparse=require("./reparse");exports.parse=parse,exports.reparse=reparse},{"./parse":45,"./reparse":46}],45:[function(require,module,exports){"use strict";var escapeMap={"&":"&",'"':""","<":"<",">":">"};function xscape(val){return"string"!=typeof val?val:val.replace(/([&"<>])/g,(function(_,e){return escapeMap[e]}))}var token=/||||||||<\/o>|<\/ins>|<\/s>|<\/sub>|<\/sup>|<\/b>|<\/i>|<\/tt>/;function update(s,cmd){cmd.add&&cmd.add.split(";").forEach((function(e){var arr=e.split(" ");s[arr[0]][arr[1]]=!0})),cmd.del&&cmd.del.split(";").forEach((function(e){var arr=e.split(" ");delete s[arr[0]][arr[1]]}))}var trans={"":{add:"text-decoration overline"},"":{del:"text-decoration overline"},"":{add:"text-decoration underline"},"":{del:"text-decoration underline"},"":{add:"text-decoration line-through"},"":{del:"text-decoration line-through"},"":{add:"font-weight bold"},"":{del:"font-weight bold"},"":{add:"font-style italic"},"":{del:"font-style italic"},"":{add:"baseline-shift sub;font-size .7em"},"":{del:"baseline-shift sub;font-size .7em"},"":{add:"baseline-shift super;font-size .7em"},"":{del:"baseline-shift super;font-size .7em"},"":{add:"font-family monospace"},"":{del:"font-family monospace"}};function dump(s){return Object.keys(s).reduce((function(pre,cur){var keys=Object.keys(s[cur]);return keys.length>0&&(pre[cur]=keys.join(" ")),pre}),{})}module.exports=function(str){var state,res,i,m,a;if(void 0===str)return[];if("number"==typeof str)return[str+""];if("string"!=typeof str)return[str];for(res=[],state={"text-decoration":{},"font-weight":{},"font-style":{},"baseline-shift":{},"font-size":{},"font-family":{}};;){if(-1===(i=str.search(token)))return res.push(["tspan",dump(state),xscape(str)]),res;if(i>0&&(a=str.slice(0,i),res.push(["tspan",dump(state),xscape(a)])),m=str.match(token)[0],update(state,trans[m]),0===(str=str.slice(i+m.length)).length)return res}}},{}],46:[function(require,module,exports){"use strict";var parse=require("./parse");module.exports=function(React){var $=React.createElement;function reTspan(e,i){var tag=e[0],attr=e[1],newAttr=Object.keys(attr).reduce((function(res,key){var str,m;return res[null===(m=(str=key).match(/(\w+)-(\w)(\w+)/))?str:m[1]+m[2].toUpperCase()+m[3]]=attr[key],res}),{}),body=e[2];return newAttr.key=i,$(tag,newAttr,body)}return function(str){return parse(str).map(reTspan)}}},{"./parse":45}],47:[function(require,module,exports){module.exports={name:"wavedrom",version:"3.5.0",description:"Digital timing diagram in your browser",homepage:"http://wavedrom.com",author:"alex.drom@gmail.com",license:"MIT",repository:{type:"git",url:"https://github.com/wavedrom/wavedrom.git"},bugs:{url:"https://github.com/wavedrom/wavedrom/issues"},main:"./lib",unpkg:"wavedrom.unpkg.min.js",files:["bin/cli.js","wavedrom.js","wavedrom.min.js","wavedrom.unpkg.js","wavedrom.unpkg.min.js","LICENSE","lib/**","skins/**"],scripts:{test:"npm-run-all eslint nyc",eslint:"eslint lib/*.js",nyc:"nyc -r=lcov -r=text mocha test",dist:"browserify ./lib/wave-drom.js > wavedrom.js","watch.dist":"watchify ./lib/wave-drom.js -o wavedrom.js -v","dist.min":"terser --compress --mengle -- wavedrom.js | node ./bin/header.js > wavedrom.min.js",unpkg:"browserify --standalone wavedrom lib/index.js > wavedrom.unpkg.js","unpkg.min":"terser --compress --mengle -- wavedrom.unpkg.js | node ./bin/header.js > wavedrom.unpkg.min.js",cli:"{ echo '#!/usr/bin/env node' ; browserify --node bin/cli.js ; } > bin/wavedrom.js ; chmod +x bin/wavedrom.js",prepare:"npm-run-all test dist dist.min unpkg unpkg.min",clean:"rm -rf wavedrom.js wavedrom.*.js coverage .nyc_output",skins:"for S in default narrow dark lowkey narrower narrowerer; do node bin/svg2js.js -i unpacked/skins/$S.svg > skins/$S.js ; done"},keywords:["waveform","verilog","RTL"],devDependencies:{"@drom/eslint-config":"^0.12.0",browserify:"^17.0.0",chai:"^4.4",eslint:"^8.56","fs-extra":"^11.2",json5:"^2.2.3",mocha:"^10.3","npm-run-all":"^4.1.5",nyc:"^15.1.0",terser:"^5.27",watchify:"^4.0.0",yargs:"^17.7"},dependencies:{"bit-field":"^1.9.0",logidrom:"^0.3.1",onml:"^2.1.0",tspan:"^0.4.0"},eslintConfig:{extends:"@drom/eslint-config/eslint4/node4",rules:{camelcase:0}}}},{}]},{},[34]);