@zenuml/core 3.23.22 → 3.23.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{StylePanel.5e5eee6a.js → StylePanel.bee6084b.js} +2 -2
- package/dist/{close.4c90d8c8.js → close.cf92378d.js} +2 -2
- package/dist/{collapse-expanded.ac5a1854.js → collapse-expanded.a1170ce8.js} +2 -2
- package/dist/{collapse-unexpanded.cb9d156e.js → collapse-unexpanded.d00d5b6a.js} +2 -2
- package/dist/{core.4ae602a3.js → core.9ab01d4f.js} +11 -7
- package/dist/{debug.1d038ff2.js → debug.0be9c845.js} +2 -2
- package/dist/{message-arrow.07af9952.js → message-arrow.588d7954.js} +2 -2
- package/dist/{non-selected-cycle.4f88bd09.js → non-selected-cycle.16fffba7.js} +2 -2
- package/dist/{numbering.e13096ca.js → numbering.ffbf5037.js} +2 -2
- package/dist/{privacy.e54e0bb4.js → privacy.df662176.js} +2 -2
- package/dist/{selected-cycle.e44bad39.js → selected-cycle.f491797c.js} +2 -2
- package/dist/{theme.63aec3c5.js → theme.f3f613ab.js} +2 -2
- package/dist/{tip.508dec43.js → tip.f75eef12.js} +2 -2
- package/dist/zenuml.esm.mjs +1 -1
- package/dist/zenuml.js +1 -1
- package/dist/{zoom-in.94751dd2.js → zoom-in.140fb620.js} +2 -2
- package/dist/{zoom-out.2aec8331.js → zoom-out.e704e3b7.js} +2 -2
- package/package.json +1 -1
package/dist/zenuml.js
CHANGED
|
@@ -3208,7 +3208,7 @@ Server rendered element contains fewer child nodes than client vdom.`),W=!0),n(n
|
|
|
3208
3208
|
<path d="M15.027 20.771h-12.881c-0.484-1.541-0.724-3.151-0.719-4.771 0-1.667 0.24-3.265 0.719-4.771h21.147c2.64-0.011 4.781 2.131 4.776 4.771 0.015 2.625-2.109 4.765-4.735 4.771zM14.427 22.375h-11.692c1.229 2.823 3.265 5.224 5.853 6.907 2.589 1.719 5.636 2.636 8.745 2.625 5.531 0 10.375-2.828 13.24-7.068-1.521-1.573-3.609-2.469-5.803-2.479zM24.771 9.64c2.271 0 4.333-0.957 5.803-2.468-3.24-4.828-8.855-7.511-14.652-7-5.791 0.516-10.848 4.14-13.187 9.468z"/>
|
|
3209
3209
|
</svg>`,auth0:`<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
3210
3210
|
<svg width="800px" height="800px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="none"><path fill="#000000" d="M12.549 1h-4.55l1.407 4.38h4.548l-3.68 2.61 1.406 4.405c2.37-1.725 3.143-4.336 2.274-7.016L12.55 1zM2.045 5.38h4.55L8 1H3.45L2.045 5.38c-.868 2.68-.094 5.29 2.275 7.015L5.725 7.99l-3.68-2.612zm2.275 7.015L8 15l3.68-2.605L8 9.745l-3.68 2.65z"/></svg>`,redis:`<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
3211
|
-
<svg fill="#000000" width="800px" height="800px" viewBox="0 -2 28 28" xmlns="http://www.w3.org/2000/svg"><path d="m27.994 14.729c-.012.267-.365.566-1.091.945-1.495.778-9.236 3.967-10.883 4.821-.589.419-1.324.67-2.116.67-.641 0-1.243-.164-1.768-.452l.019.01c-1.304-.622-9.539-3.95-11.023-4.659-.741-.35-1.119-.653-1.132-.933v2.83c0 .282.39.583 1.132.933 1.484.709 9.722 4.037 11.023 4.659.504.277 1.105.44 1.744.44.795 0 1.531-.252 2.132-.681l-.011.008c1.647-.859 9.388-4.041 10.883-4.821.76-.396 1.096-.7 1.096-.982s0-2.791 0-2.791z"/><path d="m27.992 10.115c-.013.267-.365.565-1.09.944-1.495.778-9.236 3.967-10.883 4.821-.59.421-1.326.672-2.121.672-.639 0-1.24-.163-1.763-.449l.019.01c-1.304-.627-9.539-3.955-11.023-4.664-.741-.35-1.119-.653-1.132-.933v2.83c0 .282.39.583 1.132.933 1.484.709 9.721 4.037 11.023 4.659.506.278 1.108.442 1.749.442.793 0 1.527-.251 2.128-.677l-.011.008c1.647-.859 9.388-4.043 10.883-4.821.76-.397 1.096-.7 1.096-.984s0-2.791 0-2.791z"/><path d="m27.992 5.329c.014-.285-.358-.534-1.107-.81-1.451-.533-9.152-3.596-10.624-4.136-.528-.242-1.144-.383-1.794-.383-.734 0-1.426.18-2.035.498l.024-.012c-1.731.622-9.924 3.835-11.381 4.405-.729.287-1.086.552-1.073.834v2.83c0 .282.39.583 1.132.933 1.484.709 9.721 4.038 11.023 4.66.504.277 1.105.439 1.744.439.795 0 1.531-.252 2.133-.68l-.011.008c1.647-.859 9.388-4.043 10.883-4.821.76-.397 1.096-.7 1.096-.984s0-2.791 0-2.791h-.009zm-17.967 2.684 6.488-.996-1.96 2.874zm14.351-2.588-4.253 1.68-3.835-1.523 4.246-1.679 3.838 1.517zm-11.265-2.785-.628-1.157 1.958.765 1.846-.604-.499 1.196 1.881.7-2.426.252-.543 1.311-.879-1.457-2.8-.252 2.091-.754zm-4.827 1.632c1.916 0 3.467.602 3.467 1.344s-1.559 1.344-3.467 1.344-3.474-.603-3.474-1.344 1.553-1.344 3.474-1.344z"/></svg>`};function NC(){const t=L2(0),e=L2(0),n=()=>{t.value=document.documentElement.scrollTop,e.value=document.documentElement.scrollLeft};return J2(()=>{n(),document.addEventListener("scroll",n)}),_1(()=>{document.removeEventListener("scroll",n)}),[t,e]}const Oi=10,OD=1,FD=20;function ND(){let t=document.getElementById("zenuml-intersection-detector-container"),e=Array.from(document.getElementsByClassName("zenuml-intersection-detector"));return t&&e.length===Oi?{detectorContainer:t,detectors:e}:(t=document.createElement("div"),t.id="zenuml-intersection-detector-container",Object.assign(t.style,{position:"absolute",top:"0",left:"0",opacity:"0",pointerEvents:"none"}),e=new Array(Oi).fill(0).map(()=>{const n=document.createElement("div");return n.className="zenuml-intersection-detector",Object.assign(n.style,{position:"absolute",top:"0",left:"0",width:"100%"}),t==null||t.appendChild(n),n}),document.body.appendChild(t),{detectorContainer:t,detectors:e})}function DC(){const t=L2(0);let e;return J2(()=>{const{detectorContainer:n,detectors:i}=ND(),s=document.documentElement.scrollHeight,r=document.documentElement.scrollWidth-FD;n.style.height=s+"px",n.style.width=r+"px";const o=Math.ceil(document.documentElement.scrollHeight/Oi),l=[...Array(o+1).keys()].map(a=>a/o);i.forEach((a,L)=>{a.style.top=L*o+"px",a.style.height=o+"px"}),e=new IntersectionObserver(([a])=>{(a.intersectionRect.top-a.boundingClientRect.top>OD||a.target===i[0])&&(t.value=a.intersectionRect.top)},{threshold:l}),i.forEach(a=>{e.observe(a)})}),_1(()=>{e.disconnect()}),t}function Fi(t){let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e}const r8=/[!@#$%^&*()+-,.?''":{}|<>/\s]/,Ni=t=>{const e=L2(!1);function n(l){e.value=l}async function i(l){l.preventDefault(),l.stopPropagation(),n(!0),await l4();const a=document.createRange();if(!l.target)return;a.selectNodeContents(l.target),a.collapse(!1);const L=window.getSelection();!L||(L==null||L.removeAllRanges(),L==null||L.addRange(a))}async function s(l){await l4(),e.value&&(n(!1),t(l))}function r(l){l.key==="Enter"&&(l.preventDefault(),l.stopPropagation())}function o(l){(l.key==="Enter"||l.key==="Escape"||l.key==="Tab")&&(n(!1),t(l))}return{editing:e,handleDblClick:i,handleBlur:s,handleKeydown:r,handleKeyup:o}},DD={class:"flex items-center justify-center"},PD={key:0,class:"name leading-4"},BD=["contenteditable"],zD=K2({__name:"ParticipantLabel",props:{labelText:{},labelPositions:{},assignee:{}},setup(t){const e=t,{labelText:n,labelPositions:i}=w9(e),s=r3(),r=P(()=>s.state.mode),o=P(()=>s.getters.code),l=P(()=>s.getters.onContentChange||(()=>{}));function a(p){s.dispatch("updateCode",{code:p}),l.value(p)}function L(p){var M;p.preventDefault(),p.stopPropagation();const v=p.target;if(!(v instanceof HTMLElement))return;let x=(M=v.innerText.trim())!=null?M:"";if(x===""||x===n.value){v.innerText=n.value;return}if(x.includes(" ")&&(x=x.replace(/\s+/g," ")),r8.test(x)&&(x=x.replace(/"/g,""),x=`"${x}"`,r8.lastIndex=0),!(i!=null&&i.value))return;const g=Array.from(i.value).sort((y,E)=>JSON.parse(E)[0]-JSON.parse(y)[0]);let w=o.value;for(const y of g){const[E,S]=JSON.parse(y);w=w.slice(0,E)+x+w.slice(S)}a(w)}const{editing:c,handleDblClick:C,handleBlur:u,handleKeydown:h,handleKeyup:d}=Ni(L);return(p,v)=>(F(),V("div",DD,[p.assignee?(F(),V("label",PD,X2(p.assignee)+":",1)):p2("",!0),b("label",{title:"Double click to edit",class:y2(["name leading-4 cursor-text right hover:text-skin-message-hover hover:bg-skin-message-hover",{"py-1 px-2 cursor-text":l2(c)}]),contenteditable:l2(c)&&r.value===l2(_3).Dynamic,onDblclick:v[0]||(v[0]=(...x)=>l2(C)&&l2(C)(...x)),onBlur:v[1]||(v[1]=(...x)=>l2(u)&&l2(u)(...x)),onKeyup:v[2]||(v[2]=(...x)=>l2(d)&&l2(d)(...x)),onKeydown:v[3]||(v[3]=(...x)=>l2(h)&&l2(h)(...x))},X2(l2(n)),43,BD)]))}}),UD=10,$D={name:"Participant",components:{ParticipantLabel:zD},setup(t){const e=r3(),n=L2(null);if(e.state.mode===_3.Static)return{translate:0,participant:n};const i=P(()=>e.getters.participants.Positions().get(t.entity.name)),s=DC(),[r]=NC();return{translate:P(()=>{var C;const l=t.offsetTop2||0;let a=s.value+r.value;s.value>UD&&(e==null?void 0:e.state.stickyOffset)&&(a+=e==null?void 0:e.state.stickyOffset);const L=((C=e==null?void 0:e.state.diagramElement)==null?void 0:C.clientHeight)||0,c=e!=null&&e.state.diagramElement?Fi(e==null?void 0:e.state.diagramElement):0;return a<l+c?0:Math.min(a-c,L-CC)-l}),participant:n,labelPositions:i}},props:{entity:{type:Object,required:!0},offsetTop2:{type:Number,default:0}},data(){return{color:void 0}},mounted(){this.updateFontColor()},updated(){this.updateFontColor()},computed:{selected(){return this.$store.state.selected.includes(this.entity.name)},stereotype(){return this.entity.stereotype},labelText(){return this.entity.assignee?this.entity.name.split(":")[1]:this.entity.label||this.entity.name},comment(){return this.entity.comment},icon(){var t;return FC[(t=this.entity.type)==null?void 0:t.toLowerCase()]},backgroundColor(){try{return this.entity.color?this.entity.color&&vb(this.entity.color):void 0}catch{return}}},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},updateFontColor(){if(!this.backgroundColor)return;let t=window.getComputedStyle(this.$refs.participant).getPropertyValue("background-color");if(!t)return;let e=xb(t);this.color=e>128?"#000":"#fff"}}},WD=["innerHTML","aria-description"],HD={class:"h-5 group flex flex-col justify-center"},VD={key:0,class:"interface leading-4"};function GD(t,e,n,i,s,r){const o=m2("ParticipantLabel");return F(),V("div",{class:y2(["participant bg-skin-participant shadow-participant border-skin-participant text-skin-participant rounded text-base leading-4 flex flex-col justify-center z-10 h-10 top-8",{selected:r.selected}]),ref:"participant",style:A2({backgroundColor:r.backgroundColor,color:s.color,transform:`translateY(${i.translate}px)`}),onClick:e[0]||(e[0]=(...l)=>r.onSelect&&r.onSelect(...l))},[r.icon?(F(),V("div",{key:0,innerHTML:r.icon,class:"text-skin-base bg-skin-frame px-1 absolute rounded left-1/2 transform -translate-x-1/2 -translate-y-full h-8 [&>svg]:w-full [&>svg]:h-full","aria-description":`icon for ${n.entity.name}`},null,8,WD)):p2("",!0),b("div",HD,[r.stereotype?(F(),V("label",VD,"\xAB"+X2(r.stereotype)+"\xBB",1)):p2("",!0),K(o,{labelText:r.labelText,labelPositions:i.labelPositions,assignee:n.entity.assignee},null,8,["labelText","labelPositions","assignee"])])],6)}const PC=Y2($D,[["render",GD]]),bK="",o8=o5.child({name:"LifeLine"}),jD={name:"life-line",components:{Participant:PC},props:["entity","context","groupLeft","inGroup","renderParticipants","renderLifeLine"],data:()=>({translateX:0,top:0}),computed:{...Y3(["centerOf"]),...z9(["scale"]),debug(){return!!localStorage.zenumlDebug},left(){return this.centerOf(this.entity.name)-8-(this.groupLeft||0)}},mounted(){o8.debug(`LifeLine mounted for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),o8.debug(`nextTick after updated for ${this.entity.name}`)}),Ti.$on("participant_set_top",()=>this.$nextTick(()=>this.setTop()))},updated(){o8.debug(`updated for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),o8.debug(`nextTick after updated for ${this.entity.name}`)})},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},setTop(){const t=this.entity.name.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g,"\\$1"),e=this.$store.getters.diagramElement,n=e==null?void 0:e.querySelector(`[data-to="${t}"]`),i=(n==null?void 0:n.offsetParent)!=null;if(n&&n.attributes["data-type"].value==="creation"&&i){o8.debug(`First message to ${this.entity.name} is creation`);const s=this.$el.getBoundingClientRect().y,r=n.getBoundingClientRect().y;this.top=(r-s)/this.scale}else this.top=0}}},qD=["id","entity-type"],KD={key:1,class:"line w0 mx-auto flex-grow w-px"};function YD(t,e,n,i,s,r){var l;const o=m2("participant");return F(),V("div",{id:n.entity.name,"entity-type":(l=n.entity.type)==null?void 0:l.toLowerCase(),class:y2(["lifeline absolute flex flex-col mx-2 h-full",{"transform -translate-x-1/2":n.renderParticipants}]),style:A2({paddingTop:t.top+"px",left:r.left+"px"})},[n.renderParticipants?(F(),Z2(o,{key:0,entity:n.entity,offsetTop2:t.top},null,8,["entity","offsetTop2"])):p2("",!0),n.renderLifeLine?(F(),V("div",KD)):p2("",!0)],14,qD)}const BC=Y2(jD,[["render",YD],["__scopeId","data-v-3fcb82ef"]]),zC=8,QD={name:"lifeline-group",props:["context","renderParticipants","renderLifeLine"],computed:{...Y3(["centerOf"]),name(){var t,e;return(e=(t=this.context)==null?void 0:t.name())==null?void 0:e.getFormattedText()},left(){const t=this.entities[0].name,e=Math.max(n8(t,n9.ParticipantName),100);return this.centerOf(t)-e/2-zC},right(){const t=this.entities.slice(0).pop().name,e=Math.max(n8(t,n9.ParticipantName),100);return this.centerOf(t)+e/2+zC},entities(){return q0(this.context).Array()}},components:{LifeLine:BC}},XD={class:"lifeline-group relative flex-grow"};function JD(t,e,n,i,s,r){const o=m2("life-line");return r.entities.length>0?(F(),V("div",{key:0,class:"container absolute flex flex-col h-full",style:A2({left:`${r.left}px`,width:`${r.right-r.left}px`})},[b("div",{class:y2(["flex flex-col flex-grow",{shadow:!n.renderParticipants,"shadow-slate-500/50":!n.renderParticipants}])},[b("div",XD,[(F(!0),V(F2,null,H3(r.entities,l=>(F(),Z2(o,{inGroup:"true",key:l.name,ref_for:!0,ref:l.name,entity:l,"group-left":r.left,"render-life-line":n.renderLifeLine,renderParticipants:n.renderParticipants},null,8,["entity","group-left","render-life-line","renderParticipants"]))),128))])],2)],4)):p2("",!0)}const eP=Y2(QD,[["render",JD]]),UC=o5.child({name:"LifeLineLayer"}),tP=70,nP=10,iP={name:"life-line-layer",props:["context","renderParticipants","renderLifeLine","leftGap"],setup(){const e=r3(),n=P(()=>e.state.mode);if(n.value===_3.static)return{translate:0,RenderMode:_3,mode:n};const i=DC(),[s]=NC();return{translate:P(()=>{var L;let o=i.value+s.value;i.value>nP&&(e==null?void 0:e.state.stickyOffset)&&(o+=e==null?void 0:e.state.stickyOffset);const l=((L=e==null?void 0:e.state.diagramElement)==null?void 0:L.clientHeight)||0,a=e!=null&&e.state.diagramElement?Fi(e==null?void 0:e.state.diagramElement):0;return o<=0+a?0:Math.min(o-a,l-tP)-0}),RenderMode:_3,mode:n}},computed:{...Y3(["participants","GroupContext","ParticipantContext","centerOf"]),debug(){return!!localStorage.zenumlDebug},invisibleStarter(){return this.starterParticipant.name==="_STARTER_"},starterParticipant(){return this.participants.Starter()},starterOnTheLeft(){return!this.starterParticipant.explicit},implicitParticipants(){return this.participants.ImplicitArray()},explicitGroupAndParticipants(){var t;return(t=this.context)==null?void 0:t.children.filter(e=>{const n=e instanceof rC,i=e instanceof oC;return n||i})}},methods:{...CL(["increaseGeneration"]),getParticipantEntity(t){return q0(t).First()}},updated(){UC.debug("LifeLineLayer updated")},mounted(){UC.debug("LifeLineLayer mounted")},components:{LifeLine:BC,LifeLineGroup:eP}},sP={class:"container relative grow"};function rP(t,e,n,i,s,r){const o=m2("life-line"),l=m2("life-line-group");return F(),V("div",{class:"life-line-layer lifeline-layer z-30 absolute h-full flex flex-col top-0",style:A2({"min-width":i.mode===i.RenderMode.Dynamic?"200px":"auto",width:`calc(100% - ${n.leftGap}px)`,pointerEvents:n.renderParticipants?"none":"all"})},[b("div",{style:A2({transform:`translateY(${i.translate>0?i.translate-1:i.translate}px)`}),class:"pt-8 after:bg-gradient-to-b after:from-skin-frame after:via-skin-frame after:to-skin-frame/0 after:block after:absolute after:top-0 after:w-full after:h-[72px]"},null,4),b("div",sP,[r.starterOnTheLeft?(F(),Z2(o,{key:0,entity:r.starterParticipant,class:y2(["starter",{invisible:r.invisibleStarter&&!r.debug}]),renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","class","renderParticipants","renderLifeLine"])):p2("",!0),(F(!0),V(F2,null,H3(r.explicitGroupAndParticipants,(a,L)=>(F(),V(F2,null,[a instanceof t.GroupContext?(F(),Z2(l,{key:L,context:a,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["context","renderParticipants","renderLifeLine"])):p2("",!0),a instanceof t.ParticipantContext?(F(),Z2(o,{key:L,entity:r.getParticipantEntity(a),renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"])):p2("",!0)],64))),256)),(F(!0),V(F2,null,H3(r.implicitParticipants,a=>(F(),Z2(o,{key:a.name,entity:a,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"]))),128))])],4)}const Di=Y2(iP,[["render",rP]]),oP={class:"message-layer relative z-30 pt-24 pb-10"},$C=K2({__name:"MessageLayer",props:{context:{}},setup(t){const e=g0(()=>Promise.resolve().then(()=>Rj)),n=o5.child({name:"MessageLayer"}),i=r3(),s=P(()=>i.getters.participants),r=P(()=>i.getters.centerOf),o=P(()=>{if(s.value.Array().length>=1){const l=s.value.Array().slice(0)[0].name;return r.value(l)+1}return 0});return J2(()=>{n.debug("MessageLayer mounted")}),w5(()=>{n.debug("MessageLayer updated")}),(l,a)=>{const L=m2("block");return F(),V("div",oP,[K(L,{context:l.context,style:A2({"padding-left":o.value+"px"})},null,8,["context","style"]),K(l2(e))])}}}),ZK="",lP=Z.tree.ParseTreeWalker.DEFAULT;class Pi extends I{constructor(n){super();t2(this,"_orderedParticipants");t2(this,"frameRoot",null);t2(this,"parents",[]);this._orderedParticipants=n}getLocalParticipants(n){return[n.Origin(),...q0(n).ImplicitArray().map(i=>i.name)]}getLeft(n){const i=this.getLocalParticipants(n);return this._orderedParticipants.find(s=>i.includes(s))||""}getRight(n){return this._orderedParticipants.slice().reverse().find(i=>this.getLocalParticipants(n).includes(i))||""}enterFragment(n){var s;const i={left:this.getLeft(n),right:this.getRight(n),children:[]};this.frameRoot||(this.frameRoot=i),this.parents.length>0&&((s=this.parents[this.parents.length-1].children)==null||s.push(i)),this.parents.push(i)}exitFragment(){this.parents.pop()}enterTcf(n){this.enterFragment(n)}enterOpt(n){this.enterFragment(n)}enterPar(n){this.enterFragment(n)}enterAlt(n){this.enterFragment(n)}enterLoop(n){this.enterFragment(n)}exitTcf(){this.exitFragment()}exitOpt(){this.exitFragment()}exitPar(){this.exitFragment()}exitAlt(){this.exitFragment()}exitLoop(){this.exitFragment()}getFrame(n){return n.children.map(i=>{lP.walk(this,i)}),this.frameRoot}}function Bi(t,e){if(!t.children||t.children.length===0)return 1;let n=0;for(const i of t.children)e==="LEFT"&&i.left!==t.left||e==="RIGHT"&&i.right!==t.right||(n=Math.max(n,Bi(i,e)));return n+1}function zi(t){return t?{left:10*Bi(t,"LEFT"),right:10*Bi(t,"RIGHT")}:{left:0,right:0}}function WC(t,e){const n=e.orderedParticipantNames(),i=[t.Origin(),...q0(t).Names()],s=n.find(c=>i.includes(c))||"",r=n.slice().reverse().find(c=>i.includes(c))||"",l=new Pi(n).getFrame(t),a=zi(l),L=aP(t,r,e);return e.distance(s,r)+a.left+a.right+e.half(s)+e.half(r)+L}function aP(t,e,n){const s=dC(t).filter(r=>r.from===r.to).map(r=>n8(r.signature,n9.MessageContent)+37-n.distance(r.from,e)-n.half(e));return Math.max.apply(null,[0,...s])}const Ui=K2({__name:"SeqDiagram",setup(t){const e=r3(),n=P(()=>e.state.theme),i=P(()=>e.state.mode),s=P(()=>e.getters.rootContext),r=P(()=>e.getters.coordinates),o=P(()=>WC(s.value,r.value)),l=P(()=>{const L=r.value.orderedParticipantNames(),C=new Pi(L).getFrame(s.value);return C?zi(C).left+Si+20:0}),a=L2(null);return e.commit("diagramElement",a),(L,c)=>(F(),V("div",{class:y2(["zenuml sequence-diagram relative box-border text-left overflow-visible",n.value]),ref_key:"diagramRef",ref:a},[b("div",{style:A2({paddingLeft:`${l.value}px`}),class:"relative"},[i.value===l2(_3).Dynamic?(F(),V(F2,{key:0},[K(Di,{leftGap:l.value,context:s.value.head(),renderParticipants:!1,renderLifeLine:!0},null,8,["leftGap","context"]),K($C,{context:s.value.block(),style:A2({width:`${o.value}px`})},null,8,["context","style"]),K(Di,{leftGap:l.value,context:s.value.head(),renderParticipants:!0,renderLifeLine:!1},null,8,["leftGap","context"])],64)):p2("",!0),i.value===l2(_3).Static?(F(),V(F2,{key:1},[K(Di,{leftGap:l.value,context:s.value.head(),renderParticipants:!0,renderLifeLine:!0},null,8,["leftGap","context"]),K($C,{context:s.value.block(),style:A2({width:`${o.value}px`})},null,8,["context","style"])],64)):p2("",!0)],4)],2))}}),EK="",LP={name:"IconList",props:["types"],computed:{},methods:{icon(t){return FC[t==null?void 0:t.toLowerCase()]}}},cP={role:"list",class:"mt-3 grid grid-cols-4 gap-5 sm:gap-6 sm:grid-cols-6 lg:grid-cols-8"},CP={class:"h-12 flex items-center justify-center bg-gray-50 text-sm font-medium rounded-t-md"},uP=["innerHTML","alt"],hP={class:"flex items-center justify-center border-t border-r border-b border-gray-200 bg-white rounded-b-md"},dP={class:"px-2 py-2 text-xs"},fP={class:"text-gray-900 font-medium hover:text-gray-600"};function gP(t,e,n,i,s,r){return F(),V("ul",cP,[(F(!0),V(F2,null,H3(n.types,o=>(F(),V("li",{key:o,class:"col-span-1 flex flex-col shadow-sm rounded-md"},[b("div",CP,[r.icon?(F(),V("i",{key:0,innerHTML:r.icon(o),class:"object-contain h-8 w-8 m-auto [&>svg]:w-full [&>svg]:h-full",alt:`icon for ${o}`},null,8,uP)):p2("",!0)]),b("div",hP,[b("div",dP,[b("span",fP,"@"+X2(o),1)])])]))),128))])}const pP={name:"TipsDialog",components:{Icon:i9,IconList:Y2(LP,[["render",gP]])},computed:{standardTypes(){return["Actor","Boundary","Control","Database","Entity"]},awsServices(){return["CloudWatch","CloudFront","Cognito","DynamoDB","EBS","EC2","ECS","EFS","ElastiCache","ElasticBeantalk","ElasticFileSystem","Glacier","IAM","Kinesis","Lambda","LightSail","RDS","Redshift","S3","SNS","SQS","Sagemaker","VPC"]},azureServices(){return["AzureActiveDirectory","AzureBackup","AzureCDN","AzureDataFactory","AzureDevOps","AzureFunction","AzureSQL","CosmosDB","LogicApps","VirtualMachine"]},googleServices(){return["BigTable","BigQuery","CloudCDN","CloudDNS","CloudInterconnect","CloudLoadBalancing","CloudSQL","CloudStorage","DataLab","DataProc","GoogleIAM","GoogleSecurity","GoogleVPC","PubSub","SecurityScanner","StackDriver","VisionAPI"]}},methods:{closeTipsDialog(){var t;this.$store.state.showTips=!1;try{(t=this.$gtag)==null||t.event("close",{event_category:"help",event_label:"tips dialog"})}catch(e){console.error(e)}}}},mP={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block"},wP=b("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":"true"},null,-1),xP=b("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"\u200B",-1),vP={class:"z-40 inline-block align-bottom bg-white rounded-lg px-4 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:p-2"},_P={class:"bg-white px-4 py-5 border-b border-gray-200 sm:px-6",slot:"header"},MP=b("h3",{class:"text-xl leading-6 font-medium text-gray-900 inline-block"}," ZenUML Tips ",-1),yP=b("span",{class:"sr-only"},"Close menu",-1),RP={slot:"body"},AP={class:"relative bg-white pb-32 mt-4 overflow-hidden"},SP={class:"relative"},kP={class:"lg:mx-auto lg:max-w-11/12 lg:px-8"},TP=o7(`<div class="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1"><div><div class="px-4 max-w-full mx-auto sm:px-6 lg:max-w-none lg:mx-0"><h2 class="mt-4 mb-4 text-lg leading-6 font-medium text-gray-900"> Declare Participants </h2><pre class="text-xs w-full bg-gray-50 text-gray-600 p-2 rounded-lg"><code>// Define a Starter (optional)
|
|
3211
|
+
<svg fill="#000000" width="800px" height="800px" viewBox="0 -2 28 28" xmlns="http://www.w3.org/2000/svg"><path d="m27.994 14.729c-.012.267-.365.566-1.091.945-1.495.778-9.236 3.967-10.883 4.821-.589.419-1.324.67-2.116.67-.641 0-1.243-.164-1.768-.452l.019.01c-1.304-.622-9.539-3.95-11.023-4.659-.741-.35-1.119-.653-1.132-.933v2.83c0 .282.39.583 1.132.933 1.484.709 9.722 4.037 11.023 4.659.504.277 1.105.44 1.744.44.795 0 1.531-.252 2.132-.681l-.011.008c1.647-.859 9.388-4.041 10.883-4.821.76-.396 1.096-.7 1.096-.982s0-2.791 0-2.791z"/><path d="m27.992 10.115c-.013.267-.365.565-1.09.944-1.495.778-9.236 3.967-10.883 4.821-.59.421-1.326.672-2.121.672-.639 0-1.24-.163-1.763-.449l.019.01c-1.304-.627-9.539-3.955-11.023-4.664-.741-.35-1.119-.653-1.132-.933v2.83c0 .282.39.583 1.132.933 1.484.709 9.721 4.037 11.023 4.659.506.278 1.108.442 1.749.442.793 0 1.527-.251 2.128-.677l-.011.008c1.647-.859 9.388-4.043 10.883-4.821.76-.397 1.096-.7 1.096-.984s0-2.791 0-2.791z"/><path d="m27.992 5.329c.014-.285-.358-.534-1.107-.81-1.451-.533-9.152-3.596-10.624-4.136-.528-.242-1.144-.383-1.794-.383-.734 0-1.426.18-2.035.498l.024-.012c-1.731.622-9.924 3.835-11.381 4.405-.729.287-1.086.552-1.073.834v2.83c0 .282.39.583 1.132.933 1.484.709 9.721 4.038 11.023 4.66.504.277 1.105.439 1.744.439.795 0 1.531-.252 2.133-.68l-.011.008c1.647-.859 9.388-4.043 10.883-4.821.76-.397 1.096-.7 1.096-.984s0-2.791 0-2.791h-.009zm-17.967 2.684 6.488-.996-1.96 2.874zm14.351-2.588-4.253 1.68-3.835-1.523 4.246-1.679 3.838 1.517zm-11.265-2.785-.628-1.157 1.958.765 1.846-.604-.499 1.196 1.881.7-2.426.252-.543 1.311-.879-1.457-2.8-.252 2.091-.754zm-4.827 1.632c1.916 0 3.467.602 3.467 1.344s-1.559 1.344-3.467 1.344-3.474-.603-3.474-1.344 1.553-1.344 3.474-1.344z"/></svg>`};function NC(){const t=L2(0),e=L2(0),n=()=>{t.value=document.documentElement.scrollTop,e.value=document.documentElement.scrollLeft};return J2(()=>{n(),document.addEventListener("scroll",n)}),_1(()=>{document.removeEventListener("scroll",n)}),[t,e]}const Oi=10,OD=1,FD=20;function ND(){let t=document.getElementById("zenuml-intersection-detector-container"),e=Array.from(document.getElementsByClassName("zenuml-intersection-detector"));return t&&e.length===Oi?{detectorContainer:t,detectors:e}:(t=document.createElement("div"),t.id="zenuml-intersection-detector-container",Object.assign(t.style,{position:"absolute",top:"0",left:"0",opacity:"0",pointerEvents:"none"}),e=new Array(Oi).fill(0).map(()=>{const n=document.createElement("div");return n.className="zenuml-intersection-detector",Object.assign(n.style,{position:"absolute",top:"0",left:"0",width:"100%"}),t==null||t.appendChild(n),n}),document.body.appendChild(t),{detectorContainer:t,detectors:e})}function DC(){const t=L2(0);let e;return J2(()=>{const{detectorContainer:n,detectors:i}=ND(),s=document.documentElement.scrollHeight,r=document.documentElement.scrollWidth-FD;n.style.height=s+"px",n.style.width=r+"px";const o=Math.ceil(document.documentElement.scrollHeight/Oi),l=[...Array(o+1).keys()].map(a=>a/o);i.forEach((a,L)=>{a.style.top=L*o+"px",a.style.height=o+"px"}),e=new IntersectionObserver(([a])=>{(a.intersectionRect.top-a.boundingClientRect.top>OD||a.target===i[0])&&(t.value=a.intersectionRect.top)},{threshold:l}),i.forEach(a=>{e.observe(a)})}),_1(()=>{e.disconnect()}),t}function Fi(t){let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e}const r8=/[!@#$%^&*()+-,.?''":{}|<>/\s]/,Ni=t=>{const e=L2(!1);function n(l){e.value=l}async function i(l){l.preventDefault(),l.stopPropagation(),n(!0),await l4();const a=document.createRange();if(!l.target)return;a.selectNodeContents(l.target),a.collapse(!1);const L=window.getSelection();!L||(L==null||L.removeAllRanges(),L==null||L.addRange(a))}async function s(l){await l4(),e.value&&(n(!1),t(l))}function r(l){l.key==="Enter"&&(l.preventDefault(),l.stopPropagation())}function o(l){(l.key==="Enter"||l.key==="Escape"||l.key==="Tab")&&(n(!1),t(l))}return{editing:e,handleDblClick:i,handleBlur:s,handleKeydown:r,handleKeyup:o}},DD={class:"flex items-center justify-center"},PD={key:0,class:"name leading-4"},BD=["contenteditable"],zD=K2({__name:"ParticipantLabel",props:{labelText:{},labelPositions:{},assignee:{}},setup(t){const e=t,{labelText:n,labelPositions:i}=w9(e),s=r3(),r=P(()=>s.state.mode),o=P(()=>s.getters.code),l=P(()=>s.getters.onContentChange||(()=>{}));function a(p){s.dispatch("updateCode",{code:p}),l.value(p)}function L(p){var M;p.preventDefault(),p.stopPropagation();const v=p.target;if(!(v instanceof HTMLElement))return;let x=(M=v.innerText.trim())!=null?M:"";if(x===""||x===n.value){v.innerText=n.value;return}if(x.includes(" ")&&(x=x.replace(/\s+/g," ")),r8.test(x)&&(x=x.replace(/"/g,""),x=`"${x}"`,r8.lastIndex=0),!(i!=null&&i.value))return;const g=Array.from(i.value).sort((y,E)=>JSON.parse(E)[0]-JSON.parse(y)[0]);let w=o.value;for(const y of g){const[E,S]=JSON.parse(y);w=w.slice(0,E)+x+w.slice(S)}a(w)}const{editing:c,handleDblClick:C,handleBlur:u,handleKeydown:h,handleKeyup:d}=Ni(L);return(p,v)=>(F(),V("div",DD,[p.assignee?(F(),V("label",PD,X2(p.assignee)+":",1)):p2("",!0),b("label",{title:"Double click to edit",class:y2(["name leading-4 cursor-text right hover:text-skin-message-hover hover:bg-skin-message-hover",{"py-1 px-2 cursor-text":l2(c)}]),contenteditable:l2(c)&&r.value===l2(_3).Dynamic,onDblclick:v[0]||(v[0]=(...x)=>l2(C)&&l2(C)(...x)),onBlur:v[1]||(v[1]=(...x)=>l2(u)&&l2(u)(...x)),onKeyup:v[2]||(v[2]=(...x)=>l2(d)&&l2(d)(...x)),onKeydown:v[3]||(v[3]=(...x)=>l2(h)&&l2(h)(...x))},X2(l2(n)),43,BD)]))}}),UD=10,$D={name:"Participant",components:{ParticipantLabel:zD},setup(t){const e=r3(),n=L2(null);if(e.state.mode===_3.Static)return{translate:0,participant:n};const i=P(()=>e.getters.participants.Positions().get(t.entity.name)),s=DC(),[r]=NC();return{translate:P(()=>{var C;const l=t.offsetTop2||0;let a=s.value+r.value;s.value>UD&&(e==null?void 0:e.state.stickyOffset)&&(a+=e==null?void 0:e.state.stickyOffset);const L=((C=e==null?void 0:e.state.diagramElement)==null?void 0:C.clientHeight)||0,c=e!=null&&e.state.diagramElement?Fi(e==null?void 0:e.state.diagramElement):0;return a<l+c?0:Math.min(a-c,L-CC)-l}),participant:n,labelPositions:i}},props:{entity:{type:Object,required:!0},offsetTop2:{type:Number,default:0}},data(){return{color:void 0}},mounted(){console.log("!!! Participant mounted"),this.updateFontColor()},updated(){console.log("!!! Participant updated"),this.updateFontColor()},computed:{selected(){return this.$store.state.selected.includes(this.entity.name)},stereotype(){return this.entity.stereotype},labelText(){return this.entity.assignee?this.entity.name.split(":")[1]:this.entity.label||this.entity.name},comment(){return this.entity.comment},icon(){var t;return FC[(t=this.entity.type)==null?void 0:t.toLowerCase()]},backgroundColor(){try{return this.entity.color?this.entity.color&&vb(this.entity.color):void 0}catch{return}}},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},updateFontColor(){if(!this.backgroundColor){this.color="inherit";return}let t=window.getComputedStyle(this.$refs.participant).getPropertyValue("background-color");if(!t){this.color="inherit";return}let e=xb(t);this.color=e>128?"#000":"#fff"}}},WD=["innerHTML","aria-description"],HD={class:"h-5 group flex flex-col justify-center"},VD={key:0,class:"interface leading-4"};function GD(t,e,n,i,s,r){const o=m2("ParticipantLabel");return F(),V("div",{class:y2(["participant bg-skin-participant shadow-participant border-skin-participant text-skin-participant rounded text-base leading-4 flex flex-col justify-center z-10 h-10 top-8",{selected:r.selected}]),ref:"participant",style:A2({backgroundColor:r.backgroundColor,color:s.color,transform:`translateY(${i.translate}px)`}),onClick:e[0]||(e[0]=(...l)=>r.onSelect&&r.onSelect(...l))},[r.icon?(F(),V("div",{key:0,innerHTML:r.icon,class:"text-skin-base bg-skin-frame px-1 absolute rounded left-1/2 transform -translate-x-1/2 -translate-y-full h-8 [&>svg]:w-full [&>svg]:h-full","aria-description":`icon for ${n.entity.name}`},null,8,WD)):p2("",!0),b("div",HD,[r.stereotype?(F(),V("label",VD,"\xAB"+X2(r.stereotype)+"\xBB",1)):p2("",!0),K(o,{labelText:r.labelText,labelPositions:i.labelPositions,assignee:n.entity.assignee},null,8,["labelText","labelPositions","assignee"])])],6)}const PC=Y2($D,[["render",GD]]),bK="",o8=o5.child({name:"LifeLine"}),jD={name:"life-line",components:{Participant:PC},props:["entity","context","groupLeft","inGroup","renderParticipants","renderLifeLine"],data:()=>({translateX:0,top:0}),computed:{...Y3(["centerOf"]),...z9(["scale"]),debug(){return!!localStorage.zenumlDebug},left(){return this.centerOf(this.entity.name)-8-(this.groupLeft||0)}},mounted(){o8.debug(`LifeLine mounted for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),o8.debug(`nextTick after updated for ${this.entity.name}`)}),Ti.$on("participant_set_top",()=>this.$nextTick(()=>this.setTop()))},updated(){o8.debug(`updated for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),o8.debug(`nextTick after updated for ${this.entity.name}`)})},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},setTop(){const t=this.entity.name.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g,"\\$1"),e=this.$store.getters.diagramElement,n=e==null?void 0:e.querySelector(`[data-to="${t}"]`),i=(n==null?void 0:n.offsetParent)!=null;if(n&&n.attributes["data-type"].value==="creation"&&i){o8.debug(`First message to ${this.entity.name} is creation`);const s=this.$el.getBoundingClientRect().y,r=n.getBoundingClientRect().y;this.top=(r-s)/this.scale}else this.top=0}}},qD=["id","entity-type"],KD={key:1,class:"line w0 mx-auto flex-grow w-px"};function YD(t,e,n,i,s,r){var l;const o=m2("participant");return F(),V("div",{id:n.entity.name,"entity-type":(l=n.entity.type)==null?void 0:l.toLowerCase(),class:y2(["lifeline absolute flex flex-col mx-2 h-full",{"transform -translate-x-1/2":n.renderParticipants}]),style:A2({paddingTop:t.top+"px",left:r.left+"px"})},[n.renderParticipants?(F(),Z2(o,{key:0,entity:n.entity,offsetTop2:t.top},null,8,["entity","offsetTop2"])):p2("",!0),n.renderLifeLine?(F(),V("div",KD)):p2("",!0)],14,qD)}const BC=Y2(jD,[["render",YD],["__scopeId","data-v-3fcb82ef"]]),zC=8,QD={name:"lifeline-group",props:["context","renderParticipants","renderLifeLine"],computed:{...Y3(["centerOf"]),name(){var t,e;return(e=(t=this.context)==null?void 0:t.name())==null?void 0:e.getFormattedText()},left(){const t=this.entities[0].name,e=Math.max(n8(t,n9.ParticipantName),100);return this.centerOf(t)-e/2-zC},right(){const t=this.entities.slice(0).pop().name,e=Math.max(n8(t,n9.ParticipantName),100);return this.centerOf(t)+e/2+zC},entities(){return q0(this.context).Array()}},components:{LifeLine:BC}},XD={class:"lifeline-group relative flex-grow"};function JD(t,e,n,i,s,r){const o=m2("life-line");return r.entities.length>0?(F(),V("div",{key:0,class:"container absolute flex flex-col h-full",style:A2({left:`${r.left}px`,width:`${r.right-r.left}px`})},[b("div",{class:y2(["flex flex-col flex-grow",{shadow:!n.renderParticipants,"shadow-slate-500/50":!n.renderParticipants}])},[b("div",XD,[(F(!0),V(F2,null,H3(r.entities,l=>(F(),Z2(o,{inGroup:"true",key:l.name,ref_for:!0,ref:l.name,entity:l,"group-left":r.left,"render-life-line":n.renderLifeLine,renderParticipants:n.renderParticipants},null,8,["entity","group-left","render-life-line","renderParticipants"]))),128))])],2)],4)):p2("",!0)}const eP=Y2(QD,[["render",JD]]),UC=o5.child({name:"LifeLineLayer"}),tP=70,nP=10,iP={name:"life-line-layer",props:["context","renderParticipants","renderLifeLine","leftGap"],setup(){const e=r3(),n=P(()=>e.state.mode);if(n.value===_3.static)return{translate:0,RenderMode:_3,mode:n};const i=DC(),[s]=NC();return{translate:P(()=>{var L;let o=i.value+s.value;i.value>nP&&(e==null?void 0:e.state.stickyOffset)&&(o+=e==null?void 0:e.state.stickyOffset);const l=((L=e==null?void 0:e.state.diagramElement)==null?void 0:L.clientHeight)||0,a=e!=null&&e.state.diagramElement?Fi(e==null?void 0:e.state.diagramElement):0;return o<=0+a?0:Math.min(o-a,l-tP)-0}),RenderMode:_3,mode:n}},computed:{...Y3(["participants","GroupContext","ParticipantContext","centerOf"]),debug(){return!!localStorage.zenumlDebug},invisibleStarter(){return this.starterParticipant.name==="_STARTER_"},starterParticipant(){return this.participants.Starter()},starterOnTheLeft(){return!this.starterParticipant.explicit},implicitParticipants(){return this.participants.ImplicitArray()},explicitGroupAndParticipants(){var t;return(t=this.context)==null?void 0:t.children.filter(e=>{const n=e instanceof rC,i=e instanceof oC;return n||i})}},methods:{...CL(["increaseGeneration"]),getParticipantEntity(t){return q0(t).First()}},updated(){UC.debug("LifeLineLayer updated")},mounted(){UC.debug("LifeLineLayer mounted")},components:{LifeLine:BC,LifeLineGroup:eP}},sP={class:"container relative grow"};function rP(t,e,n,i,s,r){const o=m2("life-line"),l=m2("life-line-group");return F(),V("div",{class:"life-line-layer lifeline-layer z-30 absolute h-full flex flex-col top-0",style:A2({"min-width":i.mode===i.RenderMode.Dynamic?"200px":"auto",width:`calc(100% - ${n.leftGap}px)`,pointerEvents:n.renderParticipants?"none":"all"})},[b("div",{style:A2({transform:`translateY(${i.translate>0?i.translate-1:i.translate}px)`}),class:"pt-8 after:bg-gradient-to-b after:from-skin-frame after:via-skin-frame after:to-skin-frame/0 after:block after:absolute after:top-0 after:w-full after:h-[72px]"},null,4),b("div",sP,[r.starterOnTheLeft?(F(),Z2(o,{key:0,entity:r.starterParticipant,class:y2(["starter",{invisible:r.invisibleStarter&&!r.debug}]),renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","class","renderParticipants","renderLifeLine"])):p2("",!0),(F(!0),V(F2,null,H3(r.explicitGroupAndParticipants,(a,L)=>(F(),V(F2,null,[a instanceof t.GroupContext?(F(),Z2(l,{key:L,context:a,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["context","renderParticipants","renderLifeLine"])):p2("",!0),a instanceof t.ParticipantContext?(F(),Z2(o,{key:L,entity:r.getParticipantEntity(a),renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"])):p2("",!0)],64))),256)),(F(!0),V(F2,null,H3(r.implicitParticipants,a=>(F(),Z2(o,{key:a.name,entity:a,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"]))),128))])],4)}const Di=Y2(iP,[["render",rP]]),oP={class:"message-layer relative z-30 pt-24 pb-10"},$C=K2({__name:"MessageLayer",props:{context:{}},setup(t){const e=g0(()=>Promise.resolve().then(()=>Rj)),n=o5.child({name:"MessageLayer"}),i=r3(),s=P(()=>i.getters.participants),r=P(()=>i.getters.centerOf),o=P(()=>{if(s.value.Array().length>=1){const l=s.value.Array().slice(0)[0].name;return r.value(l)+1}return 0});return J2(()=>{n.debug("MessageLayer mounted")}),w5(()=>{n.debug("MessageLayer updated")}),(l,a)=>{const L=m2("block");return F(),V("div",oP,[K(L,{context:l.context,style:A2({"padding-left":o.value+"px"})},null,8,["context","style"]),K(l2(e))])}}}),ZK="",lP=Z.tree.ParseTreeWalker.DEFAULT;class Pi extends I{constructor(n){super();t2(this,"_orderedParticipants");t2(this,"frameRoot",null);t2(this,"parents",[]);this._orderedParticipants=n}getLocalParticipants(n){return[n.Origin(),...q0(n).ImplicitArray().map(i=>i.name)]}getLeft(n){const i=this.getLocalParticipants(n);return this._orderedParticipants.find(s=>i.includes(s))||""}getRight(n){return this._orderedParticipants.slice().reverse().find(i=>this.getLocalParticipants(n).includes(i))||""}enterFragment(n){var s;const i={left:this.getLeft(n),right:this.getRight(n),children:[]};this.frameRoot||(this.frameRoot=i),this.parents.length>0&&((s=this.parents[this.parents.length-1].children)==null||s.push(i)),this.parents.push(i)}exitFragment(){this.parents.pop()}enterTcf(n){this.enterFragment(n)}enterOpt(n){this.enterFragment(n)}enterPar(n){this.enterFragment(n)}enterAlt(n){this.enterFragment(n)}enterLoop(n){this.enterFragment(n)}exitTcf(){this.exitFragment()}exitOpt(){this.exitFragment()}exitPar(){this.exitFragment()}exitAlt(){this.exitFragment()}exitLoop(){this.exitFragment()}getFrame(n){return n.children.map(i=>{lP.walk(this,i)}),this.frameRoot}}function Bi(t,e){if(!t.children||t.children.length===0)return 1;let n=0;for(const i of t.children)e==="LEFT"&&i.left!==t.left||e==="RIGHT"&&i.right!==t.right||(n=Math.max(n,Bi(i,e)));return n+1}function zi(t){return t?{left:10*Bi(t,"LEFT"),right:10*Bi(t,"RIGHT")}:{left:0,right:0}}function WC(t,e){const n=e.orderedParticipantNames(),i=[t.Origin(),...q0(t).Names()],s=n.find(c=>i.includes(c))||"",r=n.slice().reverse().find(c=>i.includes(c))||"",l=new Pi(n).getFrame(t),a=zi(l),L=aP(t,r,e);return e.distance(s,r)+a.left+a.right+e.half(s)+e.half(r)+L}function aP(t,e,n){const s=dC(t).filter(r=>r.from===r.to).map(r=>n8(r.signature,n9.MessageContent)+37-n.distance(r.from,e)-n.half(e));return Math.max.apply(null,[0,...s])}const Ui=K2({__name:"SeqDiagram",setup(t){const e=r3(),n=P(()=>e.state.theme),i=P(()=>e.state.mode),s=P(()=>e.getters.rootContext),r=P(()=>e.getters.coordinates),o=P(()=>WC(s.value,r.value)),l=P(()=>{const L=r.value.orderedParticipantNames(),C=new Pi(L).getFrame(s.value);return C?zi(C).left+Si+20:0}),a=L2(null);return e.commit("diagramElement",a),(L,c)=>(F(),V("div",{class:y2(["zenuml sequence-diagram relative box-border text-left overflow-visible",n.value]),ref_key:"diagramRef",ref:a},[b("div",{style:A2({paddingLeft:`${l.value}px`}),class:"relative"},[i.value===l2(_3).Dynamic?(F(),V(F2,{key:0},[K(Di,{leftGap:l.value,context:s.value.head(),renderParticipants:!1,renderLifeLine:!0},null,8,["leftGap","context"]),K($C,{context:s.value.block(),style:A2({width:`${o.value}px`})},null,8,["context","style"]),K(Di,{leftGap:l.value,context:s.value.head(),renderParticipants:!0,renderLifeLine:!1},null,8,["leftGap","context"])],64)):p2("",!0),i.value===l2(_3).Static?(F(),V(F2,{key:1},[K(Di,{leftGap:l.value,context:s.value.head(),renderParticipants:!0,renderLifeLine:!0},null,8,["leftGap","context"]),K($C,{context:s.value.block(),style:A2({width:`${o.value}px`})},null,8,["context","style"])],64)):p2("",!0)],4)],2))}}),EK="",LP={name:"IconList",props:["types"],computed:{},methods:{icon(t){return FC[t==null?void 0:t.toLowerCase()]}}},cP={role:"list",class:"mt-3 grid grid-cols-4 gap-5 sm:gap-6 sm:grid-cols-6 lg:grid-cols-8"},CP={class:"h-12 flex items-center justify-center bg-gray-50 text-sm font-medium rounded-t-md"},uP=["innerHTML","alt"],hP={class:"flex items-center justify-center border-t border-r border-b border-gray-200 bg-white rounded-b-md"},dP={class:"px-2 py-2 text-xs"},fP={class:"text-gray-900 font-medium hover:text-gray-600"};function gP(t,e,n,i,s,r){return F(),V("ul",cP,[(F(!0),V(F2,null,H3(n.types,o=>(F(),V("li",{key:o,class:"col-span-1 flex flex-col shadow-sm rounded-md"},[b("div",CP,[r.icon?(F(),V("i",{key:0,innerHTML:r.icon(o),class:"object-contain h-8 w-8 m-auto [&>svg]:w-full [&>svg]:h-full",alt:`icon for ${o}`},null,8,uP)):p2("",!0)]),b("div",hP,[b("div",dP,[b("span",fP,"@"+X2(o),1)])])]))),128))])}const pP={name:"TipsDialog",components:{Icon:i9,IconList:Y2(LP,[["render",gP]])},computed:{standardTypes(){return["Actor","Boundary","Control","Database","Entity"]},awsServices(){return["CloudWatch","CloudFront","Cognito","DynamoDB","EBS","EC2","ECS","EFS","ElastiCache","ElasticBeantalk","ElasticFileSystem","Glacier","IAM","Kinesis","Lambda","LightSail","RDS","Redshift","S3","SNS","SQS","Sagemaker","VPC"]},azureServices(){return["AzureActiveDirectory","AzureBackup","AzureCDN","AzureDataFactory","AzureDevOps","AzureFunction","AzureSQL","CosmosDB","LogicApps","VirtualMachine"]},googleServices(){return["BigTable","BigQuery","CloudCDN","CloudDNS","CloudInterconnect","CloudLoadBalancing","CloudSQL","CloudStorage","DataLab","DataProc","GoogleIAM","GoogleSecurity","GoogleVPC","PubSub","SecurityScanner","StackDriver","VisionAPI"]}},methods:{closeTipsDialog(){var t;this.$store.state.showTips=!1;try{(t=this.$gtag)==null||t.event("close",{event_category:"help",event_label:"tips dialog"})}catch(e){console.error(e)}}}},mP={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block"},wP=b("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":"true"},null,-1),xP=b("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"\u200B",-1),vP={class:"z-40 inline-block align-bottom bg-white rounded-lg px-4 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:p-2"},_P={class:"bg-white px-4 py-5 border-b border-gray-200 sm:px-6",slot:"header"},MP=b("h3",{class:"text-xl leading-6 font-medium text-gray-900 inline-block"}," ZenUML Tips ",-1),yP=b("span",{class:"sr-only"},"Close menu",-1),RP={slot:"body"},AP={class:"relative bg-white pb-32 mt-4 overflow-hidden"},SP={class:"relative"},kP={class:"lg:mx-auto lg:max-w-11/12 lg:px-8"},TP=o7(`<div class="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1"><div><div class="px-4 max-w-full mx-auto sm:px-6 lg:max-w-none lg:mx-0"><h2 class="mt-4 mb-4 text-lg leading-6 font-medium text-gray-900"> Declare Participants </h2><pre class="text-xs w-full bg-gray-50 text-gray-600 p-2 rounded-lg"><code>// Define a Starter (optional)
|
|
3212
3212
|
@Starter(A)
|
|
3213
3213
|
|
|
3214
3214
|
// Show icons
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as c, c as e, a as o } from "./core.
|
|
1
|
+
import { o as c, c as e, a as o } from "./core.9ab01d4f.js";
|
|
2
2
|
const s = {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
viewBox: "0 0 1024 1024"
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
_ as default,
|
|
21
21
|
l as render
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=zoom-in.
|
|
23
|
+
//# sourceMappingURL=zoom-in.140fb620.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as t, c, a as o } from "./core.
|
|
1
|
+
import { o as t, c, a as o } from "./core.9ab01d4f.js";
|
|
2
2
|
const e = {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
viewBox: "0 0 1024 1024"
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
h as default,
|
|
21
21
|
s as render
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=zoom-out.
|
|
23
|
+
//# sourceMappingURL=zoom-out.e704e3b7.js.map
|