Home
last modified time | relevance | path

Searched refs:ZS (Results 1 – 4 of 4) sorted by relevance

/plugin/ol3/
Dscript.js8ZS(n,e,r);return new qn(n)},LineString:function(t,e){var r=YS(t.arcs,e);return new Py(r)},Polygon:…
/plugin/vegalite/
H A Dvega.min.js1ZS(){sS=lS.start;const t=RS();return 8===t.type||6===t.type?(t.octal&&HS(t,pS),jS(t)):PS(t.value)}…
/plugin/bpmnio/vendor/dmn-js/dist/
H A Ddmn-modeler.production.min.js248 `,this._current.container)};Le.prototype.open=function(n,e,t,i){if(!n)throw new Error("target is missing");if(!e)throw new Error("providers for <"+e+"> not found");if(!t)throw new Error("position is missing");var r=this._eventBus.fire("popupMenu.open.allowed",{target:n,providerId:e});if(r===!1)return;this.isOpen()&&this.close();let{entries:o,headerEntries:s,emptyPlaceholder:a}=this._getContext(n,e);this._current={position:t,providerId:e,target:n,entries:o,headerEntries:s,emptyPlaceholder:a,container:this._createContainer({provider:e}),options:i},this._emit("open"),this._bindAutoClose(),this._render()};Le.prototype.refresh=function(){if(!this.isOpen())return;let{target:n,providerId:e}=this._current,{entries:t,headerEntries:i,emptyPlaceholder:r}=this._getContext(n,e);this._current={...this._current,entries:t,headerEntries:i,emptyPlaceholder:r},this._emit("refresh"),this._render()};Le.prototype._getContext=function(n,e){let t=this._getProviders(e);if(!t||!t.length)throw new Error("provider for <"+e+"> not found");let i=this._getEntries(n,t),r=this._getHeaderEntries(n,t),o=this._getEmptyPlaceholder(t);return{entries:i,headerEntries:r,emptyPlaceholder:o,empty:!(Object.keys(i).length||Object.keys(r).length)}};Le.prototype.close=function(){this.isOpen()&&(this._emit("close"),this.reset(),this._canvas.restoreFocus(),this._current=null)};Le.prototype.reset=function(){let n=this._current.container;cm(null,n),Qe(n)};Le.prototype._emit=function(n,e){this._eventBus.fire(`popupMenu.${n}`,e)};Le.prototype._onOpened=function(){this._emit("opened")};Le.prototype._onClosed=function(){this._emit("closed")};Le.prototype._createContainer=function(n){var e=this._canvas,t=e.getContainer();let i=te(`<div class="djs-popup-parent djs-scrollable" data-popup=${n.provider}></div>`);return t.appendChild(i),i};Le.prototype._bindAutoClose=function(){this._eventBus.once(WS,this.close,this)};Le.prototype._unbindAutoClose=function(){this._eventBus.off(WS,this.close,this)};Le.prototype._updateScale=function(){var n=this._canvas.zoom(),e=this._config.scale,t,i,r=n;return e!==!0&&(e===!1?(t=1,i=1):(t=e.min,i=e.max),Me(t)&&n<t&&(r=t),Me(i)&&n>i&&(r=i)),r};Le.prototype._ensureVisible=function(n,e){var t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect(),r={},o=e.x,s=e.y;return e.x+i.width>t.width&&(r.x=!0),e.y+i.height>t.height&&(r.y=!0),r.x&&r.y?(o=e.x-i.width,s=e.y-i.height):r.x?(o=e.x-i.width,s=e.y):r.y&&e.y<i.height?(o=e.x,s=10):r.y&&(o=e.x,s=e.y-i.height),e.y<t.top&&(s=e.y+i.height),{x:o,y:s}};Le.prototype.isEmpty=function(n,e){if(!n)throw new Error("target is missing");if(!e)throw new Error("provider ID is missing");let t=this._getProviders(e);return!t||!t.length?!0:this._getContext(n,e).empty};Le.prototype.registerProvider=function(n,e,t){t||(t=e,e=Ij),this._eventBus.on("popupMenu.getProviders."+n,e,function(i){i.providers.push(t)})};Le.prototype._getProviders=function(n){var e=this._eventBus.createEvent({type:"popupMenu.getProviders."+n,providers:[]});return this._eventBus.fire(e),e.providers};Le.prototype._getEntries=function(n,e){var t={};return k(e,function(i){if(!i.getPopupMenuEntries){k(i.getEntries(n),function(o){var s=o.id;if(!s)throw new Error("entry ID is missing");t[s]=Uu(o,["id"])});return}var r=i.getPopupMenuEntries(n);ge(r)?t=r(t):k(r,function(o,s){t[s]=o})}),t};Le.prototype._getHeaderEntries=function(n,e){var t={};return k(e,function(i){if(!i.getPopupMenuHeaderEntries){if(!i.getHeaderEntries)return;k(i.getHeaderEntries(n),function(o){var s=o.id;if(!s)throw new Error("entry ID is missing");t[s]=Uu(o,["id"])});return}var r=i.getPopupMenuHeaderEntries(n);ge(r)?t=r(t):k(r,function(o,s){t[s]=o})}),t};Le.prototype._getEmptyPlaceholder=function(n){let e=n.find(t=>ge(t.getEmptyPlaceholder));return e&&e.getEmptyPlaceholder()};Le.prototype.isOpen=function(){return!!this._current};Le.prototype.trigger=function(n,e,t="click"){if(n.preventDefault(),!e){let r=De(n.delegateTarget||n.target,".entry",!0),o=et(r,Dj);e={id:o,...this._getEntry(o)}}let i=e.action;if(this._emit("trigger",{entry:e,event:n})!==!1){if(ge(i)){if(t==="click")return i(n,e)}else if(i[t])return i[t](n,e)}};Le.prototype._getEntry=function(n){var e=this._current.entries[n]||this._current.headerEntries[n];if(!e)throw new Error("entry not found");return e};function US(n){return Object.entries(n).map(([e,t])=>{let i={id:e,...t};return i.entries&&(i.entries=US(i.entries)),i})}function Rx(n,e,t){let{keys:i}=t;if(e=e.trim().toLowerCase(),!e)throw new Error("<pattern> must not be empty");let r=e.trim().toLowerCase().split(/\s+/);return n.flatMap(o=>{let s=Lj(o,r,i);return s?{item:o,tokens:s}:[]}).sort(Bj(i))}function Lj(n,e,t){let{matchedWords:i,tokens:r}=t.reduce((o,s)=>{let a=n[s],{tokens:l,matchedWords:c}=F(a)?a.reduce((u,f)=>{let{tokens:h,matchedWords:d}=XS(f,e);return{tokens:[...u.tokens,h],matchedWords:{...u.matchedWords,...d}}},{matchedWords:{},tokens:[]}):XS(a,e);return{tokens:{...o.tokens,[s]:l},matchedWords:{...o.matchedWords,...c}}},{matchedWords:{},tokens:{}});return Object.keys(i).length!==e.length?null:r}function Bj(n){return(e,t)=>{let i=0,r=1;for(let o of n){let s=Nj(e.tokens[o],t.tokens[o]);if(s!==0){i+=s*r,r*=QS;continue}let a=$j(e.item[o],t.item[o]);if(a!==0){i+=a*r,r*=QS;continue}}return i}}function Nj(n,e){return KS(e)-KS(n)}var QS=.5,Da={FULL:131.9,START_FULL_WORD:8,START_WORD_PART:7.87,WORD_START:2.19,WORD_PART:1,NO_MATCH:-.07};function KS(n){let e=n.reduce((a,l)=>a+YS(l),0),t=n.flat(),i=t.reduce((a,l)=>a+l.value.length,0),r=t.reduce((a,l)=>a+(l.match?l.value.length:0),0),o=i?r/i:0;return e*(1+o)}function YS(n){if(F(n))return Math.max(...n.map(YS));let e=Math.log(n.value.length);return n.match?(n.start?n.end?Da.FULL:n.wordEnd?Da.START_FULL_WORD:Da.START_WORD_PART:n.wordStart?Da.WORD_START:Da.WORD_PART)*e:Da.NO_MATCH*e}function GS(n=""){return F(n)?n.join(", "):n}function $j(n,e){return GS(n).localeCompare(GS(e))}function XS(n,e){var c;if(!n)return{tokens:[],matchedWords:{}};let t=[],i={},r=e.map(jj),o=[`(?<all>${r.join("\\s+")})`,...r].join("|"),s=new RegExp(o,"ig"),a,l=0;for(;a=s.exec(n);){let[u]=a,f=a.index,h=a.index+u.length,d=f===0,p=h===n.length,m=!!((c=a.groups)!=null&&c.all),g=d||/\s/.test(n.charAt(f-1)),b=p||/\s/.test(n.charAt(h));a.index>l&&t.push({value:n.slice(l,a.index),index:l}),t.push({value:u,index:a.index,match:!0,wordStart:g,wordEnd:b,start:d,end:p,all:m});let _=m?e:[u];for(let v of _)i[v.toLowerCase()]=!0;l=a.index+u.length}return l<n.length&&t.push({value:n.slice(l),index:l}),{tokens:t,matchedWords:i}}function jj(n){return n.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")}var ZS={search:["value",Rx]};var JS={__depends__:[ZS],__init__:["popupMenu"],popupMenu:["type",Le]};var eO=Math.round;function Rf(n,e){this._modeling=n,this._eventBus=e}Rf.$inject=["modeling","eventBus"];Rf.prototype.replaceElement=function(n,e,t){if(n.waypoints)return null;var i=this._modeling,r=this._eventBus;r.fire("replace.start",{element:n,attrs:e,hints:t});var o=e.width||n.width,s=e.height||n.height,a=e.x||n.x,l=e.y||n.y,c=eO(a+o/2),u=eO(l+s/2),f=i.replaceShape(n,T({},e,{x:c,y:u,width:o,height:s}),t);return r.fire("replace.end",{element:n,newElement:f,hints:t}),f};function hm(n,e){e.on("replace.end",500,function(t){let{newElement:i,hints:r={}}=t;r.select!==!1&&n.select(i)})}hm.$inject=["selection","eventBus"];var tO={__init__:["replace","replaceSelectionBehavior"],replaceSelectionBehavior:["type",hm],replace:["type",Rf]};function dm(n,e,t,i){function r(o,s,a){a=a||{};var l=s.type,c=o.businessObject,u=n.create(l),f={type:l,businessObject:u};if(f.width=o.width,f.height=o.height,u.name=c.name,s.table){var h=n.create("dmn:DecisionTable");h.$parent=u;var d=n.create("dmn:OutputClause");d.typeRef="string",d.$parent=h,h.output=[d];var p=n.create("dmn:InputClause");p.$parent=h;var m=n.create("dmn:LiteralExpression",{typeRef:"string"});p.inputExpression=m,m.$parent=p,h.input=[p],nO(u,h,n)}if(s.expression){var g=n.create("dmn:LiteralExpression"),b=n.create("dmn:InformationItem",{name:c.name});nO(u,g,n,b)}return e.replaceElement(o,f,a)}this.replaceElement=r}dm.$inject=["drdFactory","replace","selection","modeling"];function nO(n,e,t,i){if(O(n,"dmn:Decision"))n.decisionLogic=e,e.$parent=n;else if(O(n,"dmn:BusinessKnowledgeModel")){var r=t.create("dmn:FunctionDefinition",{body:e});n.encapsulatedLogic=r,r.$parent=n,e.$parent=r}i&&(n.variable=i,i.$parent=n)}var iO={__depends__:[tO,ht],drdReplace:["type",dm]};var Tx={DECISION:[{label:"Empty",actionName:"replace-with-empty-decision",className:"dmn-icon-clear",target:{type:"dmn:Decision",table:!1,expression:!1}},{label:"Decision table",actionName:"replace-with-decision-table",className:"dmn-icon-decision-table",target:{type:"dmn:Decision",table:!0,expression:!1}},{label:"Literal expression",actionName:"replace-with-literal-expression",className:"dmn-icon-literal-expression",target:{type:"dmn:Decision",table:!1,expression:!0}}],BKM:[{label:"Empty",actionName:"replace-with-empty",className:"dmn-icon-clear",target:{type:"dmn:BusinessKnowledgeModel",table:!1,expression:!1}},{label:"Literal Expression",actionName:"replace-with-literal-expression",className:"dmn-icon-literal-expression",target:{type:"dmn:BusinessKnowledgeModel",table:!1,expression:!0}}]};function Er(n,e,t,i,r,o){this._popupMenu=n,this._modeling=e,this._moddle=t,this._drdReplace=i,this._rules=r,this._translate=o,this.register()}Er.$inject=["popupMenu","modeling","moddle","drdReplace","rules","translate"];Er.prototype.register=function(){this._popupMenu.registerProvider("dmn-replace",this)};Er.prototype.getEntries=function(n){var e=n.businessObject,t=this._rules,i,r;return t.allowed("shape.replace",{element:n})?O(e,"dmn:Decision")?(r=dr(e),i=Ee(Tx.DECISION,function(o){var s=o.actionName==="replace-with-empty-decision"&&r,a=o.actionName==="replace-with-decision-table"&&!O(r,"dmn:DecisionTable"),l=o.actionName==="replace-with-literal-expression"&&!O(r,"dmn:LiteralExpression");return s||a||l}),this._createEntries(n,i)):O(e,"dmn:BusinessKnowledgeModel")?(r=dr(e),i=Ee(Tx.BKM,function(o){var s=o.actionName==="replace-with-empty"&&r,a=o.actionName==="replace-with-decision-table"&&!O(r,"dmn:DecisionTable"),l=o.actionName==="replace-with-literal-expression"&&!O(r,"dmn:LiteralExpression");return s||a||l}),this._createEntries(n,i)):[]:[]};Er.prototype._createEntries=function(n,e){var t=[],i=this;return k(e,function(r){var o=i._createMenuEntry(r,n);t.push(o)}),t};Er.prototype._createMenuEntry=function(n,e,t){var i=this._drdReplace.replaceElement,r=this._translate,o=function(){return i(e,n.target)};t=t||o;var s={label:r(n.label),className:n.className,id:n.actionName,action:t};return s};Er.prototype.getHeaderEntries=function(n){return[]};var rO={__depends__:[qe,JS,iO],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",Er]};function vs(n,e,t,i,r,o,s,a,l,c,u,f){u=u||{},e.registerProvider(this),this._contextPad=e,this._modeling=t,this._elementFactory=i,this._connect=r,this._create=o,this._rules=s,this._popupMenu=a,this._canvas=l,this._translate=c,u.autoPlace!==!1&&(this._autoPlace=f.get("autoPlace",!1)),n.on("create.end",250,function(h){var d=h.context.shape;if(hf(h)){var p=e.getEntries(d);p.replace&&p.replace.action.click(h,d)}})}vs.$inject=["eventBus","contextPad","modeling","elementFactory","connect","create","rules","popupMenu","canvas","translate","config.contextPad","injector"];vs.prototype.getContextPadEntries=function(n){var e=this._modeling,t=this._elementFactory,i=this._connect,r=this._create,o=this._popupMenu,s=this._contextPad,a=this._rules,l=this._translate,c=this._autoPlace,u={};if(n.type==="label")return u;var f=n.businessObject;function h(b,_,v){i.start(b,_,v)}function d(b){e.removeElements([n])}function p(b){var _=5,v=s.getPad(b).html,x=v.getBoundingClientRect(),C={x:x.left,y:x.bottom+_};return C}function m(b,_,v,x){function C(S,w){var R=t.createShape(T({type:b},x));r.start(S,R,{source:w,hints:{connectionTarget:w}})}var E=c?function(S,w){var R=t.createShape(T({type:b},x));c.append(w,R,{connectionTarget:w})}:C;return{group:"model",className:_,title:v,action:{dragstart:C,click:E}}}O(f,"dmn:Decision")&&T(u,{"append.decision":m("dmn:Decision","dmn-icon-decision",l("Append decision"))}),Ge(f,["dmn:BusinessKnowledgeModel","dmn:Decision","dmn:KnowledgeSource"])&&T(u,{"append.knowledge-source":m("dmn:KnowledgeSource","dmn-icon-knowledge-source",l("Append knowledge source"))}),Ge(f,["dmn:BusinessKnowledgeModel","dmn:Decision"])&&T(u,{"append.business-knowledge-model":m("dmn:BusinessKnowledgeModel","dmn-icon-business-knowledge",l("Append business knowledge model"))}),Ge(f,["dmn:Decision","dmn:KnowledgeSource"])&&T(u,{"append.input-data":m("dmn:InputData","dmn-icon-input-data",l("Append input data"))}),O(f,"dmn:DRGElement")&&T(u,{"append.text-annotation":m("dmn:TextAnnotation","dmn-icon-text-annotation",l("Add text annotation")),connect:{group:"connect",className:"dmn-icon-connection-multi",title:l("Connect to other element"),action:{click:h,dragstart:h}}}),O(f,"dmn:TextAnnotation")&&T(u,{connect:{group:"connect",className:"dmn-icon-connection-multi",title:l("Connect to other element"),action:{click:h,dragstart:h}}}),o.isEmpty(n,"dmn-replace")||T(u,{replace:{group:"edit",className:"dmn-icon-screw-wrench",title:l("Change type"),action:{click:function(b,_){var v=T(p(_),{cursor:{x:b.x,y:b.y}});o.open(_,"dmn-replace",v)}}}});var g=a.allowed("elements.delete",{elements:[n]});return F(g)&&(g=g[0]===n),g&&T(u,{delete:{group:"edit",className:"dmn-icon-trash",title:l("Delete"),action:{click:d}}}),u};vs.prototype.getMultiElementContextPadEntries=function(n){var e=this._modeling,t=this._translate,i={};return this._isDeleteAllowed(n)&&T(i,{delete:{group:"edit",className:"dmn-icon-trash",title:t("Delete"),action:{click:(r,o)=>e.removeElements(o.slice())}}}),i};vs.prototype._isDeleteAllowed=function(n){var e=this._rules.allowed("elements.delete",{elements:n});return F(e)?kt(n,t=>e.includes(t)):e};var oO={__depends__:[qe,oS,ht,lS,Zp,rO],__init__:["contextPadProvider"],contextPadProvider:["type",vs]};var Fj="djs-dragger";function pi(n,e,t,i){this._canvas=e,this._graphicsFactory=t,this._elementFactory=i,this._connectionDocking=n.get("connectionDocking",!1),this._layouter=n.get("layouter",!1)}pi.$inject=["injector","canvas","graphicsFactory","elementFactory"];pi.prototype.drawPreview=function(n,e,t){t=t||{};var i=n.connectionPreviewGfx,r=n.getConnection,o=t.source,s=t.target,a=t.waypoints,l=t.connectionStart,c=t.connectionEnd,u=t.noLayout,f=t.noCropping,h=t.noNoop,d,p=this;if(i||(i=n.connectionPreviewGfx=this.createConnectionPreviewGfx()),ss(i),r||(r=n.getConnection=qj(function(m,g,b){return p.getConnection(m,g,b)})),e&&(d=r(e,o,s)),!d){!h&&this.drawNoopPreview(i,t);return}d.waypoints=a||[],this._layouter&&!u&&(d.waypoints=this._layouter.layoutConnection(d,{source:o,target:s,connectionStart:l,connectionEnd:c,waypoints:t.waypoints||d.waypoints})),(!d.waypoints||!d.waypoints.length)&&(d.waypoints=[o?le(o):l,s?le(s):c]),this._connectionDocking&&(o||s)&&!f&&(d.waypoints=this._connectionDocking.getCroppedWaypoints(d,o,s)),this._graphicsFactory.drawConnection(i,d,{stroke:"var(--element-dragger-color)"})};pi.prototype.drawNoopPreview=function(n,e){var t=e.source,i=e.target,r=e.connectionStart||le(t),o=e.connectionEnd||le(i),s=this.cropWaypoints(r,o,t,i),a=this.createNoopConnection(s[0],s[1]);K(n,a)};pi.prototype.cropWaypoints=function(n,e,t,i){var r=this._graphicsFactory,o=t&&r.getShapePath(t),s=i&&r.getShapePath(i),a=r.getConnectionPath({waypoints:[n,e]});return n=t&&tf(o,a,!0)||n,e=i&&tf(s,a,!1)||e,[n,e]};pi.prototype.cleanUp=function(n){n&&n.connectionPreviewGfx&&Fe(n.connectionPreviewGfx)};pi.prototype.getConnection=function(n){var e=Vj(n);return this._elementFactory.createConnection(e)};pi.prototype.createConnectionPreviewGfx=function(){var n=Q("g");return j(n,{pointerEvents:"none"}),ne(n).add(Fj),K(this._canvas.getActiveLayer(),n),n};pi.prototype.createNoopConnection=function(n,e){return ro([n,e],{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"})};function qj(n){var e={};return function(t){var i=JSON.stringify(t),r=e[i];return r||(r=e[i]=n.apply(null,arguments)),r}}function Vj(n){return Pe(n)?n:{}}var sO={__init__:["connectionPreview"],connectionPreview:["type",pi]};var Hj=/\s/,zj=/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i,Wj=/^[a-z_][\w-.]*$/i,Uj=/\$\{([^}]*)\}/g;function aO(n,e){let t=n.$model.ids.assigned(e),i=t&&t!==n;return e?i?"Element must have unique ID.":Qj(e):"Element must have ID."}function Qj(n){if(n=Gj(n),Kj(n))return"Id must not contain spaces.";if(!Wj.test(n))return zj.test(n)?"Id must not contain prefix.":"Id must be a valid QName."}function Kj(n){return Hj.test(n)}function Gj(n){return n.replace(Uj,"$1")}var Xj=300;function bo(n,e,t,i,r){this._eventBus=n,this._modeling=e,this._canvas=t,this._definitionPropertiesView=i,this._translate=r,n.on("definitionIdView.create",function(o){this._container=o.html;var s=X(".dmn-definitions-name",this._container),a=X(".dmn-definitions-id",this._container);this._setup(s,"name"),this._setup(a,"id")},this)}bo.$inject=["eventBus","modeling","canvas","definitionPropertiesView","translate"];bo.prototype.update=function(n,e){var t=this._canvas.getRootElement(),i={};if(i[n]=e,n==="id"){var r=aO(Ke(t),e);if(r){this._addErrorMessage(r);return}this._clearErrorMessage()}this._modeling.updateProperties(t,i)};bo.prototype._setup=function(n,e){var t=this;n.setAttribute("contenteditable",!0),n.addEventListener("input",Mi(function(i){var r=i.target.value||i.target.textContent;t.update(e,r.trim())},Xj)),n.addEventListener("keydown",function(i){i.keyCode===13&&(n.blur(),window.getSelection().removeAllRanges())}),n.addEventListener("blur",function(){t._clearErrorMessage(),t._definitionPropertiesView.update()})};bo.prototype._addErrorMessage=function(n){let e='<span class="dmn-definitions-error-message">'+this._translate(n)+"</span>";var t=X(".dmn-definitions-id",this._container);this._clearErrorMessage(),ee(t).add("dmn-definitions-error"),t.parentElement.appendChild(te(e))};bo.prototype._clearErrorMessage=function(){var n=X(".dmn-definitions-id",this._container);if(ee(n).has("dmn-definitions-error")){ee(n).remove("dmn-definitions-error");let e=X(".dmn-definitions-error-message",this._container);n.parentNode.removeChild(e)}};var lO={__depends__:[Ca],__init__:["definitionPropertiesEdit","definitionPropertiesPaletteAdapter"],definitionPropertiesEdit:["type",bo],definitionPropertiesPaletteAdapter:["type",wa]};var Yj={horizontal:["x","width"],vertical:["y","height"]},cO=5;function mi(n,e){this._modeling=n,this._filters=[],this.registerFilter(function(t){var i=e.allowed("elements.distribute",{elements:t});return F(i)?i:i?t:[]})}mi.$inject=["modeling","rules"];mi.prototype.registerFilter=function(n){if(typeof n!="function")throw new Error("the filter has to be a function");this._filters.push(n)};mi.prototype.trigger=function(n,e){var t=this._modeling,i,r;if(!(n.length<3)&&(this._setOrientation(e),r=this._filterElements(n),i=this._createGroups(r),!(i.length<=2)))return t.distributeElements(i,this._axis,this._dimension),i};mi.prototype._filterElements=function(n){var e=this._filters,t=this._axis,i=this._dimension,r=[].concat(n);return e.length?(k(e,function(o){r=o(r,t,i)}),r):n};mi.prototype._createGroups=function(n){var e=[],t=this,i=this._axis,r=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');var o=Fn(n,i);return k(o,function(s,a){var l=t._findRange(s,i,r),c,u=e[e.length-1];u&&t._hasIntersection(u.range,l)?e[e.length-1].elements.push(s):(c={range:l,elements:[s]},e.push(c))}),e};mi.prototype._setOrientation=function(n){var e=Yj[n];this._axis=e[0],this._dimension=e[1]};mi.prototype._hasIntersection=function(n,e){return Math.max(n.min,n.max)>=Math.min(e.min,e.max)&&Math.min(n.min,n.max)<=Math.max(e.min,e.max)};mi.prototype._findRange=function(n){var e=n[this._axis],t=n[this._dimension];return{min:e+cO,max:e+t-cO}};var uO={__init__:["distributeElements"],distributeElements:["type",mi]};function pm(n){n.registerFilter(function(e){return Ee(e,function(t){var i=Ge(t,["dmn:AuthorityRequirement","dmn:InformationRequirement","dmn:KnowledgeRequirement","dmn:Association","dmn:TextAnnotation"]);return!(t.labelTarget||i)})})}pm.$inject=["distributeElements"];var fO={__depends__:[uO],__init__:["drdDistributeElements"],drdDistributeElements:["type",pm]};var hO="is not a registered action",Zj="is already registered";function sn(n,e){this._eventBus=n,this._actions={};var t=this;n.on("diagram.init",function(){t._registerDefaultActions(e),n.fire("editorActions.init",{editorActions:t})})}sn.$inject=["eventBus","injector"];sn.prototype._registerDefaultActions=function(n){var e=n.get("commandStack",!1),t=n.get("modeling",!1),i=n.get("selection",!1),r=n.get("zoomScroll",!1),o=n.get("copyPaste",!1),s=n.get("canvas",!1),a=n.get("rules",!1),l=n.get("keyboardMove",!1),c=n.get("keyboardMoveSelection",!1);e&&(this.register("undo",function(){e.undo()}),this.register("redo",function(){e.redo()})),o&&i&&this.register("copy",function(){var u=i.get();if(u.length)return o.copy(u)}),o&&i&&this.register("duplicate",function(){var u=i.get();if(u.length)return o.duplicate(u)}),o&&this.register("paste",function(){o.paste()}),o&&i&&a&&this.register("cut",function(){var u=i.get();if(u.length){var f=a.allowed("elements.delete",{elements:u});if(f!==!1){var h=F(f)?f:u;return o.cut(h.slice())}}}),r&&this.register("stepZoom",function(u){r.stepZoom(u.value)}),s&&this.register("zoom",function(u){s.zoom(u.value)}),t&&i&&a&&this.register("removeSelection",function(){var u=i.get();if(u.length){var f=a.allowed("elements.delete",{elements:u}),h;f!==!1&&(F(f)?h=f:h=u,h.length&&t.removeElements(h.slice()))}}),l&&this.register("moveCanvas",function(u){l.moveCanvas(u)}),c&&this.register("moveSelection",function(u){c.moveSelection(u.direction,u.accelerated)})};sn.prototype.trigger=function(n,e){if(!this._actions[n])throw Ax(n,hO);var t=this._eventBus.fire("editorActions.allowed",{action:n,opts:e});if(t!==!1)return this._actions[n](e)};sn.prototype.register=function(n,e){var t=this;if(typeof n=="string")return this._registerAction(n,e);k(n,function(i,r){t._registerAction(r,i)})};sn.prototype._registerAction=function(n,e){if(this.isRegistered(n))throw Ax(n,Zj);this._actions[n]=e};sn.prototype.unregister=function(n){if(!this.isRegistered(n))throw Ax(n,hO);this._actions[n]=void 0};sn.prototype.getActions=function(){return Object.keys(this._actions)};sn.prototype.isRegistered=function(n){return!!this._actions[n]};function Ax(n,e){return new Error(n+" "+e)}var dO={__init__:["editorActions"],editorActions:["type",sn]};function Ia(n){n.invoke(sn,this)}fe(Ia,sn);Ia.$inject=["injector"];Ia.prototype._registerDefaultActions=function(n){sn.prototype._registerDefaultActions.call(this,n);let e=n.get("canvas",!1),t=n.get("elementRegistry",!1),i=n.get("selection",!1),r=n.get("lassoTool",!1),o=n.get("handTool",!1),s=n.get("directEditing",!1),a=n.get("distributeElements",!1),l=n.get("alignElements",!1),c=n.get("searchPad",!1);e&&t&&i&&this._registerAction("selectElements",function(){var u=e.getRootElement(),f=t.filter(function(h){return h!==u});return i.select(f),f}),i&&a&&this._registerAction("distributeElements",function(u){var f=i.get(),h=u.type;f.length>2&&a.trigger(f,h)}),i&&l&&this._registerAction("alignElements",function(u){var f=i.get(),h=u.type;f.length>1&&l.trigger(f,h)}),r&&this._registerAction("lassoTool",function(){r.toggle()}),o&&this._registerAction("handTool",function(){o.toggle()}),i&&s&&this._registerAction("directEditing",function(){var u=i.get();u.length&&s.activate(u[0])}),i&&c&&this._registerAction("find",function(){c.toggle()})};var pO={__depends__:[dO],editorActions:["type",Ia]};function La(n){return n.dmnDI&&n.dmnDI.diagrams&&n.dmnDI.diagrams[0]}function mm(n,e,t,i){function r(o){var s=o.dmnDI;s||(s=n.create("dmndi:DMNDI"),o.set("dmnDI",s));var a=n.create("dmndi:DMNDiagram");s.set("diagrams",[a]);var l=0;k(o.get("drgElement"),function(c){if(O(c,"dmn:Decision")){var u=e._getDefaultSize(c),f=n.createDiShape(c,{x:150+l*30,y:150+l*30,width:u.width,height:u.height});i.updateDiParent(f,a),l++}})}t.on("import.start",({definitions:o})=>{La(o)||r(o)})}mm.$inject=["drdFactory","elementFactory","eventBus","drdUpdater"];var mO={__init__:["diGenerator"],diGenerator:["type",mm]};var Jj=1e3;function ae(n){this._eventBus=n}ae.$inject=["eventBus"];function eF(n,e){return function(t){return n.call(e||null,t.context,t.command,t)}}ae.prototype.on=function(n,e,t,i,r,o){if((ge(e)||se(e))&&(o=r,r=i,i=t,t=e,e=null),ge(t)&&(o=r,r=i,i=t,t=Jj),Pe(r)&&(o=r,r=!1),!ge(i))throw new Error("handlerFn must be a function");F(n)||(n=[n]);var s=this._eventBus;k(n,function(a){var l=["commandStack",a,e].filter(function(c){return c}).join(".");s.on(l,t,r?eF(i,o):i,o)})};ae.prototype.canExecute=Sr("canExecute");ae.prototype.preExecute=Sr("preExecute");ae.prototype.preExecuted=Sr("preExecuted");ae.prototype.execute=Sr("execute");ae.prototype.executed=Sr("executed");ae.prototype.postExecute=Sr("postExecute");ae.prototype.postExecuted=Sr("postExecuted");ae.prototype.revert=Sr("revert");ae.prototype.reverted=Sr("reverted");function Sr(n){return function(t,i,r,o,s){(ge(t)||se(t))&&(s=o,o=r,r=i,i=t,t=null),this.on(t,n,i,r,o,s)}}function Or(n,e){ae.call(this,n),this._gridSnapping=e;var t=this;this.preExecute("shape.resize",function(i){var r=i.context,o=r.hints||{},s=o.autoResize;if(s){var a=r.shape,l=r.newBounds;Ie(s)?r.newBounds=t.snapComplex(l,s):r.newBounds=t.snapSimple(a,l)}})}Or.$inject=["eventBus","gridSnapping","modeling"];fe(Or,ae);Or.prototype.snapSimple=function(n,e){var t=this._gridSnapping;return e.width=t.snapValue(e.width,{min:e.width}),e.height=t.snapValue(e.height,{min:e.height}),e.x=n.x+n.width/2-e.width/2,e.y=n.y+n.height/2-e.height/2,e};Or.prototype.snapComplex=function(n,e){return/w|e/.test(e)&&(n=this.snapHorizontally(n,e)),/n|s/.test(e)&&(n=this.snapVertically(n,e)),n};Or.prototype.snapHorizontally=function(n,e){var t=this._gridSnapping,i=/w/.test(e),r=/e/.test(e),o={};return o.width=t.snapValue(n.width,{min:n.width}),r&&(i?(o.x=t.snapValue(n.x,{max:n.x}),o.width+=t.snapValue(n.x-o.x,{min:n.x-o.x})):n.x=n.x+n.width-o.width),T(n,o),n};Or.prototype.snapVertically=function(n,e){var t=this._gridSnapping,i=/n/.test(e),r=/s/.test(e),o={};return o.height=t.snapValue(n.height,{min:n.height}),i&&(r?(o.y=t.snapValue(n.y,{max:n.y}),o.height+=t.snapValue(n.y-o.y,{min:n.y-o.y})):n.y=n.y+n.height-o.height),T(n,o),n};var tF=2e3;function gm(n,e){n.on(["spaceTool.move","spaceTool.end"],tF,function(t){var i=t.context;if(i.initialized){var r=i.axis,o;r==="x"?(o=e.snapValue(t.dx),t.x=t.x+o-t.dx,t.dx=o):(o=e.snapValue(t.dy),t.y=t.y+o-t.dy,t.dy=o)}})}gm.$inject=["eventBus","gridSnapping"];var gO={__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Or],gridSnappingSpaceToolBehavior:["type",gm]};var Tf=10;function ym(n,e,t){return t||(t="round"),Math[t](n/e)*e}var nF=1200,iF=800;function Fi(n,e,t){var i=!t||t.active!==!1;this._eventBus=e;var r=this;e.on("diagram.init",iF,function(){r.setActive(i)}),e.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],nF,function(o){var s=o.originalEvent;if(!(!r.active||s&&Mt(s))){var a=o.context,l=a.gridSnappingContext;l||(l=a.gridSnappingContext={}),["x","y"].forEach(function(c){var u={},f=oF(o,c,n);f&&(u.offset=f);var h=rF(o,c);h&&T(u,h),wr(o,c)||r.snapEvent(o,c,u)})}})}Fi.prototype.snapEvent=function(n,e,t){var i=this.snapValue(n[e],t);vn(n,e,i)};Fi.prototype.getGridSpacing=function(){return Tf};Fi.prototype.snapValue=function(n,e){var t=0;e&&e.offset&&(t=e.offset),n+=t,n=ym(n,Tf);var i,r;return e&&e.min&&(i=e.min,se(i)&&(i=ym(i+t,Tf,"ceil"),n=Math.max(n,i))),e&&e.max&&(r=e.max,se(r)&&(r=ym(r+t,Tf,"floor"),n=Math.min(n,r))),n-=t,n};Fi.prototype.isActive=function(){return this.active};Fi.prototype.setActive=function(n){this.active=n,this._eventBus.fire("gridSnapping.toggle",{active:n})};Fi.prototype.toggleActive=function(){this.setActive(!this.active)};Fi.$inject=["elementRegistry","eventBus","config.gridSnapping"];function rF(n,e){var t=n.context,i=t.createConstraints,r=t.resizeConstraints||{},o=t.gridSnappingContext,s=o.snapConstraints;if(s&&s[e])return s[e];s||(s=o.snapConstraints={}),s[e]||(s[e]={});var a=t.direction;i&&(vm(e)?(s.x.min=i.left,s.x.max=i.right):(s.y.min=i.top,s.y.max=i.bottom));var l=r.min,c=r.max;return l&&(vm(e)?vO(a)?s.x.max=l.left:s.x.min=l.right:yO(a)?s.y.max=l.top:s.y.min=l.bottom),c&&(vm(e)?vO(a)?s.x.min=c.left:s.x.max=c.right:yO(a)?s.y.min=c.top:s.y.max=c.bottom),s[e]}function oF(n,e,t){var i=n.context,r=n.shape,o=i.gridSnappingContext,s=o.snapLocation,a=o.snapOffset;return a&&se(a[e])||(a||(a=o.snapOffset={}),se(a[e])||(a[e]=0),!r)||(t.get(r.id)||(vm(e)?a[e]+=r[e]+r.width/2:a[e]+=r[e]+r.height/2),!s)||(e==="x"?/left/.test(s)?a[e]-=r.width/2:/right/.test(s)&&(a[e]+=r.width/2):/top/.test(s)?a[e]-=r.height/2:/bottom/.test(s)&&(a[e]+=r.height/2)),a[e]}function vm(n){return n==="x"}function yO(n){return n.indexOf("n")!==-1}function vO(n){return n.indexOf("w")!==-1}var xO={__depends__:[gO],__init__:["gridSnapping"],gridSnapping:["type",Fi]};var xm="keyboard.keydown",sF="keyboard.keyup",aF=1e3,bO="Keyboard binding is now implicit; explicit binding to an element got removed. For more information, see https://github.com/bpmn-io/diagram-js/issues/661";function Pt(n,e){var t=this;this._config=n=n||{},this._eventBus=e,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),e.on("diagram.destroy",function(){t._fire("destroy"),t.unbind()}),n.bindTo&&console.error("unsupported configuration <keyboard.bindTo>",new Error(bO));var i=n&&n.bind!==!1;e.on("canvas.init",function(r){t._target=r.svg,i&&t.bind(),t._fire("init")})}Pt.$inject=["config.keyboard","eventBus"];Pt.prototype._keydownHandler=function(n){this._keyHandler(n,xm)};Pt.prototype._keyupHandler=function(n){this._keyHandler(n,sF)};Pt.prototype._keyHandler=function(n,e){var t;if(!this._isEventIgnored(n)){var i={keyEvent:n};t=this._eventBus.fire(e||xm,i),t&&n.preventDefault()}};Pt.prototype._isEventIgnored=function(n){return!1};Pt.prototype.bind=function(n){n&&console.error("unsupported argument <node>",new Error(bO)),this.unbind(),n=this._node=this._target,q.bind(n,"keydown",this._keydownHandler),q.bind(n,"keyup",this._keyupHandler),this._fire("bind")};Pt.prototype.getBinding=function(){return this._node};Pt.prototype.unbind=function(){var n=this._node;n&&(this._fire("unbind"),q.unbind(n,"keydown",this._keydownHandler),q.unbind(n,"keyup",this._keyupHandler)),this._node=null};Pt.prototype._fire=function(n){this._eventBus.fire("keyboard."+n,{node:this._node})};Pt.prototype.addListener=function(n,e,t){ge(n)&&(t=e,e=n,n=aF),this._eventBus.on(t||xm,n,e)};Pt.prototype.removeListener=function(n,e){this._eventBus.off(e||xm,n)};Pt.prototype.hasModifier=lE;Pt.prototype.isCmd=Mt;Pt.prototype.isShift=Rp;Pt.prototype.isKey=Ve;var lF=500;function kr(n,e){var t=this;n.on("editorActions.init",lF,function(i){var r=i.editorActions;t.registerBindings(e,r)})}kr.$inject=["eventBus","keyboard"];kr.prototype.registerBindings=function(n,e){function t(i,r){e.isRegistered(i)&&n.addListener(r)}t("undo",function(i){var r=i.keyEvent;if(Tp(r))return e.trigger("undo"),!0}),t("redo",function(i){var r=i.keyEvent;if(Ap(r))return e.trigger("redo"),!0}),t("copy",function(i){var r=i.keyEvent;if(cE(r))return e.trigger("copy"),!0}),t("paste",function(i){var r=i.keyEvent;if(uE(r))return e.trigger("paste"),!0}),t("duplicate",function(i){var r=i.keyEvent;if(fE(r))return e.trigger("duplicate"),!0}),t("cut",function(i){var r=i.keyEvent;if(hE(r))return e.trigger("cut"),!0}),t("stepZoom",function(i){var r=i.keyEvent;if(Ve(["+","Add","="],r)&&Mt(r))return e.trigger("stepZoom",{value:1}),!0}),t("stepZoom",function(i){var r=i.keyEvent;if(Ve(["-","Subtract"],r)&&Mt(r))return e.trigger("stepZoom",{value:-1}),!0}),t("zoom",function(i){var r=i.keyEvent;if(Ve("0",r)&&Mt(r))return e.trigger("zoom",{value:1}),!0}),t("removeSelection",function(i){var r=i.keyEvent;if(Ve(["Backspace","Delete","Del"],r))return e.trigger("removeSelection"),!0})};var _o={__init__:["keyboard","keyboardBindings"],keyboard:["type",Pt],keyboardBindings:["type",kr]};function Ba(n){n.invoke(kr,this)}fe(Ba,kr);Ba.$inject=["injector"];Ba.prototype.registerBindings=function(n,e){kr.prototype.registerBindings.call(this,n,e);function t(i,r){e.isRegistered(i)&&n.addListener(r)}t("selectElements",function(i){var r=i.keyEvent;if(n.isKey(["a","A"],r)&&n.isCmd(r))return e.trigger("selectElements"),!0}),t("lassoTool",function(i){var r=i.keyEvent;if(!n.hasModifier(r)&&n.isKey(["l","L"],r))return e.trigger("lassoTool"),!0}),t("handTool",function(i){var r=i.keyEvent;if(!n.hasModifier(r)&&n.isKey(["h","H"],r))return e.trigger("handTool"),!0}),t("directEditing",function(i){var r=i.keyEvent;if(!n.hasModifier(r)&&n.isKey(["e","E"],r))return e.trigger("directEditing"),!0}),t("find",function(i){var r=i.keyEvent;if(n.isKey(["f","F"],r)&&n.isCmd(r))return e.trigger("find"),!0})};var _O={__depends__:[_o],__init__:["keyboardBindings"],keyboardBindings:["type",Ba]};var cF={moveSpeed:50,moveSpeedAccelerated:200};function bm(n,e,t){var i=this;this._config=T({},cF,n||{}),e.addListener(r);function r(o){var s=o.keyEvent,a=i._config;if(e.isCmd(s)&&e.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],s)){var l=e.isShift(s)?a.moveSpeedAccelerated:a.moveSpeed,c;switch(s.key){case"ArrowLeft":case"Left":c="left";break;case"ArrowUp":case"Up":c="up";break;case"ArrowRight":case"Right":c="right";break;case"ArrowDown":case"Down":c="down";break}return i.moveCanvas({speed:l,direction:c}),!0}}this.moveCanvas=function(o){var s=0,a=0,l=o.speed,c=l/Math.min(Math.sqrt(t.viewbox().scale),1);switch(o.direction){case"left":s=c;break;case"up":a=c;break;case"right":s=-c;break;case"down":a=-c;break}t.scroll({dx:s,dy:a})}}bm.$inject=["config.keyboardMove","keyboard","canvas"];var wO={__depends__:[_o],__init__:["keyboardMove"],keyboardMove:["type",bm]};var uF={moveSpeed:1,moveSpeedAccelerated:10},fF=1500,CO="left",EO="up",SO="right",OO="down",hF={ArrowLeft:CO,Left:CO,ArrowUp:EO,Up:EO,ArrowRight:SO,Right:SO,ArrowDown:OO,Down:OO},dF={left:function(n){return{x:-n,y:0}},up:function(n){return{x:0,y:-n}},right:function(n){return{x:n,y:0}},down:function(n){return{x:0,y:n}}};function _m(n,e,t,i,r){var o=this;this._config=T({},uF,n||{}),e.addListener(fF,function(s){var a=s.keyEvent,l=hF[a.key];if(l&&!e.isCmd(a)){var c=e.isShift(a);return o.moveSelection(l,c),!0}}),this.moveSelection=function(s,a){var l=r.get();if(l.length){var c=this._config[a?"moveSpeedAccelerated":"moveSpeed"],u=dF[s](c),f=i.allowed("elements.move",{shapes:l,hints:{keyboardMove:!0}});f&&t.moveElements(l,u)}}}_m.$inject=["config.keyboardMoveSelection","keyboard","modeling","rules","selection"];var kO={__depends__:[_o,ht],__init__:["keyboardMoveSelection"],keyboardMoveSelection:["type",_m]};function ke(n,e){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=e,this._eventBus=n,this._uid=1,n.on(["diagram.destroy","diagram.clear"],function(){this.clear(!1)},this)}ke.$inject=["eventBus","injector"];ke.prototype.execute=function(n,e){if(!n)throw new Error("command required");this._currentExecution.trigger="execute";let t={command:n,context:e};this._pushAction(t),this._internalExecute(t),this._popAction()};ke.prototype.canExecute=function(n,e){let t={command:n,context:e},i=this._getHandler(n),r=this._fire(n,"canExecute",t);if(r===void 0){if(!i)return!1;i.canExecute&&(r=i.canExecute(e))}return r};ke.prototype.clear=function(n){this._stack.length=0,this._stackIdx=-1,n!==!1&&this._fire("changed",{trigger:"clear"})};ke.prototype.undo=function(){let n=this._getUndoAction(),e;if(n){for(this._currentExecution.trigger="undo",this._pushAction(n);n&&(this._internalUndo(n),e=this._getUndoAction(),!(!e||e.id!==n.id));)n=e;this._popAction()}};ke.prototype.redo=function(){let n=this._getRedoAction(),e;if(n){for(this._currentExecution.trigger="redo",this._pushAction(n);n&&(this._internalExecute(n,!0),e=this._getRedoAction(),!(!e||e.id!==n.id));)n=e;this._popAction()}};ke.prototype.register=function(n,e){this._setHandler(n,e)};ke.prototype.registerHandler=function(n,e){if(!n||!e)throw new Error("command and handlerCls must be defined");let t=this._injector.instantiate(e);this.register(n,t)};ke.prototype.canUndo=function(){return!!this._getUndoAction()};ke.prototype.canRedo=function(){return!!this._getRedoAction()};ke.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]};ke.prototype._getUndoAction=function(){return this._stack[this._stackIdx]};ke.prototype._internalUndo=function(n){let e=n.command,t=n.context,i=this._getHandler(e);this._atomicDo(()=>{this._fire(e,"revert",n),i.revert&&this._markDirty(i.revert(t)),this._revertedAction(n),this._fire(e,"reverted",n)})};ke.prototype._fire=function(n,e,t){arguments.length<3&&(t=e,e=null);let i=e?[n+"."+e,e]:[n],r;t=this._eventBus.createEvent(t);for(let o of i)if(r=this._eventBus.fire("commandStack."+o,t),t.cancelBubble)break;return r};ke.prototype._createId=function(){return this._uid++};ke.prototype._atomicDo=function(n){let e=this._currentExecution;e.atomic=!0;try{n()}finally{e.atomic=!1}};ke.prototype._internalExecute=function(n,e){let t=n.command,i=n.context,r=this._getHandler(t);if(!r)throw new Error("no command handler registered for <"+t+">");this._pushAction(n),e||(this._fire(t,"preExecute",n),r.preExecute&&r.preExecute(i),this._fire(t,"preExecuted",n)),this._atomicDo(()=>{this._fire(t,"execute",n),r.execute&&this._markDirty(r.execute(i)),this._executedAction(n,e),this._fire(t,"executed",n)}),e||(this._fire(t,"postExecute",n),r.postExecute&&r.postExecute(i),this._fire(t,"postExecuted",n)),this._popAction()};ke.prototype._pushAction=function(n){let e=this._currentExecution,t=e.actions,i=t[0];if(e.atomic)throw new Error("illegal invocation in <execute> or <revert> phase (action: "+n.command+")");n.id||(n.id=i&&i.id||this._createId()),t.push(n)};ke.prototype._popAction=function(){let n=this._currentExecution,e=n.trigger,t=n.actions,i=n.dirty;t.pop(),t.length||(this._eventBus.fire("elements.changed",{elements:Bw("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:e}),n.trigger=null)};ke.prototype._markDirty=function(n){let e=this._currentExecution;n&&(n=F(n)?n:[n],e.dirty=e.dirty.concat(n))};ke.prototype._executedAction=function(n,e){let t=++this._stackIdx;e||this._stack.splice(t,this._stack.length,n)};ke.prototype._revertedAction=function(n){this._stackIdx--};ke.prototype._getHandler=function(n){return this._handlerMap[n]};ke.prototype._setHandler=function(n,e){if(!n||!e)throw new Error("command and handler required");if(this._handlerMap[n])throw new Error("overriding handler for command <"+n+">");this._handlerMap[n]=e};var xs={commandStack:["type",ke]};function wm(n,e,t,i){n.on("element.changed",function(r){var o=r.element;(o.parent||o===e.getRootElement())&&(r.gfx=t.getGraphics(o)),r.gfx&&n.fire(ip(o)+".changed",r)}),n.on("elements.changed",function(r){var o=r.elements;o.forEach(function(s){n.fire("element.changed",{element:s})}),i.updateContainments(o)}),n.on("shape.changed",function(r){i.update("shape",r.element,r.gfx)}),n.on("connection.changed",function(r){i.update("connection",r.element,r.gfx)})}wm.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var Cm={__init__:["changeSupport"],changeSupport:["type",wm]};var RO=Math.min,TO=Math.max;function Mx(n){n.preventDefault()}function Af(n){n.stopPropagation()}function pF(n){return n.nodeType===Node.TEXT_NODE}function mF(n){return[].slice.call(n)}function On(n){this.container=n.container,this.parent=te('<div class="djs-direct-editing-parent"><div class="djs-direct-editing-content" contenteditable="true"></div></div>'),this.content=X("[contenteditable]",this.parent),this.keyHandler=n.keyHandler||function(){},this.resizeHandler=n.resizeHandler||function(){},this.autoResize=at(this.autoResize,this),this.handlePaste=at(this.handlePaste,this)}On.prototype.create=function(n,e,t,i){var r=this,o=this.parent,s=this.content,a=this.container;i=this.options=i||{},e=this.style=e||{};var l=hn(e,["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);T(o.style,{width:n.width+"px",height:n.height+"px",maxWidth:n.maxWidth+"px",maxHeight:n.maxHeight+"px",minWidth:n.minWidth+"px",minHeight:n.minHeight+"px",left:n.x+"px",top:n.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},l);var c=hn(e,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return T(s.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},c),i.centerVertically&&T(s.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},c),s.innerText=t,q.bind(s,"keydown",this.keyHandler),q.bind(s,"mousedown",Af),q.bind(s,"paste",r.handlePaste),i.autoResize&&q.bind(s,"input",this.autoResize),i.resizable&&this.resizable(e),a.appendChild(o),this.setSelection(s.lastChild,s.lastChild&&s.lastChild.length),o};On.prototype.handlePaste=function(n){var e=this.options,t=this.style;n.preventDefault();var i;if(n.clipboardData?i=n.clipboardData.getData("text/plain"):i=window.clipboardData.getData("Text"),this.insertText(i),e.autoResize){var r=this.autoResize(t);r&&this.resizeHandler(r)}};On.prototype.insertText=function(n){n=gF(n);var e=document.execCommand("insertText",!1,n);e||this._insertTextIE(n)};On.prototype._insertTextIE=function(n){var e=this.getSelection(),t=e.startContainer,i=e.endContainer,r=e.startOffset,o=e.endOffset,s=e.commonAncestorContainer,a=mF(s.childNodes),l,c;if(pF(s)){var u=t.textContent;t.textContent=u.substring(0,r)+n+u.substring(o),l=t,c=r+n.length}else if(t===this.content&&i===this.content){var f=document.createTextNode(n);this.content.insertBefore(f,a[r]),l=f,c=f.textContent.length}else{var h=a.indexOf(t),d=a.indexOf(i);a.forEach(function(p,m){m===h?p.textContent=t.textContent.substring(0,r)+n+i.textContent.substring(o):m>h&&m<=d&&Qe(p)}),l=t,c=r+n.length}l&&c!==void 0&&setTimeout(function(){self.setSelection(l,c)})};On.prototype.autoResize=function(){var n=this.parent,e=this.content,t=parseInt(this.style.fontSize)||12;if(e.scrollHeight>n.offsetHeight||e.scrollHeight<n.offsetHeight-t){var i=n.getBoundingClientRect(),r=e.scrollHeight;n.style.height=r+"px",this.resizeHandler({width:i.width,height:i.height,dx:0,dy:r-i.height})}};On.prototype.resizable=function(){var n=this,e=this.parent,t=this.resizeHandle,i=parseInt(this.style.minWidth)||0,r=parseInt(this.style.minHeight)||0,o=parseInt(this.style.maxWidth)||1/0,s=parseInt(this.style.maxHeight)||1/0;if(!t){t=this.resizeHandle=te('<div class="djs-direct-editing-resize-handle"></div>');var a,l,c,u,f=function(p){Mx(p),Af(p),a=p.clientX,l=p.clientY;var m=e.getBoundingClientRect();c=m.width,u=m.height,q.bind(document,"mousemove",h),q.bind(document,"mouseup",d)},h=function(p){Mx(p),Af(p);var m=RO(TO(c+p.clientX-a,i),o),g=RO(TO(u+p.clientY-l,r),s);e.style.width=m+"px",e.style.height=g+"px",n.resizeHandler({width:c,height:u,dx:p.clientX-a,dy:p.clientY-l})},d=function(p){Mx(p),Af(p),q.unbind(document,"mousemove",h,!1),q.unbind(document,"mouseup",d,!1)};q.bind(t,"mousedown",f)}T(t.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),e.appendChild(t)};On.prototype.destroy=function(){var n=this.parent,e=this.content,t=this.resizeHandle;e.innerText="",n.removeAttribute("style"),e.removeAttribute("style"),q.unbind(e,"keydown",this.keyHandler),q.unbind(e,"mousedown",Af),q.unbind(e,"input",this.autoResize),q.unbind(e,"paste",this.handlePaste),t&&(t.removeAttribute("style"),Qe(t)),Qe(n)};On.prototype.getValue=function(){return this.content.innerText.trim()};On.prototype.getSelection=function(){var n=window.getSelection(),e=n.getRangeAt(0);return e};On.prototype.setSelection=function(n,e){var t=document.createRange();n===null?t.selectNodeContents(this.content):(t.setStart(n,e),t.setEnd(n,e));var i=window.getSelection();i.removeAllRanges(),i.addRange(t)};function gF(n){return n.replace(/\r\n|\r|\n/g,`
[all...]
/plugin/bpmnio/vendor/bpmn-js/dist/
H A Dbpmn-modeler.production.min.js7 `),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function uh(e){e=C({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new Kw,o=new Yw(i,e.format);e.preamble&&o.append(Ow);var a=new qe,s=n.$model;if(a.getNamespaces().mapDefaultPrefixes(Xw(s)),a.build(n).serializeTo(o),!r)return i.value}return{toXML:t}}function Xw(e){let t=e.config&&e.config.nsMap||{},n={};for(let r in Gl)n[r]=Gl[r];for(let r in t){let i=t[r];n[i]=r}for(let r of e.getPackages())n[r.prefix]=r.uri;return n}function kc(e,t){tn.call(this,e,t)}kc.prototype=Object.create(tn.prototype);kc.prototype.fromXML=function(e,t,n){st(t)||(n=t,t="bpmn:Definitions");var r=new Mc(C({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)};kc.prototype.toXML=function(e,t){var n=new uh(t);return new Promise(function(r,i){try{var o=n.toXML(e);return r({xml:o})}catch(a){return i(a)}})};var Zw="BPMN20",Qw="http://www.omg.org/spec/BPMN/20100524/MODEL",Jw="bpmn",eS=[],tS=[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],nS=[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],rS={tagAlias:"lowerCase",typePrefix:"t"},iS={name:Zw,uri:Qw,prefix:Jw,associations:eS,types:tS,enumerations:nS,xml:rS},oS="BPMNDI",aS="http://www.omg.org/spec/BPMN/20100524/DI",sS="bpmndi",cS=[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],uS=[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],pS=[],lS={name:oS,uri:aS,prefix:sS,types:cS,enumerations:uS,associations:pS},fS="DC",dS="http://www.omg.org/spec/DD/20100524/DC",mS="dc",hS=[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],vS=[],gS={name:fS,uri:dS,prefix:mS,types:hS,associations:vS},yS="DI",_S="http://www.omg.org/spec/DD/20100524/DI",bS="di",xS=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],ES=[],wS={tagAlias:"lowerCase"},SS={name:yS,uri:_S,prefix:bS,types:xS,associations:ES,xml:wS},CS="bpmn.io colors for BPMN",RS="http://bpmn.io/schema/bpmn/biocolor/1.0",PS="bioc",AS=[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],TS=[],MS=[],DS={name:CS,uri:RS,prefix:PS,types:AS,enumerations:TS,associations:MS},kS="BPMN in Color",NS="http://www.omg.org/spec/BPMN/non-normative/color/1.0",OS="color",BS=[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],IS=[],LS=[],jS={name:kS,uri:NS,prefix:OS,types:BS,enumerations:IS,associations:LS},FS={bpmn:iS,bpmndi:lS,dc:gS,di:SS,bioc:DS,color:jS};function ph(e,t){let n=C({},FS,e);return new kc(n,t)}N();N();function Rt(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function Kt(e,t){return e.$instanceOf(t)}function HS(e){return re(e.rootElements,function(t){return Kt(t,"bpmn:Process")||Kt(t,"bpmn:Collaboration")})}function Yl(e){var t={},n=[],r={};function i(H,G){return function(oe){H(oe,G)}}function o(H){t[H.id]=H}function a(H){return t[H.id]}function s(H,G){var oe=H.gfx;if(oe)throw new Error(`already rendered ${Rt(H)}`);return e.element(H,r[H.id],G)}function c(H,G){return e.root(H,r[H.id],G)}function u(H,G){try{var oe=r[H.id]&&s(H,G);return o(H),oe}catch(xe){p(xe.message,{element:H,error:xe}),console.error(`failed to import ${Rt(H)}`,xe)}}function p(H,G){e.error(H,G)}var l=this.registerDi=function(G){var oe=G.bpmnElement;oe?r[oe.id]?p(`multiple DI elements defined for ${Rt(oe)}`,{element:oe}):r[oe.id]=G:p(`no bpmnElement referenced in ${Rt(G)}`,{element:G})};function f(H){d(H.plane)}function d(H){l(H),E(H.planeElement,m)}function m(H){l(H)}this.handleDefinitions=function(G,oe){var xe=G.diagrams;if(oe&&xe.indexOf(oe)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!oe&&xe&&xe.length&&(oe=xe[0]),!oe)throw new Error("no diagram to display");r={},f(oe);var Gt=oe.plane;if(!Gt)throw new Error(`no plane for ${Rt(oe)}`);var P=Gt.bpmnElement;if(!P)if(P=HS(G),P)p(`correcting missing bpmnElement on ${Rt(Gt)} to ${Rt(P)}`),Gt.bpmnElement=P,l(Gt);else throw new Error("no process or collaboration to display");var _=c(P,Gt);if(Kt(P,"bpmn:Process")||Kt(P,"bpmn:SubProcess"))v(P,_);else if(Kt(P,"bpmn:Collaboration"))Ie(P,_),w(G.rootElements,_);else throw new Error(`unsupported bpmnElement for ${Rt(Gt)}: ${Rt(P)}`);g(n)};var g=this.handleDeferred=function(){for(var G;n.length;)G=n.shift(),G()};function v(H,G){ye(H,G),I(H.ioSpecification,G),T(H.artifacts,G),o(H)}function w(H,G){var oe=Q(H,function(xe){return!a(xe)&&Kt(xe,"bpmn:Process")&&xe.laneSets});oe.forEach(i(v,G))}function S(H,G){u(H,G)}function x(H,G){E(H,i(S,G))}function b(H,G){u(H,G)}function R(H,G){u(H,G)}function A(H,G){u(H,G)}function O(H,G){u(H,G)}function T(H,G){E(H,function(oe){Kt(oe,"bpmn:Association")?n.push(function(){O(oe,G)}):O(oe,G)})}function I(H,G){H&&(E(H.dataInputs,i(R,G)),E(H.dataOutputs,i(A,G)))}var L=this.handleSubProcess=function(G,oe){ye(G,oe),T(G.artifacts,oe)};function W(H,G){var oe=u(H,G);Kt(H,"bpmn:SubProcess")&&L(H,oe||G),Kt(H,"bpmn:Activity")&&I(H.ioSpecification,G),n.push(function(){E(H.dataInputAssociations,i(b,G)),E(H.dataOutputAssociations,i(b,G))})}function z(H,G){u(H,G)}function K(H,G){u(H,G)}function ve(H,G){n.push(function(){var oe=u(H,G);H.childLaneSet&&Jt(H.childLaneSet,oe||G),Ze(H)})}function Jt(H,G){E(H.lanes,i(ve,G))}function ke(H,G){E(H,i(Jt,G))}function ye(H,G){he(H.flowElements,G),H.laneSets&&ke(H.laneSets,G)}function he(H,G){E(H,function(oe){Kt(oe,"bpmn:SequenceFlow")?n.push(function(){z(oe,G)}):Kt(oe,"bpmn:BoundaryEvent")?n.unshift(function(){W(oe,G)}):Kt(oe,"bpmn:FlowNode")?W(oe,G):Kt(oe,"bpmn:DataObject")||(Kt(oe,"bpmn:DataStoreReference")||Kt(oe,"bpmn:DataObjectReference")?K(oe,G):p(`unrecognized flowElement ${Rt(oe)} in context ${Rt(G&&G.businessObject)}`,{element:oe,context:G}))})}function we(H,G){var oe=u(H,G),xe=H.processRef;xe&&v(xe,oe||G)}function Ie(H,G){E(H.participants,i(we,G)),n.push(function(){x(H.messageFlows,G)}),T(H.artifacts,G)}function Ze(H){E(H.flowNodeRef,function(G){var oe=G.get("lanes");oe&&oe.push(H)})}}N();function h(e,t){var n=j(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function te(e,t){return Lt(t,function(n){return h(e,n)})}function j(e){return e&&e.businessObject||e}function ce(e){return e&&e.di}function lh(e,t,n){var r,i,o,a,s=[];function c(u,p){var l={root:function(g,v){return r.add(g,v)},element:function(g,v,w){return r.add(g,v,w)},error:function(g,v){s.push({message:g,context:v})}},f=new Yl(l);p=p||u.diagrams&&u.diagrams[0];var d=$S(u,p);if(!d)throw new Error("no diagram to display");E(d,function(g){f.handleDefinitions(u,g)});var m=p.plane.bpmnElement.id;o.setRootElement(o.findRoot(m+"_plane")||o.findRoot(m))}return new Promise(function(u,p){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),c(t,n),i.fire("import.render.complete",{error:a,warnings:s}),u({warnings:s})}catch(l){return l.warnings=s,p(l)}})}function $S(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!h(n,"bpmn:Process")&&!h(n,"bpmn:Collaboration")&&(r=zS(n));var i;h(r,"bpmn:Collaboration")?i=r:i=re(e.rootElements,function(u){if(h(u,"bpmn:Collaboration"))return re(u.participants,function(p){return p.processRef===r})});var o=[r];i&&(o=je(i.participants,function(u){return u.processRef}),o.push(i));var a=fh(o),s=[t],c=[n];return E(e.diagrams,function(u){if(u.plane){var p=u.plane.bpmnElement;a.indexOf(p)!==-1&&c.indexOf(p)===-1&&(s.push(u),c.push(p))}}),s}}function fh(e){var t=[];return E(e,function(n){n&&(t.push(n),t=t.concat(fh(n.flowElements)))}),t}function zS(e){for(var t=e;t;){if(h(t,"bpmn:Process"))return t;t=t.$parent}}var GS='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',Xl=GS,Zl={verticalAlign:"middle"},Ql={color:"#404040"},VS={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},WS={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},US={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},qS='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+Xl+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',rr;function KS(){rr=ue(qS),vt(rr,VS),vt(_e("svg",rr),Zl),vt(_e(".backdrop",rr),WS),vt(_e(".notice",rr),US),vt(_e(".link",rr),Ql,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function dh(){rr||(KS(),bt.bind(rr,".backdrop","click",function(e){document.body.removeChild(rr)})),document.body.appendChild(rr)}function $e(e){e=C({},XS,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),QS(this._container)}B($e,tr);$e.prototype.importXML=async function(t,n){let r=this;function i(a){return r.get("eventBus").createEvent(a)}let o=[];try{t=this._emit("import.parse.start",{xml:t})||t;let a;try{a=await this._moddle.fromXML(t,"bpmn:Definitions")}catch(f){throw this._emit("import.parse.complete",{error:f}),f}let s=a.rootElement,c=a.references,u=a.warnings,p=a.elementsById;o=o.concat(u),s=this._emit("import.parse.complete",i({error:null,definitions:s,elementsById:p,references:c,warnings:o}))||s;let l=await this.importDefinitions(s,n);return o=o.concat(l.warnings),this._emit("import.done",{error:null,warnings:o}),{warnings:o}}catch(a){let s=a;throw o=o.concat(s.warnings||[]),Nc(s,o),s=YS(s),this._emit("import.done",{error:s,warnings:s.warnings}),s}};$e.prototype.importDefinitions=async function(t,n){return this._setDefinitions(t),{warnings:(await this.open(n)).warnings}};$e.prototype.open=async function(t){let n=this._definitions,r=t;if(!n){let o=new Error("no XML imported");throw Nc(o,[]),o}if(typeof t=="string"&&(r=ZS(n,t),!r)){let o=new Error("BPMNDiagram <"+t+"> not found");throw Nc(o,[]),o}try{this.clear()}catch(o){throw Nc(o,[]),o}let{warnings:i}=await lh(this,n,r);return{warnings:i}};$e.prototype.saveXML=async function(t){t=t||{};let n=this._definitions,r,i;try{if(!n)throw new Error("no definitions loaded");n=this._emit("saveXML.start",{definitions:n})||n,i=(await this._moddle.toXML(n,t)).xml,i=this._emit("saveXML.serialized",{xml:i})||i}catch(a){r=a}let o=r?{error:r}:{xml:i};if(this._emit("saveXML.done",o),r)throw r;return o};$e.prototype.saveSVG=async function(){this._emit("saveSVG.start");let t,n;try{let r=this.get("canvas"),i=r.getActiveLayer(),o=_e(":scope > defs",r._svg),a=Rl(i),s=o?"<defs>"+Rl(o)+"</defs>":"",c=i.getBBox();t=`<?xml version="1.0" encoding="utf-8"?>
10 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+c.width+'" height="'+c.height+'" viewBox="'+c.x+" "+c.y+" "+c.width+" "+c.height+'" version="1.1">'+s+a+"</svg>"}catch(r){n=r}if(this._emit("saveSVG.done",{error:n,svg:t}),n)throw n;return{svg:t}};$e.prototype._setDefinitions=function(e){this._definitions=e};$e.prototype.getModules=function(){return this._modules};$e.prototype.clear=function(){this.getDefinitions()&&tr.prototype.clear.call(this)};$e.prototype.destroy=function(){tr.prototype.destroy.call(this),Wt(this._container)};$e.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)};$e.prototype.off=function(e,t){this.get("eventBus").off(e,t)};$e.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=_e(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()};$e.prototype.getDefinitions=function(){return this._definitions};$e.prototype.detach=function(){let e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))};$e.prototype._init=function(e,t,n){let r=n.modules||this.getModules(n),i=n.additionalModules||[],o=[{bpmnjs:["value",this],moddle:["value",t]}],a=[].concat(o,r,i),s=C(Nt(n,["additionalModules"]),{canvas:C({},n.canvas,{container:e}),modules:a});tr.call(this,s),n&&n.container&&this.attachTo(n.container)};$e.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)};$e.prototype._createContainer=function(e){let t=ue('<div class="bjs-container"></div>');return vt(t,{width:mh(e.width),height:mh(e.height),position:e.position}),t};$e.prototype._createModdle=function(e){let t=C({},this._moddleExtensions,e.moddleExtensions);return new ph(t)};$e.prototype._modules=[];function Nc(e,t){return e.warnings=t,e}function YS(e){let n=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}var XS={width:"100%",height:"100%",position:"relative"};function mh(e){return e+(ne(e)?"px":"")}function ZS(e,t){return t&&re(e.diagrams,function(n){return n.id===t})||null}function QS(e){let n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Xl+"</a>",r=ue(n);vt(_e("svg",r),Zl),vt(r,Ql,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),se.bind(r,"click",function(i){dh(),i.preventDefault()})}function Ai(e){$e.call(this,e),this.on("import.parse.complete",function(t){t.error||this._collectIds(t.definitions,t.elementsById)},this),this.on("diagram.destroy",function(){this.get("moddle").ids.clear()},this)}B(Ai,$e);Ai.prototype._createModdle=function(e){var t=$e.prototype._createModdle.call(this,e);return t.ids=new En([32,36,1]),t};Ai.prototype._collectIds=function(e,t){var n=e.$model,r=n.ids,i;r.clear();for(i in t)r.claim(i,t[i])};N();N();function ie(e,t){return h(e,"bpmn:CallActivity")?!1:h(e,"bpmn:SubProcess")?(t=t||ce(e),t&&h(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):h(e,"bpmn:Participant")?!!j(e).processRef:!0}function Me(e){if(!(!h(e,"bpmn:Participant")&&!h(e,"bpmn:Lane"))){var t=ce(e).isHorizontal;return t===void 0?!0:t}}function hh(e){return e&&j(e).isInterrupting!==!1}function Qe(e){return e&&!!j(e).triggeredByEvent}function Er(e,t){var n=j(e).eventDefinitions;return Lt(n,function(r){return h(r,t)})}function vh(e){return Er(e,"bpmn:ErrorEventDefinition")}function gh(e){return Er(e,"bpmn:EscalationEventDefinition")}function yh(e){return Er(e,"bpmn:CompensateEventDefinition")}N();var ir={width:90,height:20},_h=15;function mn(e){return h(e,"bpmn:Event")||h(e,"bpmn:Gateway")||h(e,"bpmn:DataStoreReference")||h(e,"bpmn:DataObjectReference")||h(e,"bpmn:DataInput")||h(e,"bpmn:DataOutput")||h(e,"bpmn:SequenceFlow")||h(e,"bpmn:MessageFlow")||h(e,"bpmn:Group")}function Xr(e){return ee(e.label)}function JS(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=e1(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),a=i.x,s=i.y;return Math.abs(o)<Math.PI/2?s-=_h:a+=_h,{x:a,y:s}}function e1(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)];return{x:n.x+(r.x-n.x)/2,y:n.y+(r.y-n.y)/2}}function La(e){return e.waypoints?JS(e.waypoints):h(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+ir.height/2}:{x:e.x+e.width/2,y:e.y+e.height+ir.height/2}}function bh(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(ir.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=La(t),r=ir),C({x:n.x-r.width/2,y:n.y-r.height/2},r)}function xh(e){if(h(e,"bpmn:FlowElement")||h(e,"bpmn:Participant")||h(e,"bpmn:Lane")||h(e,"bpmn:SequenceFlow")||h(e,"bpmn:MessageFlow")||h(e,"bpmn:DataInput")||h(e,"bpmn:DataOutput"))return"name";if(h(e,"bpmn:TextAnnotation"))return"text";if(h(e,"bpmn:Group"))return"categoryValueRef"}function t1(e){var t=e.categoryValueRef;return t&&t.value||""}function gt(e){var t=e.businessObject,n=xh(t);if(n)return n==="categoryValueRef"?t1(t):t[n]||""}function Eh(e,t){var n=e.businessObject,r=xh(n);if(r)if(r==="categoryValueRef"){if(!n[r])return e;n[r].value=t}else n[r]=t;return e}function wh(e){return ee(e)&&mn(e.labelTarget)}N();var wr=7;function Jl(e){let t=[];return E(e.incoming,n=>{h(n,"bpmn:Association")&&h(n.source,"bpmn:TextAnnotation")&&t.push({annotation:n.source,association:n})}),E(e.outgoing,n=>{h(n,"bpmn:Association")&&h(n.target,"bpmn:TextAnnotation")&&t.push({annotation:n.target,association:n})}),t}function Ti(e){let t=new Map;return E(Ta(e,!0,-1),n=>{E(Jl(n),r=>{t.has(r.annotation)||t.set(r.annotation,{annotation:r.annotation,associations:[]}),t.get(r.annotation).associations.push(r.association)})}),[...t.values()]}N();var Oc="hsl(225, 10%, 15%)",n1="white";function jn(e,t){return Lt(e.eventDefinitions,function(n){return n.$type===t})}function Sh(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function Ch(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function ge(e,t,n){var r=ce(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||n1}function Y(e,t,n){var r=ce(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||Oc}function go(e,t,n,r){var i=ce(e),o=i.get("label");return r||o&&o.get("color:color")||t||Y(e,n)}function Bc(e){var t=e.x+e.width/2,n=e.y+e.height/2,r=e.width/2,i=[["M",t,n],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]];return br(i)}function ja(e,t){var n=e.x,r=e.y,i=e.width,o=e.height,a=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,o-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-o],["a",t,t,0,0,1,t,-t],["z"]];return br(a)}function Rh(e){var t=e.width,n=e.height,r=e.x,i=e.y,o=t/2,a=n/2,s=[["M",r+o,i],["l",o,a],["l",-o,a],["l",-o,-a],["z"]];return br(s)}function Ph(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return br(o)}function yo(e,t={}){return{width:hn(e,t),height:Yt(e,t)}}function hn(e,t={}){return dt(t,"width")?t.width:e.width}function Yt(e,t={}){return dt(t,"height")?t.height:e.height}var r1=new En,i1=10,Ic=3,o1=1.5,Lc=10,a1=4,_o=.95,s1=1,c1=.25;function Sr(e,t,n,r,i,o,a){Cn.call(this,t,a);var s=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,u=e&&e.defaultLabelColor;function p(P){return n.computeStyle(P,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Oc,strokeWidth:2,fill:"white"})}function l(P){return n.computeStyle(P,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Oc,strokeWidth:2})}function f(P,_){var{ref:y={x:0,y:0},scale:M=1,element:D,parentGfx:F=i._svg}=_,V=U("marker",{id:P,viewBox:"0 0 20 20",refX:y.x,refY:y.y,markerWidth:20*M,markerHeight:20*M,orient:"auto"});J(V,D);var ae=_e(":scope > defs",F);ae||(ae=U("defs"),J(F,ae)),J(ae,V)}function d(P,_,y,M){var D=r1.nextPrefixed("marker-");return m(P,D,_,y,M),"url(#"+D+")"}function m(P,_,y,M,D){if(y==="sequenceflow-end"){var F=U("path",{d:"M 1 5 L 11 10 L 1 15 Z",...p({fill:D,stroke:D,strokeWidth:1})});f(_,{element:F,ref:{x:11,y:10},scale:.5,parentGfx:P})}if(y==="messageflow-start"){var V=U("circle",{cx:6,cy:6,r:3.5,...p({fill:M,stroke:D,strokeWidth:1,strokeDasharray:[1e4,1]})});f(_,{element:V,ref:{x:6,y:6},parentGfx:P})}if(y==="messageflow-end"){var ae=U("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...p({fill:M,stroke:D,strokeWidth:1,strokeDasharray:[1e4,1]})});f(_,{element:ae,ref:{x:8.5,y:5},parentGfx:P})}if(y==="association-start"){var be=U("path",{d:"M 11 5 L 1 10 L 11 15",...l({fill:"none",stroke:D,strokeWidth:1.5,strokeDasharray:[1e4,1]})});f(_,{element:be,ref:{x:1,y:10},scale:.5,parentGfx:P})}if(y==="association-end"){var ft=U("path",{d:"M 1 5 L 11 10 L 1 15",...l({fill:"none",stroke:D,strokeWidth:1.5,strokeDasharray:[1e4,1]})});f(_,{element:ft,ref:{x:11,y:10},scale:.5,parentGfx:P})}if(y==="conditional-flow-marker"){var at=U("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...p({fill:M,stroke:D})});f(_,{element:at,ref:{x:-1,y:10},scale:.5,parentGfx:P})}if(y==="conditional-default-flow-marker"){var St=U("path",{d:"M 6 4 L 10 16",...p({stroke:D,fill:"none"})});f(_,{element:St,ref:{x:0,y:10},scale:.5,parentGfx:P})}}function g(P,_,y,M,D={}){Se(M)&&(D=M,M=0),M=M||0,D=p(D);var F=_/2,V=y/2,ae=U("circle",{cx:F,cy:V,r:Math.round((_+y)/4-M),...D});return J(P,ae),ae}function v(P,_,y,M,D,F){Se(D)&&(F=D,D=0),D=D||0,F=p(F);var V=U("rect",{x:D,y:D,width:_-D*2,height:y-D*2,rx:M,ry:M,...F});return J(P,V),V}function w(P,_,y,M){var D=_/2,F=y/2,V=[{x:D,y:0},{x:_,y:F},{x:D,y},{x:0,y:F}],ae=V.map(function(ft){return ft.x+","+ft.y}).join(" ");M=p(M);var be=U("polygon",{...M,points:ae});return J(P,be),be}function S(P,_,y,M){y=l(y);var D=Xn(_,y,M);return J(P,D),D}function x(P,_,y){return S(P,_,y,5)}function b(P,_,y){y=l(y);var M=U("path",{...y,d:_});return J(P,M),M}function R(P,_,y,M){return b(_,y,C({"data-marker":P},M))}function A(P){return Gt[P]}function O(P){return function(_,y,M){return A(P)(_,y,M)}}var T={"bpmn:MessageEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.235,my:.315}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill),V=M?ge(_,s,y.fill):Y(_,c,y.stroke),ae=b(P,D,{fill:F,stroke:V,strokeWidth:1});return ae},"bpmn:TimerEventDefinition":function(P,_,y={}){var M=y.width||_.width,D=y.height||_.height,F=y.width?1:2,V=g(P,M,D,.2*D,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:F}),ae=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:M,containerHeight:D,position:{mx:.5,my:.5}});b(P,ae,{stroke:Y(_,c,y.stroke),strokeWidth:F});for(var be=0;be<12;be++){var ft=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:M,containerHeight:D,position:{mx:.5,my:.5}}),at=M/2,St=D/2;b(P,ft,{strokeWidth:1,stroke:Y(_,c,y.stroke),transform:"rotate("+be*30+","+St+","+at+")"})}return V},"bpmn:EscalationEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.5,my:.2}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(P,_,y={}){var M=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.5,my:.222}});return b(P,M,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:.57,my:.263}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.2,my:.722}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:.638,my:-.055}}),F=M?Y(_,c,y.stroke):"none",V=b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1});return Rc(V,45),V},"bpmn:CompensateEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.22,my:.5}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.5,my:.2}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{strokeWidth:1,fill:F,stroke:Y(_,c,y.stroke)})},"bpmn:MultipleEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.211,my:.36}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(P,_,y={}){var M=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.458,my:.194}});return b(P,M,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(P,_,y={}){var M=g(P,_.width,_.height,8,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:4});return M}};function I(P,_,y={},M){var D=j(P),F=Sh(D),V=M||P;return D.get("eventDefinitions")&&D.get("eventDefinitions").length>1?D.get("parallelMultiple")?T["bpmn:ParallelMultipleEventDefinition"](_,V,y,F):T["bpmn:MultipleEventDefinition"](_,V,y,F):jn(D,"bpmn:MessageEventDefinition")?T["bpmn:MessageEventDefinition"](_,V,y,F):jn(D,"bpmn:TimerEventDefinition")?T["bpmn:TimerEventDefinition"](_,V,y,F):jn(D,"bpmn:ConditionalEventDefinition")?T["bpmn:ConditionalEventDefinition"](_,V,y,F):jn(D,"bpmn:SignalEventDefinition")?T["bpmn:SignalEventDefinition"](_,V,y,F):jn(D,"bpmn:EscalationEventDefinition")?T["bpmn:EscalationEventDefinition"](_,V,y,F):jn(D,"bpmn:LinkEventDefinition")?T["bpmn:LinkEventDefinition"](_,V,y,F):jn(D,"bpmn:ErrorEventDefinition")?T["bpmn:ErrorEventDefinition"](_,V,y,F):jn(D,"bpmn:CancelEventDefinition")?T["bpmn:CancelEventDefinition"](_,V,y,F):jn(D,"bpmn:CompensateEventDefinition")?T["bpmn:CompensateEventDefinition"](_,V,y,F):jn(D,"bpmn:TerminateEventDefinition")?T["bpmn:TerminateEventDefinition"](_,V,y,F):null}var L={ParticipantMultiplicityMarker:function(P,_,y={}){var M=hn(_,y),D=Yt(_,y),F=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:M,containerHeight:D,position:{mx:(M/2-6)/M,my:(D-15)/D}});R("participant-multiplicity",P,F,{strokeWidth:2,fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})},SubProcessMarker:function(P,_,y={}){var M=v(P,14,14,0,{strokeWidth:1,fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)});Fe(M,_.width/2-7.5,_.height-20);var D=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:_.width,containerHeight:_.height,position:{mx:(_.width/2-7.5)/_.width,my:(_.height-20)/_.height}});R("sub-process",P,D,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})},ParallelMarker:function(P,_,y){var M=hn(_,y),D=Yt(_,y),F=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:M,containerHeight:D,position:{mx:(M/2+y.parallel)/M,my:(D-20)/D}});R("parallel",P,F,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})},SequentialMarker:function(P,_,y){var M=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:(_.width/2+y.seq)/_.width,my:(_.height-19)/_.height}});R("sequential",P,M,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})},CompensationMarker:function(P,_,y){var M=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:(_.width/2+y.compensation)/_.width,my:(_.height-13)/_.height}});R("compensation",P,M,{strokeWidth:1,fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})},LoopMarker:function(P,_,y){var M=hn(_,y),D=Yt(_,y),F=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:M,containerHeight:D,position:{mx:(M/2+y.loop)/M,my:(D-7)/D}});R("loop",P,F,{strokeWidth:1.5,fill:"none",stroke:Y(_,c,y.stroke),strokeMiterlimit:.5})},AdhocMarker:function(P,_,y){var M=hn(_,y),D=Yt(_,y),F=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:M,containerHeight:D,position:{mx:(M/2+y.adhoc)/M,my:(D-15)/D}});R("adhoc",P,F,{strokeWidth:1,fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke)})}};function W(P,_,y,M){L[P](_,y,M)}function z(P,_,y=[],M={}){M={fill:M.fill,stroke:M.stroke,width:hn(_,M),height:Yt(_,M)};var D=j(_),F=y.includes("SubProcessMarker");F?M={...M,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:M={...M,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},D.get("isForCompensation")&&y.push("CompensationMarker"),h(D,"bpmn:AdHocSubProcess")&&(y.push("AdhocMarker"),F||C(M,{compensation:M.compensation-18}));var V=D.get("loopCharacteristics"),ae=V&&V.get("isSequential");V&&(C(M,{compensation:M.compensation-18}),y.includes("AdhocMarker")&&C(M,{seq:-23,loop:-18,parallel:-24}),ae===void 0&&y.push("LoopMarker"),ae===!1&&y.push("ParallelMarker"),ae===!0&&y.push("SequentialMarker")),y.includes("CompensationMarker")&&y.length===1&&C(M,{compensation:-8}),E(y,function(be){W(be,P,_,M)})}function K(P,_,y={}){y=C({size:{width:100}},y);var M=o.createText(_||"",y);return pe(M).add("djs-label"),J(P,M),M}function ve(P,_,y,M={}){var D=j(_),F=yo({x:_.x,y:_.y,width:_.width,height:_.height},M);return K(P,D.name,{align:y,box:F,padding:7,style:{fill:go(_,u,c,M.stroke)}})}function Jt(P,_,y={}){var M={width:_.width,height:_.height,x:_.width/2+_.x,y:_.height/2+_.y};return K(P,gt(_),{box:M,style:C({},o.getExternalStyle(),{fill:go(_,u,c,y.stroke)})})}function ke(P,_,y,M={}){var D=Me(y),F=K(P,_,{box:{height:30,width:D?Yt(y,M):hn(y,M)},align:"center-middle",style:{fill:go(y,u,c,M.stroke)}});if(D){var V=-1*Yt(y,M);fo(F,0,-V,270)}}function ye(P,_,y={}){var{width:M,height:D}=yo(_,y);return v(P,M,D,Lc,{...y,fill:ge(_,s,y.fill),fillOpacity:_o,stroke:Y(_,c,y.stroke)})}function he(P,_,y={}){var M=j(_),D=ge(_,s,y.fill),F=Y(_,c,y.stroke);return(M.get("associationDirection")==="One"||M.get("associationDirection")==="Both")&&(y.markerEnd=d(P,"association-end",D,F)),M.get("associationDirection")==="Both"&&(y.markerStart=d(P,"association-start",D,F)),y=Ee(y,["markerStart","markerEnd"]),x(P,_.waypoints,{...y,stroke:F,strokeDasharray:"0, 5"})}function we(P,_,y={}){var M=ge(_,s,y.fill),D=Y(_,c,y.stroke),F=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:.474,my:.296}}),V=b(P,F,{fill:M,fillOpacity:_o,stroke:D}),ae=j(_);if(Ch(ae)){var be=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:.33,my:(_.height-18)/_.height}});b(P,be,{strokeWidth:2,fill:M,stroke:D})}return V}function Ie(P,_,y={}){return g(P,_.width,_.height,{fillOpacity:_o,...y,fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})}function Ze(P,_,y={}){return w(P,_.width,_.height,{fill:ge(_,s,y.fill),fillOpacity:_o,stroke:Y(_,c,y.stroke)})}function H(P,_,y={}){var M=v(P,hn(_,y),Yt(_,y),0,{fill:ge(_,s,y.fill),fillOpacity:y.fillOpacity||_o,stroke:Y(_,c,y.stroke),strokeWidth:1.5}),D=j(_);if(h(D,"bpmn:Lane")){var F=D.get("name");ke(P,F,_,y)}return M}function G(P,_,y={}){var M=ye(P,_,y),D=ie(_);if(Qe(_)&&($(M,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!D)){var F=j(_).flowElements||[],V=F.filter(ae=>h(ae,"bpmn:StartEvent"));V.length===1&&oe(V[0],P,y,_)}return ve(P,_,D?"center-top":"center-middle",y),D?z(P,_,void 0,y):z(P,_,["SubProcessMarker"],y),M}function oe(P,_,y,M){var D=22,F={fill:ge(M,s,y.fill),stroke:Y(M,c,y.stroke),width:D,height:D},V=j(P).isInterrupting,ae=V?0:3,be=V?1:1.2,ft=20,at=(D-ft)/2,St="translate("+at+","+at+")";g(_,ft,ft,{fill:F.fill,stroke:F.stroke,strokeWidth:be,strokeDasharray:ae,transform:St}),I(P,_,F,M)}function xe(P,_,y={}){var M=ye(P,_,y);return ve(P,_,"center-middle",y),z(P,_,void 0,y),M}var Gt=this.handlers={"bpmn:AdHocSubProcess":function(P,_,y={}){return ie(_)?y=Ee(y,["fill","stroke","width","height"]):y=Ee(y,["fill","stroke"]),G(P,_,y)},"bpmn:Association":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),he(P,_,y)},"bpmn:BoundaryEvent":function(P,_,y={}){var{renderIcon:M=!0}=y;y=Ee(y,["fill","stroke"]);var D=j(_),F=D.get("cancelActivity");y={strokeWidth:1.5,fill:ge(_,s,y.fill),fillOpacity:s1,stroke:Y(_,c,y.stroke)},F||(y.strokeDasharray="6");var V=Ie(P,_,y);return g(P,_.width,_.height,Ic,{...y,fill:"none"}),M&&I(_,P,y),V},"bpmn:BusinessRuleTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y),D=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),F=b(P,D);$(F,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1});var V=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),ae=b(P,V);return $(ae,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:CallActivity":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),G(P,_,{strokeWidth:5,...y})},"bpmn:ComplexGateway":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=Ze(P,_,y),D=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:_.width,containerHeight:_.height,position:{mx:.46,my:.26}});return b(P,D,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:DataInput":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=r.getRawPath("DATA_ARROW"),D=we(P,_,y);return b(P,M,{fill:"none",stroke:Y(_,c,y.stroke),strokeWidth:1}),D},"bpmn:DataInputAssociation":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),he(P,_,{...y,markerEnd:d(P,"association-end",ge(_,s,y.fill),Y(_,c,y.stroke))})},"bpmn:DataObject":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),we(P,_,y)},"bpmn:DataObjectReference":O("bpmn:DataObject"),"bpmn:DataOutput":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=r.getRawPath("DATA_ARROW"),D=we(P,_,y);return b(P,M,{strokeWidth:1,fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke)}),D},"bpmn:DataOutputAssociation":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),he(P,_,{...y,markerEnd:d(P,"association-end",ge(_,s,y.fill),Y(_,c,y.stroke))})},"bpmn:DataStoreReference":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:0,my:.133}});return b(P,M,{fill:ge(_,s,y.fill),fillOpacity:_o,stroke:Y(_,c,y.stroke),strokeWidth:2})},"bpmn:EndEvent":function(P,_,y={}){var{renderIcon:M=!0}=y;y=Ee(y,["fill","stroke"]);var D=Ie(P,_,{...y,strokeWidth:4});return M&&I(_,P,y),D},"bpmn:EventBasedGateway":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=j(_),D=Ze(P,_,y);g(P,_.width,_.height,_.height*.2,{fill:ge(_,"none",y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1});var F=M.get("eventGatewayType"),V=!!M.get("instantiate");function ae(){var ft=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:_.width,containerHeight:_.height,position:{mx:.36,my:.44}});b(P,ft,{fill:"none",stroke:Y(_,c,y.stroke),strokeWidth:2})}if(F==="Parallel"){var be=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:_.width,containerHeight:_.height,position:{mx:.474,my:.296}});b(P,be,{fill:"none",stroke:Y(_,c,y.stroke),strokeWidth:1})}else F==="Exclusive"&&(V||g(P,_.width,_.height,_.height*.26,{fill:"none",stroke:Y(_,c,y.stroke),strokeWidth:1}),ae());return D},"bpmn:ExclusiveGateway":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=Ze(P,_,y),D=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:_.width,containerHeight:_.height,position:{mx:.32,my:.3}}),F=ce(_);return F.get("isMarkerVisible")&&b(P,D,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:Gateway":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),Ze(P,_,y)},"bpmn:Group":function(P,_,y={}){return y=Ee(y,["fill","stroke","width","height"]),v(P,_.width,_.height,Lc,{stroke:Y(_,c,y.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:hn(_,y),height:Yt(_,y)})},"bpmn:InclusiveGateway":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=Ze(P,_,y);return g(P,_.width,_.height,_.height*.24,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:2.5}),M},"bpmn:IntermediateEvent":function(P,_,y={}){var{renderIcon:M=!0}=y;y=Ee(y,["fill","stroke"]);var D=Ie(P,_,{...y,strokeWidth:1.5});return g(P,_.width,_.height,Ic,{fill:"none",stroke:Y(_,c,y.stroke),strokeWidth:1.5}),M&&I(_,P,y),D},"bpmn:IntermediateCatchEvent":O("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":O("bpmn:IntermediateEvent"),"bpmn:Lane":function(P,_,y={}){return y=Ee(y,["fill","stroke","width","height"]),H(P,_,{...y,fillOpacity:c1})},"bpmn:ManualTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y),D=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return b(P,D,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:.5}),M},"bpmn:MessageFlow":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=j(_),D=ce(_),F=ge(_,s,y.fill),V=Y(_,c,y.stroke),ae=x(P,_.waypoints,{markerEnd:d(P,"messageflow-end",F,V),markerStart:d(P,"messageflow-start",F,V),stroke:V,strokeDasharray:"10, 11",strokeWidth:1.5});if(M.get("messageRef")){var be=ae.getPointAtLength(ae.getTotalLength()/2),ft=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:be.x,y:be.y}}),at={strokeWidth:1};D.get("messageVisibleKind")==="initiating"?(at.fill=F,at.stroke=V):(at.fill=V,at.stroke=F);var St=b(P,ft,at),xn=M.get("messageRef"),Be=xn.get("name"),yr=K(P,Be,{align:"center-top",fitBox:!0,style:{fill:V}}),lc=St.getBBox(),pn=yr.getBBox(),me=be.x-pn.width/2,Te=be.y+lc.height/2+i1;fo(yr,me,Te,0)}return ae},"bpmn:ParallelGateway":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=Ze(P,_,y),D=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:_.width,containerHeight:_.height,position:{mx:.46,my:.2}});return b(P,D,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:Participant":function(P,_,y={}){y=Ee(y,["fill","stroke","width","height"]);var M=H(P,_,y),D=ie(_),F=Me(_),V=j(_),ae=V.get("name");if(D){var be=F?[{x:30,y:0},{x:30,y:Yt(_,y)}]:[{x:0,y:30},{x:hn(_,y),y:30}];S(P,be,{stroke:Y(_,c,y.stroke),strokeWidth:o1}),ke(P,ae,_,y)}else{var ft=yo(_,y);F||(ft.height=hn(_,y),ft.width=Yt(_,y));var at=K(P,ae,{box:ft,align:"center-middle",style:{fill:go(_,u,c,y.stroke)}});if(!F){var St=-1*Yt(_,y);fo(at,0,-St,270)}}return V.get("participantMultiplicity")&&W("ParticipantMultiplicityMarker",P,_,y),M},"bpmn:ReceiveTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=j(_),D=xe(P,_,y),F;return M.get("instantiate")?(g(P,28,28,20*.22,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1}),F=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):F=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),b(P,F,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1}),D},"bpmn:ScriptTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y),D=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return b(P,D,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:SendTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y),D=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return b(P,D,{fill:Y(_,c,y.stroke),stroke:ge(_,s,y.fill),strokeWidth:1}),M},"bpmn:SequenceFlow":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=ge(_,s,y.fill),D=Y(_,c,y.stroke),F=x(P,_.waypoints,{markerEnd:d(P,"sequenceflow-end",M,D),stroke:D}),V=j(_),{source:ae}=_;if(ae){var be=j(ae);V.get("conditionExpression")&&h(be,"bpmn:Activity")&&$(F,{markerStart:d(P,"conditional-flow-marker",M,D)}),be.get("default")&&(h(be,"bpmn:Gateway")||h(be,"bpmn:Activity"))&&be.get("default")===V&&$(F,{markerStart:d(P,"conditional-default-flow-marker",M,D)})}return F},"bpmn:ServiceTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y);g(P,10,10,{fill:ge(_,s,y.fill),stroke:"none",transform:"translate(6, 6)"});var D=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});b(P,D,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1}),g(P,10,10,{fill:ge(_,s,y.fill),stroke:"none",transform:"translate(11, 10)"});var F=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return b(P,F,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:StartEvent":function(P,_,y={}){var{renderIcon:M=!0}=y;y=Ee(y,["fill","stroke"]);var D=j(_);D.get("isInterrupting")||(y={...y,strokeDasharray:"6"});var F=Ie(P,_,y);return M&&I(_,P,y),F},"bpmn:SubProcess":function(P,_,y={}){return ie(_)?y=Ee(y,["fill","stroke","width","height"]):y=Ee(y,["fill","stroke"]),G(P,_,y)},"bpmn:Task":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),xe(P,_,y)},"bpmn:TextAnnotation":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var{width:M,height:D}=yo(_,y),F=v(P,M,D,0,0,{fill:"none",stroke:"none"}),V=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:M,containerHeight:D,position:{mx:0,my:0}});b(P,V,{stroke:Y(_,c,y.stroke)});var ae=j(_),be=ae.get("text")||"";return K(P,be,{align:"left-top",box:yo(_,y),padding:wr,style:{fill:go(_,u,c,y.stroke)}}),F},"bpmn:Transaction":function(P,_,y={}){ie(_)?y=Ee(y,["fill","stroke","width","height"]):y=Ee(y,["fill","stroke"]);var M=G(P,_,{strokeWidth:1.5,...y}),D=n.style(["no-fill","no-events"],{stroke:Y(_,c,y.stroke),strokeWidth:1.5}),F=ie(_);return F||(y={}),v(P,hn(_,y),Yt(_,y),Lc-Ic,Ic,D),M},"bpmn:UserTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y),D=15,F=12,V=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:D,y:F}});b(P,V,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:.5});var ae=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:D,y:F}});b(P,ae,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:.5});var be=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:D,y:F}});return b(P,be,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:.5}),M},label:function(P,_,y={}){return Jt(P,_,y)}};this._drawPath=b,this._renderer=A}B(Sr,Cn);Sr.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"];Sr.prototype.canRender=function(e){return h(e,"bpmn:BaseElement")};Sr.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)};Sr.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)};Sr.prototype.getShapePath=function(e){return ee(e)?ja(e,a1):h(e,"bpmn:Event")?Bc(e):h(e,"bpmn:Activity")?ja(e,Lc):h(e,"bpmn:Gateway")?Rh(e):Ph(e)};function Ee(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}N();N();var u1=0,p1={width:150,height:50};function l1(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function f1(e){return Se(e)?C({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var ef=null;function d1(){return ef||(ef=document.createElement("canvas").getContext("2d")),ef}function m1(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(Th(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function Th(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function h1(e,t){var n=d1();if(!n)return{width:0,height:0};n.font=m1(t),"letterSpacing"in n&&(n.letterSpacing=Th(t.letterSpacing)||"0px");var r=e==="",i=r?"dummy":e.replace(/\s+$/,""),o=n.measureText(i);return{width:r?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function v1(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=h1(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return g1(e,i,r,o);i=_1(i,o.width,t)}}function g1(e,t,n,r){if(t.length<n.length){var i=n.slice(t.length).trim();e.unshift(i)}return{width:r.width,height:r.height,text:t}}var Ah="\xAD";function y1(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],o=0;if(n.length>1)for(;r=n.shift();)if(r.length+o<t)i.push(r),o+=r.length;else{(r==="-"||r===Ah)&&i.pop();break}var a=i[i.length-1];return a&&a===Ah&&(i[i.length-1]="-"),i.join("")}function _1(e,t,n){var r=Math.max(e.length*(n/t),1),i=y1(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function bo(e){this._config=C({},{size:p1,padding:u1,style:{},align:"center-top"},e||{})}bo.prototype.createText=function(e,t){return this.layoutText(e,t).element};bo.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions};bo.prototype.layoutText=function(e,t){for(var n=C({},this._config.size,t.box),r=C({},this._config.style,t.style),i=l1(t.align||this._config.align),o=f1(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=b1(r),c=e.split(/\u00AD?\r?\n/),u=[],p=n.width-o.left-o.right;c.length;)u.push(v1(c,p,r));i.vertical==="middle"&&(o.top=o.bottom=0);var l=Ge(u,function(v,w,S){return v+(s||w.height)},0)+o.top+o.bottom,f=Ge(u,function(v,w,S){return w.width>v?w.width:v},0),d=o.top;i.vertical==="middle"&&(d+=(n.height-l)/2),d-=(s||u[0].height)/4;var m=U("text");$(m,r),E(u,function(v){var w;switch(d+=s||v.height,i.horizontal){case"left":w=o.left;break;case"right":w=(a?f:p)-o.right-v.width;break;default:w=Math.max(((a?f:p)-v.width)/2+o.left,0)}var S=U("tspan");$(S,{x:w,y:d}),S.textContent=v.text,J(m,S)});var g={width:f,height:l};return{dimensions:g,element:m}};function b1(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var x1=12,E1=1.2,w1=40;function jc(e){var t=C({fontFamily:"Arial, sans-serif",fontSize:x1,fontWeight:"normal",lineHeight:E1},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=C({},t,{fontSize:n},e&&e.externalStyle||{}),i=new bo({style:t});this.getExternalLabelBounds=function(a,s){var c={width:Math.max(a.width,ir.width),height:30},u=o(s,c,{style:r});return{x:Math.round(a.x+a.width/2-u.width/2),y:a.y,width:Math.ceil(u.width),height:Math.ceil(u.height)}},this.getTextAnnotationBounds=function(a,s){var c=o(s,a,{style:t,align:"left-top",padding:wr});return{x:a.x,y:a.y,width:a.width,height:Math.max(w1,Math.round(c.height))}},this.getDimensions=function(a,s){return i.getDimensions(a,s||{})};function o(a,s,c){return i.getDimensions(a,C({box:s},c))}this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}jc.$inject=["config.textRenderer"];function tf(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(t){return this.pathMap[t].d},this.getScaledPath=function(t,n){var r=this.pathMap[t],i,o;n.abspos?(i=n.abspos.x,o=n.abspos.y):(i=n.containerWidth*n.position.mx,o=n.containerHeight*n.position.my);var a={};if(n.position){for(var s=n.containerHeight/r.height*n.yScaleFactor,c=n.containerWidth/r.width*n.xScaleFactor,u=0;u<r.heightElements.length;u++)a["y"+u]=r.heightElements[u]*s;for(var p=0;p<r.widthElements.length;p++)a["x"+p]=r.widthElements[p]*c}var l=P1(r.d,{mx:i,my:o,e:a});return l}}var S1=/\{([^{}]+)\}/g,C1=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function R1(e,t,n){var r=n;return t.replace(C1,function(i,o,a,s,c){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&c&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function P1(e,t){return String(e).replace(S1,function(n,r){return R1(n,r,t)})}var Mh={__init__:["bpmnRenderer"],bpmnRenderer:["type",Sr],textRenderer:["type",jc],pathMap:["type",tf]};function nf(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}var Zr={translate:["value",nf]};N();function Fc(e,t,n){return C({id:e.id,type:e.$type,businessObject:e,di:t},n)}function A1(e,t,n){var r=e.waypoint;return!r||r.length<2?[X(t),X(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function Dh(e,t,n){return new Error(`element ${Rt(t)} referenced by ${Rt(e)}#${n} not yet drawn`)}function Fn(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}Fn.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"];Fn.prototype.add=function(e,t,n){var r,i,o;if(h(t,"bpmndi:BPMNPlane")){var a=h(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(Fc(e,t,a)),this._canvas.addRootElement(r)}else if(h(t,"bpmndi:BPMNShape")){var s=!ie(e,t),c=M1(e);i=n&&(n.hidden||n.collapsed);var u=t.bounds;r=this._elementFactory.createShape(Fc(e,t,{collapsed:s,hidden:i,x:Math.round(u.x),y:Math.round(u.y),width:Math.round(u.width),height:Math.round(u.height),isFrame:c})),h(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),h(e,"bpmn:Lane")&&(o=0),h(e,"bpmn:DataStoreReference")&&(T1(n,X(u))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(h(t,"bpmndi:BPMNEdge")){var p=this._getSource(e),l=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(Fc(e,t,{hidden:i,source:p,target:l,waypoints:A1(t,p,l)})),h(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Rt(t)} for element ${Rt(e)}`);return mn(e)&&gt(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r};Fn.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Rt(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw Dh(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)};Fn.prototype.addLabel=function(e,t,n){var r,i,o;return r=bh(t,n),i=gt(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(Fc(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!gt(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(o,n.parent)};Fn.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;if(r=e[t+"Ref"],t==="source"&&i==="bpmn:DataInputAssociation"&&(r=r&&r[0]),(t==="source"&&i==="bpmn:DataOutputAssociation"||t==="target"&&i==="bpmn:DataInputAssociation")&&(r=e.$parent),n=r&&this._getElement(r),n)return n;throw r?Dh(e,r,t+"Ref"):new Error(`${Rt(e)}#${t} Ref not specified`)};Fn.prototype._getSource=function(e){return this._getConnectedElement(e,"source")};Fn.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")};Fn.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function T1(e,t){var n=t.x,r=t.y;return n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height}function M1(e){return h(e,"bpmn:Group")}var kh={__depends__:[Zr],bpmnImporter:["type",Fn]};var Nh={__depends__:[Mh,kh]};N();function or(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}or.prototype.next=function(){return this._prefix+ ++this._counter};var D1=new or("ov"),k1=500;function yt(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=D1,this._overlayDefaults=C({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=N1(n.getContainer()),this._init()}yt.$inject=["config.overlays","eventBus","canvas","elementRegistry"];yt.prototype.get=function(e){if(st(e)&&(e={id:e}),st(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?Q(t.overlays,Ct({type:e.type})):t.overlays.slice():[]}else return e.type?Q(this._overlays,Ct({type:e.type})):e.id?this._overlays[e.id]:null};yt.prototype.add=function(e,t,n){if(Se(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var r=this._ids.next();return n=C({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r};yt.prototype.remove=function(e){var t=this.get(e)||[];q(t)||(t=[t]);var n=this;E(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(Wt(r.html),Wt(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var o=i.overlays.indexOf(r);o!==-1&&i.overlays.splice(o,1)}})};yt.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"};yt.prototype.show=function(){Hc(this._overlayRoot)};yt.prototype.hide=function(){Hc(this._overlayRoot,!1)};yt.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Hr(this._overlayRoot)};yt.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=Ce(t);r=o.x,i=o.y}Oh(n,r,i),nt(e.html,"data-container-id",t.id)};yt.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,o=t.top;if(t.right!==void 0){var a;r.waypoints?a=Ce(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=Ce(r).height:s=r.height,o=t.bottom*-1+s}Oh(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())};yt.prototype._createOverlayContainer=function(e){var t=ue('<div class="djs-overlays" />');vt(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n};yt.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Bh(this._overlayRoot,n)};yt.prototype._getOverlayContainer=function(e,t){var n=re(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n};yt.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,o;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),st(r)&&(r=ue(r)),o=this._getOverlayContainer(n),i=ue('<div class="djs-overlay" data-overlay-id="'+t+'">'),vt(i,{position:"absolute"}),i.appendChild(r),e.type&&Ne(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();Hc(i,a===s),e.htmlContainer=i,o.overlays.push(e),o.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())};yt.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=this._canvas.getRootElement(),c=!0;(r!==s||n&&(Ue(i)&&i>t.scale||Ue(o)&&o<t.scale))&&(c=!1),Hc(a,c),this._updateOverlayScale(e,t)};yt.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,o=e.htmlContainer,a,s="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),Ue(r)&&t.scale<r&&(a=(1/t.scale||1)*r),Ue(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),Ue(a)&&(s="scale("+a+","+a+")"),Bh(o,s)};yt.prototype._updateOverlaysVisibilty=function(e){var t=this;E(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})};yt.prototype._init=function(){var e=this._eventBus,t=this;function n(r){t._updateRoot(r),t._updateOverlaysVisibilty(r),t.show()}e.on("canvas.viewbox.changing",function(r){t.hide()}),e.on("canvas.viewbox.changed",function(r){n(r.viewbox)}),e.on(["shape.remove","connection.remove"],function(r){var i=r.element,o=t.get({element:i});E(o,function(c){t.remove(c.id)});var a=t._getOverlayContainer(i);if(a){Wt(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",k1,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(E(o.overlays,function(a){t._updateOverlay(a)}),t._updateOverlayContainer(o))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&Ne(i.html)[r.add?"add":"remove"](r.marker)}),e.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox())}),e.on("diagram.clear",this.clear,this)};function N1(e){var t=ue('<div class="djs-overlay-container" />');return vt(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function Oh(e,t,n){vt(e,{left:t+"px",top:n+"px"})}function Hc(e,t){e.style.display=t===!1?"none":""}function Bh(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}var Qr={__init__:["overlays"],overlays:["type",yt]};function $c(e,t,n,r){e.on("element.changed",function(i){var o=i.element;(o.parent||o===t.getRootElement())&&(i.gfx=n.getGraphics(o)),i.gfx&&e.fire(_c(o)+".changed",i)}),e.on("elements.changed",function(i){var o=i.elements;o.forEach(function(a){e.fire("element.changed",{element:a})}),r.updateContainments(o)}),e.on("shape.changed",function(i){r.update("shape",i.element,i.gfx)}),e.on("connection.changed",function(i){r.update("connection",i.element,i.gfx)})}$c.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var xo={__init__:["changeSupport"],changeSupport:["type",$c]};N();var O1=1e3;function k(e){this._eventBus=e}k.$inject=["eventBus"];function B1(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}k.prototype.on=function(e,t,n,r,i,o){if((Le(t)||ne(t))&&(o=i,i=r,r=n,n=t,t=null),Le(n)&&(o=i,i=r,r=n,n=O1),Se(i)&&(o=i,i=!1),!Le(r))throw new Error("handlerFn must be a function");q(e)||(e=[e]);var a=this._eventBus;E(e,function(s){var c=["commandStack",s,t].filter(function(u){return u}).join(".");a.on(c,n,i?B1(r,o):r,o)})};k.prototype.canExecute=Cr("canExecute");k.prototype.preExecute=Cr("preExecute");k.prototype.preExecuted=Cr("preExecuted");k.prototype.execute=Cr("execute");k.prototype.executed=Cr("executed");k.prototype.postExecute=Cr("postExecute");k.prototype.postExecuted=Cr("postExecuted");k.prototype.revert=Cr("revert");k.prototype.reverted=Cr("reverted");function Cr(e){return function(n,r,i,o,a){(Le(n)||ne(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function Fa(e,t){t.invoke(k,this),this.executed(function(n){var r=n.context;r.rootElement?e.setRootElement(r.rootElement):r.rootElement=e.getRootElement()}),this.revert(function(n){var r=n.context;r.rootElement&&e.setRootElement(r.rootElement)})}B(Fa,k);Fa.$inject=["canvas","injector"];var Ih={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Fa]};N();function Rr(e){return CSS.escape(e)}var I1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Hn(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return I1[t]})}var Lh="_plane";function rf(e){var t=e.id;return L1(t)}function vn(e){var t=e.id;return h(e,"bpmn:SubProcess")?jh(t):t}function Jr(e){return jh(e)}function Eo(e){var t=ce(e);return h(t,"bpmndi:BPMNPlane")}function jh(e){return e+Lh}function L1(e){return e.replace(new RegExp(Lh+"$"),"")}var j1="bjs-breadcrumbs-shown";function zc(e,t,n){var r=ue('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=Ne(i);i.appendChild(r);var a=[];e.on("element.changed",function(c){var u=c.element,p=j(u),l=re(a,function(f){return f===p});l&&s()});function s(c){c&&(a=F1(c));var u=a.flatMap(function(l){var f=n.findRoot(vn(l))||n.findRoot(l.id);if(!f&&h(l,"bpmn:Process")){var d=t.find(function(v){var w=j(v);return w&&w.get("processRef")===l});f=d&&n.findRoot(d.id)}if(!f)return[];var m=Hn(l.name||l.id),g=ue('<li><span class="bjs-crumb"><a title="'+m+'">'+m+"</a></span></li>");return g.addEventListener("click",function(){n.setRootElement(f)}),g});r.innerHTML="";var p=u.length>1;o.toggle(j1,p),u.forEach(function(l){r.appendChild(l)})}e.on("root.set",function(c){s(c.element)})}zc.$inject=["eventBus","elementRegistry","canvas"];function F1(e){for(var t=j(e),n=[],r=t;r;r=r.$parent)(h(r,"bpmn:SubProcess")||h(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function Gc(e,t){var n=null,r=new H1;e.on("root.set",function(i){var o=i.element,a=t.viewbox(),s=r.get(o);if(r.set(n,{x:a.x,y:a.y,zoom:a.scale}),n=o,!(!h(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var c=(a.x-s.x)*a.scale,u=(a.y-s.y)*a.scale;(c!==0||u!==0)&&t.scroll({dx:c,dy:u}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}Gc.$inject=["eventBus","canvas"];function H1(){this._entries=[],this.set=function(e,t){var n=!1;for(var r in this._entries)if(this._entries[r][0]===e){this._entries[r][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}t!==-1&&this._entries.splice(t,1)}}var Fh={x:180,y:160};function Pr(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}Pr.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(r){!r.plane||!r.plane.bpmnElement||(t._processToDiagramMap[r.plane.bpmnElement.id]=r)});var n=e.diagrams.filter(r=>r.plane).flatMap(r=>t._createNewDiagrams(r.plane));n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}};Pr.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(o){var a=o.bpmnElement;if(a){var s=a.$parent;h(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),z1(a,e)&&r.push({diElement:o,parent:s})}});var i=[];return n.forEach(function(o){if(!t._processToDiagramMap[o.id]){var a=t._createDiagram(o);t._processToDiagramMap[o.id]=a,i.push(a)}}),r.forEach(function(o){for(var a=o.diElement,s=o.parent;s&&n.indexOf(s)===-1;)s=s.$parent;if(s){var c=t._processToDiagramMap[s.id];t._moveToDiPlane(a,c.plane)}}),i};Pr.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=$1(e),r={x:n.x-Fh.x,y:n.y-Fh.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(o){o.x=o.x-r.x,o.y=o.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})};Pr.prototype._moveToDiPlane=function(e,t){var n=Hh(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)};Pr.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n};Pr.$inject=["eventBus","moddle"];function Hh(e){return h(e,"bpmndi:BPMNDiagram")?e:Hh(e.$parent)}function $1(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach(function(n){if(n.bounds){var r=Z(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),Si(t)}function z1(e,t){var n=e.$parent;return!(!h(n,"bpmn:SubProcess")||n===t.bpmnElement||te(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var Vc=250,G1='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>',V1="bjs-drilldown-empty";function ar(e,t,n,r,i){k.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r,this._translate=i;var o=this;this.executed("shape.toggleCollapse",Vc,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",Vc,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],Vc,function(a){var s=a.oldParent,c=a.newParent||a.parent,u=a.shape;o._canDrillDown(u)&&o._addOverlay(u),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(c),o._updateDrilldownOverlay(u)},!0),this.reverted(["shape.create","shape.move","shape.delete"],Vc,function(a){var s=a.oldParent,c=a.newParent||a.parent,u=a.shape;o._canDrillDown(u)&&o._addOverlay(u),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(c),o._updateDrilldownOverlay(u)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}B(ar,k);ar.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}};ar.prototype._canDrillDown=function(e){var t=this._canvas;return h(e,"bpmn:SubProcess")&&t.findRoot(vn(e))};ar.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=j(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;Ne(r.html).toggle(V1,!i)}};ar.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=j(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=ue('<button type="button" class="bjs-drilldown">'+G1+"</button>"),a=r.get("name")||r.get("id"),s=this._translate("Open {element}",{element:a});o.setAttribute("title",s),o.addEventListener("click",function(){t.setRootElement(t.findRoot(vn(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)};ar.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})};ar.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var $h={__depends__:[Qr,xo,Ih],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",zc],drilldownCentering:["type",Gc],drilldownOverlayBehavior:["type",ar],subprocessCompatibility:["type",Pr]};N();function zh(e){!e||typeof e.stopPropagation!="function"||e.stopPropagation()}function Ar(e){return e.originalEvent||e.srcEvent}function Wc(e){zh(e),zh(Ar(e))}function An(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function Uc(){return/mac/i.test(navigator.platform)}function Gh(e,t){return(Ar(e)||e).button===t}function gn(e){return Gh(e,0)}function Vh(e){return Gh(e,1)}function Tr(e){var t=Ar(e)||e;return gn(e)?Uc()?t.metaKey:t.ctrlKey:!1}function Mi(e){var t=Ar(e)||e;return gn(e)&&t.shiftKey}function W1(e){return!0}function qc(e){return gn(e)||Vh(e)}var Wh=500;function Kc(e,t,n){var r=this;function i(T,I,L){if(!s(T,I)){var W,z,K;L?z=t.getGraphics(L):(W=I.delegateTarget||I.target,W&&(z=W,L=t.get(z))),!(!z||!L)&&(K=e.fire(T,{element:L,gfx:z,originalEvent:I}),K===!1&&(I.stopPropagation(),I.preventDefault()))}}var o={};function a(T){return o[T]}function s(T,I){var L=u[T]||gn;return!L(I)}var c={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},u={"element.contextmenu":W1,"element.mousedown":qc,"element.mouseup":qc,"element.click":qc,"element.dblclick":qc};function p(T,I,L){var W=c[T];if(!W)throw new Error("unmapped DOM event name <"+T+">");return i(W,I,L)}var l="svg, .djs-element";function f(T,I,L,W){var z=o[L]=function(K){i(L,K)};W&&(u[L]=W),z.$delegate=bt.bind(T,l,I,z)}function d(T,I,L){var W=a(L);W&&bt.unbind(T,I,W.$delegate)}function m(T){E(c,function(I,L){f(T,L,I)})}function g(T){E(c,function(I,L){d(T,L,I)})}e.on("canvas.destroy",function(T){g(T.svg)}),e.on("canvas.init",function(T){m(T.svg)}),e.on(["shape.added","connection.added"],function(T){var I=T.element,L=T.gfx;e.fire("interactionEvents.createHit",{element:I,gfx:L})}),e.on(["shape.changed","connection.changed"],Wh,function(T){var I=T.element,L=T.gfx;e.fire("interactionEvents.updateHit",{element:I,gfx:L})}),e.on("interactionEvents.createHit",Wh,function(T){var I=T.element,L=T.gfx;r.createDefaultHit(I,L)}),e.on("interactionEvents.updateHit",function(T){var I=T.element,L=T.gfx;r.updateDefaultHit(I,L)});var v=R("djs-hit djs-hit-stroke"),w=R("djs-hit djs-hit-click-stroke"),S=R("djs-hit djs-hit-all"),x=R("djs-hit djs-hit-no-move"),b={all:S,"click-stroke":w,stroke:v,"no-move":x};function R(T,I){return I=C({stroke:"white",strokeWidth:15},I||{}),n.cls(T,["no-fill","no-border"],I)}function A(T,I){var L=b[I];if(!L)throw new Error("invalid hit type <"+I+">");return $(T,L),T}function O(T,I){J(T,I)}this.removeHits=function(T){var I=xi(".djs-hit",T);E(I,Pe)},this.createDefaultHit=function(T,I){var L=T.waypoints,W=T.isFrame,z;return L?this.createWaypointsHit(I,L):(z=W?"stroke":"all",this.createBoxHit(I,z,{width:T.width,height:T.height}))},this.createWaypointsHit=function(T,I){var L=Xn(I);return A(L,"stroke"),O(T,L),L},this.createBoxHit=function(T,I,L){L=C({x:0,y:0},L);var W=U("rect");return A(W,I),$(W,L),O(T,W),W},this.updateDefaultHit=function(T,I){var L=_e(".djs-hit",I);if(L)return T.waypoints?Pa(L,T.waypoints):$(L,{width:T.width,height:T.height}),L},this.fire=i,this.triggerMouseEvent=p,this.mouseHandler=a,this.registerEvent=f,this.unregisterEvent=d}Kc.$inject=["eventBus","elementRegistry","styles"];var ei={__init__:["interactionEvents"],interactionEvents:["type",Kc]};N();function ti(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],function(r){var i=r.element;n.deselect(i)}),e.on(["diagram.clear","root.set"],function(r){n.select(null)})}ti.$inject=["eventBus","canvas"];ti.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(n!==-1){var r=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:t})}};ti.prototype.get=function(){return this._selectedElements};ti.prototype.isSelected=function(e){return this._selectedElements.indexOf(e)!==-1};ti.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();q(e)||(e=e?[e]:[]);var i=this._canvas,o=i.getRootElement();e=e.filter(function(a){var s=i.findRoot(a);return o===s}),t?E(e,function(a){n.indexOf(a)===-1&&n.push(a)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};N();var Uh="hover",qh="selected";function Yc(e,t){this._canvas=e;function n(i,o){e.addMarker(i,o)}function r(i,o){e.removeMarker(i,o)}t.on("element.hover",function(i){n(i.element,Uh)}),t.on("element.out",function(i){r(i.element,Uh)}),t.on("selection.changed",function(i){function o(u){r(u,qh)}function a(u){n(u,qh)}var s=i.oldSelection,c=i.newSelection;E(s,function(u){c.indexOf(u)===-1&&o(u)}),E(c,function(u){s.indexOf(u)===-1&&a(u)})})}Yc.$inject=["canvas","eventBus"];N();function Xc(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,c=o.hints||{},u=c.autoSelect;if(a){if(u===!1)return;q(u)?t.select(u):t.select(s.filter(U1))}}),e.on("connect.end",500,function(i){var o=i.context,a=o.connection;a&&t.select(a)}),e.on("shape.move.end",500,function(i){var o=i.previousSelection||[],a=r.get(i.context.shape.id),s=re(o,function(c){return a.id===c.id});s||t.select(a)}),e.on("element.click",function(i){if(gn(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,c=Mi(i);if(a&&s)return c?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,c)}})}Xc.$inject=["eventBus","selection","canvas","elementRegistry"];function U1(e){return!e.hidden}var rt={__init__:["selectionVisuals","selectionBehavior"],__depends__:[ei],selection:["type",ti],selectionVisuals:["type",Yc],selectionBehavior:["type",Xc]};function nn(e){$e.call(this,e)}B(nn,$e);nn.prototype._modules=[Nh,$h,Qr,rt,Zr];nn.prototype._moddleExtensions={};N();N();var Kh=["c","C"],Yh=["v","V"],q1=["d","D"],K1=["x","X"],Xh=["y","Y"],of=["z","Z"];function Zh(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function xt(e){return e.altKey?!1:e.ctrlKey||e.metaKey}function Ke(e,t){return e=q(e)?e:[e],e.indexOf(t.key)!==-1||e.indexOf(t.code)!==-1}function Zc(e){return e.shiftKey}function Qh(e){return xt(e)&&Ke(Kh,e)}function Jh(e){return xt(e)&&Ke(Yh,e)}function ev(e){return xt(e)&&Ke(q1,e)}function tv(e){return xt(e)&&Ke(K1,e)}function nv(e){return xt(e)&&!Zc(e)&&Ke(of,e)}function rv(e){return xt(e)&&(Ke(Xh,e)||Ke(of,e)&&Zc(e))}var Qc="keyboard.keydown",Y1="keyboard.keyup",X1=1e3,iv="Keyboard binding is now implicit; explicit binding to an element got removed. For more information, see https://github.com/bpmn-io/diagram-js/issues/661";function Mt(e,t){var n=this;this._config=e=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",function(){n._fire("destroy"),n.unbind()}),e.bindTo&&console.error("unsupported configuration <keyboard.bindTo>",new Error(iv));var r=e&&e.bind!==!1;t.on("canvas.init",function(i){n._target=i.svg,r&&n.bind(),n._fire("init")})}Mt.$inject=["config.keyboard","eventBus"];Mt.prototype._keydownHandler=function(e){this._keyHandler(e,Qc)};Mt.prototype._keyupHandler=function(e){this._keyHandler(e,Y1)};Mt.prototype._keyHandler=function(e,t){var n;if(!this._isEventIgnored(e)){var r={keyEvent:e};n=this._eventBus.fire(t||Qc,r),n&&e.preventDefault()}};Mt.prototype._isEventIgnored=function(e){return!1};Mt.prototype.bind=function(e){e&&console.error("unsupported argument <node>",new Error(iv)),this.unbind(),e=this._node=this._target,se.bind(e,"keydown",this._keydownHandler),se.bind(e,"keyup",this._keyupHandler),this._fire("bind")};Mt.prototype.getBinding=function(){return this._node};Mt.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),se.unbind(e,"keydown",this._keydownHandler),se.unbind(e,"keyup",this._keyupHandler)),this._node=null};Mt.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})};Mt.prototype.addListener=function(e,t,n){Le(e)&&(n=t,t=e,e=X1),this._eventBus.on(n||Qc,e,t)};Mt.prototype.removeListener=function(e,t){this._eventBus.off(t||Qc,e)};Mt.prototype.hasModifier=Zh;Mt.prototype.isCmd=xt;Mt.prototype.isShift=Zc;Mt.prototype.isKey=Ke;var Z1=500;function Mr(e,t){var n=this;e.on("editorActions.init",Z1,function(r){var i=r.editorActions;n.registerBindings(t,i)})}Mr.$inject=["eventBus","keyboard"];Mr.prototype.registerBindings=function(e,t){function n(r,i){t.isRegistered(r)&&e.addListener(i)}n("undo",function(r){var i=r.keyEvent;if(nv(i))return t.trigger("undo"),!0}),n("redo",function(r){var i=r.keyEvent;if(rv(i))return t.trigger("redo"),!0}),n("copy",function(r){var i=r.keyEvent;if(Qh(i))return t.trigger("copy"),!0}),n("paste",function(r){var i=r.keyEvent;if(Jh(i))return t.trigger("paste"),!0}),n("duplicate",function(r){var i=r.keyEvent;if(ev(i))return t.trigger("duplicate"),!0}),n("cut",function(r){var i=r.keyEvent;if(tv(i))return t.trigger("cut"),!0}),n("stepZoom",function(r){var i=r.keyEvent;if(Ke(["+","Add","="],i)&&xt(i))return t.trigger("stepZoom",{value:1}),!0}),n("stepZoom",function(r){var i=r.keyEvent;if(Ke(["-","Subtract"],i)&&xt(i))return t.trigger("stepZoom",{value:-1}),!0}),n("zoom",function(r){var i=r.keyEvent;if(Ke("0",i)&&xt(i))return t.trigger("zoom",{value:1}),!0}),n("removeSelection",function(r){var i=r.keyEvent;if(Ke(["Backspace","Delete","Del"],i))return t.trigger("removeSelection"),!0})};var wo={__init__:["keyboard","keyboardBindings"],keyboard:["type",Mt],keyboardBindings:["type",Mr]};N();var Q1={moveSpeed:50,moveSpeedAccelerated:200};function Jc(e,t,n){var r=this;this._config=C({},Q1,e||{}),t.addListener(i);function i(o){var a=o.keyEvent,s=r._config;if(t.isCmd(a)&&t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],a)){var c=t.isShift(a)?s.moveSpeedAccelerated:s.moveSpeed,u;switch(a.key){case"ArrowLeft":case"Left":u="left";break;case"ArrowUp":case"Up":u="up";break;case"ArrowRight":case"Right":u="right";break;case"ArrowDown":case"Down":u="down";break}return r.moveCanvas({speed:c,direction:u}),!0}}this.moveCanvas=function(o){var a=0,s=0,c=o.speed,u=c/Math.min(Math.sqrt(n.viewbox().scale),1);switch(o.direction){case"left":a=u;break;case"up":s=u;break;case"right":a=-u;break;case"down":s=-u;break}n.scroll({dx:a,dy:s})}}Jc.$inject=["config.keyboardMove","keyboard","canvas"];var eu={__depends__:[wo],__init__:["keyboardMove"],keyboardMove:["type",Jc]};var J1=/^djs-cursor-.*$/;function Di(e){var t=Ne(document.body);t.removeMatching(J1),e&&t.add("djs-cursor-"+e)}function tu(){Di(null)}var eC=5e3;function nu(e,t){t=t||"element.click";function n(){return!1}return e.once(t,eC,n),function(){e.off(t,n)}}function So(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Dt(e,t){return{x:e.x-t.x,y:e.y-t.y}}var tC=15;function ru(e,t){var n;function r(s){return a(s.originalEvent)}e.on("canvas.focus.changed",function(s){s.focused?e.on("element.mousedown",500,r):e.off("element.mousedown",r)});function i(s){var c=n.start,u=n.button,p=An(s),l=Dt(p,c);if(!n.dragging&&nC(l)>tC&&(n.dragging=!0,u===0&&nu(e),Di("grab")),n.dragging){var f=n.last||n.start;l=Dt(p,f),t.scroll({dx:l.x,dy:l.y}),n.last=p}s.preventDefault()}function o(s){se.unbind(document,"mousemove",i),se.unbind(document,"mouseup",o),n=null,tu()}function a(s){if(!Bn(s.target,".djs-draggable")){var c=s.button;if(!(c>=2||s.ctrlKey||s.shiftKey||s.altKey))return n={button:c,start:An(s)},se.bind(document,"mousemove",i),se.bind(document,"mouseup",o),!0}}this.isActive=function(){return!!n}}ru.$inject=["eventBus","canvas"];function nC(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}var iu={__init__:["moveCanvas"],moveCanvas:["type",ru]};function Ha(e){return Math.log(e)/Math.log(10)}function af(e,t){var n=Ha(e.min),r=Ha(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function ov(e,t){return Math.max(e.min,Math.min(e.max,t))}N();var rC=Math.sign||function(e){return e>=0?1:-1},sf={min:.2,max:4},av=10,iC=.1,oC=.75;function Tn(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=tt(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||oC;var r=this;t.on("canvas.mouseover",function(){r._init(e.enabled!==!1)}),t.on("canvas.mouseout",function(){r._init(!1)})}Tn.$inject=["config.zoomScroll","eventBus","canvas"];Tn.prototype.scroll=function(t){this._canvas.scroll(t)};Tn.prototype.reset=function(){this._canvas.zoom("fit-viewport")};Tn.prototype.zoom=function(t,n){var r=af(sf,av*2);this._totalDelta+=t,Math.abs(this._totalDelta)>iC&&(this._zoom(t,n,r),this._totalDelta=0)};Tn.prototype._handleWheel=function(t){if(this._enabled){var n=this._container;t.preventDefault();var r=t.ctrlKey||Uc()&&t.metaKey,i=t.shiftKey,o=-1*this._scale,a;if(r?o*=t.deltaMode===0?.02:.32:o*=t.deltaMode===0?1:16,r){var s=n.getBoundingClientRect(),c={x:t.clientX-s.left,y:t.clientY-s.top};a=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*rC(t.deltaY)*o,this.zoom(a,c)}else i?a={dx:o*t.deltaY,dy:0}:a={dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(a)}};Tn.prototype.stepZoom=function(t,n){var r=af(sf,av);this._zoom(t,n,r)};Tn.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=Ha(r.zoom()),a=Math.round(o/n)*n;a+=n*i;var s=Math.pow(10,a);r.zoom(ov(sf,s),t)};Tn.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t=="undefined"&&(t=!i),i!==t&&se[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t};Tn.prototype._init=function(e){this.toggle(e)};var ou={__init__:["zoomScroll"],zoomScroll:["type",Tn]};function sr(e){nn.call(this,e)}B(sr,nn);sr.prototype._navigationModules=[eu,iu,ou];sr.prototype._modules=[].concat(nn.prototype._modules,sr.prototype._navigationModules);N();function cf(e){return e&&e[e.length-1]}function sv(e){return e.y}function cv(e){return e.x}var aC={left:cv,center:cv,right:function(e){return e.x+e.width},top:sv,middle:sv,bottom:function(e){return e.y+e.height}};function ni(e,t){this._modeling=e,this._rules=t}ni.$inject=["modeling","rules"];ni.prototype._getOrientationDetails=function(e){var t=["top","bottom","middle"],n="x",r="width";return t.indexOf(e)!==-1&&(n="y",r="height"),{axis:n,dimension:r}};ni.prototype._isType=function(e,t){return t.indexOf(e)!==-1};ni.prototype._alignmentPosition=function(e,t){var n=this._getOrientationDetails(e),r=n.axis,i=n.dimension,o={},a={},s=!1,c,u,p;function l(f,d){return Math.round((f[r]+d[r]+d[i])/2)}if(this._isType(e,["left","top"]))o[e]=t[0][r];else if(this._isType(e,["right","bottom"]))p=cf(t),o[e]=p[r]+p[i];else if(this._isType(e,["center","middle"])){if(E(t,function(f){var d=f[r]+Math.round(f[i]/2);a[d]?a[d].elements.push(f):a[d]={elements:[f],center:d}}),c=At(a,function(f){return f.elements.length>1&&(s=!0),f.elements.length}),s)return o[e]=cf(c).center,o;u=t[0],t=At(t,function(f){return f[r]+f[i]}),p=cf(t),o[e]=l(u,p)}return o};ni.prototype.trigger=function(e,t){var n=this._modeling,r,i=Q(e,function(c){return!(c.waypoints||c.host||c.labelTarget)});if(r=this._rules.allowed("elements.align",{elements:i}),q(r)&&(i=r),!(i.length<2||!r)){var o=aC[t],a=At(i,o),s=this._alignmentPosition(t,a);n.alignElements(a,s)}};var uv={__init__:["alignElements"],alignElements:["type",ni]};var sC=new or;function ri(e){this._scheduled={},e.on("diagram.destroy",()=>{Object.keys(this._scheduled).forEach(t=>{this.cancel(t)})})}ri.$inject=["eventBus"];ri.prototype.schedule=function(e,t=sC.next()){this.cancel(t);let n=this._schedule(e,t);return this._scheduled[t]=n,n.promise};ri.prototype._schedule=function(e,t){let n=cC();return{executionId:setTimeout(()=>{try{this._scheduled[t]=null;try{n.resolve(e())}catch(i){n.reject(i)}}catch(i){console.error("Scheduler#_schedule execution failed",i)}}),promise:n.promise}};ri.prototype.cancel=function(e){let t=this._scheduled[e];t&&(this._cancel(t),this._scheduled[e]=null)};ri.prototype._cancel=function(e){clearTimeout(e.executionId)};function cC(){let e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}var pv={scheduler:["type",ri]};N();var uC="djs-element-hidden",au=".entry",pC=1e3,lv=8,lC=300;function it(e,t,n,r){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._scheduler=r,this._current=null,this._init()}it.$inject=["canvas","elementRegistry","eventBus","scheduler"];it.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",function(t){var n=t.newSelection,r=n.length?n.length===1?n[0]:n:null;r?e.open(r,!0):e.close()}),this._eventBus.on("elements.changed",function(t){var n=t.elements,r=e._current;if(r){var i=r.target,o=q(i)?i:[i],a=o.filter(function(c){return n.includes(c)});if(a.length){e.close();var s=o.filter(function(c){return e._elementRegistry.get(c.id)});s.length&&e._updateAndOpen(s.length>1?s:s[0])}}}),this._eventBus.on("canvas.viewbox.changed",function(){e._updatePosition()}),this._eventBus.on("element.marker.update",function(t){if(e.isOpen()){var n=t.element,r=e._current,i=q(r.target)?r.target:[r.target];i.includes(n)&&e._updateVisibility()}}),this._container=this._createContainer()};it.prototype._createContainer=function(){var e=ue('<div class="djs-context-pad-parent"></div>');return this._canvas.getContainer().appendChild(e),e};it.prototype.registerProvider=function(e,t){t||(t=e,e=pC),this._eventBus.on("contextPad.getProviders",e,function(n){n.providers.push(t)})};it.prototype.getEntries=function(e){var t=this._getProviders(),n=q(e)?"getMultiElementContextPadEntries":"getContextPadEntries",r={};return E(t,function(i){if(Le(i[n])){var o=i[n](e);Le(o)?r=o(r):E(o,function(a,s){r[s]=a})}}),r};it.prototype.trigger=function(e,t,n){var r=this,i,o,a=t.delegateTarget||t.target;if(!a)return t.preventDefault();if(i=nt(a,"data-action"),o=t.originalEvent||t,e==="mouseover"){this._timeout=setTimeout(function(){r._mouseout=r.triggerEntry(i,"hover",o,n)},lC);return}else if(e==="mouseout"){clearTimeout(this._timeout),this._mouseout&&(this._mouseout(),this._mouseout=null);return}return this.triggerEntry(i,e,o,n)};it.prototype.triggerEntry=function(e,t,n,r){if(this.isShown()){var i=this._current.target,o=this._current.entries,a=o[e];if(a){var s=a.action;if(this._eventBus.fire("contextPad.trigger",{entry:a,event:n})!==!1){if(Le(s)){if(t==="click")return s(n,i,r)}else if(s[t])return s[t](n,i,r);n.preventDefault()}}}};it.prototype.open=function(e,t){if(!(!t&&this.isOpen(e))){var n=this._eventBus.fire("contextPad.open.allowed",{target:e});n!==!1&&(this.close(),this._updateAndOpen(e))}};it.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers};it.prototype._updateAndOpen=function(e){var t=this.getEntries(e),n=this._createHtml(e),r;E(t,function(i,o){var a=i.group||"default",s=ue(i.html||'<div class="entry" draggable="true"></div>'),c;nt(s,"data-action",o),c=_e("[data-group="+Rr(a)+"]",n),c||(c=ue('<div class="group"></div>'),nt(c,"data-group",a),n.appendChild(c)),c.appendChild(s),i.className&&fC(s,i.className),i.title&&nt(s,"title",i.title),i.imageUrl&&(r=ue("<img>"),nt(r,"src",i.imageUrl),r.style.width="100%",r.style.height="100%",s.appendChild(r))}),Ne(n).add("open"),this._current={entries:t,html:n,target:e},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current})};it.prototype._createHtml=function(e){var t=this,n=ue('<div class="djs-context-pad"></div>');return bt.bind(n,au,"click",function(r){t.trigger("click",r)}),bt.bind(n,au,"dragstart",function(r){t.trigger("dragstart",r)}),bt.bind(n,au,"mouseover",function(r){t.trigger("mouseover",r)}),bt.bind(n,au,"mouseout",function(r){t.trigger("mouseout",r)}),se.bind(n,"mousedown",function(r){r.stopPropagation()}),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n};it.prototype.getPad=function(e){console.warn(new Error("ContextPad#getPad is deprecated and will be removed in future library versions, cf. https://github.com/bpmn-io/diagram-js/pull/888"));let t;return this.isOpen()&&mC(this._current.target,e)?t=this._current.html:t=this._createHtml(e),{html:t}};it.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)};it.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return q(e)!==q(n)?!1:q(e)?e.length===n.length&&ln(e,function(r){return n.includes(r)}):n===e};it.prototype.isShown=function(){return this.isOpen()&&Ne(this._current.html).has("open")};it.prototype.show=function(){this.isOpen()&&(Ne(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}))};it.prototype.hide=function(){this.isOpen()&&(Ne(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))};it.prototype._getPosition=function(e){if(!q(e)&&de(e)){var t=this._canvas.viewbox(),n=dC(e),r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale;return{left:r+lv*this._canvas.zoom(),top:i}}var o=this._canvas.getContainer(),a=o.getBoundingClientRect(),s=this._getTargetBounds(e);return{left:s.right-a.left+lv*this._canvas.zoom(),top:s.top-a.top}};it.prototype._updatePosition=function(){let e=()=>{if(this.isOpen()){var t=this._current.html,n=this._getPosition(this._current.target);"x"in n&&"y"in n?(t.style.left=n.x+"px",t.style.top=n.y+"px"):["top","right","bottom","left"].forEach(function(r){r in n&&(t.style[r]=n[r]+"px")})}};this._scheduler.schedule(e,"ContextPad#_updatePosition")};it.prototype._updateVisibility=function(){let e=()=>{if(this.isOpen()){var t=this,n=this._current.target,r=q(n)?n:[n],i=r.some(function(o){return t._canvas.hasMarker(o,uC)});i?t.hide():t.show()}};this._scheduler.schedule(e,"ContextPad#_updateVisibility")};it.prototype._getTargetBounds=function(e){var t=this,n=q(e)?e:[e],r=n.map(function(i){return t._canvas.getGraphics(i)});return r.reduce(function(i,o){let a=o.getBoundingClientRect();return i.top=Math.min(i.top,a.top),i.right=Math.max(i.right,a.right),i.bottom=Math.max(i.bottom,a.bottom),i.left=Math.min(i.left,a.left),i.x=i.left,i.y=i.top,i.width=i.right-i.left,i.height=i.bottom-i.top,i},{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};function fC(e,t){var n=Ne(e);t=q(t)?t:t.split(/\s+/g),t.forEach(function(r){n.add(r)})}function dC(e){return e.waypoints[e.waypoints.length-1]}function mC(e,t){return e=q(e)?e:[e],t=q(t)?t:[t],e.length===t.length&&ln(e,function(n){return t.includes(n)})}var su={__depends__:[ei,pv,Qr],contextPad:["type",it]};var mu,Ye,vv,hC,ii,fv,gv,yv,uf,uu,$a,_v,df,pf,lf,vC,lu={},fu=[],gC=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,hu=Array.isArray;function Dr(e,t){for(var n in t)e[n]=t[n];return e}function mf(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function vu(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?mu.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return pu(e,a,r,i,null)}function pu(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++vv:i,__i:-1,__u:0};return i==null&&Ye.vnode!=null&&Ye.vnode(o),o}function gu(e){return e.children}function za(e,t){this.props=e,this.context=t}function Co(e,t){if(t==null)return e.__?Co(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Co(e):null}function yC(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],o=Dr({},t);o.__v=t.__v+1,Ye.vnode&&Ye.vnode(o),hf(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n==null?Co(t):n,!!(32&t.__u),i),o.__v=t.__v,o.__.__k[o.__i]=o,wv(r,o,i),t.__e=t.__=null,o.__e!=n&&bv(o)}}function bv(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),bv(e)}function dv(e){(!e.__d&&(e.__d=!0)&&ii.push(e)&&!du.__r++||fv!=Ye.debounceRendering)&&((fv=Ye.debounceRendering)||gv)(du)}function du(){try{for(var e,t=1;ii.length;)ii.length>t&&ii.sort(yv),e=ii.shift(),t=ii.length,yC(e)}finally{ii.length=du.__r=0}}function xv(e,t,n,r,i,o,a,s,c,u,p){var l,f,d,m,g,v,w,S=r&&r.__k||fu,x=t.length;for(c=_C(n,t,S,c,x),l=0;l<x;l++)(d=n.__k[l])!=null&&(f=d.__i!=-1&&S[d.__i]||lu,d.__i=l,v=hf(e,d,f,i,o,a,s,c,u,p),m=d.__e,d.ref&&f.ref!=d.ref&&(f.ref&&vf(f.ref,null,d),p.push(d.ref,d.__c||m,d)),g==null&&m!=null&&(g=m),(w=!!(4&d.__u))||f.__k===d.__k?(c=Ev(d,c,e,w),w&&f.__e&&(f.__e=null)):typeof d.type=="function"&&v!==void 0?c=v:m&&(c=m.nextSibling),d.__u&=-7);return n.__e=g,c}function _C(e,t,n,r,i){var o,a,s,c,u,p=n.length,l=p,f=0;for(e.__k=new Array(i),o=0;o<i;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[o]=pu(null,a,null,null,null):hu(a)?a=e.__k[o]=pu(gu,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[o]=pu(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[o]=a,c=o+f,a.__=e,a.__b=e.__b+1,s=null,(u=a.__i=bC(a,n,c,l))!=-1&&(l--,(s=n[u])&&(s.__u|=2)),s==null||s.__v==null?(u==-1&&(i>p?f--:i<p&&f++),typeof a.type!="function"&&(a.__u|=4)):u!=c&&(u==c-1?f--:u==c+1?f++:(u>c?f--:f++,a.__u|=4))):e.__k[o]=null;if(l)for(o=0;o<p;o++)(s=n[o])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=Co(s)),Cv(s,s));return r}function Ev(e,t,n,r){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=Ev(i[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Co(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function bC(e,t,n,r){var i,o,a,s=e.key,c=e.type,u=t[n],p=u!=null&&(2&u.__u)==0;if(u===null&&s==null||p&&s==u.key&&c==u.type)return n;if(r>(p?1:0)){for(i=n-1,o=n+1;i>=0||o<t.length;)if((u=t[a=i>=0?i--:o++])!=null&&(2&u.__u)==0&&s==u.key&&c==u.type)return a}return-1}function mv(e,t,n){t[0]=="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||gC.test(t)?n:n+"px"}function cu(e,t,n,r,i){var o,a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||mv(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||mv(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(_v,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n[$a]=r[$a]:(n[$a]=df,e.addEventListener(t,o?lf:pf,o)):e.removeEventListener(t,o?lf:pf,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function hv(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[uu]==null)t[uu]=df++;else if(t[uu]<n[$a])return;return n(Ye.event?Ye.event(t):t)}}}function hf(e,t,n,r,i,o,a,s,c,u){var p,l,f,d,m,g,v,w,S,x,b,R,A,O,T,I=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[s=t.__e=n.__e]),(p=Ye.__b)&&p(t);e:if(typeof I=="function")try{if(w=t.props,S=I.prototype&&I.prototype.render,x=(p=I.contextType)&&r[p.__c],b=p?x?x.props.value:p.__:r,n.__c?v=(l=t.__c=n.__c).__=l.__E:(S?t.__c=l=new I(w,b):(t.__c=l=new za(w,b),l.constructor=I,l.render=EC),x&&x.sub(l),l.state||(l.state={}),l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),S&&l.__s==null&&(l.__s=l.state),S&&I.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Dr({},l.__s)),Dr(l.__s,I.getDerivedStateFromProps(w,l.__s))),d=l.props,m=l.state,l.__v=t,f)S&&I.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),S&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(S&&I.getDerivedStateFromProps==null&&w!==d&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(w,b),t.__v==n.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(w,l.__s,b)===!1){t.__v!=n.__v&&(l.props=w,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(L){L&&(L.__=t)}),fu.push.apply(l.__h,l._sb),l._sb=[],l.__h.length&&a.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(w,l.__s,b),S&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(d,m,g)})}if(l.context=b,l.props=w,l.__P=e,l.__e=!1,R=Ye.__r,A=0,S)l.state=l.__s,l.__d=!1,R&&R(t),p=l.render(l.props,l.state,l.context),fu.push.apply(l.__h,l._sb),l._sb=[];else do l.__d=!1,R&&R(t),p=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++A<25);l.state=l.__s,l.getChildContext!=null&&(r=Dr(Dr({},r),l.getChildContext())),S&&!f&&l.getSnapshotBeforeUpdate!=null&&(g=l.getSnapshotBeforeUpdate(d,m)),O=p!=null&&p.type===gu&&p.key==null?Sv(p.props.children):p,s=xv(e,hu(O)?O:[O],t,n,r,i,o,a,s,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&a.push(l),v&&(l.__E=l.__=null)}catch(L){if(t.__v=null,c||o!=null)if(L.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(T=o.length;T--;)mf(o[T]);ff(t)}else t.__e=n.__e,t.__k=n.__k,L.then||ff(t);Ye.__e(L,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=xC(n.__e,t,n,r,i,o,a,c,u);return(p=Ye.diffed)&&p(t),128&t.__u?void 0:s}function ff(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ff))}function wv(e,t,n){for(var r=0;r<n.length;r++)vf(n[r],n[++r],n[++r]);Ye.__c&&Ye.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){Ye.__e(o,i.__v)}})}function Sv(e){return typeof e!="object"||e==null||e.__b>0?e:hu(e)?e.map(Sv):e.constructor!==void 0?null:Dr({},e)}function xC(e,t,n,r,i,o,a,s,c){var u,p,l,f,d,m,g,v=n.props||lu,w=t.props,S=t.type;if(S=="svg"?i="http://www.w3.org/2000/svg":S=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((d=o[u])&&"setAttribute"in d==!!S&&(S?d.localName==S:d.nodeType==3)){e=d,o[u]=null;break}}if(e==null){if(S==null)return document.createTextNode(w);e=document.createElementNS(i,S,w.is&&w),s&&(Ye.__m&&Ye.__m(t,o),s=!1),o=null}if(S==null)v===w||s&&e.data==w||(e.data=w);else{if(o=S=="textarea"&&w.defaultValue!=null?null:o&&mu.call(e.childNodes),!s&&o!=null)for(v={},u=0;u<e.attributes.length;u++)v[(d=e.attributes[u]).name]=d.value;for(u in v)d=v[u],u=="dangerouslySetInnerHTML"?l=d:u=="children"||u in w||u=="value"&&"defaultValue"in w||u=="checked"&&"defaultChecked"in w||cu(e,u,null,d,i);for(u in w)d=w[u],u=="children"?f=d:u=="dangerouslySetInnerHTML"?p=d:u=="value"?m=d:u=="checked"?g=d:s&&typeof d!="function"||v[u]===d||cu(e,u,d,v[u],i);if(p)s||l&&(p.__html==l.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(l&&(e.innerHTML=""),xv(t.type=="template"?e.content:e,hu(f)?f:[f],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:n.__k&&Co(n,0),s,c),o!=null)for(u=o.length;u--;)mf(o[u]);s&&S!="textarea"||(u="value",S=="progress"&&m==null?e.removeAttribute("value"):m!=null&&(m!==e[u]||S=="progress"&&!m||S=="option"&&m!=v[u])&&cu(e,u,m,v[u],i),u="checked",g!=null&&g!=e[u]&&cu(e,u,g,v[u],i))}return e}function vf(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){Ye.__e(i,n)}}function Cv(e,t,n){var r,i;if(Ye.unmount&&Ye.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||vf(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){Ye.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Cv(r[i],t,n||typeof e.type!="function");n||mf(e.__e),e.__c=e.__=e.__e=void 0}function EC(e,t,n){return this.constructor(e,n)}function yu(e,t,n){var r,i,o,a;t==document&&(t=document.documentElement),Ye.__&&Ye.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],a=[],hf(t,e=(!r&&n||t).__k=vu(gu,null,[e]),i||lu,lu,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?mu.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,a),wv(o,e,a)}mu=fu.slice,Ye={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},vv=0,hC=function(e){return e!=null&&e.constructor===void 0},za.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Dr({},this.state),typeof e=="function"&&(e=e(Dr({},n),this.props)),e&&Dr(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),dv(this))},za.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),dv(this))},za.prototype.render=gu,ii=[],gv=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,yv=function(e,t){return e.__v.__b-t.__v.__b},du.__r=0,uf=Math.random().toString(8),uu="__d"+uf,$a="__a"+uf,_v=/(PointerCapture)$|Capture$/i,df=0,pf=hv(!1),lf=hv(!0),vC=0;var Pv=function(e,t,n,r){var i;t[0]=0;for(var o=1;o<t.length;o++){var a=t[o++],s=t[o]?(t[0]|=a?1:2,n[t[o++]]):t[++o];a===3?r[0]=s:a===4?r[1]=Object.assign(r[1]||{},s):a===5?(r[1]=r[1]||{})[t[++o]]=s:a===6?r[1][t[++o]]+=s+"":a?(i=e.apply(s,Pv(e,s,n,["",null])),r.push(i),s[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(s)}return r},Rv=new Map;function Av(e){var t=Rv.get(this);return t||(t=new Map,Rv.set(this,t)),(t=Pv(this,t.get(e)||(t.set(e,t=(function(n){for(var r,i,o=1,a="",s="",c=[0],u=function(f){o===1&&(f||(a=a.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?c.push(0,f,a):o===3&&(f||a)?(c.push(3,f,a),o=2):o===2&&a==="..."&&f?c.push(4,f,0):o===2&&a&&!f?c.push(5,0,!0,a):o>=5&&((a||!f&&o===5)&&(c.push(o,0,a,i),o=6),f&&(c.push(o,f,0,i),o=6)),a=""},p=0;p<n.length;p++){p&&(o===1&&u(),u(p));for(var l=0;l<n[p].length;l++)r=n[p][l],o===1?r==="<"?(u(),c=[c],o=3):a+=r:o===4?a==="--"&&r===">"?(o=1,a=""):a=r+a[0]:s?r===s?s="":a+=r:r==='"'||r==="'"?s=r:r===">"?(u(),o=1):o&&(r==="="?(o=5,i=a,a=""):r==="/"&&(o<5||n[p][l+1]===">")?(u(),o===3&&(c=c[0]),o=c,(c=c[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
211 </svg>`},sp=ES;var wS=900;function Yr(e,t,n,r){e.registerProvider(wS,this),this._contextPad=e,this._popupMenu=t,this._translate=n,this._canvas=r}Yr.$inject=["contextPad" global() class