| /plugin/bpmnio/vendor/dmn-js/dist/ |
| H A D | dmn-viewer.production.min.js | 13 `),this},this.appendIndent=function(){return e&&n.write(t.join(" ")),this},this.indent=function(){return t.push(""),this},this.unindent=function(){return t.pop(),this}}function fp(n){n=D({format:!1,preamble:!0},n||{});function e(t,i){var r=i||new h1,s=new d1(r,n.format);n.preamble&&s.append(Jb);var o=new ae,a=t.$model;if(o.getNamespaces().mapDefaultPrefixes(p1(a)),o.build(t).serializeTo(s),!i)return r.value}return{toXML:e}}function p1(n){let e=n.config&&n.config.nsMap||{},t={};for(let i in Pc)t[i]=Pc[i];for(let i in e){let r=e[i];t[r]=i}for(let i of n.getPackages())t[i.prefix]=i.uri;return t}function xa(n,e){nt.call(this,n,e)}xa.prototype=Object.create(nt.prototype);xa.prototype.fromXML=function(n,e,t){tt(e)||(t=e,e="dmn:Definitions");var i=new ya(D({model:this,lax:!0},t)),r=i.handler(e);return i.fromXML(n,r)};xa.prototype.toXML=function(n,e){var t=new fp(e);return new Promise(function(i,r){try{var s=t.toXML(n);return i({xml:s})}catch(o){return r(o)}})};var m1="DC",g1="dc",y1="http://www.omg.org/spec/DMN/20180521/DC/",v1=[{name:"Dimension",properties:[{name:"width",isAttr:!0,type:"Real"},{name:"height",isAttr:!0,type:"Real"}]},{name:"Bounds",properties:[{name:"height",isAttr:!0,type:"Real"},{name:"width",isAttr:!0,type:"Real"},{name:"x",isAttr:!0,type:"Real"},{name:"y",isAttr:!0,type:"Real"}]},{name:"Point",properties:[{name:"x",isAttr:!0,type:"Real"},{name:"y",isAttr:!0,type:"Real"}]},{name:"Color",properties:[{name:"red",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"},{name:"green",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"},{name:"blue",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"}]}],x1=[],b1=[{name:"AlignmentKind",literalValues:[{name:"start"},{name:"center"},{name:"end"}]}],w1={name:m1,prefix:g1,uri:y1,types:v1,associations:x1,enumerations:b1},O1="DI",k1="di",C1="http://www.omg.org/spec/DMN/20180521/DI/",S1=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"extension",type:"Extension"},{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"style",isReference:!0,type:"Style",xml:{serialize:"property"}},{name:"sharedStyle",isReference:!0,isVirtual:!0,type:"Style"}]},{name:"Diagram",superClass:["DiagramElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"}]},{name:"Shape",isAbstract:!0,properties:[{name:"bounds",type:"dc:Bounds"}],superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,properties:[{name:"waypoint",type:"dc:Point",isMany:!0,xml:{serialize:"property"}}],superClass:["DiagramElement"]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],E1=[],A1=[],_1={tagAlias:"lowerCase"},T1={name:O1,prefix:k1,uri:C1,types:S1,associations:E1,enumerations:A1,xml:_1},M1="DMN",R1="dmn",P1="https://www.omg.org/spec/DMN/20191111/MODEL/",D1=[{name:"AuthorityRequirement",superClass:["DMNElement"],properties:[{name:"requiredAuthority",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredDecision",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredInput",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"ItemDefinition",superClass:["NamedElement"],properties:[{name:"typeRef",type:"String"},{name:"allowedValues",type:"UnaryTests",xml:{serialize:"property"}},{name:"typeLanguage",type:"String",isAttr:!0},{name:"itemComponent",type:"ItemDefinition",isMany:!0,xml:{serialize:"property"}},{name:"functionItem",type:"FunctionItem"},{name:"isCollection",isAttr:!0,type:"Boolean"}]},{name:"Definitions",superClass:["NamedElement"],properties:[{name:"import",type:"Import",isMany:!0},{name:"itemDefinition",type:"ItemDefinition",isMany:!0},{name:"drgElement",type:"DRGElement",isMany:!0},{name:"artifact",type:"Artifact",isMany:!0},{name:"elementCollection",type:"ElementCollection",isMany:!0},{name:"businessContextElement",type:"BusinessContextElement",isMany:!0},{name:"namespace",type:"String",isAttr:!0},{name:"expressionLanguage",type:"String",isAttr:!0},{name:"typeLanguage",type:"String",isAttr:!0},{name:"exporter",isAttr:!0,type:"String"},{name:"exporterVersion",isAttr:!0,type:"String"},{name:"dmnDI",type:"dmndi:DMNDI"}]},{name:"KnowledgeSource",superClass:["DRGElement"],properties:[{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0},{name:"type",type:"String"},{name:"owner",type:"DMNElementReference",xml:{serialize:"property"}},{name:"locationURI",type:"String",isAttr:!0}]},{name:"DecisionRule",superClass:["DMNElement"],properties:[{name:"inputEntry",type:"UnaryTests",isMany:!0,xml:{serialize:"property"}},{name:"outputEntry",type:"LiteralExpression",isMany:!0,xml:{serialize:"property"}},{name:"annotationEntry",type:"RuleAnnotation",isMany:!0,xml:{serialize:"property"}}]},{name:"Expression",isAbstract:!0,superClass:["DMNElement"],properties:[{name:"typeRef",isAttr:!0,type:"String"}]},{name:"InformationItem",superClass:["NamedElement"],properties:[{name:"typeRef",isAttr:!0,type:"String"}]},{name:"Decision",superClass:["DRGElement"],properties:[{name:"question",type:"String",xml:{serialize:"property"}},{name:"allowedAnswers",type:"String",xml:{serialize:"property"}},{name:"variable",type:"InformationItem",xml:{serialize:"property"}},{name:"informationRequirement",type:"InformationRequirement",isMany:!0},{name:"knowledgeRequirement",type:"KnowledgeRequirement",isMany:!0},{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0},{name:"supportedObjective",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"impactedPerformanceIndicator",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"decisionMaker",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"decisionOwner",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"usingProcess",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"usingTask",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"decisionLogic",type:"Expression"}]},{name:"Invocation",superClass:["Expression"],properties:[{name:"calledFunction",type:"Expression"},{name:"binding",type:"Binding",isMany:!0}]},{name:"OrganisationalUnit",superClass:["BusinessContextElement"],properties:[{name:"decisionMade",type:"Decision",isReference:!0,isMany:!0},{name:"decisionOwned",type:"Decision",isReference:!0,isMany:!0}]},{name:"Import",superClass:["NamedElement"],properties:[{name:"importType",type:"String",isAttr:!0},{name:"locationURI",type:"String",isAttr:!0},{name:"namespace",type:"String",isAttr:!0}]},{name:"InformationRequirement",superClass:["DMNElement"],properties:[{name:"requiredDecision",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredInput",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"ElementCollection",superClass:["NamedElement"],properties:[{name:"drgElement",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"DRGElement",isAbstract:!0,superClass:["NamedElement"],properties:[]},{name:"InputData",superClass:["DRGElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}}]},{name:"DMNElement",isAbstract:!0,properties:[{name:"description",type:"String"},{name:"extensionElements",type:"ExtensionElements"},{name:"id",type:"String",isAttr:!0,isId:!0},{name:"extensionAttribute",type:"ExtensionAttribute",isMany:!0},{name:"label",isAttr:!0,type:"String"}]},{name:"InputClause",superClass:["DMNElement"],properties:[{name:"inputExpression",type:"LiteralExpression",xml:{serialize:"property"}},{name:"inputValues",type:"UnaryTests",xml:{serialize:"property"}}]},{name:"DecisionTable",superClass:["Expression"],properties:[{name:"input",type:"InputClause",isMany:!0,xml:{serialize:"property"}},{name:"output",type:"OutputClause",isMany:!0,xml:{serialize:"property"}},{name:"annotation",type:"RuleAnnotationClause",isMany:!0,xml:{serialize:"property"}},{name:"rule",type:"DecisionRule",isMany:!0,xml:{serialize:"property"}},{name:"hitPolicy",type:"HitPolicy",isAttr:!0,default:"UNIQUE"},{name:"aggregation",type:"BuiltinAggregator",isAttr:!0},{name:"preferredOrientation",type:"DecisionTableOrientation",isAttr:!0},{name:"outputLabel",isAttr:!0,type:"String"}]},{name:"LiteralExpression",superClass:["Expression"],properties:[{name:"expressionLanguage",type:"String",isAttr:!0},{name:"text",type:"String"},{name:"importedValues",type:"ImportedValues"}]},{name:"Binding",properties:[{name:"parameter",type:"InformationItem",xml:{serialize:"property"}},{name:"bindingFormula",type:"Expression"}]},{name:"KnowledgeRequirement",superClass:["DMNElement"],properties:[{name:"requiredKnowledge",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"BusinessKnowledgeModel",superClass:["Invocable"],properties:[{name:"encapsulatedLogic",type:"FunctionDefinition",xml:{serialize:"property"}},{name:"knowledgeRequirement",type:"KnowledgeRequirement",isMany:!0},{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0}]},{name:"BusinessContextElement",isAbstract:!0,superClass:["NamedElement"],properties:[{name:"URI",type:"String",isAttr:!0}]},{name:"PerformanceIndicator",superClass:["BusinessContextElement"],properties:[{name:"impactingDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"FunctionDefinition",superClass:["Expression"],properties:[{name:"formalParameter",type:"InformationItem",isMany:!0,xml:{serialize:"property"}},{name:"body",type:"Expression"},{name:"kind",type:"FunctionKind",isAttr:!0}]},{name:"Context",superClass:["Expression"],properties:[{name:"contextEntry",type:"ContextEntry",isMany:!0}]},{name:"ContextEntry",superClass:["DMNElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}},{name:"value",type:"Expression"}]},{name:"List",superClass:["Expression"],properties:[{name:"elements",isMany:!0,type:"Expression"}]},{name:"Relation",superClass:["Expression"],properties:[{name:"column",type:"InformationItem",isMany:!0,xml:{serialize:"property"}},{name:"row",type:"List",isMany:!0,xml:{serialize:"property"}}]},{name:"OutputClause",superClass:["DMNElement"],properties:[{name:"outputValues",type:"UnaryTests",xml:{serialize:"property"}},{name:"defaultOutputEntry",type:"LiteralExpression",xml:{serialize:"property"}},{name:"name",isAttr:!0,type:"String"},{name:"typeRef",isAttr:!0,type:"String"}]},{name:"UnaryTests",superClass:["Expression"],properties:[{name:"text",type:"String"},{name:"expressionLanguage",type:"String",isAttr:!0}]},{name:"NamedElement",isAbstract:!0,superClass:["DMNElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ImportedValues",superClass:["Import"],properties:[{name:"importedElement",type:"String"},{name:"expressionLanguage",type:"String",isAttr:!0}]},{name:"DecisionService",superClass:["Invocable"],properties:[{name:"outputDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"encapsulatedDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"inputDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"inputData",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"ExtensionElements",properties:[{name:"values",type:"Element",isMany:!0}]},{name:"ExtensionAttribute",properties:[{name:"value",type:"Element"},{name:"valueRef",type:"Element",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Element",isAbstract:!0,properties:[{name:"extensionAttribute",type:"ExtensionAttribute",isAttr:!0,isReference:!0},{name:"elements",type:"ExtensionElements",isAttr:!0,isReference:!0}]},{name:"Artifact",isAbstract:!0,superClass:["DMNElement"],properties:[]},{name:"Association",superClass:["Artifact"],properties:[{name:"sourceRef",type:"DMNElementReference",xml:{serialize:"property"}},{name:"targetRef",type:"DMNElementReference",xml:{serialize:"property"}},{name:"associationDirection",type:"AssociationDirection",isAttr:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",isAttr:!0,type:"String",default:"text/plain"}]},{name:"RuleAnnotationClause",properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"RuleAnnotation",properties:[{name:"text",type:"String"}]},{name:"Invocable",isAbstract:!0,superClass:["DRGElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}}]},{name:"Group",superClass:["Artifact"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"FunctionItem",superClass:["DMNElement"],properties:[{name:"parameters",isMany:!0,type:"InformationItem",xml:{serialize:"property"}},{name:"outputTypeRef",isAttr:!0,type:"String"}]},{name:"DMNElementReference",properties:[{isAttr:!0,name:"href",type:"String"}]}],B1=[{name:"HitPolicy",literalValues:[{name:"UNIQUE"},{name:"FIRST"},{name:"PRIORITY"},{name:"ANY"},{name:"COLLECT"},{name:"RULE ORDER"},{name:"OUTPUT ORDER"}]},{name:"BuiltinAggregator",literalValues:[{name:"SUM"},{name:"COUNT"},{name:"MIN"},{name:"MAX"}]},{name:"DecisionTableOrientation",literalValues:[{name:"Rule-as-Row"},{name:"Rule-as-Column"},{name:"CrossTable"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"FunctionKind",literalValues:[{name:"FEEL"},{name:"Java"},{name:"PMML"}]}],I1=[],$1={tagAlias:"lowerCase"},L1={name:M1,prefix:R1,uri:P1,types:D1,enumerations:B1,associations:I1,xml:$1},N1="DMNDI",q1="dmndi",F1="https://www.omg.org/spec/DMN/20191111/DMNDI/",j1=[{name:"DMNDI",properties:[{name:"diagrams",type:"DMNDiagram",isMany:!0},{name:"styles",type:"DMNStyle",isMany:!0}]},{name:"DMNStyle",superClass:["di:Style"],properties:[{name:"fillColor",type:"dc:Color",isAttr:!0},{name:"strokeColor",type:"dc:Color",isAttr:!0},{name:"fontColor",type:"dc:Color",isAttr:!0},{name:"fontSize",isAttr:!0,type:"Real"},{name:"fontFamily",isAttr:!0,type:"String"},{name:"fontItalic",isAttr:!0,type:"Boolean"},{name:"fontBold",isAttr:!0,type:"Boolean"},{name:"fontUnderline",isAttr:!0,type:"Boolean"},{name:"fontStrikeThrough",isAttr:!0,type:"Boolean"},{name:"labelHorizontalAlignment",type:"dc:AlignmentKind",isAttr:!0},{name:"labelVerticalAlignment",type:"dc:AlignmentKind",isAttr:!0}]},{name:"DMNDiagram",superClass:["di:Diagram"],properties:[{name:"dmnElementRef",type:"dmn:DMNElement",isAttr:!0,isReference:!0},{name:"size",type:"Size"},{name:"localStyle",type:"DMNStyle",isVirtual:!0},{name:"sharedStyle",type:"DMNStyle",isVirtual:!0,isReference:!0,redefines:"di:DiagramElement#sharedStyle"},{name:"diagramElements",type:"DMNDiagramElement",isMany:!0}]},{name:"DMNDiagramElement",isAbstract:!0,superClass:["di:DiagramElement"],properties:[{name:"dmnElementRef",type:"dmn:DMNElement",isAttr:!0,isReference:!0},{name:"sharedStyle",type:"DMNStyle",isVirtual:!0,isReference:!0,redefines:"di:DiagramElement#sharedStyle"},{name:"localStyle",type:"DMNStyle",isVirtual:!0},{name:"label",type:"DMNLabel"}]},{name:"DMNLabel",superClass:["di:Shape"],properties:[{name:"text",type:"Text"}]},{name:"DMNShape",superClass:["di:Shape","DMNDiagramElement"],properties:[{name:"isListedInputData",isAttr:!0,type:"Boolean"},{name:"decisionServiceDividerLine",type:"DMNDecisionServiceDividerLine"},{name:"isCollapsed",isAttr:!0,type:"Boolean"}]},{name:"DMNEdge",superClass:["di:Edge","DMNDiagramElement"],properties:[{name:"sourceElement",type:"DMNDiagramElement",isAttr:!0,isReference:!0},{name:"targetElement",type:"DMNDiagramElement",isAttr:!0,isReference:!0}]},{name:"DMNDecisionServiceDividerLine",superClass:["di:Edge"]},{name:"Text",properties:[{name:"text",isBody:!0,type:"String"}]},{name:"Size",superClass:["dc:Dimension"]}],V1=[],Q1=[],z1={name:N1,prefix:q1,uri:F1,types:j1,associations:V1,enumerations:Q1},W1="bpmn.io DI for DMN",H1="http://bpmn.io/schema/dmn/biodi/2.0",X1="biodi",U1={tagAlias:"lowerCase"},Y1=[{name:"DecisionTable",isAbstract:!0,extends:["dmn:DecisionTable"],properties:[{name:"annotationsWidth",isAttr:!0,type:"Integer"}]},{name:"OutputClause",isAbstract:!0,extends:["dmn:OutputClause"],properties:[{name:"width",isAttr:!0,type:"Integer"}]},{name:"InputClause",isAbstract:!0,extends:["dmn:InputClause"],properties:[{name:"width",isAttr:!0,type:"Integer"}]}],K1={name:W1,uri:H1,prefix:X1,xml:U1,types:Y1},G1={dc:w1,di:T1,dmn:L1,dmndi:z1,biodi:K1};function hp(n,e){var t=D({},G1,n);return new xa(t,e)}var Oe={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};Oe.td=Oe.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];Oe.option=Oe.optgroup=[1,'<select multiple="multiple">',"</select>"];Oe.thead=Oe.tbody=Oe.colgroup=Oe.caption=Oe.tfoot=[1,"<table>","</table>"];Oe.polyline=Oe.ellipse=Oe.polygon=Oe.circle=Oe.text=Oe.line=Oe.path=Oe.rect=Oe.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function le(n,e=globalThis.document){var c;if(typeof n!="string")throw new TypeError("String expected");let t=/^<!--(.*?)-->$/s.exec(n);if(t)return e.createComment(t[1]);let i=(c=/<([\w:]+)/.exec(n))==null?void 0:c[1];if(!i)return e.createTextNode(n);if(n=n.trim(),i==="body"){let u=e.createElement("html");u.innerHTML=n;let{lastChild:f}=u;return f.remove(),f}let[r,s,o]=Object.hasOwn(Oe,i)?Oe[i]:Oe._default,a=e.createElement("div");for(a.innerHTML=s+n+o;r--;)a=a.lastChild;if(a.firstChild===a.lastChild){let{firstChild:u}=a;return u.remove(),u}let l=e.createDocumentFragment();return l.append(...a.childNodes),l}function J1(n,e){return e.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(i){if(i!=="default"&&!(i in n)){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}})}),Object.freeze(n)}function yi(n,...e){let t=n.style;return B(e,function(i){i&&B(i,function(r,s){t[s]=r})}),n}function tr(n,e,t){return arguments.length==2?n.getAttribute(e):t===null?n.removeAttribute(e):(n.setAttribute(e,t),n)}var Z1=Object.prototype.toString;function vi(n){return new Hn(n)}function Hn(n){if(!n||!n.nodeType)throw new Error("A DOM element reference is required");this.el=n,this.list=n.classList}Hn.prototype.add=function(n){return this.list.add(n),this};Hn.prototype.remove=function(n){return Z1.call(n)=="[object RegExp]"?this.removeMatching(n):(this.list.remove(n),this)};Hn.prototype.removeMatching=function(n){let e=this.array();for(let t=0;t<e.length;t++)n.test(e[t])&&this.remove(e[t]);return this};Hn.prototype.toggle=function(n,e){return typeof e!="undefined"?e!==this.list.toggle(n,e)&&this.list.toggle(n):this.list.toggle(n),this};Hn.prototype.array=function(){return Array.from(this.list)};Hn.prototype.has=Hn.prototype.contains=function(n){return this.list.contains(n)};function wa(n){for(var e;e=n.firstChild;)n.removeChild(e);return n}function ew(n,e,t){var i=t?n:n.parentNode;return i&&typeof i.closest=="function"&&i.closest(e)||null}function tw(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ba={},dp;function nw(){if(dp)return ba;dp=1;var n,e,t;function i(){n=window.addEventListener?"addEventListener":"attachEvent",e=window.removeEventListener?"removeEventListener":"detachEvent",t=n!=="addEventListener"?"on":""}return ba.bind=function(r,s,o,a){return n||i(),r[n](t+s,o,a||!1),o},ba.unbind=function(r,s,o,a){return e||i(),r[e](t+s,o,a||!1),o},ba}var pp=nw(),iw=tw(pp),Oa=J1({__proto__:null,default:iw},[pp]),mp=["focus","blur"];function rw(n,e,t,i,r){return mp.indexOf(t)!==-1&&(r=!0),Oa.bind(n,t,function(s){var o=s.target||s.srcElement;s.delegateTarget=ew(o,e,!0),s.delegateTarget&&i.call(n,s)},r)}function sw(n,e,t,i){return mp.indexOf(e)!==-1&&(i=!0),Oa.unbind(n,e,t,i)}var On={bind:rw,unbind:sw};function jt(n,e){return e=e||document,e.querySelector(n)}function gp(n,e){return e=e||document,e.querySelectorAll(n)}function $e(n){n.parentNode&&n.parentNode.removeChild(n)}function nr(n){return function(){if(!window.Promise)throw new Error("Promises is not supported in this environment. Please polyfill Promise.");var e=arguments.length;if(e>=1&&Ie(arguments[e-1])){var t=arguments[e-1];console.warn(new Error("Passing callbacks to "+ow(n.name)+" is deprecated and will be removed in a future major release. Please switch to promises: https://bpmn.io/l/moving-to-promises.html"));var i=Array.prototype.slice.call(arguments,0,-1);n.apply(this,i).then(function(r){var s=Object.keys(r)[0];return t(null,r[s])},function(r){return t(r,r.warnings)})}else return n.apply(this,arguments)}}function ow(n){return n.replace("bound ","")}var aw={width:"100%",height:"100%",position:"relative"},Rs=class{constructor(e={}){$(this,"_viewsChanged",()=>{this._emit("views.changed",{views:this._views,activeView:this._activeView})});this._eventBus=new ye,this._viewsChanged=Gi(this._viewsChanged,0),this._views=[],this._viewers={},this.open=nr(this.open.bind(this)),this.importXML=nr(this.importXML.bind(this)),this.saveXML=nr(this.saveXML.bind(this)),this._init(e)}importXML(e,t){var i=this;return t=t||{open:!0},new Promise(function(s,o){var a=i._activeView;i._clear().then(()=>{e=i._emit("import.parse.start",{xml:e})||e;var l;i._moddle.fromXML(e,"dmn:Definitions").then(c=>{var u=c.rootElement,f=c.references,h=c.elementsById;if(l=c.warnings,u=i._emit("import.parse.complete",r({error:null,definitions:u,elementsById:h,references:f,warnings:l}))||u,i._setDefinitions(u),!t.open){i._emit("import.done",{error:null,warnings:l}),s({warnings:l});return}var d=i._getInitialView(i._views,a);if(!d){var p=new Error("no displayable contents");return i._emit("import.done",{error:p,warnings:l}),p.warnings=l,o(p)}i.open(d).then(m=>({warnings:m.warnings})).catch(m=>({error:m,warnings:m.warnings})).then(m=>{var y=[].concat(l,m.warnings);i._emit("import.done",{error:m.error,warnings:y}),m.error?(m.error.warnings=y,o(m.error)):s({warnings:y})})}).catch(c=>(l=c.warnings,c=lw(c,e)||cw(c)||c,i._emit("import.parse.complete",r({error:c,warnings:l})),i._emit("import.done",{error:c,warnings:l}),c.warnings=l,o(c)))}).catch(l=>(i._emit("import.done",{error:l,warnings:[]}),l.warnings=[],o(l)))});function r(s){var o=i._eventBus.createEvent(s);return Object.defineProperty(o,"context",{enumerable:!0,get:function(){return console.warn(new Error("import.parse.complete <context> is deprecated and will be removed in future library versions")),{warnings:s.warnings,references:s.references,elementsById:s.elementsById}}}),o}}getDefinitions(){return this._definitions}getActiveView(){return this._activeView}getActiveViewer(){var e=this.getActiveView();return e&&this._getViewer(e)}getView(e){return this._views.filter(function(t){return t.element===e})[0]}getViews(){return this._views}saveXML(e){var t=this;e=e||{};var i=this._definitions;return new Promise(function(r,s){if(!i){s(new Error("no definitions loaded"));return}i=t._emit("saveXML.start",{definitions:i})||i,t._moddle.toXML(i,e).then(function(o){var a=o.xml;return a=t._emit("saveXML.serialized",{xml:a})||a,{xml:a}}).catch(o=>({error:o})).then(o=>{t._emit("saveXML.done",o),o.error?s(o.error):r({xml:o.xml})})})}on(...e){this._eventBus.on(...e)}off(...e){this._eventBus.off(...e)}once(...e){this._eventBus.once(...e)}attachTo(e){e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=jt(e)),e.appendChild(this._container),this._emit("attach",{})}detach(){this._emit("detach",{}),$e(this._container)}destroy(){Object.keys(this._viewers).forEach(e=>{var t=this._viewers[e];xp(t,"destroy")}),$e(this._container)}_init(e){this._options=e,this._moddle=this._createModdle(e),this._viewers={},this._views=[];let t=le('<div class="dmn-js-parent"></div>'),i=D({},aw,e);D(t.style,{width:yp(i.width),height:yp(i.height),position:i.position}),this._container=t,e.container&&this.attachTo(e.container)}_clear(){return this._switchView(null)}open(e){return this._switchView(e)}_setDefinitions(e){this._definitions=e,this._updateViews()}_updateViews(){var e=this._definitions;if(!e){this._views=[],this._switchView(null);return}var t=this._getViewProviders(),i=[e,...e.drgElement||[]],r=this._views,s=[];for(var o of i){var a=we(t,function(d){return typeof d.opens=="string"?d.opens===o.$type:d.opens(o)});if(a){var l={element:o,id:o.id,name:o.name,type:a.id};s.push(l)}}var c=this._activeView,u;if(c&&(u=we(s,function(d){return ka(c,d)})||this._getInitialView(s),!u)){this._switchView(null);return}var f=!ka(c,u)||vp(c,u),h=r.length!==s.length||!Es(s,function(d){return we(r,function(p){return ka(p,d)&&!vp(p,d)})});this._activeView=u,this._views=s,(f||h)&&this._viewsChanged()}_getInitialView(e,t){var i;return t&&(i=we(e,function(r){return ka(r,t)})||we(e,function(r){return r.type===t})),i||e[0]}_switchView(e){var t=this;return new Promise(function(i,r){var s=(u,f)=>{t._viewsChanged(),u?r(u):i(f)},o=t.getActiveView(),a,l=e&&t._getViewer(e),c=e&&e.element;if(o&&(a=t._getViewer(o),a!==l&&(xp(a,"clear"),a.detach())),t._activeView=e,l){a!==l&&l.attachTo(t._container),t._emit("import.render.start",{view:e,element:c}),l.open(c).then(u=>{t._emit("import.render.complete",{view:e,error:null,warnings:u.warnings}),s(null,u)}).catch(u=>{t._emit("import.render.complete",{view:e,error:u,warnings:u.warnings}),s(u,null)});return}s()})}_getViewer(e){var t=e.type,i=this._viewers[t];return i||(i=this._viewers[t]=this._createViewer(e.type),this._emit("viewer.created",{type:t,viewer:i})),i}_createViewer(e){var t=we(this._getViewProviders(),function(o){return o.id===e});if(!t)throw new Error("no provider for view type <"+e+">");var i=t.constructor,r=this._options[e]||{},s=this._options.common||{};return new i({...s,...r,additionalModules:[...r.additionalModules||[],{_parent:["value",this],moddle:["value",this._moddle]}]})}_emit(...e){return this._eventBus.fire(...e)}_createModdle(e){return new hp(e.moddleExtensions)}_getViewProviders(){return[]}};function yp(n){return n+(Ce(n)?"px":"")}function lw(n,e){if(n.message!=="failed to parse document as <dmn:Definitions>")return null;var t=e.indexOf('"http://www.omg.org/spec/DMN/20151101/dmn.xsd"')!==-1&&"1.1"||e.indexOf('"http://www.omg.org/spec/DMN/20180521/MODEL/"')!==-1&&"1.2";return t?(n=new Error("unsupported DMN "+t+" file detected; only DMN 1.3 files can be opened"),console.error("Cannot open what looks like a DMN "+t+" diagram. Please refer to https://bpmn.io/l/dmn-compatibility.html to learn how to make the toolkit compatible with older DMN files",n),n):null}function cw(n){var e=/unparsable content <([^>]+)> detected([\s\S]*)$/,t=e.exec(n.message);return t?(n.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid DMN 1.3 diagram file"+t[2],n):null}function ka(n,e){return ht(n)?ht(e)?n.element===e.element||n.id===e.id:!1:!ht(e)}function vp(n,e){return!n||!e||n.name!==e.name}function xp(n,e){Ie(n[e])&&n[e]()}var uw=/^class[ {]/;function fw(n){return uw.test(n.toString())}function qc(n){return Array.isArray(n)}function Nc(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Ca(...n){n.length===1&&qc(n[0])&&(n=n[0]),n=[...n];let e=n.pop();return e.$inject=n,e}var hw=/constructor\s*[^(]*\(\s*([^)]*)\)/m,dw=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,pw=/\/\*([^*]*)\*\//m;function mw(n){if(typeof n!="function")throw new Error(`Cannot annotate "${n}". Expected a function!`);let e=n.toString().match(fw(n)?hw:dw);if(!e)return[];let t=e[1]||e[2];return t&&t.split(",").map(i=>{let r=i.match(pw);return(r&&r[1]||i).trim()})||[]}function xi(n,e){let t=e||{get:function(x,b){if(i.push(x),b===!1)return null;throw a(`No provider for "${x}"!`)}},i=[],r=this._providers=Object.create(t._providers||null),s=this._instances=Object.create(null),o=s.injector=this,a=function(x){let b=i.join(" -> ");return i.length=0,new Error(b?`${x} (Resolving: ${b})`:x)};function l(x,b){if(!r[x]&&x.includes(".")){let C=x.split("."),k=l(C.shift());for(;C.length;)k=k[C.shift()];return k}if(Nc(s,x))return s[x];if(Nc(r,x)){if(i.indexOf(x)!==-1)throw i.push(x),a("Cannot resolve circular dependency!");return i.push(x),s[x]=r[x][0](r[x][1]),i.pop(),s[x]}return t.get(x,b)}function c(x,b){if(typeof b=="undefined"&&(b={}),typeof x!="function")if(qc(x))x=Ca(x.slice());else throw a(`Cannot invoke "${x}". Expected a function!`);let k=(x.$inject||mw(x)).map(O=>Nc(b,O)?b[O]:l(O));return{fn:x,dependencies:k}}function u(x){let{fn:b,dependencies:C}=c(x),k=Function.prototype.bind.call(b,null,...C);return new k}function f(x,b,C){let{fn:k,dependencies:O}=c(x,C);return k.apply(b,O)}function h(x){return Ca(b=>x.get(b))}function d(x,b){if(b&&b.length){let C=Object.create(null),k=Object.create(null),O=[],v=[],A=[],S,M,_,P;for(let j in r)S=r[j],b.indexOf(j)!==-1&&(S[2]==="private"?(M=O.indexOf(S[3]),M===-1?(_=S[3].createChild([],b),P=h(_),O.push(S[3]),v.push(_),A.push(P),C[j]=[P,j,"private",_]):C[j]=[A[M],j,"private",v[M]]):C[j]=[S[2],S[1]],k[j]=!0),(S[2]==="factory"||S[2]==="type")&&S[1].$scope&&b.forEach(oe=>{S[1].$scope.indexOf(oe)!==-1&&(C[j]=[S[2],S[1]],k[oe]=!0)});b.forEach(j=>{if(!k[j])throw new Error('No provider for "'+j+'". Cannot use provider from the parent!')}),x.unshift(C)}return new xi(x,o)}let p={factory:f,type:u,value:function(x){return x}};function m(x,b){let C=x.__init__||[];return function(){C.forEach(k=>{typeof k=="string"?b.get(k):b.invoke(k)})}}function y(x){let b=x.__exports__;if(b){let C=x.__modules__,k=Object.keys(x).reduce((M,_)=>(_!=="__exports__"&&_!=="__modules__"&&_!=="__init__"&&_!=="__depends__"&&(M[_]=x[_]),M),Object.create(null)),O=(C||[]).concat(k),v=d(O),A=Ca(function(M){return v.get(M)});b.forEach(function(M){r[M]=[A,M,"private",v]});let S=(x.__init__||[]).slice();return S.unshift(function(){v.init()}),x=Object.assign({},x,{__init__:S}),m(x,v)}return Object.keys(x).forEach(function(C){if(C==="__init__"||C==="__depends__")return;let k=x[C];if(k[2]==="private"){r[C]=k;return}let O=k[0],v=k[1];r[C]=[p[O],gw(O,v),O]}),m(x,o)}function g(x,b){return x.indexOf(b)!==-1||(x=(b.__depends__||[]).reduce(g,x),x.indexOf(b)!==-1)?x:x.concat(b)}function w(x){let b=x.reduce(g,[]).map(y),C=!1;return function(){C||(C=!0,b.forEach(k=>k()))}}this.get=l,this.invoke=f,this.instantiate=u,this.createChild=d,this.init=w(n)}function gw(n,e){return n!=="value"&&qc(e)&&(e=Ca(e.slice())),e}function Vt(n,e){e&&(n.super_=e,n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}var yw=1e3;function it(n,e){var t=this;e=e||yw,n.on(["render.shape","render.connection"],e,function(i,r){var s=i.type,o=r.element,a=r.gfx,l=r.attrs;if(t.canRender(o))return s==="render.shape"?t.drawShape(a,o,l):t.drawConnection(a,o,l)}),n.on(["render.getShapePath","render.getConnectionPath"],e,function(i,r){if(t.canRender(r))return i.type==="render.getShapePath"?t.getShapePath(r):t.getConnectionPath(r)})}it.prototype.canRender=function(n){};it.prototype.drawShape=function(n,e){};it.prototype.drawConnection=function(n,e){};it.prototype.getShapePath=function(n){};it.prototype.getConnectionPath=function(n){};function vw(n,e){if(n.ownerDocument!==e.ownerDocument)try{return e.ownerDocument.importNode(n,!0)}catch{}return n}function kp(n,e){return e.appendChild(vw(n,e))}function ve(n,e){return kp(e,n),n}var Vc=2,Cp={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":Vc,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":Vc,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function xw(n,e){return Cp[e]?n.style[e]:n.getAttributeNS(null,e)}function Sp(n,e,t){var i=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=Cp[i];r?(r===Vc&&typeof t=="number"&&(t=String(t)+"px"),n.style[i]=t):n.setAttributeNS(null,e,t)}function bw(n,e){var t=Object.keys(e),i,r;for(i=0,r;r=t[i];i++)Sp(n,r,e[r])}function K(n,e,t){if(typeof e=="string")if(t!==void 0)Sp(n,e,t);else return xw(n,e);else bw(n,e);return n}var ww=Object.prototype.toString;function Qt(n){return new Xn(n)}function Xn(n){if(!n||!n.nodeType)throw new Error("A DOM element reference is required");this.el=n,this.list=n.classList}Xn.prototype.add=function(n){return this.list.add(n),this};Xn.prototype.remove=function(n){return ww.call(n)=="[object RegExp]"?this.removeMatching(n):(this.list.remove(n),this)};Xn.prototype.removeMatching=function(n){let e=this.array();for(let t=0;t<e.length;t++)n.test(e[t])&&this.remove(e[t]);return this};Xn.prototype.toggle=function(n,e){return typeof e!="undefined"?e!==this.list.toggle(n,e)&&this.list.toggle(n):this.list.toggle(n),this};Xn.prototype.array=function(){return Array.from(this.list)};Xn.prototype.has=Xn.prototype.contains=function(n){return this.list.contains(n)};function Ow(n){for(var e;e=n.firstChild;)n.removeChild(e);return n}var zc={svg:"http://www.w3.org/2000/svg"},bp='<svg xmlns="'+zc.svg+'"';function Ep(n){var e=!1;n.substring(0,4)==="<svg"?n.indexOf(zc.svg)===-1&&(n=bp+n.substring(4)):(n=bp+">"+n+"</svg>",e=!0);var t=kw(n);if(!e)return t;for(var i=document.createDocumentFragment(),r=t.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function kw(n){var e;return e=new DOMParser,e.async=!1,e.parseFromString(n,"text/xml")}function ie(n,e){var t;return n=n.trim(),n.charAt(0)==="<"?(t=Ep(n).firstChild,t=document.importNode(t,!0)):t=document.createElementNS(zc.svg,n),e&&K(t,e),t}var Fc=null;function Qc(){return Fc===null&&(Fc=ie("svg")),Fc}function wp(n,e){var t,i,r=Object.keys(e);for(t=0;i=r[t];t++)n[i]=e[i];return n}function Ap(n,e,t,i,r,s){var o=Qc().createSVGMatrix();switch(arguments.length){case 0:return o;case 1:return wp(o,n);case 6:return wp(o,{a:n,b:e,c:t,d:i,e:r,f:s})}}function _p(n){return n?Qc().createSVGTransformFromMatrix(n):Qc().createSVGTransform()}var Op=/([&<>]{1})/g,Cw=/([&<>\n\r"]{1})/g,Sw={"&":"&","<":"<",">":">",'"':"'"};function jc(n,e){function t(i,r){return Sw[r]||r}return n.replace(e,t)}function Tp(n,e){var t,i,r,s,o;switch(n.nodeType){case 3:e.push(jc(n.textContent,Op));break;case 1:if(e.push("<",n.tagName),n.hasAttributes())for(r=n.attributes,t=0,i=r.length;t<i;++t)s=r.item(t),e.push(" ",s.name,'="',jc(s.value,Cw),'"');if(n.hasChildNodes()){for(e.push(">"),o=n.childNodes,t=0,i=o.length;t<i;++t)Tp(o.item(t),e);e.push("</",n.tagName,">")}else e.push("/>");break;case 8:e.push("<!--",jc(n.nodeValue,Op),"-->");break;case 4:e.push("<![CDATA[",n.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+n.nodeType)}return e}function Ew(n,e){var t=Ep(e);if(Ow(n),!!e){_w(t)||(t=t.documentElement);for(var i=Tw(t.childNodes),r=0;r<i.length;r++)kp(i[r],n)}}function Aw(n){for(var e=n.firstChild,t=[];e;)Tp(e,t),e=e.nextSibling;return t.join("")}function _w(n){return n.nodeName==="#document-fragment"}function Mp(n,e){if(e!==void 0){try{Ew(n,e)}catch(t){throw new Error("error parsing SVG: "+t.message)}return n}else return Aw(n)}function Tw(n){return Array.prototype.slice.call(n)}function bi(n){var e=n.parentNode;return e&&e.removeChild(n),n}function Mw(n,e){return e instanceof SVGMatrix?n.createSVGTransformFromMatrix(e):e}function Rw(n,e){var t,i;for(n.clear(),t=0;i=e[t];t++)n.appendItem(Mw(n,i))}function Ps(n,e){var t=n.transform.baseVal;return e&&(Array.isArray(e)||(e=[e]),Rw(t,e)),t.consolidate()}function Ea(n){return n.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function Pw(n){return["M",n.x,n.y]}function Wc(n){return["L",n.x,n.y]}function Dw(n,e,t){return["C",n.x,n.y,e.x,e.y,t.x,t.y]}function Bw(n,e){let t=n.length,i=[Pw(n[0])];for(let r=1;r<t;r++){let s=n[r-1],o=n[r],a=n[r+1];if(!a||!e){i.push(Wc(o));continue}let l=Math.min(e,Hc(o.x-s.x,o.y-s.y),Hc(a.x-o.x,a.y-o.y));if(!l){i.push(Wc(o));continue}let c=Sa(o,s,l),u=Sa(o,s,l*.5),f=Sa(o,a,l),h=Sa(o,a,l*.5);i.push(Wc(c)),i.push(Dw(u,h,f))}return i}function Sa(n,e,t){let i=e.x-n.x,r=e.y-n.y,s=Hc(i,r),o=t/s;return{x:n.x+i*o,y:n.y+r*o}}function Hc(n,e){return Math.sqrt(Math.pow(n,2)+Math.pow(e,2))}function ir(n,e,t){Ce(e)&&(t=e,e=null),e||(e={});let i=ie("path",e);return Ce(t)&&(i.dataset.cornerRadius=String(t)),Xc(i,n)}function Xc(n,e){let t=parseInt(n.dataset.cornerRadius,10)||0;return K(n,{d:Ea(Bw(e,t))}),n}function wi(n,e){e=!!e,_e(n)||(n=[n]);var t,i,r,s;return B(n,function(o){var a=o;o.waypoints&&!e&&(a=wi(o.waypoints,!0));var l=a.x,c=a.y,u=a.height||0,f=a.width||0;(l<t||t===void 0)&&(t=l),(c<i||i===void 0)&&(i=c),(l+f>r||r===void 0)&&(r=l+f),(c+u>s||s===void 0)&&(s=c+u)}),{x:t,y:i,height:s-i,width:r-t}}function Rp(n){return"waypoints"in n?"connection":"x"in n?"shape":"root"}function Aa(n){return!!(n&&n.isFrame)}var Iw=1;function rn(n,e){it.call(this,n,Iw),this.CONNECTION_STYLE=e.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=e.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=e.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}Vt(rn,it);rn.prototype.canRender=function(){return!0};rn.prototype.drawShape=function(e,t,i){var r=ie("rect");return K(r,{x:0,y:0,width:t.width||0,height:t.height||0}),Aa(t)?K(r,D({},this.FRAME_STYLE,i||{})):K(r,D({},this.SHAPE_STYLE,i||{})),ve(e,r),r};rn.prototype.drawConnection=function(e,t,i){var r=ir(t.waypoints,D({},this.CONNECTION_STYLE,i||{}));return ve(e,r),r};rn.prototype.getShapePath=function(e){var t=e.x,i=e.y,r=e.width,s=e.height,o=[["M",t,i],["l",r,0],["l",0,s],["l",-r,0],["z"]];return Ea(o)};rn.prototype.getConnectionPath=function(e){var t=e.waypoints,i,r,s=[];for(i=0;r=t[i];i++)r=r.original||r,s.push([i===0?"M":"L",r.x,r.y]);return Ea(s)};rn.$inject=["eventBus","styles"];function Uc(){var n={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},e=this;this.cls=function(t,i,r){var s=this.style(i,r);return D(s,{class:t})},this.style=function(t,i){!_e(t)&&!i&&(i=t,t=[]);var r=wt(t,function(s,o){return D(s,n[o]||{})},{});return i?D(r,i):r},this.computeStyle=function(t,i,r){return _e(i)||(r=i,i=[]),e.style(i||[],D({},r,t||{}))}}var Pp={__init__:["defaultRenderer"],defaultRenderer:["type",rn],styles:["type",Uc]};function Dp(n,e){if(!n||!e)return-1;var t=n.indexOf(e);return t!==-1&&n.splice(t,1),t}function Bp(n,e,t){if(!(!n||!e)){typeof t!="number"&&(t=-1);var i=n.indexOf(e);if(i!==-1){if(i===t)return;if(t!==-1)n.splice(i,1);else return}t!==-1?n.splice(t,0,e):n.push(e)}}var Ds=Math,wR=Ds.PI,OR=Ds.min,kR=Ds.max,CR=Ds.pow,SR=Ds.abs;function Yc(n){return{top:n.y,right:n.x+(n.width||0),bottom:n.y+(n.height||0),left:n.x}}function _a(n,e){return Math.round(n*e)/e}function Ip(n){return Ce(n)?n+"px":n}function $w(n){for(;n.parent;)n=n.parent;return n}function Lw(n){n=D({},{width:"100%",height:"100%"},n);let e=n.container||document.body,t=document.createElement("div");return t.setAttribute("class","djs-container djs-parent"),yi(t,{position:"relative",overflow:"hidden",width:Ip(n.width),height:Ip(n.height)}),e.appendChild(t),t}function $p(n,e,t){let i=ie("g");Qt(i).add(e);let r=t!==void 0?t:n.childNodes.length-1;return n.insertBefore(i,n.childNodes[r]||null),i}var Nw="base",Lp=0,qw=1,Fw={shape:["x","y","width","height"],connection:["waypoints"]};function V(n,e,t,i){this._eventBus=e,this._elementRegistry=i,this._graphicsFactory=t,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(n||{})}V.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"];V.prototype._init=function(n){let e=this._eventBus,t=this._container=Lw(n),i=this._svg=ie("svg");K(i,{width:"100%",height:"100%"}),tr(i,"tabindex",0),n.autoFocus&&e.on("element.hover",()=>{this.restoreFocus()}),e.on("element.mousedown",500,s=>{this.focus()}),i.addEventListener("focusin",()=>{this._setFocused(!0)}),i.addEventListener("focusout",()=>{this._setFocused(!1)}),i.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),i.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),ve(t,i);let r=this._viewport=$p(i,"viewport");n.deferUpdate&&(this._viewboxChanged=Gi(Ft(this._viewboxChanged,this),300)),e.on("diagram.init",()=>{e.fire("canvas.init",{svg:i,viewport:r})}),e.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],()=>{delete this._cachedViewbox}),e.on("diagram.destroy",500,this._destroy,this),e.on("diagram.clear",500,this._clear,this)};V.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});let n=this._container.parentNode;n&&n.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport};V.prototype._setFocused=function(n){n!=this._focused&&(this._focused=n,this._eventBus.fire("canvas.focus.changed",{focused:n}))};V.prototype._clear=function(){this._elementRegistry.getAll().forEach(e=>{let t=Rp(e);t==="root"?this.removeRootElement(e):this._removeElement(e,t)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox};V.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)};V.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()};V.prototype.isFocused=function(){return this._focused};V.prototype.getDefaultLayer=function(){return this.getLayer(Nw,Lp)};V.prototype.getLayer=function(n,e){if(!n)throw new Error("must specify a name");let t=this._layers[n];if(t||(t=this._layers[n]=this._createLayer(n,e)),typeof e!="undefined"&&t.index!==e)throw new Error("layer <"+n+"> already created at index <"+e+">");return t.group};V.prototype._getChildIndex=function(n){return wt(this._layers,function(e,t){return t.visible&&n>=t.index&&e++,e},0)};V.prototype._createLayer=function(n,e){typeof e=="undefined"&&(e=qw);let t=this._getChildIndex(e);return{group:$p(this._viewport,"layer-"+n,t),index:e,visible:!0}};V.prototype.showLayer=function(n){if(!n)throw new Error("must specify a name");let e=this._layers[n];if(!e)throw new Error("layer <"+n+"> does not exist");let t=this._viewport,i=e.group,r=e.index;if(e.visible)return i;let s=this._getChildIndex(r);return t.insertBefore(i,t.childNodes[s]||null),e.visible=!0,i};V.prototype.hideLayer=function(n){if(!n)throw new Error("must specify a name");let e=this._layers[n];if(!e)throw new Error("layer <"+n+"> does not exist");let t=e.group;return e.visible&&(bi(t),e.visible=!1),t};V.prototype._removeLayer=function(n){let e=this._layers[n];e&&(delete this._layers[n],bi(e.group))};V.prototype.getActiveLayer=function(){let n=this._findPlaneForRoot(this.getRootElement());return n?n.layer:null};V.prototype.findRoot=function(n){return typeof n=="string"&&(n=this._elementRegistry.get(n)),n?(this._findPlaneForRoot($w(n))||{}).rootElement:void 0};V.prototype.getRootElements=function(){return this._planes.map(function(n){return n.rootElement})};V.prototype._findPlaneForRoot=function(n){return we(this._planes,function(e){return e.rootElement===n})};V.prototype.getContainer=function(){return this._container};V.prototype._updateMarker=function(n,e,t){let i;n.id||(n=this._elementRegistry.get(n)),n.markers=n.markers||new Set,i=this._elementRegistry._elements[n.id],i&&(B([i.gfx,i.secondaryGfx],function(r){r&&(t?(n.markers.add(e),Qt(r).add(e)):(n.markers.delete(e),Qt(r).remove(e)))}),this._eventBus.fire("element.marker.update",{element:n,gfx:i.gfx,marker:e,add:!!t}))};V.prototype.addMarker=function(n,e){this._updateMarker(n,e,!0)};V.prototype.removeMarker=function(n,e){this._updateMarker(n,e,!1)};V.prototype.hasMarker=function(n,e){return n.id||(n=this._elementRegistry.get(n)),n.markers?n.markers.has(e):!1};V.prototype.toggleMarker=function(n,e){this.hasMarker(n,e)?this.removeMarker(n,e):this.addMarker(n,e)};V.prototype.getRootElement=function(){let n=this._rootElement;return n||this._planes.length?n:this.setRootElement(this.addRootElement(null))};V.prototype.addRootElement=function(n){let e=this._rootsIdx++;n||(n={id:"__implicitroot_"+e,children:[],isImplicit:!0});let t=n.layer="root-"+e;this._ensureValid("root",n);let i=this.getLayer(t,Lp);return this.hideLayer(t),this._addRoot(n,i),this._planes.push({rootElement:n,layer:i}),n};V.prototype.removeRootElement=function(n){if(typeof n=="string"&&(n=this._elementRegistry.get(n)),!!this._findPlaneForRoot(n))return this._removeRoot(n),this._removeLayer(n.layer),this._planes=this._planes.filter(function(t){return t.rootElement!==n}),this._rootElement===n&&(this._rootElement=null),n};V.prototype.setRootElement=function(n){if(n===this._rootElement)return n;let e;if(!n)throw new Error("rootElement required");return e=this._findPlaneForRoot(n),e||(n=this.addRootElement(n)),this._setRoot(n),n};V.prototype._removeRoot=function(n){let e=this._elementRegistry,t=this._eventBus;t.fire("root.remove",{element:n}),t.fire("root.removed",{element:n}),e.remove(n)};V.prototype._addRoot=function(n,e){let t=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:n}),t.add(n,e),i.fire("root.added",{element:n,gfx:e})};V.prototype._setRoot=function(n,e){let t=this._rootElement;t&&(this._elementRegistry.updateGraphics(t,null,!0),this.hideLayer(t.layer)),n&&(e||(e=this._findPlaneForRoot(n).layer),this._elementRegistry.updateGraphics(n,this._svg,!0),this.showLayer(n.layer)),this._rootElement=n,this._eventBus.fire("root.set",{element:n})};V.prototype._ensureValid=function(n,e){if(!e.id)throw new Error("element must have an id");if(this._elementRegistry.get(e.id))throw new Error("element <"+e.id+"> already exists");let t=Fw[n];if(!Es(t,function(r){return typeof e[r]!="undefined"}))throw new Error("must supply { "+t.join(", ")+" } with "+n)};V.prototype._setParent=function(n,e,t){Bp(e.children,n,t),n.parent=e};V.prototype._addElement=function(n,e,t,i){t=t||this.getRootElement();let r=this._eventBus,s=this._graphicsFactory;this._ensureValid(n,e),r.fire(n+".add",{element:e,parent:t}),this._setParent(e,t,i);let o=s.create(n,e,i);return this._elementRegistry.add(e,o),s.update(n,e,o),r.fire(n+".added",{element:e,gfx:o}),e};V.prototype.addShape=function(n,e,t){return this._addElement("shape",n,e,t)};V.prototype.addConnection=function(n,e,t){return this._addElement("connection",n,e,t)};V.prototype._removeElement=function(n,e){let t=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(n=t.get(n.id||n),!!n)return r.fire(e+".remove",{element:n}),i.remove(n),Dp(n.parent&&n.parent.children,n),n.parent=null,r.fire(e+".removed",{element:n}),t.remove(n),n};V.prototype.removeShape=function(n){return this._removeElement(n,"shape")};V.prototype.removeConnection=function(n){return this._removeElement(n,"connection")};V.prototype.getGraphics=function(n,e){return this._elementRegistry.getGraphics(n,e)};V.prototype._changeViewbox=function(n){this._eventBus.fire("canvas.viewbox.changing"),n.apply(this),this._cachedViewbox=null,this._viewboxChanged()};V.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})};V.prototype.viewbox=function(n){if(n===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);let e=this._viewport,t=this.getSize(),i,r,s,o,a,l,c;if(n)this._changeViewbox(function(){a=Math.min(t.width/n.width,t.height/n.height);let u=this._svg.createSVGMatrix().scale(a).translate(-n.x,-n.y);Ps(e,u)});else return s=this._rootElement?this.getActiveLayer():null,i=s&&s.getBBox()||{},o=Ps(e),r=o?o.matrix:Ap(),a=_a(r.a,1e3),l=_a(-r.e||0,1e3),c=_a(-r.f||0,1e3),n=this._cachedViewbox={x:l?l/a:0,y:c?c/a:0,width:t.width/a,height:t.height/a,scale:a,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:t},n;return n};V.prototype.scroll=function(n){let e=this._viewport,t=e.getCTM();return n&&this._changeViewbox(function(){n=D({dx:0,dy:0},n||{}),t=this._svg.createSVGMatrix().translate(n.dx,n.dy).multiply(t),Np(e,t)}),{x:t.e,y:t.f}};V.prototype.scrollToElement=function(n,e){let t=100;typeof n=="string"&&(n=this._elementRegistry.get(n));let i=this.findRoot(n);if(i!==this.getRootElement()&&this.setRootElement(i),i===n)return;e||(e={}),typeof e=="number"&&(t=e),e={top:e.top||t,right:e.right||t,bottom:e.bottom||t,left:e.left||t};let r=wi(n),s=Yc(r),o=this.viewbox(),a=this.zoom(),l,c;o.y+=e.top/a,o.x+=e.left/a,o.width-=(e.right+e.left)/a,o.height-=(e.bottom+e.top)/a;let u=Yc(o);if(!(r.width<o.width&&r.height<o.height))l=r.x-o.x,c=r.y-o.y;else{let h=Math.max(0,s.right-u.right),d=Math.min(0,s.left-u.left),p=Math.max(0,s.bottom-u.bottom),m=Math.min(0,s.top-u.top);l=h||d,c=p||m}this.scroll({dx:-l*a,dy:-c*a})};V.prototype.zoom=function(n,e){if(!n)return this.viewbox(n).scale;if(n==="fit-viewport")return this._fitViewport(e);let t,i;return this._changeViewbox(function(){typeof e!="object"&&(t=this.viewbox().outer,e={x:t.width/2,y:t.height/2}),i=this._setZoom(n,e)}),_a(i.a,1e3)};function Np(n,e){let t="matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")";n.setAttribute("transform",t)}V.prototype._fitViewport=function(n){let e=this.viewbox(),t=e.outer,i=e.inner,r,s;return i.x>=0&&i.y>=0&&i.x+i.width<=t.width&&i.y+i.height<=t.height&&!n?s={x:0,y:0,width:Math.max(i.width+i.x,t.width),height:Math.max(i.height+i.y,t.height)}:(r=Math.min(1,t.width/i.width,t.height/i.height),s={x:i.x+(n?i.width/2-t.width/r/2:0),y:i.y+(n?i.height/2-t.height/r/2:0),width:t.width/r,height:t.height/r}),this.viewbox(s),this.viewbox(!1).scale};V.prototype._setZoom=function(n,e){let t=this._svg,i=this._viewport,r=t.createSVGMatrix(),s=t.createSVGPoint(),o,a,l,c,u;l=i.getCTM();let f=l.a;return e?(o=D(s,e),a=o.matrixTransform(l.inverse()),c=r.translate(a.x,a.y).scale(1/f*n).translate(-a.x,-a.y),u=l.multiply(c)):u=r.scale(n),Np(this._viewport,u),u};V.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}};V.prototype.getAbsoluteBBox=function(n){let e=this.viewbox(),t;n.waypoints?t=this.getGraphics(n).getBBox():t=n;let i=t.x*e.scale-e.x*e.scale,r=t.y*e.scale-e.y*e.scale,s=t.width*e.scale,o=t.height*e.scale;return{x:i,y:r,width:s,height:o}};V.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var rr="data-element-id";function Xe(n){this._elements={},this._eventBus=n}Xe.$inject=["eventBus"];Xe.prototype.add=function(n,e,t){var i=n.id;this._validateId(i),K(e,rr,i),t&&K(t,rr,i),this._elements[i]={element:n,gfx:e,secondaryGfx:t}};Xe.prototype.remove=function(n){var e=this._elements,t=n.id||n,i=t&&e[t];i&&(K(i.gfx,rr,""),i.secondaryGfx&&K(i.secondaryGfx,rr,""),delete e[t])};Xe.prototype.updateId=function(n,e){this._validateId(e),typeof n=="string"&&(n=this.get(n)),this._eventBus.fire("element.updateId",{element:n,newId:e});var t=this.getGraphics(n),i=this.getGraphics(n,!0);this.remove(n),n.id=e,this.add(n,t,i)};Xe.prototype.updateGraphics=function(n,e,t){var i=n.id||n,r=this._elements[i];return t?r.secondaryGfx=e:r.gfx=e,e&&K(e,rr,i),e};Xe.prototype.get=function(n){var e;typeof n=="string"?e=n:e=n&&K(n,rr);var t=this._elements[e];return t&&t.element};Xe.prototype.filter=function(n){var e=[];return this.forEach(function(t,i){n(t,i)&&e.push(t)}),e};Xe.prototype.find=function(n){for(var e=this._elements,t=Object.keys(e),i=0;i<t.length;i++){var r=t[i],s=e[r],o=s.element,a=s.gfx;if(n(o,a))return o}};Xe.prototype.getAll=function(){return this.filter(function(n){return n})};Xe.prototype.forEach=function(n){var e=this._elements;Object.keys(e).forEach(function(t){var i=e[t],r=i.element,s=i.gfx;return n(r,s)})};Xe.prototype.getGraphics=function(n,e){var t=n.id||n,i=this._elements[t];return i&&(e?i.secondaryGfx:i.gfx)};Xe.prototype._validateId=function(n){if(!n)throw new Error("element must have an id");if(this._elements[n])throw new Error("element with id "+n+" already added")};function jw(n,e,t,i){var r=t.inverse;return Object.defineProperty(n,"remove",{value:function(s){var o=this.indexOf(s);return o!==-1&&(this.splice(o,1),e.unset(s,r,i)),s}}),Object.defineProperty(n,"contains",{value:function(s){return this.indexOf(s)!==-1}}),Object.defineProperty(n,"add",{value:function(s,o){var a=this.indexOf(s);if(typeof o=="undefined"){if(a!==-1)return;o=this.length}a!==-1&&this.splice(a,1),this.splice(o,0,s),a===-1&&e.set(s,r,i)}}),Object.defineProperty(n,"__refs_collection",{value:!0}),n}function Vw(n){return n.__refs_collection===!0}function Qw(n,e){return Object.prototype.hasOwnProperty.call(n,e.name||e)}function qp(n,e,t){var i=jw(t[e.name]||[],n,e,t);Object.defineProperty(t,e.name,{enumerable:e.enumerable,value:i}),i.length&&i.forEach(function(r){n.set(r,e.inverse,t)})}function zw(n,e,t){var i=e.inverse,r=t[e.name];Object.defineProperty(t,e.name,{configurable:e.configurable,enumerable:e.enumerable,get:function(){return r},set:function(s){if(s!==r){var o=r;r=null,o&&n.unset(o,i,t),r=s,n.set(r,i,t)}}})}function Ue(n,e){if(!(this instanceof Ue))return new Ue(n,e);n.inverse=e,e.inverse=n,this.props={},this.props[n.name]=n,this.props[e.name]=e}Ue.prototype.bind=function(n,e){if(typeof e=="string"){if(!this.props[e])throw new Error("no property <"+e+"> in ref");e=this.props[e]}e.collection?qp(this,e,n):zw(this,e,n)};Ue.prototype.ensureRefsCollection=function(n,e){var t=n[e.name];return Vw(t)||qp(this,e,n),t};Ue.prototype.ensureBound=function(n,e){Qw(n,e)||this.bind(n,e)};Ue.prototype.unset=function(n,e,t){n&&(this.ensureBound(n,e),e.collection?this.ensureRefsCollection(n,e).remove(t):n[e.name]=void 0)};Ue.prototype.set=function(n,e,t){n&&(this.ensureBound(n,e),e.collection?this.ensureRefsCollection(n,e).add(t):n[e.name]=t)};var Kc=new Ue({name:"children",enumerable:!0,collection:!0},{name:"parent"}),jp=new Ue({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Fp=new Ue({name:"attachers",collection:!0},{name:"host"}),Vp=new Ue({name:"outgoing",collection:!0},{name:"source"}),Qp=new Ue({name:"incoming",collection:!0},{name:"target"});function Bs(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(n){var e=this.label,t=this.labels;!n&&e?t.remove(e):t.add(n,0)}}),Kc.bind(this,"parent"),jp.bind(this,"labels"),Vp.bind(this,"outgoing"),Qp.bind(this,"incoming")}function Is(){Bs.call(this),Kc.bind(this,"children"),Fp.bind(this,"host"),Fp.bind(this,"attachers")}Vt(Is,Bs);function zp(){Bs.call(this),Kc.bind(this,"children")}Vt(zp,Is);function Wp(){Is.call(this),jp.bind(this,"labelTarget")}Vt(Wp,Is);function Hp(){Bs.call(this),Vp.bind(this,"source"),Qp.bind(this,"target")}Vt(Hp,Bs);var Ww={connection:Hp,shape:Is,label:Wp,root:zp};function Xp(n,e){var t=Ww[n];if(!t)throw new Error("unknown type: <"+n+">");return D(new t,e)}function Un(){this._uid=12}Un.prototype.createRoot=function(n){return this.create("root",n)};Un.prototype.createLabel=function(n){return this.create("label",n)};Un.prototype.createShape=function(n){return this.create("shape",n)};Un.prototype.createConnection=function(n){return this.create("connection",n)};Un.prototype.create=function(n,e){return e=D({},e||{}),e.id||(e.id=n+"_"+this._uid++),Xp(n,e)};function Up(n){return n.childNodes[0]}function Yp(n){return n.parentNode.childNodes[1]}function Kp(n,e,t){var i=_p();i.setTranslate(e,t),Ps(n,i)}function Ye(n,e){this._eventBus=n,this._elementRegistry=e}Ye.$inject=["eventBus","elementRegistry"];Ye.prototype._getChildrenContainer=function(n){var e=this._elementRegistry.getGraphics(n),t;return n.parent?(t=Yp(e),t||(t=ie("g"),Qt(t).add("djs-children"),ve(e.parentNode,t))):t=e,t};Ye.prototype._clear=function(n){var e=Up(n);return wa(e),e};Ye.prototype._createContainer=function(n,e,t,i){var r=ie("g");Qt(r).add("djs-group"),typeof t!="undefined"?Gp(r,e,e.childNodes[t]):ve(e,r);var s=ie("g");Qt(s).add("djs-element"),Qt(s).add("djs-"+n),i&&Qt(s).add("djs-frame"),ve(r,s);var o=ie("g");return Qt(o).add("djs-visual"),ve(s,o),s};Ye.prototype.create=function(n,e,t){var i=this._getChildrenContainer(e.parent);return this._createContainer(n,i,t,Aa(e))};Ye.prototype.updateContainments=function(n){var e=this,t=this._elementRegistry,i;i=wt(n,function(r,s){return s.parent&&(r[s.parent.id]=s.parent),r},{}),B(i,function(r){var s=r.children;if(s){var o=e._getChildrenContainer(r);B(s.slice().reverse(),function(a){var l=t.getGraphics(a);Gp(l.parentNode,o)})}})};Ye.prototype.drawShape=function(n,e,t={}){var i=this._eventBus;return i.fire("render.shape",{gfx:n,element:e,attrs:t})};Ye.prototype.getShapePath=function(n){var e=this._eventBus;return e.fire("render.getShapePath",n)};Ye.prototype.drawConnection=function(n,e,t={}){var i=this._eventBus;return i.fire("render.connection",{gfx:n,element:e,attrs:t})};Ye.prototype.getConnectionPath=function(n){var e=this._eventBus;return e.fire("render.getConnectionPath",n)};Ye.prototype.update=function(n,e,t){if(e.parent){var i=this._clear(t);if(n==="shape")this.drawShape(i,e),Kp(t,e.x,e.y);else if(n==="connection")this.drawConnection(i,e);else throw new Error("unknown type: "+n);e.hidden?K(t,"display","none"):K(t,"display","block")}};Ye.prototype.remove=function(n){var e=this._elementRegistry.getGraphics(n);bi(e.parentNode)};function Gp(n,e,t){var i=t||e.firstChild;n!==i&&e.insertBefore(n,i)}var Jp={__depends__:[Pp],__init__:["canvas"],canvas:["type",V],elementRegistry:["type",Xe],elementFactory:["type",Un],eventBus:["type",ye],graphicsFactory:["type",Ye]};function Hw(n){var e=new xi(n);return e.init(),e}function Xw(n){n=n||{};var e={config:["value",n]},t=[e,Jp].concat(n.modules||[]);return Hw(t)}function kn(n,e){this._injector=e||Xw(n),this.get("eventBus").fire("diagram.init")}kn.prototype.get=function(n,e){return this._injector.get(n,e)};kn.prototype.invoke=function(n,e,t){return this._injector.invoke(n,e,t)};kn.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")};kn.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function Q(n,e){var t=Ot(n);return t&&typeof t.$instanceOf=="function"&&t.$instanceOf(e)}function Ot(n){return n&&n.businessObject||n}function Zp(n){return Ot(n).name}function Ta(n){var e=Ot(n);if(Q(e,"dmn:Decision"))return e.get("decisionLogic");if(Q(e,"dmn:BusinessKnowledgeModel")){var t=e.get("encapsulatedLogic");return t&&t.get("body")}}var Uw="https://www.omg.org/spec/DMN/20191111/FEEL/";function em(n){for(let e=n;e;e=e.$parent){let t=e.get("expressionLanguage");if(t)return!!(t===Uw||/feel/i.test(t));if(Q(e,"dmn:FunctionDefinition"))return(e.get("kind")||"FEEL")==="FEEL"}return!0}var Yw=new Ue({name:"dmnElementRef",enumerable:!0},{name:"di",configurable:!0});function Gc(n,e){var t=[];function i(g){var w=g.gfx;if(w)throw new Error("already rendered "+g.id);return n.element(g)}function r(g){return n.root(g)}function s(g){try{var w=g.di&&i(g);return w}catch(x){y(x.message,{element:g,error:x})}}function o(g,w){var x=g.dmnDI;if(!x)throw new Error("no dmndi:DMNDI");var b=x.diagrams||[];if(w&&b.indexOf(w)===-1)throw new Error("diagram not part of dmndi:DMNDI");if(!w&&b&&b.length&&(w=b[0]),!w)throw new Error("no diagram to display");g.di=w,f(w),r(g),a(g.get("drgElement")),l(g.get("artifact")),m()}function a(g){B(g,function(w){s(w),u(w)})}function l(g){B(g,function(w){Q(w,"dmn:Association")?c(w):s(w)})}function c(g){p(function(){s(g)})}function u(g){B(["informationRequirement","knowledgeRequirement","authorityRequirement"],function(w){B(g[w],function(x){p(function(){s(x)})})})}function f(g){B(g.diagramElements,h)}function h(g){d(g)}function d(g){var w=g.dmnElementRef;w?w.di?y("multiple DI elements defined for element",{element:w}):(Yw.bind(w,"di"),w.di=g):y("no DMN element referenced in element",{element:g})}function p(g){t.push(g)}function m(){B(t,function(g){g()})}function y(g,w){n.error(g,w)}return{handleDefinitions:o}}function tm(n,e,t){var i=n.get("drdImporter"),r=n.get("eventBus"),s,o=[];function a(l){var c={root:function(f){return i.root(f)},element:function(f,h){return i.add(f,h)},error:function(f,h){o.push({message:f,context:h})}},u=new Gc(c);u.handleDefinitions(l)}r.fire("import.start",{definitions:e});try{a(e)}catch(l){s=l}r.fire("import.done",{error:s,warnings:o}),t(s,o)}var ru="$NO_OP",Kw="a runtime error occured! Use Inferno in development environment to find the error.",Da=Array.isArray;function su(n){var e=typeof n;return e==="string"||e==="number"}function Z(n){return Ba(n)||fe(n)}function Yn(n){return fe(n)||n===!1||Gw(n)||Ba(n)}function G(n){return typeof n=="function"}function sr(n){return typeof n=="string"}function tu(n){return typeof n=="number"}function fe(n){return n===null}function Gw(n){return n===!0}function Ba(n){return n===void 0}function Jw(n){throw n||(n=Kw),new Error("Inferno Error: "+n)}function Ns(n,e){var t={};if(n)for(var i in n)t[i]=n[i];if(e)for(var r in e)t[r]=e[r];return t}var $s="$";function ou(n,e,t,i,r,s,o,a){return{childFlags:n,children:e,className:t,dom:null,flags:i,key:r===void 0?null:r,parentVNode:null,props:s===void 0?null:s,ref:o===void 0?null:o,type:a}}function E(n,e,t,i,r,s,o,a){var l=r===void 0?1:r,c=ou(l,i,t,n,o,s,a,e),u=Ct.createVNode;return typeof u=="function"&&u(c),l===0&&um(c,c.children),c}function F(n,e,t,i,r){(n&2)>0&&(n=e.prototype&&G(e.prototype.render)?4:8);var s=e.defaultProps;if(!Z(s)){t||(t={});for(var o in s)Ba(t[o])&&(t[o]=s[o])}if((n&8)>0){var a=e.defaultHooks;if(!Z(a))if(!r)r=a;else for(var l in a)Ba(r[l])&&(r[l]=a[l])}var c=ou(1,null,null,n,i,t,r,e),u=Ct.createVNode;return G(u)&&u(c),c}function xe(n,e){return ou(1,Z(n)?"":n,null,16,e,null,null,null)}function on(n){var e=n.props;if(e){var t=n.flags;t&481&&(e.children!==void 0&&Z(n.children)&&um(n,e.children),e.className!==void 0&&(n.className=e.className||null,e.className=void 0)),e.key!==void 0&&(n.key=e.key,e.key=void 0),e.ref!==void 0&&(t&8?n.ref=Ns(n.ref,e.ref):n.ref=e.ref,e.ref=void 0)}return n}function je(n){var e,t=n.flags;if(t&14){var i,r=n.props;if(!fe(r)){i={};for(var s in r)i[s]=r[s]}e=F(t,n.type,i,n.key,n.ref)}else t&481?e=E(t,n.type,n.className,n.children,n.childFlags,n.props,n.key,n.ref):t&16?e=xe(n.children,n.key):t&1024&&(e=n);return e}function lm(){return xe("",null)}function cm(n,e,t,i){for(var r=n.length;t<r;t++){var s=n[t];if(!Yn(s)){var o=i+$s+t;if(Da(s))cm(s,e,0,o);else{if(su(s))s=xe(s,o);else{var a=s.key,l=sr(a)&&a[0]===$s;(!fe(s.dom)||l)&&(s=je(s)),fe(a)||l?s.key=o:s.key=i+a}e.push(s)}}}}function um(n,e){var t,i=1;if(Yn(e))t=e;else if(sr(e))i=2,t=xe(e);else if(tu(e))i=2,t=xe(e+"");else if(Da(e)){var r=e.length;if(r===0)t=null,i=1;else{(Object.isFrozen(e)||e.$===!0)&&(e=e.slice()),i=8;for(var s=0;s<r;s++){var o=e[s];if(Yn(o)||Da(o)){t=t||e.slice(0,s),cm(e,t,s,"");break}else if(su(o))t=t||e.slice(0,s),t.push(xe(o,$s+s));else{var a=o.key,l=fe(o.dom),c=fe(a),u=!c&&sr(a)&&a[0]===$s;!l||c||u?(t=t||e.slice(0,s),(!l||u)&&(o=je(o)),(c||u)&&(o.key=$s+s),t.push(o)):t&&t.push(o)}}t=t||e,t.$=!0}}else t=e,fe(e.dom)||(t=je(e)),i=2;return n.children=t,n.childFlags=i,n}var Ct={afterRender:null,beforeRender:null,createVNode:null,renderComplete:null};var Oi="http://www.w3.org/1999/xlink",Jc="http://www.w3.org/XML/1998/namespace",Zw="http://www.w3.org/2000/svg",nm={"xlink:actuate":Oi,"xlink:arcrole":Oi,"xlink:href":Oi,"xlink:role":Oi,"xlink:show":Oi,"xlink:title":Oi,"xlink:type":Oi,"xml:base":Jc,"xml:lang":Jc,"xml:space":Jc},Me={},sn=[];function Ia(n,e){n.appendChild(e)}function Ma(n,e,t){Z(t)?Ia(n,e):n.insertBefore(e,t)}function eO(n,e){return e?document.createElementNS(Zw,n):document.createElement(n)}function au(n,e,t){n.replaceChild(e,t)}function tO(n,e){n.removeChild(e)}function lu(n){for(var e;(e=n.shift())!==void 0;)e()}var Ra={},Zc={};function fm(n,e,t){var i=Ra[n],r=t.$EV;e?(i||(Zc[n]=sO(n),Ra[n]=0),r||(r=t.$EV={}),r[n]||Ra[n]++,r[n]=e):r&&r[n]&&(Ra[n]--,i===1&&(document.removeEventListener(hm(n),Zc[n]),Zc[n]=null),r[n]=e)}function nO(n){return G(n.composedPath)?n.composedPath()[0]:n.target}function iO(n,e,t,i){for(var r=nO(n);!fe(r);){if(e&&r.disabled)return;var s=r.$EV;if(s){var o=s[t];if(o&&(i.dom=r,o.event?o.event(o.data,n):o(n),n.cancelBubble))return}r=r.parentNode}}function hm(n){return n.substr(2).toLowerCase()}function rO(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function sO(n){var e=function(i){var r=i.type,s=r==="click"||r==="dblclick";if(s&&i.button!==0)return i.stopPropagation(),!1;i.stopPropagation=rO;var o={dom:document};Object.defineProperty(i,"currentTarget",{configurable:!0,get:function(){return o.dom}}),iO(i,s,n,o)};return document.addEventListener(hm(n),e),e}function dm(n,e){var t=document.createElement("i");return t.innerHTML=e,t.innerHTML===n.innerHTML}function oO(n,e){return!!(e&&e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html&&dm(n,e.dangerouslySetInnerHTML.__html))}function im(n,e,t){if(n[e]){var i=n[e];i.event?i.event(i.data,t):i(t)}else{var r=e.toLowerCase();n[r]&&n[r](t)}}function Fs(n,e){var t=function(r){r.stopPropagation();var s=this.$V;if(s){var o=s.props||Me,a=s.dom;if(sr(n))im(o,n,r);else for(var l=0;l<n.length;l++)im(o,n[l],r);if(G(e)){var c=this.$V,u=c.props||Me;e(u,a,!1,c)}}};return Object.defineProperty(t,"wrapped",{configurable:!1,enumerable:!1,value:!0,writable:!1}),t}function cu(n){return n==="checkbox"||n==="radio"}var aO=Fs("onInput",uu),lO=Fs(["onClick","onChange"],uu);function pm(n){n.stopPropagation()}pm.wrapped=!0;function cO(n,e){cu(e.type)?(n.onchange=lO,n.onclick=pm):n.oninput=aO}function uu(n,e){var t=n.type,i=n.value,r=n.checked,s=n.multiple,o=n.defaultValue,a=!Z(i);t&&t!==e.type&&e.setAttribute("type",t),!Z(s)&&s!==e.multiple&&(e.multiple=s),!Z(o)&&!a&&(e.defaultValue=o+""),cu(t)?(a&&(e.value=i),Z(r)||(e.checked=r)):a&&e.value!==i?(e.defaultValue=i,e.value=i):Z(r)||(e.checked=r)}function rm(n,e){var t=n.type;if(t==="optgroup"){var i=n.children,r=n.childFlags;if(r&12)for(var s=0,o=i.length;s<o;s++)eu(i[s],e);else r===2&&eu(i,e)}else eu(n,e)}function eu(n,e){var t=n.props||Me,i=n.dom;i.value=t.value,Da(e)&&e.indexOf(t.value)!==-1||t.value===e?i.selected=!0:(!Z(e)||!Z(t.selected))&&(i.selected=t.selected||!1)}var uO=Fs("onChange",mm);function fO(n){n.onchange=uO}function mm(n,e,t,i){var r=!!n.multiple;!Z(n.multiple)&&r!==e.multiple&&(e.multiple=r);var s=i.childFlags;if((s&1)===0){var o=i.children,a=n.value;if(t&&Z(a)&&(a=n.defaultValue),s&12)for(var l=0,c=o.length;l<c;l++)rm(o[l],a);else s===2&&rm(o,a)}}var hO=Fs("onInput",gm),dO=Fs("onChange");function pO(n,e){n.oninput=hO,e.onChange&&(n.onchange=dO)}function gm(n,e,t){var i=n.value,r=e.value;if(Z(i)){if(t){var s=n.defaultValue;!Z(s)&&s!==r&&(e.defaultValue=s,e.value=s)}}else r!==i&&(e.defaultValue=i,e.value=i)}function ym(n,e,t,i,r,s){n&64?uu(i,t):n&256?mm(i,t,r,e):n&128&&gm(i,t,r),s&&(t.$V=e)}function mO(n,e,t){n&64?cO(e,t):n&256?fO(e):n&128&&pO(e,t)}function vm(n){return n.type&&cu(n.type)?!Z(n.checked):!Z(n.value)}function kt(n,e){ki(n),e&&n.dom&&(tO(e,n.dom),n.dom=null)}function ki(n){var e=n.flags;if(e&481){var t=n.ref,i=n.props;G(t)&&t(null);var r=n.children,s=n.childFlags;if(s&12?fu(r):s===2&&ki(r),!fe(i))for(var o in i)switch(o){case"onClick":case"onDblClick":case"onFocusIn":case"onFocusOut":case"onKeyDown":case"onKeyPress":case"onKeyUp":case"onMouseDown":case"onMouseMove":case"onMouseUp":case"onSubmit":case"onTouchEnd":case"onTouchMove":case"onTouchStart":fm(o,null,n.dom);break}}else{var a=n.children;if(a)if(e&14){var l=n.ref;e&4?(G(a.componentWillUnmount)&&a.componentWillUnmount(),G(l)&&l(null),a.$UN=!0,a.$LI&&ki(a.$LI)):(!Z(l)&&G(l.onComponentWillUnmount)&&l.onComponentWillUnmount(n.dom,n.props||Me),ki(a))}else e&1024&&kt(a,n.type)}}function fu(n){for(var e=0,t=n.length;e<t;e++)ki(n[e])}function Pa(n,e){fu(e),n.textContent=""}function gO(n,e){return function(t){n(e.data,t)}}function yO(n,e,t){var i=n.toLowerCase();if(!G(e)&&!Z(e)){var r=e.event;r&&G(r)&&(t[i]=gO(r,e))}else{var s=t[i];(!s||!s.wrapped)&&(t[i]=e)}}function sm(n,e){switch(n){case"animationIterationCount":case"borderImageOutset":case"borderImageSlice":case"borderImageWidth":case"boxFlex":case"boxFlexGroup":case"boxOrdinalGroup":case"columnCount":case"fillOpacity":case"flex":case"flexGrow":case"flexNegative":case"flexOrder":case"flexPositive":case"flexShrink":case"floodOpacity":case"fontWeight":case"gridColumn":case"gridRow":case"lineClamp":case"lineHeight":case"opacity":case"order":case"orphans":case"stopOpacity":case"strokeDasharray":case"strokeDashoffset":case"strokeMiterlimit":case"strokeOpacity":case"strokeWidth":case"tabSize":case"widows":case"zIndex":case"zoom":return e;default:return e+"px"}}function vO(n,e,t){var i=t.style,r,s;if(sr(e)){i.cssText=e;return}if(!Z(n)&&!sr(n)){for(r in e)s=e[r],s!==n[r]&&(i[r]=tu(s)?sm(r,s):s);for(r in n)Z(e[r])&&(i[r]="")}else for(r in e)s=e[r],i[r]=tu(s)?sm(r,s):s}function nu(n,e,t,i,r,s,o){switch(n){case"onClick":case"onDblClick":case"onFocusIn":case"onFocusOut":case"onKeyDown":case"onKeyPress":case"onKeyUp":case"onMouseDown":case"onMouseMove":case"onMouseUp":case"onSubmit":case"onTouchEnd":case"onTouchMove":case"onTouchStart":fm(n,t,i);break;case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":break;case"autoFocus":i.autofocus=!!t;break;case"allowfullscreen":case"autoplay":case"capture":case"checked":case"controls":case"default":case"disabled":case"hidden":case"indeterminate":case"loop":case"muted":case"novalidate":case"open":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"selected":i[n]=!!t;break;case"defaultChecked":case"value":case"volume":if(s&&n==="value")return;var a=Z(t)?"":t;i[n]!==a&&(i[n]=a);break;case"dangerouslySetInnerHTML":var l=e&&e.__html||"",c=t&&t.__html||"";l!==c&&!Z(c)&&!dm(i,c)&&(fe(o)||(o.childFlags&12?fu(o.children):o.childFlags===2&&ki(o.children),o.children=null,o.childFlags=1),i.innerHTML=c);break;default:n[0]==="o"&&n[1]==="n"?yO(n,t,i):Z(t)?i.removeAttribute(n):n==="style"?vO(e,t,i):r&&nm[n]?i.setAttributeNS(nm[n],n,t):i.setAttribute(n,t);break}}function xm(n,e,t,i,r){var s=!1,o=(e&448)>0;o&&(s=vm(t),s&&mO(e,i,t));for(var a in t)nu(a,null,t[a],i,r,s,null);o&&ym(e,n,i,t,!0,s)}function bm(n,e,t,i){var r=new e(t,i);if(n.children=r,r.$V=n,r.$BS=!1,r.context=i,r.props===Me&&(r.props=t),r.$UN=!1,G(r.componentWillMount)){if(r.$BR=!0,r.componentWillMount(),r.$PSS){var s=r.state,o=r.$PS;if(fe(s))r.state=o;else for(var a in o)s[a]=o[a];r.$PSS=!1,r.$PS=null}r.$BR=!1}G(Ct.beforeRender)&&Ct.beforeRender(r);var l=js(r.render(t,r.state,i),n),c;return G(r.getChildContext)&&(c=r.getChildContext()),Z(c)?r.$CX=i:r.$CX=Ns(i,c),G(Ct.afterRender)&&Ct.afterRender(r),r.$LI=l,r}function js(n,e){return Yn(n)?n=lm():su(n)?n=xe(n,null):(n.dom&&(n=je(n)),n.flags&14&&(n.parentVNode=e)),n}function Ke(n,e,t,i){var r=n.flags;if(r&481)return wm(n,e,t,i);if(r&14)return xO(n,e,t,i,(r&4)>0);if(r&512||r&16)return iu(n,e);if(r&1024)return Ke(n.children,n.type,t,!1),n.dom=iu(lm(),e)}function iu(n,e){var t=n.dom=document.createTextNode(n.children);return fe(e)||Ia(e,t),t}function wm(n,e,t,i){var r=n.flags,s=n.children,o=n.props,a=n.className,l=n.ref,c=n.childFlags;i=i||(r&32)>0;var u=eO(n.type,i);if(n.dom=u,!Z(a)&&a!==""&&(i?u.setAttribute("class",a):u.className=a),fe(e)||Ia(e,u),(c&1)===0){var f=i===!0&&n.type!=="foreignObject";c===2?Ke(s,u,t,f):c&12&&Ls(s,u,t,f)}return fe(o)||xm(n,r,o,u,i),G(l)&&hu(u,l),u}function Ls(n,e,t,i){for(var r=0,s=n.length;r<s;r++){var o=n[r];fe(o.dom)||(n[r]=o=je(o)),Ke(o,e,t,i)}}function xO(n,e,t,i,r){var s,o=n.type,a=n.props||Me,l=n.ref;if(r){var c=bm(n,o,a,t);n.dom=s=Ke(c.$LI,null,c.$CX,i),Om(n,l,c),c.$UPD=!1}else{var u=js(o(a,t),n);n.children=u,n.dom=s=Ke(u,null,t,i),km(a,l,s)}return fe(e)||Ia(e,s),s}function bO(n){return function(){n.$UPD=!0,n.componentDidMount(),n.$UPD=!1}}function Om(n,e,t){G(e)&&e(t),G(t.componentDidMount)&&sn.push(bO(t))}function wO(n,e,t){return function(){return n.onComponentDidMount(e,t)}}function km(n,e,t){Z(e)||(G(e.onComponentWillMount)&&e.onComponentWillMount(n),G(e.onComponentDidMount)&&sn.push(wO(e,t,n)))}function hu(n,e){sn.push(function(){return e(n)})}function OO(n,e,t,i,r){var s=n.type,o=n.ref,a=n.props||Me;if(r){var l=bm(n,s,a,t),c=l.$LI;qs(c,e,l.$CX,i),n.dom=c.dom,Om(n,o,l),l.$UPD=!1}else{var u=js(s(a,t),n);qs(u,e,t,i),n.children=u,n.dom=u.dom,km(a,o,e)}}function kO(n,e,t,i){var r=n.children,s=n.props,o=n.className,a=n.flags,l=n.ref;if(i=i||(a&32)>0,e.nodeType!==1||e.tagName.toLowerCase()!==n.type){var c=wm(n,null,t,i);n.dom=c,au(e.parentNode,c,e)}else{n.dom=e;var u=e.firstChild,f=n.childFlags;if((f&1)===0){for(var h=null;u;)h=u.nextSibling,u.nodeType===8&&(u.data==="!"?e.replaceChild(document.createTextNode(""),u):e.removeChild(u)),u=h;if(u=e.firstChild,f===2)fe(u)?Ke(r,e,t,i):(h=u.nextSibling,qs(r,u,t,i),u=h);else if(f&12)for(var d=0,p=r.length;d<p;d++){var m=r[d];fe(u)?Ke(m,e,t,i):(h=u.nextSibling,qs(m,u,t,i),u=h)}for(;u;)h=u.nextSibling,e.removeChild(u),u=h}else!fe(e.firstChild)&&!oO(e,s)&&(e.textContent="",a&448&&(e.defaultValue=""));fe(s)||xm(n,a,s,e,i),Z(o)?e.className!==""&&e.removeAttribute("class"):i?e.setAttribute("class",o):e.className=o,G(l)&&hu(e,l)}}function CO(n,e){if(e.nodeType!==3){var t=iu(n,null);n.dom=t,au(e.parentNode,t,e)}else{var i=n.children;e.nodeValue!==i&&(e.nodeValue=i),n.dom=e}}function qs(n,e,t,i){var r=n.flags;r&14?OO(n,e,t,i,(r&4)>0):r&481?kO(n,e,t,i):r&16?CO(n,e):r&512?n.dom=e:Jw()}function SO(n,e,t){var i=e.firstChild;if(!fe(i))for(Yn(n)||qs(n,i,Me,!1),i=e.firstChild;i=i.nextSibling;)e.removeChild(i);sn.length>0&&lu(sn),e.$V=n,G(t)&&t()}function du(n,e,t,i,r){ki(n),au(t,Ke(e,null,i,r),n.dom)}function Cn(n,e,t,i,r){var s=e.flags|0;n.flags!==s||s&2048?du(n,e,t,i,r):s&481?_O(n,e,t,i,r,s):s&14?TO(n,e,t,i,r,(s&4)>0):s&16?MO(n,e):s&512?e.dom=n.dom:AO(n,e,i)}function EO(n,e){n.textContent!==e.children&&(n.textContent=e.children)}function AO(n,e,t){var i=n.type,r=e.type,s=e.children;if(Cm(n.childFlags,e.childFlags,n.children,s,i,t,!1),e.dom=n.dom,i!==r&&!Yn(s)){var o=s.dom;i.removeChild(o),r.appendChild(o)}}function _O(n,e,t,i,r,s){var o=e.type;if(n.type!==o)du(n,e,t,i,r);else{var a=n.dom,l=n.props,c=e.props,u=!1,f=!1,h;if(e.dom=a,r=r||(s&32)>0,l!==c){var d=l||Me;if(h=c||Me,h!==Me){u=(s&448)>0,u&&(f=vm(h));for(var p in h){var m=d[p],y=h[p];m!==y&&nu(p,m,y,a,r,f,n)}}if(d!==Me)for(var g in d)!h.hasOwnProperty(g)&&!Z(d[g])&&nu(g,d[g],null,a,r,f,n)}var w=n.children,x=e.children,b=e.ref,C=n.className,k=e.className;s&4096?EO(a,x):Cm(n.childFlags,e.childFlags,w,x,a,i,r&&o!=="foreignObject"),u&&ym(s,e,a,h,!1,f),C!==k&&(Z(k)?a.removeAttribute("class"):r?a.setAttribute("class",k):a.className=k),G(b)&&n.ref!==b&&hu(a,b)}}function Cm(n,e,t,i,r,s,o){switch(n){case 2:switch(e){case 2:Cn(t,i,r,s,o);break;case 1:kt(t,r);break;default:kt(t,r),Ls(i,r,s,o);break}break;case 1:switch(e){case 2:Ke(i,r,s,o);break;case 1:break;default:Ls(i,r,s,o);break}break;default:if(e&12){var a=t.length,l=i.length;a===0?l>0&&Ls(i,r,s,o):l===0?Pa(r,t):e===8&&n===8?PO(t,i,r,s,o,a,l):RO(t,i,r,s,o,a,l)}else e===1?Pa(r,t):e===2&&(Pa(r,t),Ke(i,r,s,o));break}}function Sm(n,e,t,i,r,s,o,a,l){var c=n.state,u=n.props;t.children=n;var f;if(!n.$UN){if(u!==i||i===Me){if(!l&&G(n.componentWillReceiveProps)){if(n.$BR=!0,n.componentWillReceiveProps(i,s),n.$UN)return;n.$BR=!1}n.$PSS&&(e=Ns(e,n.$PS),n.$PSS=!1,n.$PS=null)}var h=!!n.shouldComponentUpdate;if(a||!h||h&&n.shouldComponentUpdate(i,e,s)){G(n.componentWillUpdate)&&(n.$BS=!0,n.componentWillUpdate(i,e,s),n.$BS=!1),n.props=i,n.state=e,n.context=s,G(Ct.beforeRender)&&Ct.beforeRender(n),f=n.render(i,e,s),G(Ct.afterRender)&&Ct.afterRender(n);var d=f!==ru,p;if(G(n.getChildContext)&&(p=n.getChildContext()),Z(p)?p=s:p=Ns(s,p),n.$CX=p,d){var m=n.$LI,y=js(f,t);Cn(m,y,r,p,o),n.$LI=y,G(n.componentDidUpdate)&&n.componentDidUpdate(u,c)}}else n.props=i,n.state=e,n.context=s;t.dom=n.$LI.dom}}function TO(n,e,t,i,r,s){var o=e.type,a=n.key,l=e.key;if(n.type!==o||a!==l)du(n,e,t,i,r);else{var c=e.props||Me;if(s){var u=n.children;u.$UPD=!0,u.$V=e,Sm(u,u.state,e,c,t,i,r,!1,!1),u.$UPD=!1}else{var f=!0,h=n.props,d=e.ref,p=!Z(d),m=n.children;if(e.dom=n.dom,e.children=m,p&&G(d.onComponentShouldUpdate)&&(f=d.onComponentShouldUpdate(h,c)),f!==!1){p&&G(d.onComponentWillUpdate)&&d.onComponentWillUpdate(h,c);var y=o(c,i);y!==ru&&(y=js(y,e),Cn(m,y,t,i,r),e.children=y,e.dom=y.dom,p&&G(d.onComponentDidUpdate)&&d.onComponentDidUpdate(h,c))}else m.flags&14&&(m.parentVNode=e)}}}function MO(n,e){var t=e.children,i=n.dom;t!==n.children&&(i.nodeValue=t),e.dom=i}function RO(n,e,t,i,r,s,o){for(var a=s>o?o:s,l=0,c,u;l<a;l++)c=e[l],u=n[l],c.dom&&(c=e[l]=je(c)),Cn(u,c,t,i,r),n[l]=c;if(s<o)for(l=a;l<o;l++)c=e[l],c.dom&&(c=e[l]=je(c)),Ke(c,t,i,r);else if(s>o)for(l=a;l<s;l++)kt(n[l],t)}function PO(n,e,t,i,r,s,o){var a=s-1,l=o-1,c,u=0,f=n[u],h=e[u],d;e:{for(;f.key===h.key;){if(h.dom&&(e[u]=h=je(h)),Cn(f,h,t,i,r),n[u]=h,u++,u>a||u>l)break e;f=n[u],h=e[u]}for(f=n[a],h=e[l];f.key===h.key;){if(h.dom&&(e[l]=h=je(h)),Cn(f,h,t,i,r),n[a]=h,a--,l--,u>a||u>l)break e;f=n[a],h=e[l]}}if(u>a){if(u<=l){d=l+1;for(var p=d<o?e[d].dom:null;u<=l;)h=e[u],h.dom&&(e[u]=h=je(h)),u++,Ma(t,Ke(h,null,i,r),p)}}else if(u>l)for(;u<=a;)kt(n[u++],t);else{var m=u,y=u,g=a-u+1,w=l-u+1,x=[];for(c=0;c<w;c++)x.push(0);var b=g===s,C=!1,k=0,O=0;if(o<4||(g|w)<32)for(c=m;c<=a;c++)if(f=n[c],O<w){for(u=y;u<=l;u++)if(h=e[u],f.key===h.key){if(x[u-y]=c+1,b)for(b=!1;c>m;)kt(n[m++],t);k>u?C=!0:k=u,h.dom&&(e[u]=h=je(h)),Cn(f,h,t,i,r),O++;break}!b&&u>l&&kt(f,t)}else b||kt(f,t);else{var v={};for(c=y;c<=l;c++)v[e[c].key]=c;for(c=m;c<=a;c++)if(f=n[c],O<w)if(u=v[f.key],u!==void 0){if(b)for(b=!1;c>m;)kt(n[m++],t);h=e[u],x[u-y]=c+1,k>u?C=!0:k=u,h.dom&&(e[u]=h=je(h)),Cn(f,h,t,i,r),O++}else b||kt(f,t);else b||kt(f,t)}if(b)Pa(t,n),Ls(e,t,i,r);else if(C){var A=DO(x);for(u=A.length-1,c=w-1;c>=0;c--)x[c]===0?(k=c+y,h=e[k],h.dom&&(e[k]=h=je(h)),d=k+1,Ma(t,Ke(h,null,i,r),d<o?e[d].dom:null)):u<0||c!==A[u]?(k=c+y,h=e[k],d=k+1,Ma(t,h.dom,d<o?e[d].dom:null)):u--}else if(O!==w)for(c=w-1;c>=0;c--)x[c]===0&&(k=c+y,h=e[k],h.dom&&(e[k]=h=je(h)),d=k+1,Ma(t,Ke(h,null,i,r),d<o?e[d].dom:null))}}function DO(n){var e=n.slice(),t=[0],i,r,s,o,a,l=n.length;for(i=0;i<l;i++){var c=n[i];if(c!==0){if(r=t[t.length-1],n[r]<c){e[i]=r,t.push(i);continue}for(s=0,o=t.length-1;s<o;)a=(s+o)/2|0,n[t[a]]<c?s=a+1:o=a;c<n[t[s]]&&(s>0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function or(n,e,t){if(n!==ru){var i=e.$V;if(Z(i)?Yn(n)||(n.dom&&(n=je(n)),fe(e.firstChild)?(Ke(n,e,Me,!1),e.$V=n):SO(n,e),i=n):Z(n)?(kt(i,e),e.$V=null):(n.dom&&(n=je(n)),Cn(i,n,e,Me,!1),i=e.$V=n),sn.length>0&&lu(sn),G(t)&&t(),G(Ct.renderComplete)&&Ct.renderComplete(i),i&&i.flags&14)return i.children}}function Em(n,e){return E(1024,e,null,n,0,null,Yn(n)?null:n.key,null)}var om=typeof Promise=="undefined"?null:Promise.resolve(),BO=typeof requestAnimationFrame=="undefined"?setTimeout:requestAnimationFrame.bind(window);function IO(n){return om?om.then(n):BO(n)}function am(n,e,t,i){G(e)&&(e=e(n.state,n.props,n.context));var r=n.$PS;if(Z(r))n.$PS=e;else for(var s in e)r[s]=e[s];if(!n.$PSS&&!n.$BR)if(!n.$UPD)n.$PSS=!0,n.$UPD=!0,Am(n,i,t),n.$UPD=!1;else{var o=n.$QU;fe(o)&&(o=n.$QU=[],IO($O(n,o))),G(t)&&o.push(t)}else n.$PSS=!0,n.$BR&&G(t)&&sn.push(t.bind(n))}function $O(n,e){return function(){n.$QU=null,n.$UPD=!0,Am(n,!1,function(){for(var t=0,i=e.length;t<i;t++)e[t].call(n)}),n.$UPD=!1}}function Am(n,e,t){if(!n.$UN){if(e||!n.$BR){n.$PSS=!1;var i=n.$PS,r=n.state,s=Ns(r,i),o=n.props,a=n.context;n.$PS=null;var l=n.$V,c=n.$LI,u=c.dom&&c.dom.parentNode;if(Sm(n,s,l,o,u,a,(l.flags&32)>0,e,!0),n.$UN)return;if((n.$LI.flags&1024)===0)for(var f=n.$LI.dom;!fe(l=l.parentVNode);)(l.flags&14)>0&&(l.dom=f);sn.length>0&&lu(sn)}else n.state=n.$PS,n.$PS=null;G(t)&&t.call(n)}}var z=(function(){function n(t,i){this.state=null,this.props=void 0,this.context=void 0,this.refs=void 0,this.$BR=!1,this.$BS=!0,this.$PSS=!1,this.$PS=null,this.$LI=null,this.$V=null,this.$UN=!1,this.$CX=null,this.$UPD=!0,this.$QU=null,this.props=t||Me,this.context=i||Me}var e=n.prototype;return e.forceUpdate=function(i){this.$UN||am(this,{},i,!0)},e.setState=function(i,r){if(!this.$UN)if(!this.$BS)am(this,i,r,!1);else return},e.render=function(i,r,s){},n})();z.defaultProps=void 0;var _m='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21" style="vertical-align:middle"><path fill="#000000" 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="#000000" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>';function pu(n){var e='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" style="position: absolute; bottom: 15px; right: 15px; z-index: 100;">'+_m+"</a>",t=le(e);n.appendChild(t),Oa.bind(t,"click",function(i){jO(),i.preventDefault()})}var Kn=class extends z{constructor(e,t){super(e,t),this.node=null}componentDidMount(){pu(this.node)}render(){return E(1,"div",null,null,1,null,null,e=>this.node=e)}};function mu(n){return n.join(";")}var LO=mu(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"]),NO=mu(["width: 100%","height: 100%","background: rgba(40,40,40,0.2)"]),qO=mu(["position: absolute","left: 50%","top: 40%","transform: translate(-50%)","width: 260px","padding: 10px","background: white","box-shadow: 0 1px 4px rgba(0,0,0,0.3)","font-family: Helvetica, Arial, sans-serif","font-size: 14px","display: flex","line-height: 1.3"]),FO='<div class="bjs-powered-by-lightbox" style="'+LO+'"><div class="backdrop" style="'+NO+'"></div><div class="notice" style="'+qO+'"><a href="https://bpmn.io" target="_blank" rel="noopener" style="margin: 15px 20px 15px 10px; align-self: center;">'+_m+'</a><span>Web-based tooling for BPMN, DMN and CMMN diagrams powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',Vs;function jO(){Vs||(Vs=le(FO),On.bind(Vs,".backdrop","click",function(n){document.body.removeChild(Vs)})),document.body.appendChild(Vs)}function VO(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var gu={exports:{}},Tm;function QO(){if(Tm)return gu.exports;Tm=1;var n=gu.exports=function(e,t){if(t||(t=16),e===void 0&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(t),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(t)*r;for(var s=i-Math.floor(i),o="",r=0;r<Math.floor(i);r++){var a=Math.floor(Math.random()*t).toString(t);o=a+o}if(s){var l=Math.pow(t,s),a=Math.floor(Math.random()*l).toString(t);o=a+o}var c=parseInt(o,t);return c!==1/0&&c>=Math.pow(2,e)?n(e,t):o};return n.rack=function(e,t,i){var r=function(o){var a=0;do{if(a++>10)if(i)e+=i;else throw new Error("too many ID collisions, use more bits");var l=n(e,t)}while(Object.hasOwnProperty.call(s,l));return s[l]=o,l},s=r.hats={};return r.get=function(o){return r.hats[o]},r.set=function(o,a){return r.hats[o]=a,r},r.bits=e||128,r.base=t||16,r},gu.exports}var zO=QO(),WO=VO(zO);function an(n){if(!(this instanceof an))return new an(n);n=n||[128,36,1],this._seed=n.length?WO.rack(n[0],n[1],n[2]):n}an.prototype.next=function(n){return this._seed(n||!0)};an.prototype.nextPrefixed=function(n,e){var t;do t=n+this.next(!0);while(this.assigned(t));return this.claim(t,e),t};an.prototype.claim=function(n,e){this._seed.set(n,e||!0)};an.prototype.assigned=function(n){return this._seed.get(n)||!1};an.prototype.unclaim=function(n){delete this._seed.hats[n]};an.prototype.clear=function(){var n=this._seed.hats,e;for(e in n)this.unclaim(e)};var HO=new an,$a="hsl(225, 10%, 15%)";function Qs(n,e,t,i,r,s){it.call(this,e);var o=HO.next(),a=i.computeStyle,l={},c=n&&n.defaultFillColor||"white",u=n&&n.defaultStrokeColor||$a,f=n&&n.defaultLabelColor;function h(O,v,A){var S=O+"-"+Rm(v)+"-"+Rm(A)+"-"+o;return l[S]||p(S,O,v,A),"url(#"+S+")"}function d(O,v){var A=D({strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},v.attrs),S=v.ref||{x:0,y:0},M=v.scale||1;A.strokeDasharray==="none"&&(A.strokeDasharray=[1e4,1]);var _=ie("marker");K(v.element,A),ve(_,v.element),K(_,{id:O,viewBox:"0 0 20 20",refX:S.x,refY:S.y,markerWidth:20*M,markerHeight:20*M,orient:"auto"});var P=jt("defs",s._svg);P||(P=ie("defs"),ve(s._svg,P)),ve(P,_),l[O]=_}function p(O,v,A,S){if(v==="association-start"){var M=ie("path");K(M,{d:"M 11 5 L 1 10 L 11 15"}),d(O,{element:M,attrs:{fill:"none",stroke:S,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}else if(v==="association-end"){var _=ie("path");K(_,{d:"M 1 5 L 11 10 L 1 15"}),d(O,{element:_,attrs:{fill:"none",stroke:S,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}else if(v==="information-requirement-end"){var P=ie("path");K(P,{d:"M 1 5 L 11 10 L 1 15 Z"}),d(O,{element:P,attrs:{fill:S,stroke:"none"},ref:{x:11,y:10},scale:1})}else if(v==="knowledge-requirement-end"){var j=ie("path");K(j,{d:"M 1 3 L 11 10 L 1 17"}),d(O,{element:j,attrs:{fill:"none",stroke:S,strokeWidth:2},ref:{x:11,y:10},scale:.8})}else if(v==="authority-requirement-end"){var oe=ie("circle");K(oe,{cx:3,cy:3,r:3}),d(O,{element:oe,attrs:{fill:S,stroke:"none"},ref:{x:3,y:3},scale:.9})}}function m(O,v,A,S,M,_){dt(M)&&(_=M,M=0),M=M||0,_=a(_,{stroke:$a,strokeWidth:2,fill:"white"});var P=ie("rect");return K(P,{x:M,y:M,width:v-M*2,height:A-M*2,rx:S,ry:S}),K(P,_),ve(O,P),P}function y(O,v,A){var S=r.createText(v||"",A);return tr(S,"class","djs-label"),ve(O,S),S}function g(O,v,A,S){var M=Zp(v);return S=D({box:v,align:A,padding:5,style:{fill:Pm(v,f,u)}},S),y(O,M,S)}function w(O,v,A){A=a(A,["no-fill"],{strokeWidth:2,stroke:$a});var S=ie("path");return K(S,{d:v}),K(S,A),ve(O,S),S}var x={"dmn:Decision":function(O,v){var A=m(O,v.width,v.height,0,{stroke:ln(v,u),fill:Gn(v,c)});return g(O,v,"center-middle"),A},"dmn:KnowledgeSource":function(O,v){var A=t.getScaledPath("KNOWLEDGE_SOURCE",{xScaleFactor:1.021,yScaleFactor:1,containerWidth:v.width,containerHeight:v.height,position:{mx:0,my:.075}}),S=w(O,A,{strokeWidth:2,fill:Gn(v,c),stroke:ln(v,u)});return g(O,v,"center-middle"),S},"dmn:BusinessKnowledgeModel":function(O,v){var A=t.getScaledPath("BUSINESS_KNOWLEDGE_MODEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:v.width,containerHeight:v.height,position:{mx:0,my:.3}}),S=w(O,A,{strokeWidth:2,fill:Gn(v,c),stroke:ln(v,u)});return g(O,v,"center-middle"),S},"dmn:InputData":function(O,v){var A=m(O,v.width,v.height,22,{stroke:ln(v,u),fill:Gn(v,c)});return g(O,v,"center-middle"),A},"dmn:TextAnnotation":function(O,v){var A={fill:"none",stroke:"none"},S=m(O,v.width,v.height,0,0,A),M=t.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:v.width,containerHeight:v.height,position:{mx:0,my:0}});w(O,M,{stroke:ln(v,u)});var _=Mm(v).text||"";return y(O,_,{style:{fill:Pm(v,f,u)},box:v,align:"left-top",padding:5}),S},"dmn:Association":function(O,v){var A=Mm(v),S=Gn(v,c),M=ln(v,u),_={stroke:M,strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"};return(A.associationDirection==="One"||A.associationDirection==="Both")&&(_.markerEnd=h("association-end",S,M)),A.associationDirection==="Both"&&(_.markerStart=h("association-start",S,M)),k(O,v.waypoints,_)},"dmn:InformationRequirement":function(O,v){var A=Gn(v,c),S=ln(v,u),M={stroke:S,strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:h("information-requirement-end",A,S)};return k(O,v.waypoints,M)},"dmn:KnowledgeRequirement":function(O,v){var A=Gn(v,c),S=ln(v,u),M={stroke:S,strokeWidth:1,strokeDasharray:5,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:h("knowledge-requirement-end",A,S)};return k(O,v.waypoints,M)},"dmn:AuthorityRequirement":function(O,v){var A=Gn(v,c),S=ln(v,u),M={stroke:S,strokeWidth:1.5,strokeDasharray:5,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:h("authority-requirement-end",A,S)};return k(O,v.waypoints,M)}};function b(O,v){var A=x[v.type];return A?A(O,v):it.prototype.drawShape.apply(this,[O,v])}function C(O,v){var A=v.type,S=x[A];return S?S(O,v):it.prototype.drawConnection.apply(this,[O,v])}function k(O,v,A){A=a(A,["no-fill"],{stroke:$a,strokeWidth:2,fill:"none"});var S=ir(v,A);return ve(O,S),S}this.canRender=function(O){return Q(O,"dmn:DMNElement")||Q(O,"dmn:InformationRequirement")||Q(O,"dmn:KnowledgeRequirement")||Q(O,"dmn:AuthorityRequirement")},this.drawShape=b,this.drawConnection=C}Vt(Qs,it);Qs.$inject=["config.drdRenderer","eventBus","pathMap","styles","textRenderer","canvas"];function Mm(n){return n.businessObject}function Rm(n){return n.replace(/[^0-9a-zA-z]+/g,"_")}function ln(n,e){return e}function Gn(n,e){return e}function Pm(n,e,t){return e||ln(n,t)}var XO=0,UO={width:150,height:50};function YO(n){var e=n.split("-");return{horizontal:e[0]||"center",vertical:e[1]||"top"}}function KO(n){return dt(n)?D({top:0,left:0,right:0,bottom:0},n):{top:n,left:n,right:n,bottom:n}}var yu=null;function GO(){return yu||(yu=document.createElement("canvas").getContext("2d")),yu}function JO(n){var e=[];return n.fontStyle&&e.push(n.fontStyle),n.fontVariant&&e.push(n.fontVariant),n.fontWeight&&e.push(n.fontWeight),n.fontStretch&&e.push(n.fontStretch),e.push(Bm(n.fontSize)||"12px"),e.push(n.fontFamily||"sans-serif"),e.join(" ")}function Bm(n){if(n!=null)return typeof n=="number"||/^-?\d+(\.\d+)?$/.test(n)?n+"px":n}function ZO(n,e){var t=GO();if(!t)return{width:0,height:0};t.font=JO(e),"letterSpacing"in t&&(t.letterSpacing=Bm(e.letterSpacing)||"0px");var i=n==="",r=i?"dummy":n.replace(/\s+$/,""),s=t.measureText(r);return{width:i?0:s.width,height:"fontBoundingBoxAscent"in s?s.fontBoundingBoxAscent+s.fontBoundingBoxDescent:s.actualBoundingBoxAscent+s.actualBoundingBoxDescent}}function ek(n,e,t){for(var i=n.shift(),r=i,s;;){if(s=ZO(r,t),s.width=r?s.width:0,r===" "||r===""||s.width<Math.round(e)||r.length<2)return tk(n,r,i,s);r=ik(r,s.width,e)}}function tk(n,e,t,i){if(e.length<t.length){var r=t.slice(e.length).trim();n.unshift(r)}return{width:i.width,height:i.height,text:e}}var Dm="\xAD";function nk(n,e){var t=n.split(/(\s|-|\u00AD)/g),i,r=[],s=0;if(t.length>1)for(;i=t.shift();)if(i.length+s<e)r.push(i),s+=i.length;else{(i==="-"||i===Dm)&&r.pop();break}var o=r[r.length-1];return o&&o===Dm&&(r[r.length-1]="-"),r.join("")}function ik(n,e,t){var i=Math.max(n.length*(t/e),1),r=nk(n,i);return r||(r=n.slice(0,Math.max(Math.round(i-1),1))),r}function ar(n){this._config=D({},{size:UO,padding:XO,style:{},align:"center-top"},n||{})}ar.prototype.createText=function(n,e){return this.layoutText(n,e).element};ar.prototype.getDimensions=function(n,e){return this.layoutText(n,e).dimensions};ar.prototype.layoutText=function(n,e){for(var t=D({},this._config.size,e.box),i=D({},this._config.style,e.style),r=YO(e.align||this._config.align),s=KO(e.padding!==void 0?e.padding:this._config.padding),o=e.fitBox||!1,a=rk(i),l=n.split(/\u00AD?\r?\n/),c=[],u=t.width-s.left-s.right;l.length;)c.push(ek(l,u,i));r.vertical==="middle"&&(s.top=s.bottom=0);var f=wt(c,function(y,g,w){return y+(a||g.height)},0)+s.top+s.bottom,h=wt(c,function(y,g,w){return g.width>y?g.width:y},0),d=s.top;r.vertical==="middle"&&(d+=(t.height-f)/2),d-=(a||c[0].height)/4;var p=ie("text");K(p,i),B(c,function(y){var g;switch(d+=a||y.height,r.horizontal){case"left":g=s.left;break;case"right":g=(o?h:u)-s.right-y.width;break;default:g=Math.max(((o?h:u)-y.width)/2+s.left,0)}var w=ie("tspan");K(w,{x:g,y:d}),w.textContent=y.text,ve(p,w)});var m={width:h,height:f};return{dimensions:m,element:p}};function rk(n){if("fontSize"in n&&"lineHeight"in n)return n.lineHeight*parseInt(n.fontSize,10)}var sk=12,ok=1.2,ak=30;function La(n){var e=D({fontFamily:"Arial, sans-serif",fontSize:sk,fontWeight:"normal",lineHeight:ok},n&&n.defaultStyle||{}),t=parseInt(e.fontSize,10)-1,i=D({},e,{fontSize:t},n&&n.externalStyle||{}),r=new ar({style:e});this.getExternalLabelBounds=function(s,o){var a=r.getDimensions(o,{box:{width:90,height:30,x:s.width/2+s.x,y:s.height/2+s.y},style:i});return{x:Math.round(s.x+s.width/2-a.width/2),y:Math.round(s.y),width:Math.ceil(a.width),height:Math.ceil(a.height)}},this.getTextAnnotationBounds=function(s,o){var a=r.getDimensions(o,{box:s,style:e,align:"left-top",padding:5});return{x:s.x,y:s.y,width:s.width,height:Math.max(ak,Math.round(a.height))}},this.createText=function(s,o){return r.createText(s,o||{})},this.getDefaultStyle=function(){return e},this.getExternalStyle=function(){return i}}La.$inject=["config.textRenderer"];function vu(){this.pathMap={KNOWLEDGE_SOURCE:{d:"m {mx},{my} l 0,{e.y0} c {e.x0},{e.y1} {e.x1},-{e.y2} {e.x2},-{e.y3} c {e.x3},-{e.y4} {e.x4},{e.y5} {e.x5},{e.y6} l 0,-{e.y7}z",width:100,height:65,widthElements:[29.8,48.4,67.2,12.2,19.8,30.8],heightElements:[55.3,19.7,4.2,6.7,2.3,1.6,6.2,54.6]},BUSINESS_KNOWLEDGE_MODEL:{d:"m {mx},{my} l {e.x0},-{e.y0} l {e.x1},0 l 0,{e.y1} l -{e.x2},{e.y2} l -{e.x3},0z",width:125,height:45,widthElements:[13.8,109.2,13.8,109.1],heightElements:[13.2,29.8,13.2]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",width:10,height:30,widthElements:[10],heightElements:[30]}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var i=this.pathMap[e],r,s;t.abspos?(r=t.abspos.x,s=t.abspos.y):(r=t.containerWidth*t.position.mx,s=t.containerHeight*t.position.my);var o={};if(t.position){for(var a=t.containerHeight/i.height*t.yScaleFactor,l=t.containerWidth/i.width*t.xScaleFactor,c=0;c<i.heightElements.length;c++)o["y"+c]=i.heightElements[c]*a;for(var u=0;u<i.widthElements.length;u++)o["x"+u]=i.widthElements[u]*l}var f=fk(i.d,{mx:r,my:s,e:o});return f}}var lk=/\{([^{}]+)\}/g,ck=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function uk(n,e,t){var i=t;return e.replace(ck,function(r,s,o,a,l){s=s||a,i&&(s in i&&(i=i[s]),typeof i=="function"&&l&&(i=i()))}),i=(i==null||i==t?n:i)+"",i}function fk(n,e){return String(n).replace(lk,function(t,i){return uk(t,i,e)})}var Im={__init__:["drdRenderer"],drdRenderer:["type",Qs],textRenderer:["type",La],pathMap:["type",vu]};function Sn(n,e,t,i){this._eventBus=n,this._canvas=e,this._elementRegistry=i,this._elementFactory=t}Sn.$inject=["eventBus","canvas","elementFactory","elementRegistry"];Sn.prototype.root=function(n){var e=this._elementFactory.createRoot(xu(n));return this._canvas.setRootElement(e),e};Sn.prototype.add=function(n){var e=this._elementFactory,t=this._canvas,i=this._eventBus,r=n.di,s,o,a,l,c,u;if(r.$instanceOf("dmndi:DMNShape"))u=r.bounds,c=xu(n,{x:Math.round(u.x),y:Math.round(u.y),width:Math.round(u.width),height:Math.round(u.height)}),s=e.createShape(c),t.addShape(s),i.fire("drdElement.added",{element:s,di:r});else if(r.$instanceOf("dmndi:DMNEdge"))o=hk(r),a=this._getSource(n),l=this._getTarget(n),a&&l&&(c=xu(n,{hidden:!1,source:a,target:l,waypoints:o}),s=e.createConnection(c),t.addConnection(s),i.fire("drdElement.added",{element:s,di:r}));else throw new Error("unknown di for element "+n.id);return s};Sn.prototype._getSource=function(n){var e,t;if(Q(n,"dmn:Association")?t=n.sourceRef:Q(n,"dmn:InformationRequirement")?t=n.requiredDecision||n.requiredInput:Q(n,"dmn:KnowledgeRequirement")?t=n.requiredKnowledge:Q(n,"dmn:AuthorityRequirement")&&(t=n.requiredDecision||n.requiredInput||n.requiredAuthority),t&&(e=t.href),e)return this._getShape($m(e))};Sn.prototype._getTarget=function(n){return Q(n,"dmn:Association")?n.targetRef&&this._getShape($m(n.targetRef.href)):this._getShape(n.$parent.id)};Sn.prototype._getShape=function(n){return this._elementRegistry.get(n)};function xu(n,e){return D({id:n.id,type:n.$type,businessObject:n},e)}function hk(n){var e=n.waypoint;if(e)return zd(e,function(t){var i={x:t.x,y:t.y};return D({original:i},i)})}function $m(n){return n.split("#").pop()}var Lm={drdImporter:["type",Sn]};var Nm={__depends__:[Im,Lm]};function bu(n,e){return e=e||{},n.replace(/{([^}]+)}/g,function(t,i){return e[i]||"{"+i+"}"})}var rt={translate:["value",bu]};function wu(n){return n.originalEvent||n.srcEvent}function qm(n,e){return(wu(n)||n).button===e}function lr(n){return qm(n,0)}function Fm(n){return qm(n,1)}function jm(n){var e=wu(n)||n;return lr(n)&&e.shiftKey}function dk(n){return!0}function Na(n){return lr(n)||Fm(n)}var Vm=500;function qa(n,e,t){var i=this;function r(v,A,S){if(!a(v,A)){var M,_,P;S?_=e.getGraphics(S):(M=A.delegateTarget||A.target,M&&(_=M,S=e.get(_))),!(!_||!S)&&(P=n.fire(v,{element:S,gfx:_,originalEvent:A}),P===!1&&(A.stopPropagation(),A.preventDefault()))}}var s={};function o(v){return s[v]}function a(v,A){var S=c[v]||lr;return!S(A)}var l={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":dk,"element.mousedown":Na,"element.mouseup":Na,"element.click":Na,"element.dblclick":Na};function u(v,A,S){var M=l[v];if(!M)throw new Error("unmapped DOM event name <"+v+">");return r(M,A,S)}var f="svg, .djs-element";function h(v,A,S,M){var _=s[S]=function(P){r(S,P)};M&&(c[S]=M),_.$delegate=On.bind(v,f,A,_)}function d(v,A,S){var M=o(S);M&&On.unbind(v,A,M.$delegate)}function p(v){B(l,function(A,S){h(v,S,A)})}function m(v){B(l,function(A,S){d(v,S,A)})}n.on("canvas.destroy",function(v){m(v.svg)}),n.on("canvas.init",function(v){p(v.svg)}),n.on(["shape.added","connection.added"],function(v){var A=v.element,S=v.gfx;n.fire("interactionEvents.createHit",{element:A,gfx:S})}),n.on(["shape.changed","connection.changed"],Vm,function(v){var A=v.element,S=v.gfx;n.fire("interactionEvents.updateHit",{element:A,gfx:S})}),n.on("interactionEvents.createHit",Vm,function(v){var A=v.element,S=v.gfx;i.createDefaultHit(A,S)}),n.on("interactionEvents.updateHit",function(v){var A=v.element,S=v.gfx;i.updateDefaultHit(A,S)});var y=C("djs-hit djs-hit-stroke"),g=C("djs-hit djs-hit-click-stroke"),w=C("djs-hit djs-hit-all"),x=C("djs-hit djs-hit-no-move"),b={all:w,"click-stroke":g,stroke:y,"no-move":x};function C(v,A){return A=D({stroke:"white",strokeWidth:15},A||{}),t.cls(v,["no-fill","no-border"],A)}function k(v,A){var S=b[A];if(!S)throw new Error("invalid hit type <"+A+">");return K(v,S),v}function O(v,A){ve(v,A)}this.removeHits=function(v){var A=gp(".djs-hit",v);B(A,bi)},this.createDefaultHit=function(v,A){var S=v.waypoints,M=v.isFrame,_;return S?this.createWaypointsHit(A,S):(_=M?"stroke":"all",this.createBoxHit(A,_,{width:v.width,height:v.height}))},this.createWaypointsHit=function(v,A){var S=ir(A);return k(S,"stroke"),O(v,S),S},this.createBoxHit=function(v,A,S){S=D({x:0,y:0},S);var M=ie("rect");return k(M,A),K(M,S),O(v,M),M},this.updateDefaultHit=function(v,A){var S=jt(".djs-hit",A);if(S)return v.waypoints?Xc(S,v.waypoints):K(S,{width:v.width,height:v.height}),S},this.fire=r,this.triggerMouseEvent=u,this.mouseHandler=o,this.registerEvent=h,this.unregisterEvent=d}qa.$inject=["eventBus","elementRegistry","styles"];var Qm={__init__:["interactionEvents"],interactionEvents:["type",qa]};function Jn(n,e){this._eventBus=n,this._canvas=e,this._selectedElements=[];var t=this;n.on(["shape.remove","connection.remove"],function(i){var r=i.element;t.deselect(r)}),n.on(["diagram.clear","root.set"],function(i){t.select(null)})}Jn.$inject=["eventBus","canvas"];Jn.prototype.deselect=function(n){var e=this._selectedElements,t=e.indexOf(n);if(t!==-1){var i=e.slice();e.splice(t,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:e})}};Jn.prototype.get=function(){return this._selectedElements};Jn.prototype.isSelected=function(n){return this._selectedElements.indexOf(n)!==-1};Jn.prototype.select=function(n,e){var t=this._selectedElements,i=t.slice();_e(n)||(n=n?[n]:[]);var r=this._canvas,s=r.getRootElement();n=n.filter(function(o){var a=r.findRoot(o);return s===a}),e?B(n,function(o){t.indexOf(o)===-1&&t.push(o)}):this._selectedElements=t=n.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})};var zm="hover",Wm="selected";function Fa(n,e){this._canvas=n;function t(r,s){n.addMarker(r,s)}function i(r,s){n.removeMarker(r,s)}e.on("element.hover",function(r){t(r.element,zm)}),e.on("element.out",function(r){i(r.element,zm)}),e.on("selection.changed",function(r){function s(c){i(c,Wm)}function o(c){t(c,Wm)}var a=r.oldSelection,l=r.newSelection;B(a,function(c){l.indexOf(c)===-1&&s(c)}),B(l,function(c){a.indexOf(c)===-1&&o(c)})})}Fa.$inject=["canvas","eventBus"];function ja(n,e,t,i){n.on("create.end",500,function(r){var s=r.context,o=s.canExecute,a=s.elements,l=s.hints||{},c=l.autoSelect;if(o){if(c===!1)return;_e(c)?e.select(c):e.select(a.filter(pk))}}),n.on("connect.end",500,function(r){var s=r.context,o=s.connection;o&&e.select(o)}),n.on("shape.move.end",500,function(r){var s=r.previousSelection||[],o=i.get(r.context.shape.id),a=we(s,function(l){return o.id===l.id});a||e.select(o)}),n.on("element.click",function(r){if(lr(r)){var s=r.element;s===t.getRootElement()&&(s=null);var o=e.isSelected(s),a=e.get().length>1,l=jm(r);if(o&&a)return l?e.deselect(s):e.select(s);o?e.deselect(s):e.select(s,l)}})}ja.$inject=["eventBus","selection","canvas","elementRegistry"];function pk(n){return!n.hidden}var Hm={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Qm],selection:["type",Jn],selectionVisuals:["type",Fa],selectionBehavior:["type",ja]};function Va(n){this._counter=0,this._prefix=(n?n+"-":"")+Math.floor(Math.random()*1e9)+"-"}Va.prototype.next=function(){return this._prefix+ ++this._counter};var mk=new Va("ov"),gk=500;function ke(n,e,t,i){this._eventBus=e,this._canvas=t,this._elementRegistry=i,this._ids=mk,this._overlayDefaults=D({show:null,scale:!0},n&&n.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=yk(t.getContainer()),this._init()}ke.$inject=["config.overlays","eventBus","canvas","elementRegistry"];ke.prototype.get=function(n){if(tt(n)&&(n={id:n}),tt(n.element)&&(n.element=this._elementRegistry.get(n.element)),n.element){var e=this._getOverlayContainer(n.element,!0);return e?n.type?Qn(e.overlays,Cc({type:n.type})):e.overlays.slice():[]}else return n.type?Qn(this._overlays,Cc({type:n.type})):n.id?this._overlays[n.id]:null};ke.prototype.add=function(n,e,t){if(dt(e)&&(t=e,e=null),n.id||(n=this._elementRegistry.get(n)),!t.position)throw new Error("must specifiy overlay position");if(!t.html)throw new Error("must specifiy overlay html");if(!n)throw new Error("invalid element specified");var i=this._ids.next();return t=D({},this._overlayDefaults,t,{id:i,type:e,element:n,html:t.html}),this._addOverlay(t),i};ke.prototype.remove=function(n){var e=this.get(n)||[];_e(e)||(e=[e]);var t=this;B(e,function(i){var r=t._getOverlayContainer(i.element,!0);if(i&&($e(i.html),$e(i.htmlContainer),delete i.htmlContainer,delete i.element,delete t._overlays[i.id]),r){var s=r.overlays.indexOf(i);s!==-1&&r.overlays.splice(s,1)}})};ke.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"};ke.prototype.show=function(){Qa(this._overlayRoot)};ke.prototype.hide=function(){Qa(this._overlayRoot,!1)};ke.prototype.clear=function(){this._overlays={},this._overlayContainers=[],wa(this._overlayRoot)};ke.prototype._updateOverlayContainer=function(n){var e=n.element,t=n.html,i=e.x,r=e.y;if(e.waypoints){var s=wi(e);i=s.x,r=s.y}Xm(t,i,r),tr(n.html,"data-container-id",e.id)};ke.prototype._updateOverlay=function(n){var e=n.position,t=n.htmlContainer,i=n.element,r=e.left,s=e.top;if(e.right!==void 0){var o;i.waypoints?o=wi(i).width:o=i.width,r=e.right*-1+o}if(e.bottom!==void 0){var a;i.waypoints?a=wi(i).height:a=i.height,s=e.bottom*-1+a}Xm(t,r||0,s||0),this._updateOverlayVisibilty(n,this._canvas.viewbox())};ke.prototype._createOverlayContainer=function(n){var e=le('<div class="djs-overlays" />');yi(e,{position:"absolute"}),this._overlayRoot.appendChild(e);var t={html:e,element:n,overlays:[]};return this._updateOverlayContainer(t),this._overlayContainers.push(t),t};ke.prototype._updateRoot=function(n){var e=n.scale||1,t="matrix("+[e,0,0,e,-1*n.x*e,-1*n.y*e].join(",")+")";Um(this._overlayRoot,t)};ke.prototype._getOverlayContainer=function(n,e){var t=we(this._overlayContainers,function(i){return i.element===n});return!t&&!e?this._createOverlayContainer(n):t};ke.prototype._addOverlay=function(n){var e=n.id,t=n.element,i=n.html,r,s;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),tt(i)&&(i=le(i)),s=this._getOverlayContainer(t),r=le('<div class="djs-overlay" data-overlay-id="'+e+'">'),yi(r,{position:"absolute"}),r.appendChild(i),n.type&&vi(r).add("djs-overlay-"+n.type);var o=this._canvas.findRoot(t),a=this._canvas.getRootElement();Qa(r,o===a),n.htmlContainer=r,s.overlays.push(n),s.html.appendChild(r),this._overlays[e]=n,this._updateOverlay(n),this._updateOverlayVisibilty(n,this._canvas.viewbox())};ke.prototype._updateOverlayVisibilty=function(n,e){var t=n.show,i=this._canvas.findRoot(n.element),r=t&&t.minZoom,s=t&&t.maxZoom,o=n.htmlContainer,a=this._canvas.getRootElement(),l=!0;(i!==a||t&&(ht(r)&&r>e.scale||ht(s)&&s<e.scale))&&(l=!1),Qa(o,l),this._updateOverlayScale(n,e)};ke.prototype._updateOverlayScale=function(n,e){var t=n.scale,i,r,s=n.htmlContainer,o,a="";t!==!0&&(t===!1?(i=1,r=1):(i=t.min,r=t.max),ht(i)&&e.scale<i&&(o=(1/e.scale||1)*i),ht(r)&&e.scale>r&&(o=(1/e.scale||1)*r)),ht(o)&&(a="scale("+o+","+o+")"),Um(s,a)};ke.prototype._updateOverlaysVisibilty=function(n){var e=this;B(this._overlays,function(t){e._updateOverlayVisibilty(t,n)})};ke.prototype._init=function(){var n=this._eventBus,e=this;function t(i){e._updateRoot(i),e._updateOverlaysVisibilty(i),e.show()}n.on("canvas.viewbox.changing",function(i){e.hide()}),n.on("canvas.viewbox.changed",function(i){t(i.viewbox)}),n.on(["shape.remove","connection.remove"],function(i){var r=i.element,s=e.get({element:r});B(s,function(l){e.remove(l.id)});var o=e._getOverlayContainer(r);if(o){$e(o.html);var a=e._overlayContainers.indexOf(o);a!==-1&&e._overlayContainers.splice(a,1)}}),n.on("element.changed",gk,function(i){var r=i.element,s=e._getOverlayContainer(r,!0);s&&(B(s.overlays,function(o){e._updateOverlay(o)}),e._updateOverlayContainer(s))}),n.on("element.marker.update",function(i){var r=e._getOverlayContainer(i.element,!0);r&&vi(r.html)[i.add?"add":"remove"](i.marker)}),n.on("root.set",function(){e._updateOverlaysVisibilty(e._canvas.viewbox())}),n.on("diagram.clear",this.clear,this)};function yk(n){var e=le('<div class="djs-overlay-container" />');return yi(e,{position:"absolute",width:0,height:0}),n.insertBefore(e,n.firstChild),e}function Xm(n,e,t){yi(n,{left:e+"px",top:t+"px"})}function Qa(n,e){n.style.display=e===!1?"none":""}function Um(n,e){n.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(t){n.style[t+"transform"]=e})}var za={__init__:["overlays"],overlays:["type",ke]};function cr(n,e,t){this._eventBus=n,this._canvas=e,this._translate=t,n.on("diagram.init",function(){this._init()},this),n.on("import.done",function(i){i.error||this.update()},this),this.HTML_MARKUP='<div class="dmn-definitions"><div class="dmn-definitions-name" title="'+this._translate("Definition name")+'" spellcheck="false"></div><div class="dmn-definitions-id" title="'+this._translate("Definition ID")+'" spellcheck="false"></div></div>'}cr.$inject=["eventBus","canvas","translate"];cr.prototype._init=function(){var n=this._canvas,e=this._eventBus,t=n.getContainer(),i=this._container=le(this.HTML_MARKUP);t.appendChild(i),this.nameElement=jt(".dmn-definitions-name",this._container),this.idElement=jt(".dmn-definitions-id",this._container),On.bind(i,".dmn-definitions-name, .dmn-definitions-id","mousedown",function(r){r.stopPropagation()}),e.fire("definitionIdView.create",{html:i})};cr.prototype.update=function(){var n=this._canvas.getRootElement().businessObject;this.nameElement.textContent=n.name,this.idElement.textContent=n.id};function Wa(n,e){function t(i,r){var s=e.getContainer();vi(s).toggle(i,r)}n.on("palette.create",function(){t("with-palette",!0)}),n.on("palette.changed",function(i){t("with-palette-two-column",i.twoColumn)})}Wa.$inject=["eventBus","canvas"];var Ym={__depends__:[rt],__init__:["definitionPropertiesView","definitionPropertiesPaletteAdapter"],definitionPropertiesView:["type",cr],definitionPropertiesPaletteAdapter:["type",Wa]};var Km=[{className:"dmn-icon-decision-table",matches:function(n){var e=Ot(n);return Q(e,"dmn:Decision")&&Q(e.decisionLogic,"dmn:DecisionTable")},title:"Open decision table"},{className:"dmn-icon-literal-expression",matches:function(n){var e=Ta(n);return Q(e,"dmn:LiteralExpression")},title:"Open literal expression"}],ur=class{constructor(e,t,i,r,s){this._injector=e,this._eventBus=t,this._overlays=i,this._translate=s,this._config=r||{enabled:!0},t.on(["shape.added"],({element:o})=>{for(let l=0;l<Km.length;l++){let{matches:c,className:u,title:f}=Km[l];var a=c&&c(o);a&&this.addOverlay(o,u,f)}})}addOverlay(e,t,i){let r=this._config.enabled!==!1,s=this._getOverlayNode(t,i,r),o=this._overlays.add(e,{position:{top:2,left:2},html:s});r&&(vi(s).add("interactive"),this.bindEventListener(e,s,o))}_getOverlayNode(e,t,i){let r=document.createElement("div");if(r.className="drill-down-overlay",!i){let o=document.createElement("span");return o.className=e,r.appendChild(o),r}let s=document.createElement("button");return s.type="button",s.className=e,s.title=this._translate(t),r.appendChild(s),r}bindEventListener(e,t,i){let r=this._overlays,s=this._eventBus,o=r._overlayRoot;On.bind(o,'[data-overlay-id="'+i+'"]',"click",()=>{s.fire("drillDown.click",{element:e})!==!1&&this.drillDown(e)})}drillDown(e){let t=this._injector.get("_parent",!1);if(!t)return!1;let i=t.getView(e.businessObject);return i?(t.open(i),!0):!1}};ur.$inject=["injector","eventBus","overlays","config.drillDown","translate"];var Gm={__depends__:[za,rt],__init__:["drillDown"],drillDown:["type",ur]};function Ve(n){this._container=this._createContainer(),pu(this._container),this._init(this._container,n)}Vt(Ve,kn);Ve.prototype.saveSVG=nr(function(n){var e=this;return new Promise(function(t){var i=e.get("canvas"),r=i.getActiveLayer(),s=jt("defs",i._svg),o=Mp(r),a=s&&s.outerHTML||"",l=r.getBBox(),c=`<?xml version="1.0" encoding="utf-8"?> function 29 %s`,this.path,this.context,$x(e," ")),this)}token(e){return Nn&&console.log("[%s] token <%s> + <%s>",this.path,this.tokens.join(" "),e),this.assign({tokens:[...this.tokens,e]})}literal(e){return Nn&&console.log("[%s] literal %o",this.path,e),this.pushChild(this.of({name:"Literal",value:e}))}computedValue(){for(let e=this;;e=Os(e.children)){if(!e)return null;if(!ha(e.value))return e.value}}contextCache(){let e=this.cache.get(this.context);return e||(e=Nx(this.context),this.cache.set(this.context,e)),e}get path(){var e,t;return((t=(e=this.parent)==null?void 0:e.path)==null?void 0:t.concat(" > ",this.name))||this.name}get(e){let t=e&&Ad(e),i=this.contextCache().originalMap.get(t);if(typeof i=="undefined")return;let r=this.context.get(i);return r instanceof ks?r.get(this):r}resolveName(){let e=this.tokens.join(" "),t=[],i=this.assign({tokens:t}),r=this.of({name:"VariableName",parent:i,value:this.get(e),raw:e});return Nn&&console.log("[%s] resolve name <%s=%s>",r.path,e,this.get(e)),i.pushChild(r)}pushChild(e){if(!e)return this;let t=this.assign({children:[...this.children,e]});return e.parent=t,t}pushChildren(e){let t=this;for(let i of e)t=t.pushChild(i);return t}declareName(){if(this.tokens.length===0)throw Error("no tokens to declare name");let e=this.tokens.join(" ");return Nn&&console.log("[%s] declareName <%s>",this.path,e),this.assign({tokens:[]}).pushChild(this.of({name:"Name",value:e}))}define(e,t){if(typeof e!="string")return Nn&&console.log("[%s] no define <%s=%s>",this.path,e,t),this;Nn&&console.log("[%s] define <%s=%s>",this.path,e,t);let i=this.context,r=i.set(e,t),s=this.cache.get(i)||Nx(i),o=Kx(e,Gx(s));return this.cache.set(r,o),this.assign({context:r})}assign(e={}){return n.of({...this,...e})}of(e={}){let t={context:this.context,parent:this.parent};return n.of({...t,...e})}static of(e){let{name:t,tokens:i=[],children:r=[],parent:s=null,context:o,value:a,raw:l,__cache:c}=e;if(!o)throw new Error("must provide <context>");return new n({name:t,tokens:[...i],children:[...r],context:o,parent:s,value:a,raw:l,__cache:c})}};function Ad(n){return n.replace(/\s*([./\-'+]|\*\*?)\s*/g," $1 ").replace(/\s{2,}/g," ").trim()}function qx(n,e,t){var c;let i=n.children.filter(u=>u.name!==e),r=n.children.filter(u=>u.name===e),s=i[0],o=i[Math.max(1,i.length-1)],a=s==null?void 0:s.computedValue(),l=(c=o==null?void 0:o.computedValue())!=null?c:null;return n.assign({children:r}).enterScope(e).pushChildren(i).exitScope(t).define(a,l)}function _d(n={},e=Od){let t=kd.of({context:e.of(n)});return new bc({start:t,reduce(i,r,s,o){if(r===jx){let[f,h]=i.children.slice(-2);i=i.assign({value:e.of(f==null?void 0:f.computedValue(),h==null?void 0:h.computedValue())})}if(r===Hx&&(i=i.assign({value:e.of(...i.children.map(f=>f==null?void 0:f.computedValue()))})),r===Qx){let[f,h]=i.children.slice(-2);i=i.assign({value:f==null?void 0:f.computedValue()})}if(r===Wx){let[f,...h]=i.children;(f==null?void 0:f.raw)==="get value"?i=CT(i,h):i=i.assign({value:(f==null?void 0:f.computedValue())||e.of(void 0)})}let a=xT[r];if(a)return i.enterScope(a);let l=vT[r];if(l){let{children:f,context:h}=i,d=f.slice(0,-1),p=Os(f),m=null;return r===Vx&&(m=e.of(p==null?void 0:p.computedValue())),r===zx&&(m=e.of(h,p==null?void 0:p.computedValue()).set("item",p==null?void 0:p.computedValue())),i.assign({children:d}).enterScope(l).pushChild(p).assign({context:m||h})}let c=o.read(o.pos,s.pos);if(bT[r])return i.exitScope(c);if(r===iT){let f=i.children.filter(p=>p.name!=="ContextEntry"),h=f[0],d=Os(f);return qx(i,"ContextEntry",c).assign({value:e.of(i.value).set(h==null?void 0:h.computedValue(),d==null?void 0:d.computedValue())})}if(r===T_||r===L_)return qx(i,"InExpression",c);if(r===D_)return i.define("partial",ks.of(f=>{var h;return(h=Os(f.children))==null?void 0:h.computedValue()}));if(r===X_){let f=Os(i.children).computedValue();return i.define(f,1)}if(r===F_||r===j_||r===V_){let f=i.children.slice(0,-1),h=Os(i.children);return i.assign({children:f}).enterScope("ArithmeticExpression").pushChild(h)}if(r===Q_)return i.enterScope("ArithmeticExpression");if(r===R_||r===P_||r===sT)return i.token(c);if(r===K_)return i.literal(c.replace(/^"|"$/g,"").replace(/\\(["\\])/g,"$1"));if(r===G_)return i.literal(c==="true");if(r===Y_)return i.literal(parseFloat(c));if(r===U_)return i.literal(null);if(r===z_)return i.resolveName();if(r===M_||r===rT)return i.declareName();if((r===Bx||r===N_)&&i.tokens.length>0)throw new Error("uncleared name");if(r===Bx){let f=i;for(;f.parent;)f=f.exitScope(c);return f}return i}})}var kT=_d({});function CT(n,e){if(!e.length)return n.assign({value:null});if(e[0].name==="Name"&&(e=ST(e,["m","key"])),e.length!==2)return n.assign({value:null});let[t,i]=e,r=i==null?void 0:i.computedValue(),s=t==null?void 0:t.computedValue();return!s||typeof s!="object"||typeof r!="string"?n.assign({value:null}):n.assign({value:[Ad(r),r].reduce((o,a)=>s.get(a)||o,null)})}function ST(n,e){let t={};for(let i=0;i<n.length;i+=2){let[r,s]=n.slice(i,i+2);t[r.value]=s}return e.map(i=>t[i])}function Os(n){return n[n.length-1]}var ET=Jl({StringLiteral:T.string,NumericLiteral:T.number,BooleanLiteral:T.bool,"AtLiteral!":T.special(T.string),CompareOp:T.compareOperator,ArithOp:T.arithmeticOperator,"for if then else some every return":T.controlKeyword,"in instance of and or satisfies between as":T.operatorKeyword,function:T.definitionKeyword,"Type/...":T.typeName,"Wildcard!":T.modifier,null:T.null,LineComment:T.lineComment,BlockComment:T.blockComment,"VariableName!":T.variableName,'"?"':T.special(T.variableName),"DateTimeConstructor! SpecialFunctionName!":T.standard(T.function(T.variableName)),"FunctionInvocation/VariableName!":T.function(T.variableName),"Name!":T.definition(T.variableName),"Key/Name! ContextEntryType/Name!":T.definition(T.propertyName),"PathExpression/VariableName!":T.propertyName,"FormalParameter/ParameterName!":T.function(T.definition(T.variableName)),"( )":T.paren,"[ ]":T.squareBracket,"{ }":T.brace,".":T.derefOperator,", ;":T.separator,"..":T.punctuation}),AT={__proto__:null,for:10,in:32,return:36,if:40,then:42,else:44,some:48,every:50,satisfies:56,or:60,and:64,between:72,instance:86,of:89,days:101,time:103,duration:105,years:107,months:109,date:111,list:117,context:123,function:130,null:156,true:330,false:330,"?":170,external:186,not:211},Jx=wc.deserialize({version:14,states:"CjO`QYOOO`QYOOO$yQYOOOOQU'#Ce'#CeO%TQYO'#C`O&^QYO'#FQOOQQ'#Fe'#FeO&hQYO'#FeO`QYO'#DVOOQU'#En'#EnO(_Q^O'#D]OOQU'#D^'#D^OOQU'#D]'#D]OOQO'#Fm'#FmO*[QWO'#DvOOQQ'#D}'#D}OOQQ'#EO'#EOOOQQ'#EP'#EPO*aOWO'#ESO*[QWO'#EQOOQQ'#EQ'#EQOOQQ'#Fs'#FsOOQQ'#Fq'#FqOOQQ'#Fy'#FyOOQQ'#EU'#EUO`QYO'#EWOOQQ'#FS'#FSO*iQ^O'#FSO,`QYO'#EXO,gQWO'#EYOOQP'#F}'#F}O,lQXO'#EaOOQQ'#Fz'#FzOOQQ'#FR'#FRQOQWOOOOQQ'#FT'#FTOOQQ'#F^'#F^O`QYO'#CoOOQQ'#F_'#F_O%TQYO'#CsO,zQYO'#DwOOQQ'#Fr'#FrO-PQYO'#EROOQO'#ER'#ERO`QYO'#EVO`QYO'#EUOOQO'#F{'#F{Q-XQWOOO-^QYO'#DRO.TQWO'#FaOOQO'#DT'#DTO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g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wR&S%jT&W%k&q!_!eT!Q!n!t!v#P#W#X#h#i#j#k#m#n#o#p#u$i$m$p%P%Q%X%[%_%b%l%t%x&Z!_!gT!Q!n!t!v#P#W#X#h#i#j#k#m#n#o#p#u$i$m$p%P%Q%X%[%_%b%l%t%x&Z!k^OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wQ!q^R!scR#y!pQ!wlR#z!p!kfOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%w!klOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%w!kmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wR$T!x!koOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wR#Oo",nodeNames:"\u26A0 LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName BacktickIdentifier SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not",maxTerm:173,context:kT,nodeProps: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q;'S*r;'S;=`+s<%lO*r~+sOQ~~+vP;=`<%l*r~,OSP~OY+yZ;'S+y;'S;=`,[<%lO+y~,_P;=`<%l+y~,gS$h~!O!P,s!Q![,b!g!h){#X#Y){~,vP!Q![)m~-OO$[~~-TO$s~R-[P!]QsP!_!`-_P-dOsPR-kP!YQsP!_!`-_~-sO$l~~-xO!i~~-}O!g~~.QTO#S-}#S#T.a#T;'S-};'S;=`.f<%lO-}~.fO$Y~~.iP;=`<%l-}~.qO#S~~.vO#R~",tokenizers:[gT,mT,yT,0,1],topRules:{Expression:[0,3],Expressions:[1,102],UnaryTests:[2,103]},dialects:{camunda:2564},dynamicPrecedences:{31:-1,68:1,72:-1,74:-1},specialized:[{term:122,get:n=>AT[n]||-1}],tokenPrec:2567});function _T(n){let e=[];return n.iterate({enter:t=>{let i=t.node;if(!i.type.isError)return;let r=i.parent,s=eb(i),o={from:i.from,to:i.to,severity:"error",type:"Syntax Error"};if(i.from!==i.to)o.message=`Unrecognized token in <${r.name}>`;else if(s)o.message=`Unrecognized token <${s.name}> in <${r.name}>`,o.to=s.to;else{let a=r.enterUnfinishedNodesBefore(i.to);o.message=`Incomplete <${(a||r).name}>`}e.push(o)}}),e}function eb(n){return n?n.nextSibling||eb(n.parent):null}var TT="first-item",MT={create(n){return{enter(e){if(e.name!=="FilterExpression")return;let t=n.readContent(e.from,e.to);if(Zx().test(t)){let{from:i,to:r}=e;n.report({from:i,to:r,message:"First item is accessed via [1]",severity:"warning",type:TT,actions:[{name:"fix",apply(s,o=i,a=r){n.updateContent(o,a,t.replace(Zx(),"[1]"))}}]})}}}}};function Zx(){return/\[\s*0\s*\]$/}var RT=[MT];function PT(n){let{readContent:e,syntaxTree:t,updateContent:i}=n,r=[],s={readContent:e,report:a=>{r.push(a)},updateContent:i},o=RT.map(a=>a.create(s));return t.iterate({enter:a=>{for(let l of o)l.enter&&l.enter(a)},leave:a=>{for(let l of o)l.leave&&l.leave(a)}}),r}function DT(n){return[..._T(n.syntaxTree),...PT(n)]}var tb=()=>n=>{if(n.state.doc.length===0)return[];let e=ge(n.state);return DT({syntaxTree:e,readContent:(i,r)=>n.state.sliceDoc(i,r),updateContent:(i,r,s)=>n.dispatch({changes:{from:i,to:r,insert:s}})}).map(i=>({...i,source:i.type}))};var Md=[Bt("function(${params}) ${body}",{label:"function",detail:"definition",type:"keyword"}),Bt("for ${var} in ${collection} return ${value}",{label:"for",detail:"expression",type:"keyword"}),Bt("every ${var} in ${collection} satisfies ${condition}",{label:"every",detail:"quantified expression",type:"keyword"}),Bt("some ${var} in ${collection} satisfies ${condition}",{label:"some",detail:"quantified expression",type:"keyword"}),Bt("if ${condition} then ${value} else ${other value}",{label:"if",detail:"block",type:"keyword"}),Bt("{ ${key}: ${value} }",{label:"context",detail:"block",type:"keyword"}),Bt("null",{label:"null",detail:"literal",type:"keyword"}),Bt("true",{label:"true",detail:"literal",type:"keyword"}),Bt("false",{label:"false",detail:"literal",type:"keyword"})];function Td(){return Td=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Td.apply(null,arguments)}function ra(n){let{context:e,after:t,before:i,keyword:r}=n;return NT({nodes:e,before:i,after:t,keyword:r},ys([{label:r,type:"keyword",boost:10}]))}var Rd=[ra({context:"InExpression",keyword:"in"}),ra({context:"IfExpression",keyword:"then",after:"if",before:"else"}),ra({context:"IfExpression",keyword:"else",after:"then"}),ra({context:"QuantifiedExpression",keyword:"satisfies"}),ra({context:"ForExpression",after:"InExpressions",keyword:"return"})],nb=["StringLiteral","Identifier","LineComment","BlockComment","PathExpression","Context","Key","ParameterName"],BT=["Expr","ContextEntry"];function IT(n){let e=[...nb,...BT];return t=>{let{state:i,pos:r}=t,s=sb(ge(i).resolveInner(r,-1),e);if(s){let[o,a]=s;if(nb.includes(a))return null}return n(t)}}function $T(n){return IT(ys(n.map(e=>Td({},e,{type:"text"}))))}function ib(n,e,t){return rb(n,e,t,-1)}function LT(n,e,t){return rb(n,e,t,1)}function rb(n,e,t,i){let r=n[i>0?"childAfter":"childBefore"](e);for(;r;){if(t.includes(r.name))return r;if(r.type.isError&&r.firstChild&&t.includes(r.firstChild.name))return r.firstChild;r=r[i>0?"nextSibling":"prevSibling"]}return null}function sb(n,e){for(Array.isArray(e)||(e=[e]);n;n=n.parent){let t=n.type,i=e.find(r=>r&&t.is(r));if(i)return[n,i];if(t.isTop)break}return null}function NT(n,e){let{nodes:t,before:i,after:r,keyword:s}=n;return o=>{let{state:a,pos:l}=o,c=sb(ge(a).resolveInner(l,-1),t);if(!c)return null;let[u]=c;return ib(u,l,[s,i])||LT(u,l,[s,r])||r&&!ib(u,l,[r])?null:e(o)}}var ob=Zl.define({parser:Jx.configure({props:[$h.add({Context:Lh({closing:"}"}),"List FilterExpression":Lh({closing:"]"}),"ParenthesizedExpression FunctionInvocation":nc({except:/^\s*\)/}),"ForExpression QuantifiedExpression IfExpression":nc({except:/^\s*(then|else|return|satisfies)\b/}),FunctionDefinition:nc({except:/^\s*(\(|\))/})}),dv.add({Context:ic,List:ic,ParenthesizedExpression:ic,FunctionDefinition(n){let e=n.getChild(")");return e?{from:e.to,to:n.to}:null}})]}),languageData:{indentOnInput:/^\s*(\)|\}|\]|then|else|return|satisfies)$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}}),qT=ob.configure({top:"UnaryTests"},"FEEL unary tests"),FT=ob.configure({top:"Expression"},"FEEL expression");function ab(n={}){let e=n.dialect==="unaryTests"?qT:FT,t=n.parserDialect,i=_d(n.context),r=e.configure({contextTracker:i,dialect:t}),s=n.completions||[$T(Md),Rd].flat();return new ec(r,[...s.map(o=>r.data.of({autocomplete:o}))])}var jT=[{name:"not",type:"function",params:[{name:"negand"}],info:`<p>Returns the logical negation of the given value.</p>
|
| H A D | dmn-modeler.production.min.js | 248 `,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,` 288 %s`,this.path,this.context,CP(e," ")),this)}token(e){return Wr&&console.log("[%s] token <%s> + <%s>",this.path,this.tokens.join(" "),e),this.assign({tokens:[...this.tokens,e]})}literal(e){return Wr&&console.log("[%s] literal %o",this.path,e),this.pushChild(this.of({name:"Literal",value:e}))}computedValue(){for(let e=this;;e=xc(e.children)){if(!e)return null;if(!Yr(e.value))return e.value}}contextCache(){let e=this.cache.get(this.context);return e||(e=SP(this.context),this.cache.set(this.context,e)),e}get path(){var e,t;return((t=(e=this.parent)==null?void 0:e.path)==null?void 0:t.concat(" > ",this.name))||this.name}get(e){let t=e&&U_(e),i=this.contextCache().originalMap.get(t);if(typeof i=="undefined")return;let r=this.context.get(i);return r instanceof bc?r.get(this):r}resolveName(){let e=this.tokens.join(" "),t=[],i=this.assign({tokens:t}),r=this.of({name:"VariableName",parent:i,value:this.get(e),raw:e});return Wr&&console.log("[%s] resolve name <%s=%s>",r.path,e,this.get(e)),i.pushChild(r)}pushChild(e){if(!e)return this;let t=this.assign({children:[...this.children,e]});return e.parent=t,t}pushChildren(e){let t=this;for(let i of e)t=t.pushChild(i);return t}declareName(){if(this.tokens.length===0)throw Error("no tokens to declare name");let e=this.tokens.join(" ");return Wr&&console.log("[%s] declareName <%s>",this.path,e),this.assign({tokens:[]}).pushChild(this.of({name:"Name",value:e}))}define(e,t){if(typeof e!="string")return Wr&&console.log("[%s] no define <%s=%s>",this.path,e,t),this;Wr&&console.log("[%s] define <%s=%s>",this.path,e,t);let i=this.context,r=i.set(e,t),o=this.cache.get(i)||SP(i),s=NP(e,$P(o));return this.cache.set(r,s),this.assign({context:r})}assign(e={}){return n.of({...this,...e})}of(e={}){let t={context:this.context,parent:this.parent};return n.of({...t,...e})}static of(e){let{name:t,tokens:i=[],children:r=[],parent:o=null,context:s,value:a,raw:l,__cache:c}=e;if(!s)throw new Error("must provide <context>");return new n({name:t,tokens:[...i],children:[...r],context:s,parent:o,value:a,raw:l,__cache:c})}};function U_(n){return n.replace(/\s*([./\-'+]|\*\*?)\s*/g," $1 ").replace(/\s{2,}/g," ").trim()}function OP(n,e,t){var c;let i=n.children.filter(u=>u.name!==e),r=n.children.filter(u=>u.name===e),o=i[0],s=i[Math.max(1,i.length-1)],a=o==null?void 0:o.computedValue(),l=(c=s==null?void 0:s.computedValue())!=null?c:null;return n.assign({children:r}).enterScope(e).pushChildren(i).exitScope(t).define(a,l)}function Q_(n={},e=q_){let t=V_.of({context:e.of(n)});return new My({start:t,reduce(i,r,o,s){if(r===RP){let[f,h]=i.children.slice(-2);i=i.assign({value:e.of(f==null?void 0:f.computedValue(),h==null?void 0:h.computedValue())})}if(r===DP&&(i=i.assign({value:e.of(...i.children.map(f=>f==null?void 0:f.computedValue()))})),r===AP){let[f,h]=i.children.slice(-2);i=i.assign({value:f==null?void 0:f.computedValue()})}if(r===PP){let[f,...h]=i.children;(f==null?void 0:f.raw)==="get value"?i=Nz(i,h):i=i.assign({value:(f==null?void 0:f.computedValue())||e.of(void 0)})}let a=Pz[r];if(a)return i.enterScope(a);let l=Mz[r];if(l){let{children:f,context:h}=i,d=f.slice(0,-1),p=xc(f),m=null;return r===TP&&(m=e.of(p==null?void 0:p.computedValue())),r===MP&&(m=e.of(h,p==null?void 0:p.computedValue()).set("item",p==null?void 0:p.computedValue())),i.assign({children:d}).enterScope(l).pushChild(p).assign({context:m||h})}let c=s.read(s.pos,o.pos);if(Dz[r])return i.exitScope(c);if(r===gz){let f=i.children.filter(p=>p.name!=="ContextEntry"),h=f[0],d=xc(f);return OP(i,"ContextEntry",c).assign({value:e.of(i.value).set(h==null?void 0:h.computedValue(),d==null?void 0:d.computedValue())})}if(r===V6||r===X6)return OP(i,"InExpression",c);if(r===U6)return i.define("partial",bc.of(f=>{var h;return(h=xc(f.children))==null?void 0:h.computedValue()}));if(r===sz){let f=xc(i.children).computedValue();return i.define(f,1)}if(r===J6||r===ez||r===tz){let f=i.children.slice(0,-1),h=xc(i.children);return i.assign({children:f}).enterScope("ArithmeticExpression").pushChild(h)}if(r===nz)return i.enterScope("ArithmeticExpression");if(r===z6||r===W6||r===vz)return i.token(c);if(r===cz)return i.literal(c.replace(/^"|"$/g,"").replace(/\\(["\\])/g,"$1"));if(r===uz)return i.literal(c==="true");if(r===lz)return i.literal(parseFloat(c));if(r===az)return i.literal(null);if(r===iz)return i.resolveName();if(r===H6||r===yz)return i.declareName();if((r===_P||r===Y6)&&i.tokens.length>0)throw new Error("uncleared name");if(r===_P){let f=i;for(;f.parent;)f=f.exitScope(c);return f}return i}})}var Bz=Q_({});function Nz(n,e){if(!e.length)return n.assign({value:null});if(e[0].name==="Name"&&(e=$z(e,["m","key"])),e.length!==2)return n.assign({value:null});let[t,i]=e,r=i==null?void 0:i.computedValue(),o=t==null?void 0:t.computedValue();return!o||typeof o!="object"||typeof r!="string"?n.assign({value:null}):n.assign({value:[U_(r),r].reduce((s,a)=>o.get(a)||s,null)})}function $z(n,e){let t={};for(let i=0;i<n.length;i+=2){let[r,o]=n.slice(i,i+2);t[r.value]=o}return e.map(i=>t[i])}function xc(n){return n[n.length-1]}var jz=cy({StringLiteral:B.string,NumericLiteral:B.number,BooleanLiteral:B.bool,"AtLiteral!":B.special(B.string),CompareOp:B.compareOperator,ArithOp:B.arithmeticOperator,"for if then else some every return":B.controlKeyword,"in instance of and or satisfies between as":B.operatorKeyword,function:B.definitionKeyword,"Type/...":B.typeName,"Wildcard!":B.modifier,null:B.null,LineComment:B.lineComment,BlockComment:B.blockComment,"VariableName!":B.variableName,'"?"':B.special(B.variableName),"DateTimeConstructor! SpecialFunctionName!":B.standard(B.function(B.variableName)),"FunctionInvocation/VariableName!":B.function(B.variableName),"Name!":B.definition(B.variableName),"Key/Name! ContextEntryType/Name!":B.definition(B.propertyName),"PathExpression/VariableName!":B.propertyName,"FormalParameter/ParameterName!":B.function(B.definition(B.variableName)),"( )":B.paren,"[ ]":B.squareBracket,"{ }":B.brace,".":B.derefOperator,", ;":B.separator,"..":B.punctuation}),Fz={__proto__:null,for:10,in:32,return:36,if:40,then:42,else:44,some:48,every:50,satisfies:56,or:60,and:64,between:72,instance:86,of:89,days:101,time:103,duration:105,years:107,months:109,date:111,list:117,context:123,function:130,null:156,true:330,false:330,"?":170,external:186,not:211},jP=Py.deserialize({version:14,states:"CjO`QYOOO`QYOOO$yQYOOOOQU'#Ce'#CeO%TQYO'#C`O&^QYO'#FQOOQQ'#Fe'#FeO&hQYO'#FeO`QYO'#DVOOQU'#En'#EnO(_Q^O'#D]OOQU'#D^'#D^OOQU'#D]'#D]OOQO'#Fm'#FmO*[QWO'#DvOOQQ'#D}'#D}OOQQ'#EO'#EOOOQQ'#EP'#EPO*aOWO'#ESO*[QWO'#EQOOQQ'#EQ'#EQOOQQ'#Fs'#FsOOQQ'#Fq'#FqOOQQ'#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#q#}$O$X$]$`$o${%V%a%v%w!kwOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wR#SwV!SQ#^#q!V!aT!Q!t!v#P#W#X#h#m#n#o#p#u$i$m$p%P%Q%X%[%_%b%l%t%x&Z!X!bT!Q!t!v#P#W#X#h#i#m#n#o#p#u$i$m$p%P%Q%X%[%_%b%l%t%x&Z!Z!cT!Q!t!v#P#W#X#h#i#j#m#n#o#p#u$i$m$p%P%Q%X%[%_%b%l%t%x&Z!kWOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wR&S%jT&W%k&q!_!eT!Q!n!t!v#P#W#X#h#i#j#k#m#n#o#p#u$i$m$p%P%Q%X%[%_%b%l%t%x&Z!_!gT!Q!n!t!v#P#W#X#h#i#j#k#m#n#o#p#u$i$m$p%P%Q%X%[%_%b%l%t%x&Z!k^OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wQ!q^R!scR#y!pQ!wlR#z!p!kfOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%w!klOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%w!kmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wR$T!x!koOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#q#}$O$X$]$`$o${%V%a%v%wR#Oo",nodeNames:"\u26A0 LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName BacktickIdentifier SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not",maxTerm:173,context:Bz,nodeProps:[["group",-17,4,19,23,29,31,33,41,42,68,70,72,85,86,88,89,90,97,"Expr",47,"Expr Expr",-5,78,79,80,81,82,"Expr Literal"],["closedBy",38,")",71,"]",96,"}"],["openedBy",40,"(",69,"[",95,"{"]],propSources:[jz],skippedNodes:[0,1,2],repeatNodeCount:14,tokenData:".v~RvXY#iYZ$^Z[#i]^$^pq#iqr$crs$nwx(Wxy(]yz(bz{(g{|(t|}(y}!O)O!O!P)]!P!Q*g!Q![,b![!],y!]!^-O!^!_-T!_!`$i!`!a-d!b!c-n!}#O-s#P#Q-x#Q#R(o#S#T-}#o#p.l#q#r.q$f$g#i#BY#BZ#i$IS$I_#i$I|$I}$^$I}$JO$^$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~#nY#r~XY#iZ[#ipq#i$f$g#i#BY#BZ#i$IS$I_#i$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~$cO#s~~$fP!_!`$i~$nOr~~$qXOY$nYZ%^Zr$nrs&zs#O$n#O#P'R#P;'S$n;'S;=`(Q<%lO$n~%aVOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`&t<%lO%^~%{O$i~~&ORO;'S%^;'S;=`&X;=`O%^~&[WOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`&t;=`<%l%^<%lO%^~&wP;=`<%l%^~'RO$i~$j~~'URO;'S$n;'S;=`'_;=`O$n~'bYOY$nYZ%^Zr$nrs&zs#O$n#O#P'R#P;'S$n;'S;=`(Q;=`<%l$n<%lO$n~(TP;=`<%l$n~(]O#{~~(bOv~~(gOx~~(lP^~z{(o~(tO_~~(yO[~~)OO$O~R)TPZP!`!a)WQ)]O$^Q~)bQ#z~!O!P)h!Q![)m~)mO#}~~)rR$h~!Q![)m!g!h){#X#Y){~*OR{|*X}!O*X!Q![*_~*[P!Q![*_~*dP$h~!Q![*_~*lQ]~z{*r!P!Q+y~*uTOz*rz{+U{;'S*r;'S;=`+s<%lO*r~+XVOz*rz{+U{!P*r!P!Q+n!Q;'S*r;'S;=`+s<%lO*r~+sOQ~~+vP;=`<%l*r~,OSP~OY+yZ;'S+y;'S;=`,[<%lO+y~,_P;=`<%l+y~,gS$h~!O!P,s!Q![,b!g!h){#X#Y){~,vP!Q![)m~-OO$[~~-TO$s~R-[P!]QsP!_!`-_P-dOsPR-kP!YQsP!_!`-_~-sO$l~~-xO!i~~-}O!g~~.QTO#S-}#S#T.a#T;'S-};'S;=`.f<%lO-}~.fO$Y~~.iP;=`<%l-}~.qO#S~~.vO#R~",tokenizers:[Tz,Rz,Az,0,1],topRules:{Expression:[0,3],Expressions:[1,102],UnaryTests:[2,103]},dialects:{camunda:2564},dynamicPrecedences:{31:-1,68:1,72:-1,74:-1},specialized:[{term:122,get:n=>Fz[n]||-1}],tokenPrec:2567});function qz(n){let e=[];return n.iterate({enter:t=>{let i=t.node;if(!i.type.isError)return;let r=i.parent,o=qP(i),s={from:i.from,to:i.to,severity:"error",type:"Syntax Error"};if(i.from!==i.to)s.message=`Unrecognized token in <${r.name}>`;else if(o)s.message=`Unrecognized token <${o.name}> in <${r.name}>`,s.to=o.to;else{let a=r.enterUnfinishedNodesBefore(i.to);s.message=`Incomplete <${(a||r).name}>`}e.push(s)}}),e}function qP(n){return n?n.nextSibling||qP(n.parent):null}var Vz="first-item",Hz={create(n){return{enter(e){if(e.name!=="FilterExpression")return;let t=n.readContent(e.from,e.to);if(FP().test(t)){let{from:i,to:r}=e;n.report({from:i,to:r,message:"First item is accessed via [1]",severity:"warning",type:Vz,actions:[{name:"fix",apply(o,s=i,a=r){n.updateContent(s,a,t.replace(FP(),"[1]"))}}]})}}}}};function FP(){return/\[\s*0\s*\]$/}var zz=[Hz];function Wz(n){let{readContent:e,syntaxTree:t,updateContent:i}=n,r=[],o={readContent:e,report:a=>{r.push(a)},updateContent:i},s=zz.map(a=>a.create(o));return t.iterate({enter:a=>{for(let l of s)l.enter&&l.enter(a)},leave:a=>{for(let l of s)l.leave&&l.leave(a)}}),r}function Uz(n){return[...qz(n.syntaxTree),...Wz(n)]}var VP=()=>n=>{if(n.state.doc.length===0)return[];let e=lt(n.state);return Uz({syntaxTree:e,readContent:(i,r)=>n.state.sliceDoc(i,r),updateContent:(i,r,o)=>n.dispatch({changes:{from:i,to:r,insert:o}})}).map(i=>({...i,source:i.type}))};var G_=[li("function(${params}) ${body}",{label:"function",detail:"definition",type:"keyword"}),li("for ${var} in ${collection} return ${value}",{label:"for",detail:"expression",type:"keyword"}),li("every ${var} in ${collection} satisfies ${condition}",{label:"every",detail:"quantified expression",type:"keyword"}),li("some ${var} in ${collection} satisfies ${condition}",{label:"some",detail:"quantified expression",type:"keyword"}),li("if ${condition} then ${value} else ${other value}",{label:"if",detail:"block",type:"keyword"}),li("{ ${key}: ${value} }",{label:"context",detail:"block",type:"keyword"}),li("null",{label:"null",detail:"literal",type:"keyword"}),li("true",{label:"true",detail:"literal",type:"keyword"}),li("false",{label:"false",detail:"literal",type:"keyword"})];function K_(){return K_=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},K_.apply(null,arguments)}function Xh(n){let{context:e,after:t,before:i,keyword:r}=n;return Yz({nodes:e,before:i,after:t,keyword:r},pc([{label:r,type:"keyword",boost:10}]))}var X_=[Xh({context:"InExpression",keyword:"in"}),Xh({context:"IfExpression",keyword:"then",after:"if",before:"else"}),Xh({context:"IfExpression",keyword:"else",after:"then"}),Xh({context:"QuantifiedExpression",keyword:"satisfies"}),Xh({context:"ForExpression",after:"InExpressions",keyword:"return"})],HP=["StringLiteral","Identifier","LineComment","BlockComment","PathExpression","Context","Key","ParameterName"],Qz=["Expr","ContextEntry"];function Kz(n){let e=[...HP,...Qz];return t=>{let{state:i,pos:r}=t,o=UP(lt(i).resolveInner(r,-1),e);if(o){let[s,a]=o;if(HP.includes(a))return null}return n(t)}}function Gz(n){return Kz(pc(n.map(e=>K_({},e,{type:"text"}))))}function zP(n,e,t){return WP(n,e,t,-1)}function Xz(n,e,t){return WP(n,e,t,1)}function WP(n,e,t,i){let r=n[i>0?"childAfter":"childBefore"](e);for(;r;){if(t.includes(r.name))return r;if(r.type.isError&&r.firstChild&&t.includes(r.firstChild.name))return r.firstChild;r=r[i>0?"nextSibling":"prevSibling"]}return null}function UP(n,e){for(Array.isArray(e)||(e=[e]);n;n=n.parent){let t=n.type,i=e.find(r=>r&&t.is(r));if(i)return[n,i];if(t.isTop)break}return null}function Yz(n,e){let{nodes:t,before:i,after:r,keyword:o}=n;return s=>{let{state:a,pos:l}=s,c=UP(lt(a).resolveInner(l,-1),t);if(!c)return null;let[u]=c;return zP(u,l,[o,i])||Xz(u,l,[o,r])||r&&!zP(u,l,[r])?null:e(s)}}var QP=uy.define({parser:jP.configure({props:[t_.add({Context:n_({closing:"}"}),"List FilterExpression":n_({closing:"]"}),"ParenthesizedExpression FunctionInvocation":dy({except:/^\s*\)/}),"ForExpression QuantifiedExpression IfExpression":dy({except:/^\s*(then|else|return|satisfies)\b/}),FunctionDefinition:dy({except:/^\s*(\(|\))/})}),eM.add({Context:py,List:py,ParenthesizedExpression:py,FunctionDefinition(n){let e=n.getChild(")");return e?{from:e.to,to:n.to}:null}})]}),languageData:{indentOnInput:/^\s*(\)|\}|\]|then|else|return|satisfies)$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}}),Zz=QP.configure({top:"UnaryTests"},"FEEL unary tests"),Jz=QP.configure({top:"Expression"},"FEEL expression");function KP(n={}){let e=n.dialect==="unaryTests"?Zz:Jz,t=n.parserDialect,i=Q_(n.context),r=e.configure({contextTracker:i,dialect:t}),o=n.completions||[Gz(G_),X_].flat();return new fy(r,[...o.map(s=>r.data.of({autocomplete:s}))])}var eW=[{name:"not",type:"function",params:[{name:"negand"}],info:`<p>Returns the logical negation of the given value.</p> 197 `,this._current.container)};De.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 global() function [all...] |
| /plugin/vegalite/ |
| H A D | vega.min.js | 1 …ms.length;for(let o=0;o<i;++o){const i=t.params[o];r[i.name]=gO(i,e,n)}return r}function gO(t,e,n)…
|
| /plugin/ol3/ |
| D | script.js | 8 …gO=function(t){function e(e){var r=this,n=e||{},i=void 0!==n.className?n.className:n.bar?"ol-scale…
|
| /plugin/mizarverifiabledocs/dist/ |
| H A D | script.js.map | 1 …gO~PQOVUQRSTWXYZ[]W~\",\n goto: \"#OePPPPPPPPPPPPPPffffxP!lqPORSTUVWXY[]^_`abQRO`ZR[]^_`abQ[SQ]…
|
| /plugin/openlayersmap/ol/ |
| H A D | ol.js.map | 1 …,EAAWhsB,QAAS,CACzCqxN,GAAe,EACf,KACF,CACF,CACF,CACIA,GACF3tL,EAAarzC,KAAK+gO,EAAgBxrL,YAEtC,IAEAl…
|