16 lines
No EOL
462 KiB
JavaScript
16 lines
No EOL
462 KiB
JavaScript
/*! bpmn-js - bpmn-modeler v0.14.1 | (c) 2014, 2015 camunda Services GmbH | bpmn.io/license */
|
|
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.BpmnJS=e()}}(function(){var e;return function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var p=new Error("Cannot find module '"+a+"'");throw p.code="MODULE_NOT_FOUND",p}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return r(n?n:t)},u,u.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){"use strict";function i(e){a.call(this,e),this.on("import.parse.complete",function(e){e.error||this._collectIds(e.definitions,e.context)},this),this.on("diagram.destroy",function(){this.moddle.ids.clear()},this)}var r=e(243),o=e(241),a=e(2),s='<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>';r(i,a),t.exports=i,i.prototype.createDiagram=function(e){return this.importXML(s,e)},i.prototype._createModdle=function(e){var t=a.prototype._createModdle.call(this,e);return t.ids=new o([32,36,1]),t},i.prototype._collectIds=function(e,t){var n,i=e.$model,r=i.ids;r.clear();for(n in t.elementsById)r.claim(n,t.elementsById[n])},i.prototype._interactionModules=[e(16),e(8),e(216),e(212),e(213)],i.prototype._modelingModules=[e(166),e(118),e(182),e(196),e(141),e(133),e(12),e(62),e(43),e(10),e(49),e(54)],i.prototype._modules=[].concat(i.prototype._modules,i.prototype._interactionModules,i.prototype._modelingModules)},{10:10,118:118,12:12,133:133,141:141,16:16,166:166,182:182,196:196,2:2,212:212,213:213,216:216,241:241,243:243,43:43,49:49,54:54,62:62,8:8}],2:[function(e,t,n){"use strict";function i(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/,n=t.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}function r(e){return e+(u(e)?"px":"")}function o(e){e=s({},g,e),this.moddle=this._createModdle(e),this.container=this._createContainer(e),a(this.container),this._init(this.container,this.moddle,e)}function a(e){var t=x.BPMNIO_LOGO,n='<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"><img src="data:image/png;base64,'+t+'"></a>',i=l(n);e.appendChild(i),b.bind(i,"click",function(e){x.open(),e.preventDefault()})}var s=e(377),c=e(381),p=e(374),u=e(371),l=e(394),h=e(397),d=e(398),f=e(96),m=e(72),v=e(243),y=e(65),g={width:"100%",height:"100%",position:"relative",container:"body"};v(o,f),t.exports=o,o.prototype.importXML=function(e,t){t=t||function(){};var n=this;e=this._emit("import.parse.start",{xml:e})||e,this.moddle.fromXML(e,"bpmn:Definitions",function(e,r,o){if(r=n._emit("import.parse.complete",{error:e,definitions:r,context:o})||r,e)return e=i(e),n._emit("import.done",{error:e}),t(e);var a=o.warnings;n.importDefinitions(r,function(e,i){var r=[].concat(a,i||[]);n._emit("import.done",{error:e,warnings:r}),t(e,r)})})},o.prototype.saveXML=function(e,t){t||(t=e,e={});var n=this.definitions;return n?void this.moddle.toXML(n,e,t):t(new Error("no definitions loaded"))},o.prototype.saveSVG=function(e,t){t||(t=e,e={});var n=this.get("canvas"),i=n.getDefaultLayer(),r=n._svg.select("defs"),o=i.innerSVG(),a=r&&r.outerSVG()||"",s=i.getBBox(),c='<?xml version="1.0" encoding="utf-8"?>\n<!-- created with bpmn-js / http://bpmn.io -->\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+s.width+'" height="'+s.height+'" viewBox="'+s.x+" "+s.y+" "+s.width+" "+s.height+'" version="1.1">'+a+o+"</svg>";t(null,c)},o.prototype.importDefinitions=function(e,t){try{this.definitions&&this.clear(),this.definitions=e,y.importBpmnDiagram(this,e,t)}catch(n){t(n)}},o.prototype.getModules=function(){return this._modules},o.prototype.destroy=function(){f.prototype.destroy.call(this),d(this.container)},o.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},o.prototype.off=function(e,t){this.get("eventBus").off(e,t)},o.prototype._init=function(e,t,n){var i=n.modules||this.getModules(),r=n.additionalModules||[],o=[{bpmnjs:["value",this],moddle:["value",t]}],a=[].concat(o,i,r),p=s(c(n,"additionalModules"),{canvas:s({},n.canvas,{container:e}),modules:a});f.call(this,p)},o.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},o.prototype._createContainer=function(e){var t,n=e.container;return n.get&&(n=n.get(0)),p(n)&&(n=h(n)),t=l('<div class="bjs-container"></div>'),s(t.style,{width:r(e.width),height:r(e.height),position:e.position}),n.appendChild(t),t},o.prototype._createModdle=function(e){var t=s({},this._moddleExtensions,e.moddleExtensions);return new m(t)},o.prototype._modules=[e(3),e(204),e(189),e(171)],o.prototype._moddleExtensions={};var x=e(71),b=e(395)},{171:171,189:189,204:204,243:243,3:3,371:371,374:374,377:377,381:381,394:394,395:395,397:397,398:398,65:65,71:71,72:72,96:96}],3:[function(e,t,n){t.exports={__depends__:[e(6),e(67)]}},{6:6,67:67}],4:[function(e,t,n){"use strict";function i(e,t,n,i){function p(e,t){z[e]=t}function u(e){return z[e]}function l(e){function t(e,t){var n=m({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},t.attrs),i=t.ref||{x:0,y:0},r=t.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var o=t.element.attr(n).marker(0,0,20,20,i.x,i.y).attr({markerWidth:20*r,markerHeight:20*r});return p(e,o)}t("sequenceflow-end",{element:e.path("M 1 5 L 11 10 L 1 15 Z"),ref:{x:11,y:10},scale:.5}),t("messageflow-start",{element:e.circle(6,6,3.5),attrs:{fill:"white",stroke:"black"},ref:{x:6,y:6}}),t("messageflow-end",{element:e.path("m 1 5 l 0 -3 l 7 3 l -7 3 z"),attrs:{fill:"white",stroke:"black",strokeLinecap:"butt"},ref:{x:8.5,y:5}}),t("association-start",{element:e.path("M 11 5 L 1 10 L 11 15"),attrs:{fill:"none",stroke:"black",strokeWidth:1.5},ref:{x:1,y:10},scale:.5}),t("association-end",{element:e.path("M 1 5 L 11 10 L 1 15"),attrs:{fill:"none",stroke:"black",strokeWidth:1.5},ref:{x:12,y:10},scale:.5}),t("conditional-flow-marker",{element:e.path("M 0 10 L 8 6 L 16 10 L 8 14 Z"),attrs:{fill:"white",stroke:"black"},ref:{x:-1,y:10},scale:.5}),t("conditional-default-flow-marker",{element:e.path("M 1 4 L 5 16"),attrs:{stroke:"black"},ref:{x:-5,y:10},scale:.5})}function h(e,t,n,i,r){f(i)&&(r=i,i=0),i=i||0,r=G(r,{stroke:"black",strokeWidth:2,fill:"white"});var o=t/2,a=n/2;return e.circle(o,a,Math.round((t+n)/4-i)).attr(r)}function d(e,t,n,i,r,o){return f(r)&&(o=r,r=0),r=r||0,o=G(o,{stroke:"black",strokeWidth:2,fill:"white"}),e.rect(r,r,t-2*r,n-2*r,i).attr(o)}function y(e,t,n,i){var r=t/2,o=n/2,a=[r,0,t,o,r,n,0,o];return i=G(i,{stroke:"black",strokeWidth:2,fill:"white"}),e.polygon(a).attr(i)}function x(e,t,n){return n=G(n,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"}),A(t,n).appendTo(e)}function _(e,t,n){return n=G(n,["no-fill"],{strokeWidth:2,stroke:"black"}),e.path(t).attr(n)}function S(e,t,n,i){return _(t,n,m({"data-marker":e},i))}function T(e){return function(t,n){return V[e](t,n)}}function P(e){return V[e]}function M(e,t){var n=c(e),i=o(n);return r(n,"bpmn:MessageEventDefinition")?P("bpmn:MessageEventDefinition")(t,e,i):r(n,"bpmn:TimerEventDefinition")?P("bpmn:TimerEventDefinition")(t,e,i):r(n,"bpmn:ConditionalEventDefinition")?P("bpmn:ConditionalEventDefinition")(t,e):r(n,"bpmn:SignalEventDefinition")?P("bpmn:SignalEventDefinition")(t,e,i):r(n,"bpmn:CancelEventDefinition")&&r(n,"bpmn:TerminateEventDefinition",{parallelMultiple:!1})?P("bpmn:MultipleEventDefinition")(t,e,i):r(n,"bpmn:CancelEventDefinition")&&r(n,"bpmn:TerminateEventDefinition",{parallelMultiple:!0})?P("bpmn:ParallelMultipleEventDefinition")(t,e,i):r(n,"bpmn:EscalationEventDefinition")?P("bpmn:EscalationEventDefinition")(t,e,i):r(n,"bpmn:LinkEventDefinition")?P("bpmn:LinkEventDefinition")(t,e,i):r(n,"bpmn:ErrorEventDefinition")?P("bpmn:ErrorEventDefinition")(t,e,i):r(n,"bpmn:CancelEventDefinition")?P("bpmn:CancelEventDefinition")(t,e,i):r(n,"bpmn:CompensateEventDefinition")?P("bpmn:CompensateEventDefinition")(t,e,i):r(n,"bpmn:TerminateEventDefinition")?P("bpmn:TerminateEventDefinition")(t,e,i):null}function D(e,t,n){return F.createText(e,t||"",n).addClass("djs-label")}function k(e,t,n){var i=c(t);return D(e,i.name,{box:t,align:n,padding:5})}function B(e,t,n){var i=c(t);return D(e,i.name,{box:t,align:n,style:{fontSize:"11px"}})}function O(e,t,n){var i=D(e,t,{box:{height:30,width:n.height},align:"center-middle"}),r=-1*n.height;i.transform("rotate(270) translate("+r+",0)")}function I(e){for(var t=e.waypoints,n="m "+t[0].x+","+t[0].y,i=1;i<t.length;i++)n+="L"+t[i].x+","+t[i].y+" ";return n}function L(e,t,n){var i,r=c(t),o=g(n,"SubProcessMarker");i=o?{seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},v(n,function(n){P(n)(e,t,i)}),r.isForCompensation&&P("CompensationMarker")(e,t,i),"bpmn:AdHocSubProcess"===r.$type&&P("AdhocMarker")(e,t,i);var a=r.loopCharacteristics,s=a&&a.isSequential;a&&(void 0===s&&P("LoopMarker")(e,t,i),s===!1&&P("ParallelMarker")(e,t,i),s===!0&&P("SequentialMarker")(e,t,i))}function j(e,t){var i=(t.height-16)/t.height,r=n.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.451,my:i}});_(e,r,{strokeWidth:2})}b.call(this,e,i);var F=new E({style:N,size:{width:100}}),z={},G=t.computeStyle,V=this.handlers={"bpmn:Event":function(e,t,n){return h(e,t.width,t.height,n)},"bpmn:StartEvent":function(e,t){var n={},i=c(t);i.isInterrupting||(n={strokeDasharray:"6",strokeLinecap:"round"});var r=P("bpmn:Event")(e,t,n);return M(t,e),r},"bpmn:MessageEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),o=i?"black":"white",a=i?"white":"black",s=_(e,r,{strokeWidth:1,fill:o,stroke:a});return s},"bpmn:TimerEventDefinition":function(e,t){var i=h(e,t.width,t.height,.2*t.height,{strokeWidth:2}),r=n.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}});_(e,r,{strokeWidth:2,strokeLinecap:"square"});for(var o=0;12>o;o++){var a=n.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),s=t.width/2,c=t.height/2;_(e,a,{strokeWidth:1,strokeLinecap:"square",transform:"rotate("+30*o+","+c+","+s+")"})}return i},"bpmn:EscalationEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.555}}),o=i?"black":"none";return _(e,r,{strokeWidth:1,fill:o})},"bpmn:ConditionalEventDefinition":function(e,t){var i=n.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}});return _(e,i,{strokeWidth:1})},"bpmn:LinkEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),o=i?"black":"none";return _(e,r,{strokeWidth:1,fill:o})},"bpmn:ErrorEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),o=i?"black":"none";return _(e,r,{strokeWidth:1,fill:o})},"bpmn:CancelEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),o=i?"black":"none";return _(e,r,{strokeWidth:1,fill:o}).transform("rotate(45)")},"bpmn:CompensateEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),o=i?"black":"none";return _(e,r,{strokeWidth:1,fill:o})},"bpmn:SignalEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),o=i?"black":"none";return _(e,r,{strokeWidth:1,fill:o})},"bpmn:MultipleEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),o=i?"black":"none";return _(e,r,{strokeWidth:1,fill:o})},"bpmn:ParallelMultipleEventDefinition":function(e,t){var i=n.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}});return _(e,i,{strokeWidth:1})},"bpmn:EndEvent":function(e,t){var n=P("bpmn:Event")(e,t,{strokeWidth:4});return M(t,e,!0),n},"bpmn:TerminateEventDefinition":function(e,t){var n=h(e,t.width,t.height,8,{strokeWidth:4,fill:"black"});return n},"bpmn:IntermediateEvent":function(e,t){var n=P("bpmn:Event")(e,t,{strokeWidth:1});return h(e,t.width,t.height,R,{strokeWidth:1,fill:"none"}),M(t,e),n},"bpmn:IntermediateCatchEvent":T("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":T("bpmn:IntermediateEvent"),"bpmn:Activity":function(e,t,n){return d(e,t.width,t.height,C,n)},"bpmn:Task":function(e,t,n){var i=P("bpmn:Activity")(e,t,n);return k(e,t,"center-middle"),L(e,t),i},"bpmn:ServiceTask":function(e,t){var i=P("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});_(e,r,{strokeWidth:1,fill:"none"});var o=n.getScaledPath("TASK_TYPE_SERVICE_FILL",{abspos:{x:17.2,y:18}});_(e,o,{strokeWidth:0,stroke:"none",fill:"white"});var a=n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return _(e,a,{strokeWidth:1,fill:"white"}),i},"bpmn:UserTask":function(e,t){var i=P("bpmn:Task")(e,t),r=15,o=12,a=n.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:r,y:o}});_(e,a,{strokeWidth:.5,fill:"none"});var s=n.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:r,y:o}});_(e,s,{strokeWidth:.5,fill:"none"});var c=n.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:r,y:o}});return _(e,c,{strokeWidth:.5,fill:"black"}),i},"bpmn:ManualTask":function(e,t){var i=P("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return _(e,r,{strokeWidth:.25,fill:"white",stroke:"black"}),i},"bpmn:SendTask":function(e,t){var i=P("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return _(e,r,{strokeWidth:1,fill:"black",stroke:"white"}),i},"bpmn:ReceiveTask":function(e,t){var i,r=c(t),o=P("bpmn:Task")(e,t);return r.instantiate?(h(e,28,28,4.4,{strokeWidth:1}),i=n.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):i=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),_(e,i,{strokeWidth:1}),o},"bpmn:ScriptTask":function(e,t){var i=P("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return _(e,r,{strokeWidth:1}),i},"bpmn:BusinessRuleTask":function(e,t){var i=P("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),o=_(e,r);o.attr({strokeWidth:1,fill:"AAA"});var a=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),s=_(e,a);return s.attr({strokeWidth:1}),i},"bpmn:SubProcess":function(e,t,n){n=m({fillOpacity:.95},n);var i=P("bpmn:Activity")(e,t,n),r=w.isExpanded(t),o=w.isEventSubProcess(t);return o&&i.attr({strokeDasharray:"1,2"}),k(e,t,r?"center-top":"center-middle"),r?L(e,t):L(e,t,["SubProcessMarker"]),i},"bpmn:AdHocSubProcess":function(e,t){return P("bpmn:SubProcess")(e,t)},"bpmn:Transaction":function(e,n){var i=P("bpmn:SubProcess")(e,n),r=t.style(["no-fill","no-events"]);return d(e,n.width,n.height,C-2,R,r),i},"bpmn:CallActivity":function(e,t){return P("bpmn:SubProcess")(e,t,{strokeWidth:5})},"bpmn:Participant":function(e,t){var n=P("bpmn:Lane")(e,t,{fillOpacity:.95,fill:"White"}),i=w.isExpanded(t);if(i){x(e,[{x:30,y:0},{x:30,y:t.height}]);var r=c(t).name;O(e,r,t)}else{var o=c(t).name;D(e,o,{box:t,align:"center-middle"})}var a=!!c(t).participantMultiplicity;return a&&P("ParticipantMultiplicityMarker")(e,t),n},"bpmn:Lane":function(e,t,n){var i=d(e,t.width,t.height,0,n||{fill:"none"}),r=c(t);if("bpmn:Lane"===r.$type){var o=r.name;O(e,o,t)}return i},"bpmn:InclusiveGateway":function(e,t){var n=y(e,t.width,t.height);return h(e,t.width,t.height,.24*t.height,{strokeWidth:2.5,fill:"none"}),n},"bpmn:ExclusiveGateway":function(e,t){var i=y(e,t.width,t.height),r=n.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return s(t).isMarkerVisible&&_(e,r,{strokeWidth:1,fill:"black"}),i},"bpmn:ComplexGateway":function(e,t){var i=y(e,t.width,t.height),r=n.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}});return _(e,r,{strokeWidth:1,fill:"black"}),i},"bpmn:ParallelGateway":function(e,t){var i=y(e,t.width,t.height),r=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}});return _(e,r,{strokeWidth:1,fill:"black"}),i},"bpmn:EventBasedGateway":function(e,t){function i(){var i=n.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});_(e,i,{strokeWidth:2,fill:"none"})}var r=c(t),o=y(e,t.width,t.height);h(e,t.width,t.height,.2*t.height,{strokeWidth:1,fill:"none"});var a=r.eventGatewayType,s=!!r.instantiate;if("Parallel"===a){var p=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),u=_(e,p);u.attr({strokeWidth:1,fill:"none"})}else if("Exclusive"===a){if(!s){var l=h(e,t.width,t.height,.26*t.height);l.attr({strokeWidth:1,fill:"none"})}i()}return o},"bpmn:Gateway":function(e,t){return y(e,t.width,t.height)},"bpmn:SequenceFlow":function(e,t){var n=I(t),i=_(e,n,{strokeLinejoin:"round",markerEnd:u("sequenceflow-end")}),r=c(t),o=t.source.businessObject;return r.conditionExpression&&o.$instanceOf("bpmn:Activity")&&i.attr({markerStart:u("conditional-flow-marker")}),o["default"]&&(o.$instanceOf("bpmn:Gateway")||o.$instanceOf("bpmn:Activity"))&&o["default"]===r&&i.attr({markerStart:u("conditional-default-flow-marker")}),i},"bpmn:Association":function(e,t,n){var i=c(t);return n=m({strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round"},n||{}),"One"!==i.associationDirection&&"Both"!==i.associationDirection||(n.markerEnd=u("association-end")),"Both"===i.associationDirection&&(n.markerStart=u("association-start")),x(e,t.waypoints,n)},"bpmn:DataInputAssociation":function(e,t){return P("bpmn:Association")(e,t,{markerEnd:u("association-end")})},"bpmn:DataOutputAssociation":function(e,t){return P("bpmn:Association")(e,t,{markerEnd:u("association-end")})},"bpmn:MessageFlow":function(e,t){var i=c(t),r=s(t),o=I(t),a=_(e,o,{markerEnd:u("messageflow-end"),markerStart:u("messageflow-start"),strokeDasharray:"10, 12",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px"});if(i.messageRef){var p=a.getPointAtLength(a.getTotalLength()/2),l=n.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:p.x,y:p.y}}),h={strokeWidth:1};"initiating"===r.messageVisibleKind?(h.fill="white",h.stroke="black"):(h.fill="#888",h.stroke="white"),_(e,l,h)}return a},"bpmn:DataObject":function(e,t){var i=n.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),r=_(e,i,{fill:"white"}),o=c(t);return a(o)&&j(e,t),r},"bpmn:DataObjectReference":T("bpmn:DataObject"),"bpmn:DataInput":function(e,t){var i=n.getRawPath("DATA_ARROW"),r=P("bpmn:DataObject")(e,t);return _(e,i,{strokeWidth:1}),r},"bpmn:DataOutput":function(e,t){var i=n.getRawPath("DATA_ARROW"),r=P("bpmn:DataObject")(e,t);return _(e,i,{strokeWidth:1,fill:"black"}),r},"bpmn:DataStoreReference":function(e,t){var i=n.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),r=_(e,i,{strokeWidth:2,fill:"white"});return r},"bpmn:BoundaryEvent":function(e,t){var n=c(t),i=n.cancelActivity,r={strokeWidth:1};i||(r.strokeDasharray="6",r.strokeLinecap="round");var o=P("bpmn:Event")(e,t,r);return h(e,t.width,t.height,R,m(r,{fill:"none"})),M(t,e),o},"bpmn:Group":function(e,t){return d(e,t.width,t.height,C,{strokeWidth:1,strokeDasharray:"8,3,1,3",fill:"none",pointerEvents:"none"})},label:function(e,t){return B(e,t,"")},"bpmn:TextAnnotation":function(e,t){var i={fill:"none",stroke:"none"},r=d(e,t.width,t.height,0,0,i),o=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:0}});_(e,o);var a=c(t).text||"";return D(e,a,{box:t,align:"left-middle",padding:5}),r},ParticipantMultiplicityMarker:function(e,t){var i=n.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:t.width/2/t.width,my:(t.height-15)/t.height}});S("participant-multiplicity",e,i)},SubProcessMarker:function(e,t){var i=d(e,14,14,0,{strokeWidth:1});i.transform("translate("+(t.width/2-7.5)+","+(t.height-20)+")");var r=n.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}});S("sub-process",e,r)},ParallelMarker:function(e,t,i){var r=n.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.parallel)/t.width,my:(t.height-20)/t.height}});S("parallel",e,r)},SequentialMarker:function(e,t,i){var r=n.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.seq)/t.width,my:(t.height-19)/t.height}});S("sequential",e,r)},CompensationMarker:function(e,t,i){var r=n.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.compensation)/t.width,my:(t.height-13)/t.height}});S("compensation",e,r,{strokeWidth:1})},LoopMarker:function(e,t,i){var r=n.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.loop)/t.width,my:(t.height-7)/t.height}});S("loop",e,r,{strokeWidth:1,fill:"none",strokeLinecap:"round",strokeMiterlimit:.5})},AdhocMarker:function(e,t,i){var r=n.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.adhoc)/t.width,my:(t.height-15)/t.height}});S("adhoc",e,r,{strokeWidth:1,fill:"black"})}};e.on("canvas.init",function(e){l(e.svg)})}function r(e,t,n){function i(e,t){return y(t,function(t,n){return e[n]==t})}return x(e.eventDefinitions,function(r){return r.$type===t&&i(e,n)})}function o(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}function a(e){return e.isCollection||e.elementObjectRef&&e.elementObjectRef.isCollection}function s(e){return e.businessObject.di}function c(e){return e.businessObject}function p(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2,r=[["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]];return T(r)}function u(e,t){var n=e.x,i=e.y,r=e.width,o=e.height,a=[["M",n+t,i],["l",r-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-r,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]];return T(a)}function l(e){var t=e.width,n=e.height,i=e.x,r=e.y,o=t/2,a=n/2,s=[["M",i+o,r],["l",o,a],["l",-o,a],["l",-o,-a],["z"]];return T(s)}function h(e){var t=e.x,n=e.y,i=e.width,r=e.height,o=[["M",t,n],["l",i,0],["l",0,r],["l",-i,0],["z"]];return T(o)}var d=e(243),f=e(372),m=e(377),v=e(255),y=e(252),g=e(257),x=e(261),b=e(107),E=e(232),w=e(68),_=e(70).is,S=e(231),T=S.componentsToPath,A=S.createLine,C=10,R=3,N={fontFamily:"Arial, sans-serif",fontSize:"12px"};d(i,b),i.$inject=["eventBus","styles","pathMap"],t.exports=i,i.prototype.canRender=function(e){return _(e,"bpmn:BaseElement")},i.prototype.drawShape=function(e,t){var n=t.type,i=this.handlers[n];return i(e,t)},i.prototype.drawConnection=function(e,t){var n=t.type,i=this.handlers[n];return i(e,t)},i.prototype.getShapePath=function(e){return _(e,"bpmn:Event")?p(e):_(e,"bpmn:Activity")?u(e,C):_(e,"bpmn:Gateway")?l(e):h(e)}},{107:107,231:231,232:232,243:243,252:252,255:255,257:257,261:261,372:372,377:377,68:68,70:70}],5:[function(e,t,n){"use strict";function i(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"m {mx},{my} c -{e.x1},{e.y0} -{e.x3},{e.y1} -{e.x5},{e.y4} {e.x1},-{e.y3} {e.x3},-{e.y5} {e.x5},-{e.y6} {e.x0},{e.y3} {e.x2},{e.y5} {e.x4},{e.y6} -{e.x0},-{e.y0} -{e.x2},-{e.y1} -{e.x4},-{e.y4} z",height:36,width:36,heightElements:[2.382,4.764,4.926,6.589333,7.146,13.178667,19.768],widthElements:[2.463,2.808,4.926,5.616,7.389,8.424]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m {mx}, {my} m 0 15 l 0 -15 m 4 15 l 0 -15 m 4 15 l 0 -15 ",height:61,width:51,heightElements:[12],widthElements:[1,6,12,15]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],
|
|
widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,o=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var a={};if(t.position){for(var s=t.containerHeight/o.height*t.yScaleFactor,c=t.containerWidth/o.width*t.xScaleFactor,p=0;p<o.heightElements.length;p++)a["y"+p]=o.heightElements[p]*s;for(var u=0;u<o.widthElements.length;u++)a["x"+u]=o.widthElements[u]*c}var l=r.format(o.d,{mx:n,my:i,e:a});return l}}var r=e(240);t.exports=i},{240:240}],6:[function(e,t,n){t.exports={__init__:["bpmnRenderer"],bpmnRenderer:["type",e(4)],pathMap:["type",e(5)]}},{4:4,5:5}],7:[function(e,t,n){"use strict";function i(e,t,n,i){function r(e,t,n){return{top:e.y<t.y+n.top,bottom:e.y+e.height>t.y+t.height-n.bottom,left:e.x<t.x+n.left,right:e.x+e.width>t.x+t.width-n.right}}function v(e,t){"string"==typeof t&&(t=i.get(t));var u=a(e),l=!0;if((o(t,"bpmn:Participant")||o(t,"bpmn:Lane")||o(t,"bpmn:SubProcess"))&&(p(e,function(e){return o(e,"bpmn:Lane")||e.labelTarget?void(l=!1):void 0}),l)){var h=r(u,t,m),d=s(t,["x","y","width","height"]);if(h.top){var y=u.y-f.top;c(d,{y:y,height:d.height+d.y-y})}if(h.bottom&&c(d,{height:u.y+u.height+f.bottom-d.y}),h.left){var g=u.x-f.left;c(d,{x:g,width:d.width+d.x-g})}h.right&&c(d,{width:u.x+u.width+f.right-d.x}),o(t,"bpmn:Participant")?n.resizeLane(t,d):n.resizeShape(t,d);var x=t.parent;x&&v([t],x)}}d.call(this,e),this.postExecuted(["shape.create"],function(e){var t=e.context,n=t.shape,i=t.parent||t.newParent;v([n],i)}),this.postExecuted(["elements.move"],function(e){var t=e.context,n=l(u(t.closure.topLevel)),i=h(n,function(e){return e.parent.id});p(i,function(e,t){v(e,t)})})}var r=e(243),o=e(70).is,a=e(221).getBBox,s=e(383),c=e(377),p=e(255),u=e(385),l=e(245),h=e(256),d=e(98),f={top:60,bottom:60,left:100,right:100},m={top:2,bottom:2,left:15,right:15};i.$inject=["eventBus","canvas","modeling","elementRegistry"],r(i,d),t.exports=i},{221:221,243:243,245:245,255:255,256:256,377:377,383:383,385:385,70:70,98:98}],8:[function(e,t,n){t.exports={__init__:["autoResize"],autoResize:["type",e(7)]}},{7:7}],9:[function(e,t,n){"use strict";function i(e,t,n,i,r,o,a,s,c){e.registerProvider(this),this._contextPad=e,this._modeling=t,this._elementFactory=n,this._connect=i,this._create=r,this._popupMenu=o,this._canvas=a,this._rules=s,this._translate=c}function r(e,t,n){var i=e.$instanceOf(t),r=!1,o=e.eventDefinitions||[];return a(o,function(e){e.$type===n&&(r=!0)}),i&&r}var o=e(377),a=e(255),s=e(368),c=e(70).is,p=e(68).isExpanded,u=e(45).isAny,l=e(44).getChildLanes,h=e(68).isEventSubProcess;i.$inject=["contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate"],t.exports=i,i.prototype.getContextPadEntries=function(e){function t(e,t,n){y.start(e,t,n)}function n(t){m.removeElements([e])}function i(e){var t=5,n=b.getContainer(),i=f.getPad(e).html,r=n.getBoundingClientRect(),o=i.getBoundingClientRect(),a=o.top-r.top,s=o.left-r.left,c={x:s,y:a+o.height+t};return c}function a(e,t,n,i){function r(t,n){var r=v.createShape(o({type:e},i));g.start(t,r,n)}return"string"!=typeof n&&(i=n,n=w("Append {type}",{type:e.replace(/^bpmn\:/,"")})),{group:"model",className:t,title:n,action:{dragstart:r,click:r}}}function d(e){return function(t,n){m.splitLane(n,e),f.open(n,!0)}}var f=this._contextPad,m=this._modeling,v=this._elementFactory,y=this._connect,g=this._create,x=this._popupMenu,b=this._canvas,E=this._rules,w=this._translate,_={};if("label"===e.type)return _;var S=e.businessObject;if(u(S,["bpmn:Lane","bpmn:Participant"])&&p(S)){var T=l(e);o(_,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:w("Add Lane above"),action:{click:function(e,t){m.addLane(t,"top")}}}}),T.length<2&&(e.height>=120&&o(_,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:w("Divide into two Lanes"),action:{click:d(2)}}}),e.height>=180&&o(_,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:w("Divide into three Lanes"),action:{click:d(3)}}})),o(_,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:w("Add Lane below"),action:{click:function(e,t){m.addLane(t,"bottom")}}}})}c(S,"bpmn:FlowNode")&&(c(S,"bpmn:EventBasedGateway")?o(_,{"append.receive-task":a("bpmn:ReceiveTask","bpmn-icon-receive-task"),"append.message-intermediate-event":a("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":a("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condtion-intermediate-event":a("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":a("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",{eventDefinitionType:"bpmn:SignalEventDefinition"})}):r(S,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?o(_,{"append.compensation-activity":a("bpmn:Task","bpmn-icon-task",w("Append compensation activity"),{isForCompensation:!0})}):c(S,"bpmn:EndEvent")||S.isForCompensation||r(S,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||h(S)||o(_,{"append.end-event":a("bpmn:EndEvent","bpmn-icon-end-event-none"),"append.gateway":a("bpmn:ExclusiveGateway","bpmn-icon-gateway-xor"),"append.append-task":a("bpmn:Task","bpmn-icon-task"),"append.intermediate-event":a("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none")}));var A;x._providers["bpmn-replace"]&&(A=x.create("bpmn-replace",e)),A&&!A.isEmpty()&&o(_,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:w("Change type"),action:{click:function(e,t){A.open(o(i(t),{cursor:{x:e.x,y:e.y}}),t)}}}}),u(S,["bpmn:FlowNode","bpmn:InteractionNode"])&&o(_,{"append.text-annotation":a("bpmn:TextAnnotation","bpmn-icon-text-annotation"),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:w("Connect using "+(S.isForCompensation?"":"Sequence/MessageFlow or ")+"Association"),action:{click:t,dragstart:t}}}),u(S,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&o(_,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:w("Connect using DataInputAssociation"),action:{click:t,dragstart:t}}});var C=E.allowed("elements.delete",{elements:[e]});return s(C)&&(C=C[0]===e),C&&o(_,{"delete":{group:"edit",className:"bpmn-icon-trash",title:w("Remove"),action:{click:n,dragstart:n}}}),_}},{255:255,368:368,377:377,44:44,45:45,68:68,70:70}],10:[function(e,t,n){t.exports={__depends__:[e(93),e(124),e(189),e(122),e(126),e(51)],__init__:["contextPadProvider"],contextPadProvider:["type",e(9)]}},{122:122,124:124,126:126,189:189,51:51,9:9,93:93}],11:[function(e,t,n){"use strict";function i(e,t,n,i,r,o,a,s,c){var p={selectElements:function(){var e=a.getRootElement(),t=s.filter(function(t){return t!=e});o.select(t)},spaceTool:function(){t.toggle()},lassoTool:function(){n.toggle()},handTool:function(){i.toggle()},directEditing:function(){var e=o.get();e.length&&r.activate(e[0])}};c.register(p),e.addListener(function(t,n){if(65===t&&e.isCmd(n))return c.trigger("selectElements"),!0;if(!e.hasModifier(n))return 83===t?(c.trigger("spaceTool"),!0):76===t?(c.trigger("lassoTool"),!0):72===t?(c.trigger("handTool"),!0):69===t?(c.trigger("directEditing"),!0):void 0})}i.$inject=["keyboard","spaceTool","lassoTool","handTool","directEditing","selection","canvas","elementRegistry","editorActions"],t.exports=i},{}],12:[function(e,t,n){t.exports={__depends__:[e(137)],__init__:["bpmnKeyBindings"],bpmnKeyBindings:["type",e(11)]}},{11:11,137:137}],13:[function(e,t,n){"use strict";function i(e,t,n,i){n.registerProvider(this),i.registerHandler("element.updateLabel",r),e.on("element.dblclick",function(e){n.activate(e.element)}),e.on(["element.mousedown","drag.init","canvas.viewbox.changed"],function(e){n.complete()}),e.on(["commandStack.changed"],function(){n.cancel()}),"ontouchstart"in document.documentElement||e.on("create.end",500,function(e){var t=e.shape,i=e.context.canExecute;i&&(a(t,"bpmn:Task")||a(t,"bpmn:TextAnnotation")||a(t,"bpmn:SubProcess")&&!s(t))&&n.activate(t)}),this._canvas=t,this._commandStack=i}var r=e(15),o=e(14),a=e(70).is,s=e(68).isExpanded,c={width:150,height:50};i.$inject=["eventBus","canvas","directEditing","commandStack"],t.exports=i,i.prototype.activate=function(e){var t=o.getLabel(e);if(void 0!==t){var n=this.getEditingBBox(e);return(a(e,"bpmn:Participant")&&s(e)||a(e,"bpmn:Lane"))&&(n.width=c.width,n.height=c.height,n.x=n.x+10-n.width/2,n.y=n.mid.y-n.height/2),(a(e,"bpmn:Task")||a(e,"bpmn:Activity"))&&(n.width<100&&(n.width=100,n.x=n.mid.x-n.width/2),n.height<80&&(n.height=80,n.y=n.mid.y-n.height/2)),(a(e,"bpmn:SubProcess")&&s(e)||a(e,"bpmn:Participant")&&!s(e))&&(n.width=e.width,n.height=c.height,n.x=n.mid.x-e.width/2),{bounds:n,text:t}}},i.prototype.getEditingBBox=function(e,t){var n=e.label||e,i=this._canvas.getAbsoluteBBox(n),r={x:i.x+i.width/2,y:i.y+i.height/2};return n.labelTarget&&(i.width=Math.max(i.width,c.width),i.height=Math.max(i.height,c.height),i.x=r.x-i.width/2),i.mid=r,i},i.prototype.update=function(e,t){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t})}},{14:14,15:15,68:68,70:70}],14:[function(e,t,n){"use strict";function i(e){return r(e,"bpmn:FlowElement")||r(e,"bpmn:Participant")||r(e,"bpmn:Lane")||r(e,"bpmn:SequenceFlow")||r(e,"bpmn:MessageFlow")?"name":r(e,"bpmn:TextAnnotation")?"text":void 0}var r=e(70).is;t.exports.getLabel=function(e){var t=e.businessObject,n=i(t);return n?t[n]||"":void 0},t.exports.setLabel=function(e,t,n){var r=e.businessObject,o=i(r);return o&&(r[o]=t),n&&(e.hidden=!t),e}},{70:70}],15:[function(e,t,n){"use strict";function i(){function e(e,t){var n=e.label||e,i=e.labelTarget||e;return r.setLabel(n,t,i!==n),[n,i]}function t(t){return t.oldLabel=r.getLabel(t.element),e(t.element,t.newLabel)}function n(t){return e(t.element,t.oldLabel)}this.execute=t,this.revert=n}var r=e(14);t.exports=i},{14:14}],16:[function(e,t,n){t.exports={__depends__:[e(100),e(120),e(93)],__init__:["labelEditingProvider"],labelEditingProvider:["type",e(13)]}},{100:100,120:120,13:13,93:93}],17:[function(e,t,n){"use strict";function i(e){this._model=e}var r=e(258),o=e(377),a=e(383);i.$inject=["moddle"],i.prototype._needsId=function(e){return e.$instanceOf("bpmn:RootElement")||e.$instanceOf("bpmn:FlowElement")||e.$instanceOf("bpmn:MessageFlow")||e.$instanceOf("bpmn:DataAssociation")||e.$instanceOf("bpmn:Artifact")||e.$instanceOf("bpmn:Participant")||e.$instanceOf("bpmn:Lane")||e.$instanceOf("bpmn:Process")||e.$instanceOf("bpmn:Collaboration")||e.$instanceOf("bpmndi:BPMNShape")||e.$instanceOf("bpmndi:BPMNEdge")||e.$instanceOf("bpmndi:BPMNDiagram")||e.$instanceOf("bpmndi:BPMNPlane")||e.$instanceOf("bpmn:Property")},i.prototype._ensureId=function(e){var t=(e.$type||"").replace(/^[^:]*:/g,"")+"_";!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e))},i.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},i.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},i.prototype.createDiShape=function(e,t,n){return this.create("bpmndi:BPMNShape",o({bpmnElement:e,bounds:this.createDiBounds(t)},n))},i.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},i.prototype.createDiWaypoints=function(e){return r(e,function(e){return this.createDiWaypoint(e)},this)},i.prototype.createDiWaypoint=function(e){return this.create("dc:Point",a(e,["x","y"]))},i.prototype.createDiEdge=function(e,t,n){return this.create("bpmndi:BPMNEdge",o({bpmnElement:e},n))},i.prototype.createDiPlane=function(e){return this.create("bpmndi:BPMNPlane",{bpmnElement:e})},t.exports=i},{258:258,377:377,383:383}],18:[function(e,t,n){"use strict";function i(){}function r(e){var t=e.host,n=-10;return d(h(e),t,n)}function o(e,t,n){var i=e&&e[t];return i?i.original||i:h(n)}function a(e){var t=e.source,n=e.target;return f(n,"bpmn:Activity")&&f(t,"bpmn:BoundaryEvent")&&n.businessObject.isForCompensation}var s=e(243),c=e(377),p=e(206),u=e(209),l=e(208),h=l.getMid,d=l.getOrientation,f=e(70).is;s(i,p),t.exports=i,i.prototype.layoutConnection=function(e,t){var n,i,s,p,l=e.source,h=e.target,d=e.waypoints;if(n=o(d,0,l),i=o(d,d&&d.length-1,h),(f(e,"bpmn:Association")||f(e,"bpmn:DataAssociation"))&&d&&!a(e))return d;if(f(e,"bpmn:MessageFlow"))s={preferredLayouts:["straight","v:v"]},f(h,"bpmn:Event")&&(s={preferredLayouts:["v:v"]});else if(f(e,"bpmn:SequenceFlow")||a(e))if(f(l,"bpmn:BoundaryEvent")){var m=r(l);/left|right/.test(m)?s={preferredLayouts:["h:v"]}:/top|bottom/.test(m)&&(s={preferredLayouts:["v:h"]})}else s=f(l,"bpmn:Gateway")?{preferredLayouts:["v:h"]}:f(h,"bpmn:Gateway")?{preferredLayouts:["h:v"]}:{preferredLayouts:["h:h"]};return s&&(s=c(s,t),p=u.repairConnection(l,h,n,i,d,s)),p||[n,i]}},{206:206,208:208,209:209,243:243,377:377,70:70}],19:[function(e,t,n){"use strict";function i(e,t,n,i){function r(e){var t,i=e.context;i.cropped||(t=i.connection,t.waypoints=n.getCroppedWaypoints(t),i.cropped=!0)}function a(e){var t=e.context;y.updateParent(t.shape||t.connection,t.oldParent)}function c(e){var t=e.context,n=t.shape||t.connection,i=t.parent||t.newParent;y.updateParent(n,i)}function p(e){var t=e.context,n=t.oldRoot,i=n.children;s(i,function(e){y.updateParent(e)})}function u(e){var t=e.context.shape;h(t,"bpmn:BaseElement")&&y.updateBounds(t)}function f(e){y.updateConnection(e.context)}function m(e){y.updateConnectionWaypoints(e.context.connection)}function v(e){y.updateAttachment(e.context)}d.call(this,e),this._bpmnFactory=t,this._translate=i;var y=this;this.executed(["connection.layout","connection.create","connection.reconnectEnd","connection.reconnectStart"],r),this.reverted(["connection.layout"],function(e){delete e.context.cropped}),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],o(a)),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],o(c)),this.executed(["canvas.updateRoot"],p),this.reverted(["canvas.updateRoot"],p),this.executed(["shape.move","shape.create","shape.resize"],o(u)),this.reverted(["shape.move","shape.create","shape.resize"],o(u)),this.executed(["connection.create","connection.move","connection.delete","connection.reconnectEnd","connection.reconnectStart"],o(f)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnectEnd","connection.reconnectStart"],o(f)),this.executed(["connection.layout","connection.move","connection.updateWaypoints","connection.reconnectEnd","connection.reconnectStart"],o(m)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints","connection.reconnectEnd","connection.reconnectStart"],o(m)),this.executed(["connection.reconnectEnd","connection.reconnectStart"],o(function(e){var t=e.context,n=t.connection,i=l(n),r=l(t.oldSource),o=l(t.oldTarget),a=l(n.source),s=l(n.target);r!==a&&o!==s&&(r&&r["default"]&&(t["default"]=r["default"],r["default"]=void 0),i.sourceRef&&i.sourceRef["default"]&&!h(s,"bpmn:Activity")&&(t["default"]=i.sourceRef["default"],i.sourceRef["default"]=void 0),i.conditionExpression&&h(r,"bpmn:Activity")&&(t.conditionExpression=i.conditionExpression,i.conditionExpression=void 0),i.conditionExpression&&!h(s,"bpmn:Activity")&&(t.conditionExpression=i.conditionExpression,i.conditionExpression=void 0))})),this.reverted(["connection.reconnectEnd","connection.reconnectStart"],o(function(e){var t=e.context,n=t.connection,i=l(n),r=l(n.source);t["default"]&&(h(r,"bpmn:ExclusiveGateway")||h(r,"bpmn:InclusiveGateway")||h(r,"bpmn:Activity"))&&(r["default"]=t["default"]),t.conditionExpression&&h(r,"bpmn:Activity")&&(i.conditionExpression=t.conditionExpression)})),this.executed(["element.updateAttachment"],o(v)),this.reverted(["element.updateAttachment"],o(v))}function r(e){for(;e&&!h(e,"bpmn:Definitions");)e=e.$parent;return e}function o(e){return function(t){var n=t.context,i=n.shape||n.connection;h(i,"bpmn:BaseElement")&&e(t)}}var a=e(377),s=e(255),c=e(243),p=e(219),u=e(210),l=e(70).getBusinessObject,h=e(70).is,d=e(98);c(i,d),t.exports=i,i.$inject=["eventBus","bpmnFactory","connectionDocking","translate"],i.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,i=t.host;n.attachedToRef=i&&i.businessObject},i.prototype.updateParent=function(e,t){if(!(e instanceof u.Label)){var n=e.parent,i=e.businessObject,r=n&&n.businessObject,o=r&&r.di;h(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,r,t&&t.businessObject),h(e,"bpmn:DataOutputAssociation")&&(r=e.source?e.source.businessObject:null),h(e,"bpmn:DataInputAssociation")&&(r=e.target?e.target.businessObject:null),this.updateSemanticParent(i,r),h(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,r),this.updateDiParent(i.di,o)}},i.prototype.updateBounds=function(e){var t=e.businessObject.di,n=e instanceof u.Label?this._getLabel(t).bounds:t.bounds;a(n,{x:e.x,y:e.y,width:e.width,height:e.height})},i.prototype.updateFlowNodeRefs=function(e,t,n){if(n!==t){var i,r;h(n,"bpmn:Lane")&&(i=n.get("flowNodeRef"),p.remove(i,e)),h(t,"bpmn:Lane")&&(r=t.get("flowNodeRef"),p.add(r,e))}},i.prototype.updateDiParent=function(e,t){if(t&&!h(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(p.remove(n,e),e.$parent=null)}},i.prototype.getLaneSet=function(e){var t,n;return h(e,"bpmn:Lane")?(t=e.childLaneSet,t||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(h(e,"bpmn:Participant")&&(e=e.processRef),n=e.get("laneSets"),t=n[0],t||(t=this._bpmnFactory.create("bpmn:LaneSet"),t.$parent=e,n.push(t)),t)},i.prototype.updateSemanticParent=function(e,t){var n,i=this._translate;if(e.$parent!==t){if(h(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),n="lanes";else if(h(e,"bpmn:FlowElement")){if(t)if(h(t,"bpmn:Participant"))t=t.processRef;else if(h(t,"bpmn:Lane"))do t=t.$parent.$parent;while(h(t,"bpmn:Lane"));n="flowElements"}else if(h(e,"bpmn:Artifact")){for(;t&&!h(t,"bpmn:Process")&&!h(t,"bpmn:SubProcess")&&!h(t,"bpmn:Collaboration");){if(h(t,"bpmn:Participant")){t=t.processRef;break}t=t.$parent}n="artifacts"}else if(h(e,"bpmn:MessageFlow"))n="messageFlows";else if(h(e,"bpmn:Participant")){n="participants";var o,a=e.processRef;a&&(o=r(e.$parent||t),e.$parent&&(p.remove(o.get("rootElements"),a),a.$parent=null),t&&(p.add(o.get("rootElements"),a),a.$parent=o))}else h(e,"bpmn:DataOutputAssociation")?n="dataOutputAssociations":h(e,"bpmn:DataInputAssociation")&&(n="dataInputAssociations");if(!n)throw new Error(i("no parent for {element} in {parent}",{element:e.id,parent:t.id}));var s;e.$parent&&(s=e.$parent.get(n),p.remove(s,e)),t?(s=t.get(n),s.push(e),e.$parent=t):e.$parent=null}},i.prototype.updateConnectionWaypoints=function(e){e.businessObject.di.set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},i.prototype.updateConnection=function(e){var t=e.connection,n=l(t),i=l(t.source),r=l(t.target);if(h(n,"bpmn:DataAssociation"))h(n,"bpmn:DataInputAssociation")?(n.get("sourceRef")[0]=i,this.updateSemanticParent(n,r)):h(n,"bpmn:DataOutputAssociation")&&(this.updateSemanticParent(n,i),n.targetRef=r);else{var o=h(n,"bpmn:SequenceFlow");n.sourceRef!==i&&(o&&(p.remove(n.sourceRef&&n.sourceRef.get("outgoing"),n),i&&i.get("outgoing")&&i.get("outgoing").push(n)),n.sourceRef=i),n.targetRef!==r&&(o&&(p.remove(n.targetRef&&n.targetRef.get("incoming"),n),r&&r.get("incoming")&&r.get("incoming").push(n)),n.targetRef=r)}this.updateConnectionWaypoints(t)},i.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label}},{210:210,219:219,243:243,255:255,377:377,70:70,98:98}],20:[function(e,t,n){"use strict";function i(e,t,n){c.call(this),this._bpmnFactory=e,this._moddle=t,this._translate=n}var r=e(377),o=e(243),a=e(70).is,s=e(68).isExpanded,c=e(102),p=e(69);o(i,c),i.$inject=["bpmnFactory","moddle","translate"],t.exports=i,i.prototype.baseCreate=c.prototype.create,i.prototype.create=function(e,t){return"label"===e?this.baseCreate(e,r({type:"label"},p.DEFAULT_LABEL_SIZE,t)):this.createBpmnElement(e,t)},i.prototype.createBpmnElement=function(e,t){var n,i=this._translate;t=t||{};var o=t.businessObject;if(!o){if(!t.type)throw new Error(i("no shape type specified"));o=this._bpmnFactory.create(t.type)}o.di||("root"===e?o.di=this._bpmnFactory.createDiPlane(o,[],{id:o.id+"_di"}):"connection"===e?o.di=this._bpmnFactory.createDiEdge(o,[],{id:o.id+"_di"}):o.di=this._bpmnFactory.createDiShape(o,{},{id:o.id+"_di"})),t.processRef&&(o.processRef=t.processRef),t.isExpanded&&(o.di.isExpanded=t.isExpanded),a(o,"bpmn:ExclusiveGateway")&&(o.di.isMarkerVisible=!0),t.isInterrupting===!1&&(o.isInterrupting=!1),t.associationDirection&&(o.associationDirection=t.associationDirection);var s,c;return t.eventDefinitionType&&(s=o.get("eventDefinitions")||[],c=this._moddle.create(t.eventDefinitionType),s.push(c),c.$parent=o,o.eventDefinitions=s),t.isForCompensation&&(o.isForCompensation=!0),n=this._getDefaultSize(o),t=r({businessObject:o,id:o.id},n,t),this.baseCreate(e,t)},i.prototype._getDefaultSize=function(e){return a(e,"bpmn:SubProcess")?s(e)?{width:350,height:200}:{width:100,height:80}:a(e,"bpmn:Task")?{width:100,height:80}:a(e,"bpmn:Gateway")?{width:50,height:50}:a(e,"bpmn:Event")?{width:36,height:36}:a(e,"bpmn:Participant")?s(e)?{width:600,height:250}:{width:400,height:100}:a(e,"bpmn:Lane")?{width:400,height:100}:a(e,"bpmn:DataObjectReference")?{width:36,height:50}:a(e,"bpmn:DataStoreReference")?{width:50,height:50}:a(e,"bpmn:TextAnnotation")?{width:100,height:30}:{width:100,height:80}},i.prototype.createParticipantShape=function(e){var t={type:"bpmn:Participant"};return e||(t.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(t)}},{102:102,243:243,377:377,68:68,69:69,70:70}],21:[function(e,t,n){"use strict";function i(e,t,n,i){o.call(this,e,t,n),this._bpmnRules=i}var r=e(243),o=e(142),a=e(42),s=e(40),c=e(37),p=e(39),u=e(38),l=e(41);r(i,o),i.$inject=["eventBus","elementFactory","commandStack","bpmnRules"],t.exports=i,i.prototype.getHandlers=function(){var e=o.prototype.getHandlers.call(this);return e["element.updateProperties"]=a,e["canvas.updateRoot"]=s,e["lane.add"]=c,e["lane.resize"]=u,e["lane.split"]=p,e["lane.updateRefs"]=l,e},i.prototype.updateLabel=function(e,t){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t})},i.prototype.connect=function(e,t,n){var i=this._bpmnRules;return n||(n=i.canConnect(e,t)||{type:"bpmn:Association"}),this.createConnection(e,t,n,e.parent)},i.prototype.updateProperties=function(e,t){this._commandStack.execute("element.updateProperties",{element:e,properties:t})},i.prototype.resizeLane=function(e,t,n){this._commandStack.execute("lane.resize",{shape:e,newBounds:t,balanced:n})},i.prototype.addLane=function(e,t){var n={shape:e,location:t};return this._commandStack.execute("lane.add",n),n.newLane},i.prototype.splitLane=function(e,t){this._commandStack.execute("lane.split",{shape:e,count:t})},i.prototype.makeCollaboration=function(){var e=this._create("root",{type:"bpmn:Collaboration"}),t={newRoot:e};return this._commandStack.execute("canvas.updateRoot",t),e},i.prototype.updateLaneRefs=function(e,t){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:e,laneShapes:t})},i.prototype.makeProcess=function(){var e=this._create("root",{type:"bpmn:Process"}),t={newRoot:e};this._commandStack.execute("canvas.updateRoot",t)}},{142:142,243:243,37:37,38:38,39:39,40:40,41:41,42:42}],22:[function(e,t,n){"use strict";function i(e,t,n){a.call(this,e),this.preExecute("shape.append",function(e){var t=e.source,n=e.shape;e.position||(o(n,"bpmn:TextAnnotation")?e.position={x:t.x+t.width/2+75,y:t.y-50-n.height/2}:e.position={x:t.x+t.width+80+n.width/2,y:t.y+t.height/2})},!0)}var r=e(243),o=e(70).is,a=e(98);i.$inject=["eventBus","elementFactory","bpmnRules"],r(i,a),t.exports=i},{243:243,70:70,98:98}],23:[function(e,t,n){"use strict";function i(e,t,n,i){o.call(this,e),this.preExecute("shape.create",function(e){var t,r,o=e.shape,s=e.host,c={cancelActivity:!0};s&&a(o,"bpmn:IntermediateThrowEvent")&&(c.attachedToRef=s.businessObject,t=i.create("bpmn:BoundaryEvent",c),r={type:"bpmn:BoundaryEvent",businessObject:t},e.shape=n.createShape(r))},!0)}var r=e(243),o=e(98),a=e(70).is;i.$inject=["eventBus","modeling","elementFactory","bpmnFactory"],r(i,o),t.exports=i},{243:243,70:70,98:98}],24:[function(e,t,n){"use strict";function i(e,t,n){o.call(this,e),this.preExecute("shape.create",function(e){var n=e.context,i=n.shape;if(a(i,"bpmn:DataObjectReference")&&"label"!==i.type){var r=t.create("bpmn:DataObject");i.businessObject.dataObjectRef=r}})}var r=e(243),o=e(98),a=e(70).is;i.$inject=["eventBus","bpmnFactory","moddle"],r(i,o),t.exports=i},{243:243,70:70,98:98}],25:[function(e,t,n){"use strict";function i(e){return a({},e)}function r(e,t,n){s.call(this,e),this.preExecute("shape.create",function(e){var n=e.parent,i=e.shape;t.canInsert(i,n)&&(e.targetFlow=n,e.parent=n.parent)},!0),this.postExecute("shape.create",function(e){var r,o,a,s,p,u,l,h,d=e.shape,f=e.targetFlow,m=e.position;f&&(p=f.waypoints,s=c(p,m),s&&(u=p.slice(0,s.index),l=p.slice(s.index+(s.bendpoint?1:0)),h=s.bendpoint?p[s.index]:m,u.push(i(h)),l.unshift(i(h))),r=f.source,o=f.target,t.canConnect(r,d,f)&&(n.reconnectEnd(f,d,u||i(m)),a=!0),t.canConnect(d,o,f)&&(a?n.connect(d,o,{type:f.type,waypoints:l}):n.reconnectStart(f,d,l||i(m))))},!0)}var o=e(243),a=e(377),s=e(98),c=e(226).getApproxIntersection;o(r,s),r.$inject=["eventBus","bpmnRules","modeling"],t.exports=r},{226:226,243:243,377:377,98:98}],26:[function(e,t,n){"use strict";function i(e,t,n,i){o.call(this,e),this.preExecute("shape.create",function(e){var n=e.parent,i=e.shape,r=e.position;if(a(n,"bpmn:Process")&&a(i,"bpmn:Participant")){var o=t.makeCollaboration();e.position=r,e.parent=o,e.processRoot=n}},!0),this.execute("shape.create",function(e){var t=e.processRoot,n=e.shape;t&&(e.oldProcessRef=n.businessObject.processRef,n.businessObject.processRef=t.businessObject)},!0),this.revert("shape.create",function(e){var t=e.processRoot,n=e.shape;t&&(n.businessObject.processRef=e.oldProcessRef)},!0),this.postExecute("shape.create",function(e){var n=e.processRoot,i=e.shape;if(n){var r=n.children.slice();t.moveElements(r,{x:0,y:0},i)}},!0)}var r=e(243),o=e(98),a=e(70).is;i.$inject=["eventBus","modeling","elementFactory","bpmnFactory"],r(i,o),t.exports=i},{243:243,70:70,98:98}],27:[function(e,t,n){"use strict";function i(e,t){function n(e,t,n){var i=e.get("dataInputAssociations");return c(i,function(e){return e!==n&&e.targetRef===t})}function i(e,n){var i=e.get("properties"),r=c(i,function(e){return e.name===u});return!r&&n&&(r=t.create("bpmn:Property",{name:u}),s.add(i,r)),r}function o(e,t){var r=i(e);r&&(n(e,r,t)||s.remove(e.get("properties"),r))}function p(e){var t,n=e.context,r=n.connection,a=r.businessObject,s=r.target,c=s&&s.businessObject,p=n.newTarget,u=p&&p.businessObject,l=n.oldTarget||n.target,h=l&&l.businessObject,d=r.businessObject;h&&h!==c&&o(h,a),u&&u!==c&&o(u,a),c?(t=i(c,!0),d.targetRef=t):d.targetRef=null}a.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnectEnd"],r(p)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnectEnd"],r(p))}function r(e){return function(t){var n=t.context,i=n.connection;return p(i,"bpmn:DataInputAssociation")?e(t):void 0}}var o=e(243),a=e(98),s=e(219),c=e(254),p=e(70).is,u="__targetRef_placeholder";
|
|
i.$inject=["eventBus","bpmnFactory"],o(i,a),t.exports=i},{219:219,243:243,254:254,70:70,98:98}],28:[function(e,t,n){"use strict";function i(e,t,n){function i(e,t){var i=s(t),r=[],o=[];if(c(i,function(t){return t.y>e.y?o.push(t):r.push(t),t.children}),i.length){var a;a=o.length&&r.length?e.height/2:e.height;var p,u;r.length&&(p=n.calculateAdjustments(r,"y",a,e.y-10),n.makeSpace(p.movingShapes,p.resizingShapes,{x:0,y:a},"s")),o.length&&(u=n.calculateAdjustments(o,"y",-a,e.y+e.height+10),n.makeSpace(u.movingShapes,u.resizingShapes,{x:0,y:-a},"n"))}}o.call(this,e),this.postExecuted("shape.delete",p,function(e){var t=e.context,n=t.hints,r=t.shape,o=t.oldParent;a(r,"bpmn:Lane")&&(n&&n.nested||i(r,o))})}var r=e(243),o=e(98),a=e(70).is,s=e(44).getChildLanes,c=e(221).eachElement,p=500;i.$inject=["eventBus","modeling","spaceTool"],r(i,o),t.exports=i},{221:221,243:243,44:44,70:70,98:98}],29:[function(e,t,n){"use strict";function i(e,t,n){u.call(this,e),this.postExecute(["shape.create","connection.create"],function(e){var n,i=e.context,r=i.shape||i.connection,o=r.businessObject;c(o)&&(n=p(r),t.createLabel(r,n,{id:o.id+"_label",hidden:!o.name,businessObject:o}))}),this.executed(["label.create"],function(e){var t,i,o=e.context.shape;o.labelTarget&&s(o.labelTarget||o,"bpmn:BaseElement")&&(t=o.businessObject,i=t.di,i.label||(i.label=n.create("bpmndi:BPMNLabel",{bounds:n.create("dc:Bounds")})),r(i.label.bounds,{x:o.x,y:o.y,width:o.width,height:o.height}))})}var r=e(377),o=e(243),a=e(69),s=e(70).is,c=a.hasExternalLabel,p=a.getExternalLabelMid,u=e(98);o(i,u),i.$inject=["eventBus","modeling","bpmnFactory"],t.exports=i},{243:243,377:377,69:69,70:70,98:98}],30:[function(e,t,n){"use strict";function i(e,t,n){function i(e,n){t.add({position:{x:e.x+5,y:e.y+5},type:"error",timeout:2e3,html:"<div>"+n+"</div>"})}e.on(["shape.move.rejected","create.rejected"],function(e){var t=e.context,o=t.shape,a=t.target;r(a,"bpmn:Collaboration")&&r(o,"bpmn:FlowNode")&&i(e,n("flow elements must be children of pools/participants"))})}var r=e(70).is;i.$inject=["eventBus","tooltips","translate"],t.exports=i},{70:70}],31:[function(e,t,n){"use strict";function i(e,t){o.call(this,e),this.preExecute("shape.delete",function(e){var t=e.shape,n=t.parent;a(t,"bpmn:Participant")&&(e.collaborationRoot=n)},!0),this.postExecute("shape.delete",function(e){var n=e.collaborationRoot;n&&!n.businessObject.participants.length&&t.makeProcess()},!0)}var r=e(243),o=e(98),a=e(70).is;i.$inject=["eventBus","modeling"],r(i,o),t.exports=i},{243:243,70:70,98:98}],32:[function(e,t,n){"use strict";function i(e,t,n){function i(e){var i=e.source,r=e.target,o=e.parent;if(o){var a,s;c(e,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(i,r)||(s=!0),n.canConnectMessageFlow(i,r)&&(a="bpmn:MessageFlow")),c(e,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(i,r)||(s=!0),n.canConnectSequenceFlow(i,r)&&(a="bpmn:SequenceFlow")),c(e,"bpmn:Association")&&!n.canConnectAssociation(i,r)&&(s=!0),s&&t.removeConnection(e),a&&t.connect(i,r,{type:a,waypoints:e.waypoints.slice()})}}s.call(this,e),this.postExecuted("elements.move",function(e){var t=e.closure,n=t.allConnections;r(n,i)},!0),this.postExecuted(["connection.reconnectStart","connection.reconnectEnd"],function(e){var t=e.context.connection;i(t)}),this.postExecuted("element.updateProperties",function(e){var n,i=e.context,r=i.properties,a=i.element,s=a.businessObject;r["default"]&&(n=o(a.outgoing,{id:a.businessObject["default"].id}),n&&t.updateProperties(n,{conditionExpression:void 0})),r.conditionExpression&&s.sourceRef["default"]===s&&t.updateProperties(a.source,{"default":void 0})})}var r=e(255),o=e(254),a=e(243),s=e(98),c=e(70).is;a(i,s),i.$inject=["eventBus","modeling","bpmnRules"],t.exports=i},{243:243,254:254,255:255,70:70,98:98}],33:[function(e,t,n){"use strict";function i(e,t,n,i,r,c){o.call(this,e),this._bpmnReplace=t,this._elementRegistry=i,this._selection=r,this._modeling=c,this.postExecuted(["elements.move"],500,function(e){var t=e.context,i=t.newParent,r=t.newHost,o=[];a(t.closure.topLevel,function(e){o=s(e)?o.concat(e.children):o.concat(e)}),1===o.length&&r&&(i=r);var c=n.canReplace(o,i);c&&this.replaceElements(o,c.replacements,r)},this),this.postExecute(["shape.replace"],1500,function(e){var t,i=e.context,r=i.oldShape,o=i.newShape,a=r.attachers;a&&a.length&&(t=n.canReplace(a,o),this.replaceElements(a,t.replacements))},this)}var r=e(243),o=e(98),a=e(255),s=e(68).isEventSubProcess,c=e(70).is;r(i,o),i.prototype.replaceElements=function(e,t,n){var i=this._elementRegistry,r=this._bpmnReplace,o=this._selection,s=this._modeling;a(t,function(t){var o={type:t.newElementType},a=i.get(t.oldElementId);n&&c(a,"bpmn:BoundaryEvent")&&s.updateAttachment(a,null);var p=e.indexOf(a);e[p]=r.replaceElement(a,o,{select:!1}),n&&c(e[p],"bpmn:BoundaryEvent")&&s.updateAttachment(e[p],n)}),t&&o.select(e)},i.$inject=["eventBus","bpmnReplace","bpmnRules","elementRegistry","selection","modeling"],t.exports=i},{243:243,255:255,68:68,70:70,98:98}],34:[function(e,t,n){"use strict";function i(e,t){e.on("resize.start",s+500,function(e){var t=e.context,n=t.shape;(r(n,"bpmn:Lane")||r(n,"bpmn:Participant"))&&(t.balanced=!a(e))}),e.on("resize.end",s,function(e){var n=e.context,i=n.shape,a=n.canExecute,s=n.newBounds;return r(i,"bpmn:Lane")||r(i,"bpmn:Participant")?(a&&(s=o(s),t.resizeLane(i,s,n.balanced)),!1):void 0})}var r=e(70).is,o=e(208).roundBounds,a=e(228).hasPrimaryModifier,s=1001;i.$inject=["eventBus","modeling"],t.exports=i},{208:208,228:228,70:70}],35:[function(e,t,n){"use strict";function i(e,t,n){function i(){return l=l||new r,l.enter(),l}function o(){if(!l)throw new Error(n("out of bounds release"));return l}function u(){if(!l)throw new Error(n("out of bounds release"));var e=l.leave();return e&&(t.updateLaneRefs(l.flowNodes,l.lanes),l=null),e}a.call(this,e);var l,h=["spaceTool","lane.add","lane.resize","lane.split","elements.move","elements.delete","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(h,p,function(e){i()}),this.postExecuted(h,c,function(e){u()}),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],function(e){var t=e.context,n=t.shape,i=o();n.labelTarget||(s(n,"bpmn:Lane")&&i.addLane(n),s(n,"bpmn:FlowNode")&&i.addFlowNode(n))})}function r(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}var o=e(243),a=e(98),s=e(70).is,c=500,p=5e3;i.$inject=["eventBus","modeling","translate"],o(i,a),t.exports=i},{243:243,70:70,98:98}],36:[function(e,t,n){t.exports={__init__:["appendBehavior","createBoundaryEventBehavior","createDataObjectBehavior","createOnFlowBehavior","createParticipantBehavior","dataInputAssociationBehavior","deleteLaneBehavior","labelBehavior","modelingFeedback","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeLaneBehavior","updateFlowNodeRefsBehavior"],appendBehavior:["type",e(22)],createBoundaryEventBehavior:["type",e(23)],createDataObjectBehavior:["type",e(24)],createOnFlowBehavior:["type",e(25)],createParticipantBehavior:["type",e(26)],dataInputAssociationBehavior:["type",e(27)],deleteLaneBehavior:["type",e(28)],labelBehavior:["type",e(29)],modelingFeedback:["type",e(30)],removeParticipantBehavior:["type",e(31)],replaceConnectionBehavior:["type",e(32)],replaceElementBehaviour:["type",e(33)],resizeLaneBehavior:["type",e(34)],updateFlowNodeRefsBehavior:["type",e(35)]}},{22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35}],37:[function(e,t,n){"use strict";function i(e,t){this._modeling=e,this._spaceTool=t}var r=e(253),o=e(221),a=e(44).getLanesRoot,s=e(44).getChildLanes,c=e(44).LANE_INDENTATION;i.$inject=["modeling","spaceTool"],t.exports=i,i.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,i=e.shape,p=e.location,u=a(i),l=u===i,h=l?i:i.parent,d=s(h);d.length||n.createShape({type:"bpmn:Lane"},{x:i.x+c,y:i.y,width:i.width-c,height:i.height},h);var f=[];o.eachElement(u,function(e){return f.push(e),e===i?[]:r(e.children,function(e){return e!==i})});var m="top"===p?-120:120,v="top"===p?i.y:i.y+i.height,y=v+("top"===p?10:-10),g="top"===p?"n":"s",x=t.calculateAdjustments(f,"y",m,y);t.makeSpace(x.movingShapes,x.resizingShapes,{x:0,y:m},g),e.newLane=n.createShape({type:"bpmn:Lane"},{x:i.x+(l?c:0),y:v-("top"===p?120:0),width:i.width-(l?c:0),height:120},h)}},{221:221,253:253,44:44}],38:[function(e,t,n){"use strict";function i(e,t){this._modeling=e,this._spaceTool=t}var r=e(70).is,o=e(44).getLanesRoot,a=e(44).computeLanesResize,s=e(221).eachElement,c=e(208).asTRBL,p=e(180).substractTRBL;i.$inject=["modeling","spaceTool"],t.exports=i,i.prototype.preExecute=function(e){var t=e.shape,n=e.newBounds,i=e.balanced;i!==!1?this.resizeBalanced(t,n):this.resizeSpace(t,n)},i.prototype.resizeBalanced=function(e,t){var n=this._modeling,i=a(e,t);n.resizeShape(e,t),i.forEach(function(e){n.resizeShape(e.shape,e.newBounds)})},i.prototype.resizeSpace=function(e,t){var n=this._spaceTool,i=c(e),a=c(t),u=p(a,i),l=o(e),h=[],d=[];s(l,function(e){return h.push(e),(r(e,"bpmn:Lane")||r(e,"bpmn:Participant"))&&d.push(e),e.children});var f,m,v,y,g;(u.bottom||u.top)&&(f=u.bottom||u.top,m=e.y+(u.bottom?e.height:0)+(u.bottom?-10:10),v=u.bottom?"s":"n",y=u.top>0||u.bottom<0?-f:f,g=n.calculateAdjustments(h,"y",y,m),n.makeSpace(g.movingShapes,g.resizingShapes,{x:0,y:f},v)),(u.left||u.right)&&(f=u.right||u.left,m=e.x+(u.right?e.width:0)+(u.right?-10:100),v=u.right?"e":"w",y=u.left>0||u.right<0?-f:f,g=n.calculateAdjustments(d,"x",y,m),n.makeSpace(g.movingShapes,g.resizingShapes,{x:f,y:0},v))}},{180:180,208:208,221:221,44:44,70:70}],39:[function(e,t,n){"use strict";function i(e,t){this._modeling=e,this._translate=t}var r=e(44).getChildLanes,o=e(44).LANE_INDENTATION;i.$inject=["modeling","translate"],t.exports=i,i.prototype.preExecute=function(e){var t=this._modeling,n=this._translate,i=e.shape,a=e.count,s=r(i),c=s.length;if(c>a)throw new Error(n("more than {count} child lanes",{count:a}));var p,u,l,h,d,f=Math.round(i.height/a);for(d=0;a>d;d++)p=i.y+d*f,u=d===a-1?i.height-f*d:f,l={x:i.x+o,y:p,width:i.width-o,height:u},c>d?t.resizeShape(s[d],l):(h={type:"bpmn:Lane"},t.createShape(h,l,i))}},{44:44}],40:[function(e,t,n){"use strict";function i(e,t){this._canvas=e,this._modeling=t}var r=e(219);i.$inject=["canvas","modeling"],t.exports=i,i.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,o=t.getRootElement(),a=o.businessObject,s=a.$parent,c=a.di;t.setRootElement(n,!0),r.add(s.rootElements,i),i.$parent=s,r.remove(s.rootElements,a),a.$parent=null,a.di=null,c.bpmnElement=i,i.di=c,e.oldRoot=o},i.prototype.revert=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,o=e.oldRoot,a=o.businessObject,s=i.$parent,c=i.di;t.setRootElement(o,!0),r.remove(s.rootElements,i),i.$parent=null,r.add(s.rootElements,a),a.$parent=s,i.di=null,c.bpmnElement=a,a.di=c}},{219:219}],41:[function(e,t,n){"use strict";function i(e){this._elementRegistry=e}var r=e(44).collectLanes,o=e(44).getLanesRoot,a=e(70).is,s=e(219),c=e(208).asTRBL,p="flowNodeRef",u="lanes";i.$inject=["elementRegistry"],t.exports=i,i.prototype.computeUpdates=function(e,t){function n(e,t){var n=c(t),i={x:e.x+e.width/2,y:e.y+e.height/2};return i.x>n.left&&i.x<n.right&&i.y>n.top&&i.y<n.bottom}function i(e){h[e.id]||(m.push(e),h[e.id]=e)}function s(e){var t=o(e);return f[t.id]||(f[t.id]=r(t)),f[t.id]}function l(e){if(!e.parent)return[];var t=s(e);return t.filter(function(t){return n(e,t)}).map(function(e){return e.businessObject})}var h={},d=[],f={},m=[];return t.forEach(function(e){var t=o(e);if(t&&!h[t.id]){var n=t.children.filter(function(e){return a(e,"bpmn:FlowNode")});n.forEach(i),h[t.id]=t}}),e.forEach(i),m.forEach(function(e){var t=e.businessObject,n=t.get(u),i=n.slice(),r=l(e);d.push({flowNode:t,remove:i,add:r})}),t.forEach(function(e){var t=e.businessObject;e.parent||t.get(p).forEach(function(e){d.push({flowNode:e,remove:[t],add:[]})})}),d},i.prototype.execute=function(e){var t=e.updates;t||(t=e.updates=this.computeUpdates(e.flowNodeShapes,e.laneShapes)),t.forEach(function(e){var t=e.flowNode,n=t.get(u);e.remove.forEach(function(e){s.remove(n,e),s.remove(e.get(p),t)}),e.add.forEach(function(e){s.add(n,e),s.add(e.get(p),t)})})},i.prototype.revert=function(e){var t=e.updates;t.forEach(function(e){var t=e.flowNode,n=t.get(u);e.add.forEach(function(e){s.remove(n,e),s.remove(e.get(p),t)}),e.remove.forEach(function(e){s.add(n,e),s.add(e.get(p),t)})})}},{208:208,219:219,44:44,70:70}],42:[function(e,t,n){"use strict";function i(e,t,n){this._elementRegistry=e,this._moddle=t,this._translate=n}function r(e,t){return m in e&&e[m]!==t[m]}function o(e,t){return c(t,function(t,n){return t[n]=e.get(n),t},{})}function a(e,t){u(t,function(t,n){e.set(n,t)})}function s(e){var t=l({},e);return v.forEach(function(n){n in e&&(t[n]=h(t[n]))}),t}var c=e(384),p=e(378),u=e(255),l=e(377),h=e(70).getBusinessObject,d="default",f="name",m="id";i.$inject=["elementRegistry","moddle","translate"],t.exports=i,i.prototype.execute=function(e){var t=e.element,n=[t],i=this._translate;if(!t)throw new Error(i("element required"));var c=this._elementRegistry,u=this._moddle.ids,l=t.businessObject,h=s(e.properties),v=e.oldProperties||o(l,p(h));return r(h,l)&&(u.unclaim(l[m]),c.updateId(t,h[m])),d in h&&(h[d]&&n.push(c.get(h[d].id)),l[d]&&n.push(c.get(l[d].id))),f in h&&t.label&&(n.push(t.label),t.label.hidden=!h[f]),a(l,h),e.oldProperties=v,e.changed=n,n},i.prototype.revert=function(e){var t=e.element,n=e.properties,i=e.oldProperties,o=t.businessObject,s=this._elementRegistry,c=this._moddle.ids;return a(o,i),r(n,o)&&(c.unclaim(n[m]),s.updateId(t,i[m])),e.changed};var v=["default"]},{255:255,377:377,378:378,384:384,70:70}],43:[function(e,t,n){t.exports={__init__:["modeling","bpmnUpdater"],__depends__:[e(36),e(16),e(59),e(47),e(57),e(100),e(200),e(139),e(112),e(189),e(120),e(196)],bpmnFactory:["type",e(17)],bpmnUpdater:["type",e(19)],elementFactory:["type",e(20)],modeling:["type",e(21)],layouter:["type",e(18)],connectionDocking:["type",e(207)]}},{100:100,112:112,120:120,139:139,16:16,17:17,18:18,189:189,19:19,196:196,20:20,200:200,207:207,21:21,36:36,47:47,57:57,59:59}],44:[function(e,t,n){"use strict";function i(e,t){return l(u(t),u(e))}function r(e,t){return t=t||[],e.children.filter(function(e){c(e,"bpmn:Lane")&&(r(e,t),t.push(e))}),t}function o(e){return e.children.filter(function(e){return c(e,"bpmn:Lane")})}function a(e){return p(e,f)||e}function s(e,t){var n=a(e),o=c(n,"bpmn:Process")?[]:[n],s=r(n,o),p=u(e),l=u(t),f=i(e,t),m=[];return s.forEach(function(t){if(t!==e){var n=0,i=f.right,r=0,o=f.left,a=u(t);f.top&&(d(a.bottom-p.top)<10&&(r=l.top-a.bottom),d(a.top-p.top)<5&&(n=l.top-a.top)),f.bottom&&(d(a.top-p.bottom)<10&&(n=l.bottom-a.top),d(a.bottom-p.bottom)<5&&(r=l.bottom-a.bottom)),(n||i||r||o)&&m.push({shape:t,newBounds:h(t,{top:n,right:i,bottom:r,left:o})})}}),m}var c=e(70).is,p=e(45).getParent,u=e(208).asTRBL,l=e(180).substractTRBL,h=e(180).resizeTRBL,d=Math.abs,f=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"],m=30;t.exports.LANE_INDENTATION=m,t.exports.collectLanes=r,t.exports.getChildLanes=o,t.exports.getLanesRoot=a,t.exports.computeLanesResize=s},{180:180,208:208,45:45,70:70}],45:[function(e,t,n){"use strict";function i(e){for(var t=[];e;)e=e.parent,e&&t.push(e);return t}function r(e,t){return a(t,function(t){return s(e,t)})}function o(e,t){for("string"==typeof t&&(t=[t]);e=e.parent;)if(r(e,t))return e;return null}var a=e(251),s=e(70).is;t.exports.getParents=i,t.exports.isAny=r,t.exports.getParent=o},{251:251,70:70}],46:[function(e,t,n){"use strict";function i(e,t){function n(e){var t=c(p,function(t){return a(e,[t.type])});return t&&t.order||{level:1}}function i(e){var t=e.order;return t||(e.order=t=n(e)),t}function r(e,n,i){for(var r=n;r&&!a(r,i);)r=r.parent;if(!r)throw new Error(t("no parent for {element} in {parent}",{element:e.id,parent:n.id}));return r}o.call(this,e);var p=[{type:"label",order:{level:10}},{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:5,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];this.getOrdering=function(e,t){var n=i(e);n.containers&&(t=r(e,t,n.containers));var o=t.children.indexOf(e),a=s(t.children,function(t){return!e.labelTarget&&t.labelTarget?!1:n.level<i(t).level});return-1!==a&&-1!==o&&a>o&&(a-=1),{index:a,parent:t}}}var r=e(243),o=e(167),a=e(45).isAny,s=e(244),c=e(254);i.$inject=["eventBus","translate"],r(i,o),t.exports=i},{167:167,243:243,244:244,254:254,45:45}],47:[function(e,t,n){t.exports={__init__:["bpmnOrderingProvider"],__depends__:[e(204)],bpmnOrderingProvider:["type",e(46)]}},{204:204,46:46}],48:[function(e,t,n){"use strict";function i(e,t,n,i,r,o,a){this._palette=e,this._create=t,this._elementFactory=n,this._spaceTool=i,this._lassoTool=r,this._handTool=o,this._translate=a,e.registerProvider(this)}var r=e(377);t.exports=i,i.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","translate","eventBus"],i.prototype.getPaletteEntries=function(e){function t(e,t,n,i,s){function c(t){var n=a.createShape(r({type:e},s));s&&(n.businessObject.di.isExpanded=s.isExpanded),o.start(t,n)}var p=e.replace(/^bpmn\:/,"");return{group:t,className:n,title:i||u("Create {type}",{type:p}),action:{dragstart:c,click:c}}}function n(e,t){o.start(e,a.createParticipantShape(t))}var i={},o=this._create,a=this._elementFactory,s=this._spaceTool,c=this._lassoTool,p=this._handTool,u=this._translate;return r(i,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:u("Activate the hand tool"),action:{click:function(e){p.activateHand(e)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:u("Activate the lasso tool"),action:{click:function(e){c.activateSelection(e)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:u("Activate the create/remove space tool"),action:{click:function(e){s.activateSelection(e)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":t("bpmn:StartEvent","event","bpmn-icon-start-event-none"),"create.intermediate-event":t("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none"),"create.end-event":t("bpmn:EndEvent","event","bpmn-icon-end-event-none"),"create.exclusive-gateway":t("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-xor"),"create.task":t("bpmn:Task","activity","bpmn-icon-task"),"create.data-object":t("bpmn:DataObjectReference","data-object","bpmn-icon-data-object"),"create.data-store":t("bpmn:DataStoreReference","data-store","bpmn-icon-data-store"),"create.subprocess-expanded":t("bpmn:SubProcess","activity","bpmn-icon-subprocess-expanded",u("Create expanded SubProcess"),{isExpanded:!0}),"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:u("Create Pool/Participant"),action:{dragstart:n,click:n}}}),i}},{377:377}],49:[function(e,t,n){t.exports={__depends__:[e(173),e(126),e(196),e(141),e(133),e(204)],__init__:["paletteProvider"],paletteProvider:["type",e(48)]}},{126:126,133:133,141:141,173:173,196:196,204:204,48:48}],50:[function(e,t,n){"use strict";function i(e,t,n,i,r,o){this._popupMenu=e,this._modeling=t,this._moddle=n,this._bpmnReplace=i,this._rules=r,this._translate=o,this.register()}var r=e(70).is,o=e(68).isEventSubProcess,a=e(70).getBusinessObject,s=e(68).isExpanded,c=e(52).isDifferentType,p=e(255),u=e(253),l=e(56);i.$inject=["popupMenu","modeling","moddle","bpmnReplace","rules","translate"],i.prototype.register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},i.prototype.getEntries=function(e){var t,n=e.businessObject,i=this._rules;if(!i.allowed("shape.replace",{element:e}))return[];var p=c(e);return r(n,"bpmn:StartEvent")&&!o(n.$parent)?(t=u(l.START_EVENT,p),this._createEntries(e,t)):r(n,"bpmn:Participant")?(t=u(l.PARTICIPANT,function(e){return s(n)!==e.target.isExpanded}),this._createEntries(e,t)):r(n,"bpmn:StartEvent")&&o(n.$parent)?(t=u(l.EVENT_SUB_PROCESS_START_EVENT,function(t){var n=t.target,i=n.isInterrupting!==!1,r=a(e).isInterrupting===i;return p(t)||!p(t)&&!r}),this._createEntries(e,t)):r(n,"bpmn:EndEvent")?(t=u(l.END_EVENT,function(e){var t=e.target;return"bpmn:CancelEventDefinition"!=t.eventDefinition||r(n.$parent,"bpmn:Transaction")?p(e):!1}),this._createEntries(e,t)):r(n,"bpmn:BoundaryEvent")?(t=u(l.BOUNDARY_EVENT,function(e){var t=e.target;if("bpmn:CancelEventDefinition"==t.eventDefinition&&!r(n.attachedToRef,"bpmn:Transaction"))return!1;var i=t.cancelActivity!==!1,o=n.cancelActivity==i;return p(e)||!p(e)&&!o}),this._createEntries(e,t)):r(n,"bpmn:IntermediateCatchEvent")||r(n,"bpmn:IntermediateThrowEvent")?(t=u(l.INTERMEDIATE_EVENT,p),this._createEntries(e,t)):r(n,"bpmn:Gateway")?(t=u(l.GATEWAY,p),this._createEntries(e,t)):r(n,"bpmn:Transaction")?(t=u(l.TRANSACTION,p),this._createEntries(e,t)):o(n)&&s(n)?(t=u(l.EVENT_SUB_PROCESS,p),this._createEntries(e,t)):r(n,"bpmn:SubProcess")&&s(n)?(t=u(l.SUBPROCESS_EXPANDED,p),this._createEntries(e,t)):r(n,"bpmn:AdHocSubProcess")&&!s(n)?(t=u(l.TASK,function(t){var n=t.target,i="bpmn:SubProcess"===n.type;return c(e,n)&&!i}),this._createEntries(e,t)):r(n,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,l.SEQUENCE_FLOW):r(n,"bpmn:FlowNode")?(t=u(l.TASK,p),n.isForCompensation&&(t=u(t,function(e){return!/CallActivity/.test(e.target.type)})),this._createEntries(e,t)):[]},i.prototype.getHeaderEntries=function(e){var t=[];return r(e,"bpmn:Activity")&&!o(e)&&(t=t.concat(this._getLoopEntries(e))),!r(e,"bpmn:SubProcess")||r(e,"bpmn:Transaction")||o(e)||t.push(this._getAdHocEntry(e)),t},i.prototype._createEntries=function(e,t){var n=[],i=this;return p(t,function(t){var r=i._createMenuEntry(t,e);n.push(r)}),n},i.prototype._createSequenceFlowEntries=function(e,t){var n=a(e),i=[],o=this._modeling,s=this._moddle,c=this;return p(t,function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef["default"]!==n&&(r(n.sourceRef,"bpmn:ExclusiveGateway")||r(n.sourceRef,"bpmn:InclusiveGateway")||r(n.sourceRef,"bpmn:Activity"))&&i.push(c._createMenuEntry(t,e,function(){o.updateProperties(e.source,{"default":n})}));break;case"replace-with-conditional-flow":!n.conditionExpression&&r(n.sourceRef,"bpmn:Activity")&&i.push(c._createMenuEntry(t,e,function(){var t=s.create("bpmn:FormalExpression",{body:""});o.updateProperties(e,{conditionExpression:t})}));break;default:if(r(n.sourceRef,"bpmn:Activity")&&n.conditionExpression)return i.push(c._createMenuEntry(t,e,function(){o.updateProperties(e,{conditionExpression:void 0})}));if((r(n.sourceRef,"bpmn:ExclusiveGateway")||r(n.sourceRef,"bpmn:InclusiveGateway")||r(n.sourceRef,"bpmn:Activity"))&&n.sourceRef["default"]===n)return i.push(c._createMenuEntry(t,e,function(){o.updateProperties(e.source,{"default":void 0})}))}}),i},i.prototype._createMenuEntry=function(e,t,n){var i=this._translate,r=this._bpmnReplace.replaceElement,o=function(){return r(t,e.target)};n=n||o;var a={label:i(e.label),className:e.className,id:e.actionName,action:n};return a},i.prototype._getLoopEntries=function(e){function t(t,n){var i;n.active?i=void 0:(i=o._moddle.create(n.options.loopCharacteristics),n.options.isSequential&&(i.isSequential=n.options.isSequential)),o._modeling.updateProperties(e,{loopCharacteristics:i})}var n,i,r,o=this,s=this._translate,c=a(e),p=c.loopCharacteristics;p&&(n=p.isSequential,i=void 0===p.isSequential,r=void 0!==p.isSequential&&!p.isSequential);var u=[{id:"toggle-parallel-mi",className:"bpmn-icon-parallel-mi-marker",title:s("Parallel Multi Instance"),active:r,action:t,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},{id:"toggle-sequential-mi",className:"bpmn-icon-sequential-mi-marker",title:s("Sequential Multi Instance"),active:n,action:t,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},{id:"toggle-loop",className:"bpmn-icon-loop-marker",title:s("Loop"),active:i,action:t,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}];return u},i.prototype._getAdHocEntry=function(e){var t=this._translate,n=a(e),i=r(n,"bpmn:AdHocSubProcess"),o=this._bpmnReplace.replaceElement,s={id:"toggle-adhoc",className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:i,action:function(t,n){return i?o(e,{type:"bpmn:SubProcess"}):o(e,{type:"bpmn:AdHocSubProcess"})}};return s},t.exports=i},{253:253,255:255,52:52,56:56,68:68,70:70}],51:[function(e,t,n){t.exports={__depends__:[e(175),e(57)],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",e(50)]}},{175:175,50:50,57:57}],52:[function(e,t,n){"use strict";function i(e){return function(t){var n=t.target,i=r(e),o=i.eventDefinitions&&i.eventDefinitions[0],a=(o&&o.$type)===n.eventDefinitionType,s=i.$type===n.type,c=i.triggeredByEvent==n.triggeredByEvent;return!s||!a||!c}}var r=e(70).getBusinessObject;t.exports.isDifferentType=i},{70:70}],53:[function(e,t,n){"use strict";function i(e,t,n,i,o){function p(e){var r=e.canExecute.replacements;s(r,function(r){var s=r.oldElementId,c={type:r.newElementType};if(!e.visualReplacements[s]){var p=t.get(s);a(c,{x:p.x,y:p.y});var u=n.createShape(c);i.addShape(u,p.parent);var l=e.dragGroup.select("[data-element-id="+p.id+"]");l&&l.attr({display:"none"});var h=o.addDragger(e,u);e.visualReplacements[s]=h,i.removeShape(u)}})}function u(e){var t=e.visualReplacements;s(t,function(n,i){var r=e.dragGroup.select("[data-element-id="+i+"]");r&&r.attr({display:"inline"}),n.remove(),t[i]&&delete t[i]})}r.call(this,e),e.on("shape.move.move",c,function(e){var t=e.context,n=t.canExecute;t.visualReplacements||(t.visualReplacements={}),n.replacements?p(t):u(t)})}var r=e(98),o=e(243),a=e(377),s=e(255),c=250;i.$inject=["eventBus","elementRegistry","elementFactory","canvas","moveVisuals"],o(i,r),t.exports=i},{243:243,255:255,377:377,98:98}],54:[function(e,t,n){t.exports={__depends__:[e(166)],__init__:["bpmnReplacePreview"],bpmnReplacePreview:["type",e(53)]}},{166:166,53:53}],55:[function(e,t,n){"use strict";function i(e,t,n,i){function u(i,u,l){l=l||{};var h=u.type,d=i.businessObject,f=e.create(h),m={type:h,businessObject:f};return u.eventDefinitionType&&(m.eventDefinitionType=u.eventDefinitionType),o(f,r(u,p)),a(d,"bpmn:Activity")&&(m.width=i.width,m.height=i.height),a(d,"bpmn:SubProcess")&&(m.isExpanded=s(d)),a(d,"bpmn:Participant")&&(u.isExpanded===!0?f.processRef=e.create("bpmn:Process"):l.moveChildren=!1,m.width=i.width,m.height=i.height),f.name=d.name,c(f)||(f.loopCharacteristics=d.loopCharacteristics),(a(d,"bpmn:ExclusiveGateway")||a(d,"bpmn:InclusiveGateway")||a(d,"bpmn:Activity"))&&(a(f,"bpmn:ExclusiveGateway")||a(f,"bpmn:InclusiveGateway")||a(f,"bpmn:Activity"))&&(f["default"]=d["default"]),d.isForCompensation&&(f.isForCompensation=!0),m=t.replaceElement(i,m,l),l.select!==!1&&n.select(m),m}this.replaceElement=u}var r=e(383),o=e(377),a=e(70).is,s=e(68).isExpanded,c=e(68).isEventSubProcess,p=["cancelActivity","instantiate","eventGatewayType","triggeredByEvent","isInterrupting"];i.$inject=["bpmnFactory","replace","selection","modeling"],t.exports=i},{377:377,383:383,68:68,70:70}],56:[function(e,t,n){"use strict";t.exports.START_EVENT=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],t.exports.INTERMEDIATE_EVENT=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Intermediate Catch Event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message Intermediate Throw Event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Intermediate Catch Event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Intermediate Throw Event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Intermediate Catch Event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link Intermediate Catch Event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition"}},{label:"Link Intermediate Throw Event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition"}},{label:"Compensation Intermediate Throw Event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal Intermediate Catch Event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal Intermediate Throw Event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],t.exports.END_EVENT=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"
|
|
}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message End Event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation End Event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error End Event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel End Event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation End Event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal End Event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate End Event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],t.exports.GATEWAY=[{label:"Exclusive Gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel Gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive Gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex Gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event based Gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],t.exports.SUBPROCESS_EXPANDED=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],t.exports.TRANSACTION=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],t.exports.EVENT_SUB_PROCESS=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}}],t.exports.TASK=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"Send Task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive Task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"User Task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Manual Task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business Rule Task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Service Task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Script Task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call Activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub Process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],t.exports.BOUNDARY_EVENT=[{label:"Message Boundary Event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Boundary Event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Boundary Event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Boundary Event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Error Boundary Event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel Boundary Event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Signal Boundary Event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Compensation Boundary Event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],t.exports.EVENT_SUB_PROCESS_START_EVENT=[{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Error Start Event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Escalation Start Event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Compensation Start Event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],t.exports.SEQUENCE_FLOW=[{label:"Sequence Flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default Flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional Flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],t.exports.PARTICIPANT=[{label:"Expanded Pool",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:"Collapsed Pool",actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}]},{}],57:[function(e,t,n){t.exports={__depends__:[e(177),e(189)],bpmnReplace:["type",e(55)]}},{177:177,189:189,55:55}],58:[function(e,t,n){"use strict";function i(e){K.call(this,e)}function r(e){return!e||b(e)}function o(e,t){return e===t}function a(e){for(var t=H(e);t&&!W(t,"bpmn:Process");){if(W(t,"bpmn:Participant"))return t.processRef||t;t=t.$parent}return t}function s(e){return W(e,"bpmn:TextAnnotation")}function c(e){return W(e,"bpmn:BoundaryEvent")&&m(e,"bpmn:CompensateEventDefinition")}function p(e){return H(e).isForCompensation}function u(e,t){var n=a(e),i=a(t);return n===i}function l(e){return W(e,"bpmn:InteractionNode")&&!p(e)&&(!W(e,"bpmn:Event")||W(e,"bpmn:ThrowEvent")&&v(e,"bpmn:MessageEventDefinition"))}function h(e){return W(e,"bpmn:InteractionNode")&&!p(e)&&(!W(e,"bpmn:Event")||W(e,"bpmn:CatchEvent")&&v(e,"bpmn:MessageEventDefinition"))}function d(e){var t=H(e);if(W(t,"bpmn:Participant"))return null;for(;t;)if(t=t.$parent,W(t,"bpmn:FlowElementsContainer"))return t;return t}function f(e,t){var n=d(e),i=d(t);return n&&n===i}function m(e,t){var n=H(e);return!!j(n.eventDefinitions||[],function(e){return W(e,t)})}function v(e,t){var n=H(e);return(n.eventDefinitions||[]).every(function(e){return W(e,t)})}function y(e){return W(e,"bpmn:FlowNode")&&!W(e,"bpmn:EndEvent")&&!Y(e)&&!(W(e,"bpmn:IntermediateThrowEvent")&&m(e,"bpmn:LinkEventDefinition"))&&!c(e)&&!p(e)}function g(e){return W(e,"bpmn:FlowNode")&&!W(e,"bpmn:StartEvent")&&!W(e,"bpmn:BoundaryEvent")&&!Y(e)&&!(W(e,"bpmn:IntermediateCatchEvent")&&m(e,"bpmn:LinkEventDefinition"))&&!p(e)}function x(e){return W(e,"bpmn:ReceiveTask")||W(e,"bpmn:IntermediateCatchEvent")&&(m(e,"bpmn:MessageEventDefinition")||m(e,"bpmn:TimerEventDefinition")||m(e,"bpmn:ConditionalEventDefinition")||m(e,"bpmn:SignalEventDefinition"))}function b(e){return e.labelTarget}function E(e){return e.waypoints}function w(e,t){var n=$(t);return-1!==n.indexOf(e)}function _(e,t,n){if(r(e)||r(t))return null;if(o(e,t))return!1;if(!W(n,"bpmn:DataAssociation")){if(B(e,t))return{type:"bpmn:MessageFlow"};if(O(e,t))return{type:"bpmn:SequenceFlow"}}var i=I(e,t);return i?i:c(e)&&p(t)?{type:"bpmn:Association",associationDirection:"One"}:W(n,"bpmn:Association")&&k(e,t)?{type:"bpmn:Association"}:s(e)||s(t)?{type:"bpmn:Association"}:!1}function S(e,t,n){return b(e)&&!E(t)?!0:W(t,"bpmn:Participant")&&!q(t)?!1:W(e,"bpmn:Participant")?W(t,"bpmn:Process")||W(t,"bpmn:Collaboration"):W(e,"bpmn:Lane")?W(t,"bpmn:Participant")||W(t,"bpmn:Lane"):W(e,"bpmn:BoundaryEvent")?!1:W(e,"bpmn:FlowElement")||W(e,"bpmn:DataAssociation")?W(t,"bpmn:FlowElementsContainer")?q(t):U(t,["bpmn:Participant","bpmn:Lane"]):W(e,"bpmn:Artifact")?U(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):W(e,"bpmn:MessageFlow")?W(t,"bpmn:Collaboration"):!1}function T(e){return!b(e)&&W(e,"bpmn:BoundaryEvent")}function A(e){return W(e,"bpmn:Lane")}function C(e){return T(e)||W(e,"bpmn:IntermediateThrowEvent")&&!e.parent}function R(e,t,n,i){if(Array.isArray(e)||(e=[e]),n)return!1;if(1!==e.length)return!1;var r=e[0];return b(r)?!1:C(r)?t?Y(t)?!1:!W(t,"bpmn:Activity")||p(t)?!1:i&&!Z(i,t)?!1:"attach":!0:!1}function N(e,t,n){if(!t)return!1;var i={replacements:[]};return G(e,function(e){Y(t)||W(e,"bpmn:StartEvent")&&!X(e)&&"label"!==e.type&&S(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),W(t,"bpmn:Transaction")||m(e,"bpmn:CancelEventDefinition")&&"label"!==e.type&&(W(e,"bpmn:EndEvent")&&S(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:EndEvent"}),W(e,"bpmn:BoundaryEvent")&&R(e,t,null,n)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:BoundaryEvent"}))}),i.replacements.length?i:!1}function P(e,t){return F(e,T)?!1:F(e,A)?!1:t?e.every(function(e){return S(e,t)}):!0}function M(e,t,n,i){return t?b(t)?null:o(n,t)?!1:n&&w(n,t)?!1:S(e,t,i)||L(e,t,i):!1}function D(e,t){return W(e,"bpmn:SubProcess")?!!q(e)&&(!t||t.width>=100&&t.height>=80):W(e,"bpmn:Lane")?!t||t.width>=130&&t.height>=60:W(e,"bpmn:Participant")?!t||t.width>=250&&t.height>=50:!!s(e)}function k(e,t){return E(e)||E(t)?!1:!w(t,e)&&!w(e,t)}function B(e,t){return l(e)&&h(t)&&!u(e,t)}function O(e,t){return y(e)&&g(t)&&f(e,t)&&!(W(e,"bpmn:EventBasedGateway")&&!x(t))}function I(e,t){return U(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&U(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:U(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&U(e,["bpmn:Activity","bpmn:CatchEvent"])?{type:"bpmn:DataOutputAssociation"}:!1}function L(e,t,n){return U(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&W(e,"bpmn:FlowNode")&&!W(e,"bpmn:BoundaryEvent")&&S(e,t.parent,n)}var j=e(254),F=e(251),z=e(253),G=e(255),V=e(243),$=e(45).getParents,W=e(70).is,U=e(45).isAny,H=e(70).getBusinessObject,q=e(68).isExpanded,Y=e(68).isEventSubProcess,X=e(68).isInterrupting,K=e(183),Z=e(61).getBoundaryAttachment;V(i,K),i.$inject=["eventBus"],t.exports=i,i.prototype.init=function(){this.addRule("connection.create",function(e){var t=e.source,n=e.target;return _(t,n)}),this.addRule("connection.reconnectStart",function(e){var t=e.connection,n=e.hover||e.source,i=t.target;return _(n,i,t)}),this.addRule("connection.reconnectEnd",function(e){var t=e.connection,n=t.source,i=e.hover||e.target;return _(n,i,t)}),this.addRule("connection.updateWaypoints",function(e){return null}),this.addRule("shape.resize",function(e){var t=e.shape,n=e.newBounds;return D(t,n)}),this.addRule("elements.move",function(e){var t=e.target,n=e.shapes,i=e.position;return R(n,t,null,i)||N(n,t,i)||P(n,t,i)}),this.addRule(["shape.create","shape.append"],function(e){var t=e.target,n=e.shape,i=e.source,r=e.position;return R([n],t,i,r)||M(n,t,i,r)}),this.addRule(["elements.delete"],function(e){return z(e.elements,function(e){return!b(e)})})},i.prototype.canConnectMessageFlow=B,i.prototype.canConnectSequenceFlow=O,i.prototype.canConnectDataAssociation=I,i.prototype.canConnectAssociation=k,i.prototype.canMove=P,i.prototype.canAttach=R,i.prototype.canReplace=N,i.prototype.canDrop=S,i.prototype.canInsert=L,i.prototype.canCreate=M,i.prototype.canConnect=_,i.prototype.canResize=D},{183:183,243:243,251:251,253:253,254:254,255:255,45:45,61:61,68:68,70:70}],59:[function(e,t,n){t.exports={__depends__:[e(185)],__init__:["bpmnRules"],bpmnRules:["type",e(58)]}},{185:185,58:58}],60:[function(e,t,n){"use strict";function i(t,n,i,s){function c(e,t,n){return"attach"===i.canAttach([e],t,null,n)}d.call(this,t,n),t.on("create.start",function(e){var t=e.context,i=t.shape,o=n.getRootElement();u(i,"bpmn:Participant")&&u(o,"bpmn:Process")&&r(t,i,o.children)}),t.on(["create.move","create.end"],1500,function(e){var t=e.context,n=t.shape,i=t.participantSnapBox;!b(e)&&i&&o(i,n,e)}),t.on("shape.move.start",function(e){var t=e.context,i=t.shape,o=n.getRootElement();u(i,"bpmn:Participant")&&u(o,"bpmn:Process")&&r(t,i,o.children)}),t.on(["create.move","create.end","shape.move.move","shape.move.end"],1500,function(e){var t=e.context,n=t.target,i=t.shape;n&&!b(e)&&c(i,n,e)&&a(e,i,n)}),t.on(["shape.move.hover","shape.move.move","shape.move.end","create.hover","create.move","create.end"],1500,function(e){var t=e.context,n=t.shape,i=e.hover;u(i,"bpmn:Lane")&&!l(n,["bpmn:Lane","bpmn:Participant"])&&(e.hover=S(i),e.hoverGfx=s.getGraphics(e.hover))});var p=Math.abs,f=e(253),v=e(377);t.on(["create.move","shape.move.move"],function(e){var t=e.context,n=t.shape,i=t.target,r=30;if(u(n,"bpmn:Lane")&&l(i,["bpmn:Lane","bpmn:Participant"])){var o,a=f(i.children,function(e){return u(e,"bpmn:Lane")}),s=e.y,c=a.reduce(function(e,t){var n=m(t);return p(n.top-s)<r?e=v(e||{},{before:{element:t,y:n.top}}):p(n.bottom-s)<r?e=v(e||{},{after:{element:t,y:n.bottom}}):n.top<s&&n.bottom>s&&(e=p(n.top-s)>p(n.bottom-s)?v(e||{},{after:{element:t,y:n.bottom}}):v(e||{},{before:{element:t,y:n.top}})),e},!1);c||(o=m(i),c=p(o.top-s)<r?{before:{element:i,y:o.top}}:p(o.bottom-s)<r?{after:{element:i,y:o.bottom}}:{into:{element:i,y:(o.top+o.bottom)/2}}),c.before&&c.after?(console.log("insert between",c.before.element.id,"and",c.after.element.id),E(e,"x",c.before.element.x+c.before.element.width/2),E(e,"y",c.before.y)):c.after?(console.log("insert after",c.after.element.id),E(e,"x",c.after.element.x+c.after.element.width/2),E(e,"y",c.after.y)):c.before?(console.log("insert before",c.before.element.id),E(e,"x",c.before.element.x+c.before.element.width/2),E(e,"y",c.before.y)):c.into&&(console.log("insert into",c.into.element.id),E(e,"x",c.into.element.x+c.into.element.width/2),E(e,"y",c.into.y))}}),t.on("resize.start",1500,function(e){var t=e.context,n=t.shape;u(n,"bpmn:SubProcess")&&h(n)&&(t.minDimensions={width:140,height:120}),u(n,"bpmn:Participant")&&(t.minDimensions={width:300,height:150}),(u(n,"bpmn:Lane")||u(n,"bpmn:Participant"))&&(t.resizeConstraints=_(n,t.direction,t.balanced)),u(n,"bpmn:TextAnnotation")&&(t.minDimensions={width:50,height:30})})}function r(e,t,n){if(n.length){var i=p(n.filter(function(e){return!e.labelTarget&&!e.waypoints}));i.x-=50,i.y-=20,i.width+=70,i.height+=40,t.width=Math.max(t.width,i.width),t.height=Math.max(t.height,i.height),e.participantSnapBox=i}}function o(e,t,n,i){i=i||0;var r=t.width/2-i,o=t.height/2,a={x:n.x-r-i,y:n.y-o},s={x:n.x+r+i,y:n.y+o},c=e,p=x(e);a.x>=c.x?E(n,"x",c.x+i+r):s.x<=p.x&&E(n,"x",p.x-i-r),a.y>=c.y?E(n,"y",c.y+o):s.y<=p.y&&E(n,"y",p.y-o)}function a(e,t,n){var i=m(n),r=w(e,n);/top/.test(r)?E(e,"y",i.top):/bottom/.test(r)&&E(e,"y",i.bottom),/left/.test(r)?E(e,"x",i.left):/right/.test(r)&&E(e,"x",i.right)}var s=e(243),c=e(255),p=e(221).getBBox,u=e(70).is,l=e(45).isAny,h=e(68).isExpanded,d=e(192),f=e(191),m=e(208).asTRBL,v=Math.round,y=f.mid,g=f.topLeft,x=f.bottomRight,b=f.isSnapped,E=f.setSnapped,w=e(61).getBoundaryAttachment,_=e(61).getParticipantSizeConstraints,S=e(44).getLanesRoot;s(i,d),i.$inject=["eventBus","canvas","bpmnRules","elementRegistry"],t.exports=i,i.prototype.initSnap=function(e){var t,n,i,r,o,a=e.context,s=e.shape;o=d.prototype.initSnap.call(this,e),u(s,"bpmn:Participant")&&o.setSnapLocations(["top-left","bottom-right","mid"]),s&&(t=y(s,e),n={width:s.width,height:s.height,x:isNaN(s.x)?v(t.x-s.width/2):s.x,y:isNaN(s.y)?v(t.y-s.height/2):s.y},i=g(n),r=x(n),o.setSnapOrigin("top-left",{x:i.x-e.x,y:i.y-e.y}),o.setSnapOrigin("bottom-right",{x:r.x-e.x,y:r.y-e.y}),c(s.outgoing,function(t){var n=t.waypoints[0];n=n.original||n,o.setSnapOrigin(t.id+"-docking",{x:n.x-e.x,y:n.y-e.y})}),c(s.incoming,function(t){var n=t.waypoints[t.waypoints.length-1];n=n.original||n,o.setSnapOrigin(t.id+"-docking",{x:n.x-e.x,y:n.y-e.y})}));var p=a.source;p&&o.addDefaultSnap("mid",y(p))},i.prototype.addTargetSnaps=function(e,t,n){u(t,"bpmn:BoundaryEvent")&&"label"!==t.type&&(n=n.parent),u(n,"bpmn:SequenceFlow")&&this.addTargetSnaps(e,t,n.parent);var i=this.getSiblings(t,n)||[];c(i,function(t){u(t,"bpmn:Lane")||(e.add("mid",y(t)),u(t,"bpmn:Participant")&&(e.add("top-left",g(t)),e.add("bottom-right",x(t))))}),c(t.incoming,function(t){-1===i.indexOf(t.source)&&e.add("mid",y(t.source));var n=t.waypoints[0];e.add(t.id+"-docking",n.original||n)}),c(t.outgoing,function(t){-1===i.indexOf(t.target)&&e.add("mid",y(t.target));var n=t.waypoints[t.waypoints.length-1];e.add(t.id+"-docking",n.original||n)})}},{191:191,192:192,208:208,221:221,243:243,253:253,255:255,377:377,44:44,45:45,61:61,68:68,70:70}],61:[function(e,t,n){"use strict";function i(e,t){var n=c(e,t,-15);return"intersect"!==n?n:null}function r(e,t,n,i){var r=e[t];e[t]=void 0===r?n:i(n,r)}function o(e,t,n){return r(e,t,n,f)}function a(e,t,n){return r(e,t,n,m)}function s(e,t,n){var i=h(e),r=!0,s=!0,c=l(i,[i]),f=u(e),m={},w={};/e/.test(t)?w.right=f.left+y:/w/.test(t)&&(w.left=f.right-y),c.forEach(function(e){var i=u(e);/n/.test(t)&&(i.top<f.top-10&&(r=!1),n&&d(f.top-i.bottom)<10&&a(m,"top",i.top+v),d(f.top-i.top)<5&&o(w,"top",i.bottom-v)),/s/.test(t)&&(i.bottom>f.bottom+10&&(s=!1),n&&d(f.bottom-i.top)<10&&o(m,"bottom",i.bottom-v),d(f.bottom-i.bottom)<5&&a(w,"bottom",i.top+v))});var _=i.children.filter(function(e){return!e.hidden&&!e.waypoints&&(p(e,"bpmn:FlowElement")||p(e,"bpmn:Artifact"))});return _.forEach(function(e){var n=u(e);r&&/n/.test(t)&&o(w,"top",n.top-b),/e/.test(t)&&a(w,"right",n.right+g),s&&/s/.test(t)&&a(w,"bottom",n.bottom+E),/w/.test(t)&&o(w,"left",n.left-x)}),{min:w,max:m}}var c=e(208).getOrientation;t.exports.getBoundaryAttachment=i;var p=e(70).is,u=e(208).asTRBL,l=e(44).collectLanes,h=e(44).getLanesRoot,d=Math.abs,f=Math.min,m=Math.max,v=60,y=300,g=20,x=50,b=20,E=20;t.exports.getParticipantSizeConstraints=s},{208:208,44:44,70:70}],62:[function(e,t,n){t.exports={__init__:["snapping"],snapping:["type",e(60)]}},{60:60}],63:[function(e,t,n){"use strict";function i(e,t){return s({id:e.id,type:e.$type,businessObject:e},t)}function r(e){return c(e,function(e){return{x:e.x,y:e.y}})}function o(e,t,n,i){return new Error(e("element {element} referenced by {referenced}#{property} not yet drawn",{element:f(n),referenced:f(t),property:i}))}function a(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._translate=r}var s=e(377),c=e(258),p=e(69),u=e(70).is,l=p.hasExternalLabel,h=p.getExternalLabelBounds,d=e(68).isExpanded,f=e(66).elementToString;a.$inject=["eventBus","canvas","elementFactory","elementRegistry","translate"],t.exports=a,a.prototype.add=function(e,t){var n,o=e.di,a=this._translate;if(u(o,"bpmndi:BPMNPlane"))n=this._elementFactory.createRoot(i(e)),this._canvas.setRootElement(n);else if(u(o,"bpmndi:BPMNShape")){var s=!d(e),c=t&&(t.hidden||t.collapsed),p=e.di.bounds;n=this._elementFactory.createShape(i(e,{collapsed:s,hidden:c,x:Math.round(p.x),y:Math.round(p.y),width:Math.round(p.width),height:Math.round(p.height)})),u(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,n),this._canvas.addShape(n,t)}else{if(!u(o,"bpmndi:BPMNEdge"))throw new Error(a("unknown di {di} for element {semantic}",{di:f(o),semantic:f(e)}));var h=this._getSource(e),m=this._getTarget(e);n=this._elementFactory.createConnection(i(e,{source:h,target:m,waypoints:r(e.di.waypoint)})),this._canvas.addConnection(n,t)}return l(e)&&this.addLabel(e,n),this._eventBus.fire("bpmnElement.added",{element:n}),n},a.prototype._attachBoundary=function(e,t){var n=this._translate,i=e.attachedToRef;if(!i)throw new Error(n("missing {semantic}#attachedToRef",{semantic:f(e)}));var r=this._elementRegistry.get(i.id),a=r&&r.attachers;if(!r)throw o(n,e,i,"attachedToRef");t.host=r,a||(r.attachers=a=[]),-1===a.indexOf(t)&&a.push(t)},a.prototype.addLabel=function(e,t){var n=h(e,t),r=this._elementFactory.createLabel(i(e,{id:e.id+"_label",labelTarget:t,type:"label",hidden:t.hidden||!e.name,x:Math.round(n.x),y:Math.round(n.y),width:Math.round(n.width),height:Math.round(n.height)}));return this._canvas.addShape(r,t.parent)},a.prototype._getEnd=function(e,t){var n,i,r=e.$type,a=this._translate;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?o(a,e,i,t+"Ref"):new Error(a("{semantic}#{side} Ref not specified",{semantic:f(e),side:t}))},a.prototype._getSource=function(e){return this._getEnd(e,"source")},a.prototype._getTarget=function(e){return this._getEnd(e,"target")},a.prototype._getElement=function(e){return this._elementRegistry.get(e.id)}},{258:258,377:377,66:66,68:68,69:69,70:70}],64:[function(e,t,n){"use strict";function i(e,t){return e.$instanceOf(t)}function r(e){return s(e.rootElements,function(e){return i(e,"bpmn:Process")||i(e,"bpmn:Collaboration")})}function o(e,t){function n(e,t){return function(n){e(n,t)}}function o(e){W[e.id]=e}function s(e){return W[e.id]}function p(n,i){var r=n.gfx;if(r)throw new Error(t("already rendered {element}",{element:u(n)}));return e.element(n,i)}function h(t,n){return e.root(t,n)}function d(e,n){try{var i=e.di&&p(e,n);return o(e),i}catch(r){f(r.message,{element:e,error:r}),console.error(t("failed to import {element}",{element:u(e)})),console.error(r)}}function f(t,n){e.error(t,n)}function m(e){var n=e.bpmnElement;n?n.di?f(t("multiple DI elements defined for {element}",{element:u(n)}),{element:n}):(l.bind(n,"di"),n.di=e):f(t("no bpmnElement referenced in {element}",{element:u(e)}),{element:e})}function v(e){y(e.plane)}function y(e){m(e),c(e.planeElement,g)}function g(e){m(e)}function x(e,n){var o=e.diagrams;if(n&&-1===o.indexOf(n))throw new Error(t("diagram not part of bpmn:Definitions"));if(!n&&o&&o.length&&(n=o[0]),!n)throw new Error(t("no diagram to display"));v(n);var a=n.plane;if(!a)throw new Error(t("no plane for {element}",{element:u(n)}));var s=a.bpmnElement;if(!s){if(s=r(e),!s)throw new Error(t("no process or collaboration to display"));f(t("correcting missing bpmnElement on {plane} to {rootElement}",{plane:u(a),rootElement:u(s)})),a.bpmnElement=s,m(a)}var c=h(s,a);if(i(s,"bpmn:Process"))E(s,c);else{if(!i(s,"bpmn:Collaboration"))throw new Error(t("unsupported bpmnElement for {plane}: {rootElement}",{plane:u(a),rootElement:u(s)}));V(s,c),w(e.rootElements,c)}b(U)}function b(e){c(e,function(e){e()})}function E(e,t){F(e,t),P(e.ioSpecification,t),N(e.artifacts,t),o(e)}function w(e){var t=a(e,function(e){return!s(e)&&i(e,"bpmn:Process")&&e.laneSets});t.forEach(n(E))}function _(e,t){d(e,t)}function S(e,t){c(e,n(_,t))}function T(e,t){d(e,t)}function A(e,t){d(e,t)}function C(e,t){d(e,t)}function R(e,t){d(e,t)}function N(e,t){c(e,function(e){i(e,"bpmn:Association")?U.push(function(){R(e,t)}):R(e,t)})}function P(e,t){e&&(c(e.dataInputs,n(A,t)),c(e.dataOutputs,n(C,t)))}function M(e,t){F(e,t),N(e.artifacts,t)}function D(e,t){var r=d(e,t);i(e,"bpmn:SubProcess")&&M(e,r||t),i(e,"bpmn:Activity")&&P(e.ioSpecification,t),U.push(function(){c(e.dataInputAssociations,n(T,t)),c(e.dataOutputAssociations,n(T,t))})}function k(e,t){d(e,t)}function B(e,t){d(e,t)}function O(e,t){d(e,t)}function I(e,t){var n=d(e,t);e.childLaneSet&&L(e.childLaneSet,n||t),$(e)}function L(e,t){c(e.lanes,n(I,t))}function j(e,t){c(e,n(L,t))}function F(e,t){e.laneSets&&j(e.laneSets,t),z(e.flowElements,t)}function z(e,n){c(e,function(e){i(e,"bpmn:SequenceFlow")?U.push(function(){k(e,n)}):i(e,"bpmn:BoundaryEvent")?U.unshift(function(){O(e,n)}):i(e,"bpmn:FlowNode")?D(e,n):i(e,"bpmn:DataObject")||(i(e,"bpmn:DataStoreReference")?B(e,n):i(e,"bpmn:DataObjectReference")?B(e,n):f(t("unrecognized flowElement {element} in context {context}",{element:u(e),context:n?u(n.businessObject):"null"}),{element:e,context:n}))})}function G(e,t){var n=d(e,t),i=e.processRef;i&&E(i,n||t)}function V(e){c(e.participants,n(G)),N(e.artifacts),U.push(function(){S(e.messageFlows)})}function $(e){c(e.flowNodeRef,function(t){var n=t.get("lanes");n&&n.push(e)})}var W={},U=[];return{handleDefinitions:x}}var a=e(253),s=e(254),c=e(255),p=e(407),u=e(66).elementToString,l=new p({name:"bpmnElement",enumerable:!0},{name:"di"});t.exports=o},{253:253,254:254,255:255,407:407,66:66}],65:[function(e,t,n){"use strict";function i(e,t,n){function i(e){var t={root:function(e){return a.add(e)},element:function(e,t){return a.add(e,t)},error:function(e,t){p.push({message:e,context:t})}},n=new r(t,c);n.handleDefinitions(e)}var o,a=e.get("bpmnImporter"),s=e.get("eventBus"),c=e.get("translate"),p=[];s.fire("import.render.start",{definitions:t});try{i(t)}catch(u){o=u}s.fire("import.render.complete",{error:o,warnings:p}),n(o,p)}var r=e(64);t.exports.importBpmnDiagram=i},{64:64}],66:[function(e,t,n){"use strict";t.exports.elementToString=function(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}},{}],67:[function(e,t,n){t.exports={__depends__:[e(204)],bpmnImporter:["type",e(63)]}},{204:204,63:63}],68:[function(e,t,n){"use strict";var i=e(70).is,r=e(70).getBusinessObject;t.exports.isExpanded=function(e){return i(e,"bpmn:CallActivity")?!1:i(e,"bpmn:SubProcess")?!!r(e).di.isExpanded:i(e,"bpmn:Participant")?!!r(e).processRef:!0},t.exports.isInterrupting=function(e){return e&&r(e).isInterrupting!==!1},t.exports.isEventSubProcess=function(e){return e&&!!r(e).triggeredByEvent}},{70:70}],69:[function(e,t,n){"use strict";function i(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}function r(e){return e.waypoints?i(e.waypoints):{x:e.x+e.width/2,y:e.y+e.height+s.height/2}}var o=e(377),a=e(70).is,s=t.exports.DEFAULT_LABEL_SIZE={width:90,height:20};t.exports.hasExternalLabel=function(e){return a(e,"bpmn:Event")||a(e,"bpmn:Gateway")||a(e,"bpmn:DataStoreReference")||a(e,"bpmn:DataObjectReference")||a(e,"bpmn:SequenceFlow")||a(e,"bpmn:MessageFlow")},t.exports.getWaypointsMid=i,t.exports.getExternalLabelMid=r,t.exports.getExternalLabelBounds=function(e,t){var n,i,a,c=e.di,p=c.label;return p&&p.bounds?(a=p.bounds,i={width:Math.max(s.width,a.width),height:a.height},n={x:a.x+a.width/2,
|
|
y:a.y+a.height/2}):(n=r(t),i=s),o({x:n.x-i.width/2,y:n.y-i.height/2},i)}},{377:377,70:70}],70:[function(e,t,n){"use strict";function i(e,t){var n=r(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function r(e){return e&&e.businessObject||e}t.exports.is=i,t.exports.getBusinessObject=r},{}],71:[function(e,t,n){"use strict";function i(e){return e.join(";")}function r(){o||(o=a(h),s.bind(o,".backdrop","click",function(e){document.body.removeChild(o)})),document.body.appendChild(o)}var o,a=e(394),s=e(393),c=t.exports.BPMNIO_LOGO="iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFiMte9PrwldFwfcZPqtqN0+zEyOe1XLgjvuKncsJAZ70y6fXh3vDT////UrQV////G2zN+AAAABB0Uk5T////////////////////AOAjXRkAAAHDSURBVHjavJZJkoUgDEBJmAX8979tM8u3E6x20VlYJfFFMoL4vBDxATxZcakIOJTWSmxvKWVIkJ8jHvlRv1F2LFrVISCZI+tCtQx+XfewgVTfyY3plPiQEAzI3zWy+kR6NBhFBYeBuscJLOUuA2WVLpCjVIaFzrNQZArxAZKUQm6gsj37L9Cb7dnIBUKxENaaMJQqMpDXvSL+ktxdGRm2IsKgJGGPg7atwUG5CcFUEuSv+CwQqizTrvDTNXdMU2bMiDWZd8d7QIySWVRsb2vBBioxOFt4OinPBapL+neAb5KL5IJ8szOza2/DYoipUCx+CjO0Bpsv0V6mktNZ+k8rlABlWG0FrOpKYVo8DT3dBeLEjUBAj7moDogVii7nSS9QzZnFcOVBp1g2PyBQ3Vr5aIapN91VJy33HTJLC1iX2FY6F8gRdaAeIEfVONgtFCzZTmoLEdOjBDfsIOA6128gw3eu1shAajdZNAORxuQDJN5A5PbEG6gNIu24QJD5iNyRMZIr6bsHbCtCU/OaOaSvgkUyDMdDa1BXGf5HJ1To+/Ym6mCKT02Y+/Sa126ZKyd3jxhzpc1r8zVL6YM1Qy/kR4ABAFJ6iQUnivhAAAAAAElFTkSuQmCC",p=i(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"]),u=i(["width: 100%","height: 100%","background: rgba(0,0,0,0.2)"]),l=i(["position: absolute","left: 50%","top: 40%","margin: 0 -130px","width: 260px","padding: 10px","background: white","border: solid 1px #AAA","border-radius: 3px","font-family: Helvetica, Arial, sans-serif","font-size: 14px","line-height: 1.2em"]),h='<div class="bjs-powered-by-lightbox" style="'+p+'"><div class="backdrop" style="'+u+'"></div><div class="notice" style="'+l+'"><a href="http://bpmn.io" target="_blank" style="float: left; margin-right: 10px"><img src="data:image/png;base64,'+c+'"></a>Web-based tooling for BPMN, DMN and CMMN diagrams powered by <a href="http://bpmn.io" target="_blank">bpmn.io</a>.</div></div>';t.exports.open=r},{393:393,394:394}],72:[function(e,t,n){t.exports=e(74)},{74:74}],73:[function(e,t,n){"use strict";function i(e,t){s.call(this,e,t)}var r=e(374),o=e(369),a=e(377),s=e(80),c=e(76),p=e(77);i.prototype=Object.create(s.prototype),t.exports=i,i.prototype.fromXML=function(e,t,n,i){r(t)||(i=n,n=t,t="bpmn:Definitions"),o(n)&&(i=n,n={});var s=new c(a({model:this,lax:!0},n)),p=s.handler(t);s.fromXML(e,p,i)},i.prototype.toXML=function(e,t,n){o(t)&&(n=t,t={});var i=new p(t);try{var r=i.toXML(e);n(null,r)}catch(a){n(a)}}},{369:369,374:374,377:377,76:76,77:77,80:80}],74:[function(e,t,n){"use strict";var i=e(377),r=e(73),o={bpmn:e(89),bpmndi:e(90),dc:e(91),di:e(92)};t.exports=function(e,t){return new r(i({},o,e),t)}},{377:377,73:73,89:89,90:90,91:91,92:92}],75:[function(e,t,n){"use strict";function i(e){return e.charAt(0).toUpperCase()+e.slice(1)}function r(e){return e.charAt(0).toLowerCase()+e.slice(1)}function o(e){return e.xml&&"lowerCase"===e.xml.tagAlias}function a(e){return e.xml&&e.xml.serialize}t.exports.aliasToName=function(e,t){return o(t)?i(e):e},t.exports.nameToAlias=function(e,t){return o(t)?r(e):e},t.exports.DEFAULT_NS_MAP={xsi:"http://www.w3.org/2001/XMLSchema-instance"};var s=t.exports.XSI_TYPE="xsi:type";t.exports.serializeAsType=function(e){return a(e)===s},t.exports.serializeAsProperty=function(e){return"property"===a(e)}},{}],76:[function(e,t,n){"use strict";function i(e){var t=e.attributes;return g(t,function(e,t,n){var i,r;return t.local?(r=A(t.name,t.prefix),i=r.name):i=t.prefix,e[i]=t.value,e},{})}function r(e,t,n){var i,r=A(t.value),o=e.ns[r.prefix||""],a=r.localName,s=o&&n.getPackage(o);s&&(i=s.xml&&s.xml.typePrefix,i&&0===a.indexOf(i)&&(a=a.slice(i.length)),t.value=s.prefix+":"+a)}function o(e,t,n){var i,a;if(i=e.uri||n){var s=t.getPackage(i);a=s?s.prefix:e.prefix,e.prefix=a,e.uri=i}x(e.attributes,function(n){n.uri===D&&"type"===n.local&&r(e,n,t),o(n,t,null)})}function a(e){return new Error(e)}function s(e){return e.$descriptor}function c(e){E(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw a("expected element");var t,n=s(e),i=n.idProperty;i&&(t=e.get(i.name),t&&(this.elementsById[t]=e))},this.addWarning=function(e){this.warnings.push(e)}}function p(){}function u(){}function l(){}function h(e,t){this.property=e,this.context=t}function d(e,t){this.element=t,this.propertyDesc=e}function f(){}function m(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function v(e,t,n){this.model=e,this.context=n}function y(e){e instanceof T&&(e={model:e}),E(this,{lax:!1},e)}var g=e(259),x=e(255),b=e(254),E=e(377),w=e(266),_=e(79),S=e(78).parser,T=e(80),A=e(85).parseName,C=e(88),R=C.coerceType,N=C.isSimple,P=e(75),M=P.XSI_TYPE,D=P.DEFAULT_NS_MAP.xsi,k=P.serializeAsType,B=P.aliasToName;p.prototype.handleEnd=function(){},p.prototype.handleText=function(){},p.prototype.handleNode=function(){},u.prototype=new p,u.prototype.handleNode=function(){return this},l.prototype=new p,l.prototype.handleText=function(e){this.body=(this.body||"")+e},h.prototype=new l,h.prototype.handleNode=function(e){if(this.element)throw a("expected no sub nodes");return this.element=this.createReference(e),this},h.prototype.handleEnd=function(){this.element.id=this.body},h.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},d.prototype=new l,d.prototype.handleEnd=function(){var e=this.body,t=this.element,n=this.propertyDesc;e=R(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},f.prototype=Object.create(l.prototype),f.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},m.prototype=new f,m.prototype.addReference=function(e){this.context.addReference(e)},m.prototype.handleEnd=function(){var e=this.body,t=this.element,n=s(t),i=n.bodyProperty;i&&void 0!==e&&(e=R(i.type,e),t.set(i.name,e))},m.prototype.createElement=function(e){var t=i(e),n=this.type,r=s(n),o=this.context,a=new n({});return x(t,function(e,t){var n,i=r.propertiesByName[t];i&&i.isReference?i.isMany?(n=e.split(" "),x(n,function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i&&(e=R(i.type,e)),a.set(t,e))}),a},m.prototype.getPropertyForNode=function(e){var t,n,i,r=A(e.local,e.prefix),o=this.type,c=this.model,p=s(o),u=r.name,l=p.propertiesByName[u];if(l)return k(l)&&(i=e.attributes[M])?(t=i.value,n=c.getType(t),E({},l,{effectiveType:s(n).name})):l;var h=c.getPackage(r.prefix);if(h){if(t=r.prefix+":"+B(r.localName,p.$pkg),n=c.getType(t),l=b(p.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}))return E({},l,{effectiveType:s(n).name})}else if(l=b(p.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}))return l;throw a("unrecognized element <"+r.name+">")},m.prototype.toString=function(){return"ElementDescriptor["+s(this.type).name+"]"},m.prototype.valueHandler=function(e,t){return new d(e,t)},m.prototype.referenceHandler=function(e){return new h(e,this.context)},m.prototype.handler=function(e){return"Element"===e?new v(this.model,e,this.context):new m(this.model,e,this.context)},m.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,N(n))return this.valueHandler(t,i);r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e);var o=r.element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(E(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},v.prototype=Object.create(f.prototype),v.prototype.createElement=function(e){var t=e.name,n=e.prefix,i=e.ns[n],r=e.attributes;return this.model.createAny(t,i,r)},v.prototype.handleChild=function(e){var t,n=new v(this.model,"Element",this.context).handleNode(e),i=this.element,r=n.element;return void 0!==r&&(t=i.$children=i.$children||[],t.push(r),r.$parent=i),n},v.prototype.handleText=function(e){this.body=this.body||""+e},v.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},y.prototype.fromXML=function(e,t,n){function i(){var e,t,n=v.elementsById,i=v.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],a=s(r).propertiesByName[t.property];if(o||v.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var c=r.get(a.name),p=c.indexOf(t);-1===p&&(p=c.length),o?c[p]=o:c.splice(p,1)}else r.set(a.name,o)}}function r(e){g.pop().handleEnd()}function p(e){var t=g.peek();o(e,d);try{g.push(t.handleNode(e))}catch(n){var i=this.line,r=this.column,s="unparsable content <"+e.name+"> detected\n line: "+i+"\n column: "+r+"\n nested error: "+n.message;if(!f)throw console.error("could not parse document"),console.error(n),a(s);v.addWarning({message:s,error:n}),console.warn("could not parse node"),console.warn(n),g.push(new u)}}function l(e){g.peek().handleText(e)}var h=t.rootHandler;t instanceof m?(h=t,t={}):"string"==typeof t?(h=this.handler(t),t={}):"string"==typeof h&&(h=this.handler(h));var d=this.model,f=this.lax,v=new c(E({},t,{rootHandler:h})),y=new S(!0,{xmlns:!0,trim:!0}),g=new _;h.context=v,g.push(h),y.onopentag=p,y.oncdata=y.ontext=l,y.onclosetag=r,y.onend=i,w(function(){var t;try{y.write(e).close()}catch(i){t=i}n(t,t?void 0:h.element,v)})},y.prototype.handler=function(e){return new m(this.model,e)},t.exports=y,t.exports.ElementHandler=m},{254:254,255:255,259:259,266:266,377:377,75:75,78:78,79:79,80:80,85:85,88:88}],77:[function(e,t,n){"use strict";function i(e){return E(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function r(e){function t(t){return e.used[t.uri]}function n(e){var t="xmlns"+(e.prefix?":"+e.prefix:"");return{name:t,value:e.uri}}var i=[].concat(e.wellknown,e.custom);return x(w(i,t),n)}function o(e,t){return t.isGeneric?t.name:_({localName:C(t.ns.localName,t.$pkg)},e)}function a(e,t){return _({localName:t.ns.localName},e)}function s(e){var t=e.$descriptor;return w(t.properties,function(t){var n=t.name;if(t.isVirtual)return!1;if(!e.hasOwnProperty(n))return!1;var i=e[n];return i===t["default"]?!1:t.isMany?i.length:!0})}function c(e){return e=E(e)?e:""+e,e.replace(M,function(e){return"&#"+B[e]+";"})}function p(e){return w(e,function(e){return e.isAttr})}function u(e){return w(e,function(e){return!e.isAttr})}function l(e,t){this.ns=t}function h(){}function d(e){this.ns=e}function f(e,t){this.body=[],this.attrs=[],this.parent=e,this.ns=t}function m(e,t){f.call(this,e,t)}function v(){this.value="",this.write=function(e){this.value+=e}}function y(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function g(e){function t(t,n){var i=n||new v,r=new y(i,e.format);return e.preamble&&r.append(P),(new f).build(t).serializeTo(r),n?void 0:i.value}return e=_({format:!1,preamble:!0},e||{}),{toXML:t}}var x=e(258),b=e(255),E=e(374),w=e(253),_=e(377),S=e(88),T=e(85).parseName,A=e(75),C=A.nameToAlias,R=A.serializeAsType,N=A.serializeAsProperty,P='<?xml version="1.0" encoding="UTF-8"?>\n',M=/(<|>|'|"|&|\n\r|\n)/g,D=A.DEFAULT_NS_MAP,k=A.XSI_TYPE,B={"\n":"10","\n\r":"10",'"':"34","'":"39","<":"60",">":"62","&":"38"};l.prototype.build=function(e){return this.element=e,this},l.prototype.serializeTo=function(e){e.appendIndent().append("<"+i(this.ns)+">"+this.element.id+"</"+i(this.ns)+">").appendNewLine()},h.prototype.serializeValue=h.prototype.serializeTo=function(e){var t=this.escape;t&&e.append("<![CDATA["),e.append(this.value),t&&e.append("]]>")},h.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(M)&&(this.escape=!0),this},d.prototype=new h,d.prototype.serializeTo=function(e){e.appendIndent().append("<"+i(this.ns)+">"),this.serializeValue(e),e.append("</"+i(this.ns)+">").appendNewLine()},f.prototype.build=function(e){this.element=e;var t=this.parseNsAttributes(e);if(this.ns||(this.ns=this.nsTagName(e.$descriptor)),e.$descriptor.isGeneric)this.parseGeneric(e);else{var n=s(e);this.parseAttributes(p(n)),this.parseContainments(u(n)),this.parseGenericAttributes(e,t)}return this},f.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return o(t,e)},f.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return a(t,e)},f.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},f.prototype.nsAttributeName=function(e){var t;if(t=E(e)?T(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.isLocalNs(n)?{localName:t.localName}:_({localName:t.localName},n)},f.prototype.parseGeneric=function(e){var t=this,n=this.body,i=this.attrs;b(e,function(e,r){"$body"===r?n.push((new h).build({type:"String"},e)):"$children"===r?b(e,function(e){n.push(new f(t).build(e))}):0!==r.indexOf("$")&&i.push({name:r,value:c(e)})})},f.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=e.$model,r=[];return b(n,function(e,n){var o,a=T(n);"xmlns"===a.prefix&&(o={prefix:a.localName,uri:e}),a.prefix||"xmlns"!==a.localName||(o={uri:e}),o?i.getPackage(e)?t.logNamespace(o,!0):t.logNamespaceUsed(o):r.push({name:n,value:e})}),r},f.prototype.parseGenericAttributes=function(e,t){var n=this;b(t,function(t){if(t.name!==k)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(i){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,i)}})},f.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;b(e,function(e){var r=i.get(e.name),o=e.isReference,a=e.isMany,s=t.nsPropertyTagName(e);if(a||(r=[r]),e.isBody)n.push((new h).build(e,r[0]));else if(S.isSimple(e.type))b(r,function(t){n.push(new d(s).build(e,t))});else if(o)b(r,function(e){n.push(new l(t,s).build(e))});else{var c=R(e),p=N(e);b(r,function(e){var i;i=c?new m(t,s):p?new f(t,s):new f(t),n.push(i.build(e))})}})},f.prototype.getNamespaces=function(){var e=this.namespaces,t=this.parent;return e||(e=this.namespaces=t?t.getNamespaces():{prefixMap:{},uriMap:{},used:{},wellknown:[],custom:[]}),e},f.prototype.logNamespace=function(e,t){var n=this.getNamespaces(),i=e.uri,r=n.uriMap[i];return r||(n.uriMap[i]=e,t?n.wellknown.push(e):n.custom.push(e)),n.prefixMap[e.prefix]=i,e},f.prototype.logNamespaceUsed=function(e){var t=this.element,n=t.$model,i=this.getNamespaces(),r=e.prefix,o=D[r]||n&&(n.getPackage(r)||{}).uri,a=e.uri||i.prefixMap[r]||o;if(!a)throw new Error("no namespace uri given for prefix <"+e.prefix+">");return e=i.uriMap[a],e||(e=this.logNamespace({prefix:r,uri:a},o)),i.used[e.uri]||(i.used[e.uri]=e),e},f.prototype.parseAttributes=function(e){var t=this,n=this.element;b(e,function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];b(i,function(e){r.push(e.id)}),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)})},f.prototype.addAttribute=function(e,t){var n=this.attrs;E(t)&&(t=c(t)),n.push({name:e,value:t})},f.prototype.serializeAttributes=function(e){var t=this.attrs,n=!this.parent;n&&(t=r(this.namespaces).concat(t)),b(t,function(t){e.append(" ").append(i(t.name)).append('="').append(t.value).append('"')})},f.prototype.serializeTo=function(e){var t=this.body.length,n=!(1===this.body.length&&this.body[0]instanceof h);e.appendIndent().append("<"+i(this.ns)),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),b(this.body,function(t){t.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("</"+i(this.ns)+">")),e.appendNewLine()},m.prototype=new f,m.prototype.build=function(e){var t=e.$descriptor;this.element=e,this.typeNs=this.nsTagName(t);var n=this.typeNs,i=e.$model.getPackage(n.uri),r=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(k),(n.prefix?n.prefix+":":"")+r+t.ns.localName),f.prototype.build.call(this,e)},m.prototype.isLocalNs=function(e){return e.uri===this.typeNs.uri},t.exports=g},{253:253,255:255,258:258,374:374,377:377,75:75,85:85,88:88}],78:[function(e,t,n){(function(t){!function(n){function i(e,t){if(!(this instanceof i))return new i(e,t);var r=this;o(r),r.q=r.c="",r.bufferCheckPosition=n.MAX_BUFFER_LENGTH,r.opt=t||{},r.opt.lowercase=r.opt.lowercase||r.opt.lowercasetags,r.looseCase=r.opt.lowercase?"toLowerCase":"toUpperCase",r.tags=[],r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.strict=!!e,r.noscript=!(!e&&!r.opt.noscript),r.state=W.BEGIN,r.ENTITIES=Object.create(n.ENTITIES),r.attribList=[],r.opt.xmlns&&(r.ns=Object.create(G)),r.trackPosition=r.opt.position!==!1,r.trackPosition&&(r.position=r.line=r.column=0),d(r,"onready")}function r(e){for(var t=Math.max(n.MAX_BUFFER_LENGTH,10),i=0,r=0,o=C.length;o>r;r++){var a=e[C[r]].length;if(a>t)switch(C[r]){case"textNode":m(e);break;case"cdata":f(e,"oncdata",e.cdata),e.cdata="";break;case"script":f(e,"onscript",e.script),e.script="";break;default:y(e,"Max buffer length exceeded: "+C[r])}i=Math.max(i,a)}e.bufferCheckPosition=n.MAX_BUFFER_LENGTH-i+e.position}function o(e){for(var t=0,n=C.length;n>t;t++)e[C[t]]=""}function a(e){m(e),""!==e.cdata&&(f(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(f(e,"onscript",e.script),e.script="")}function s(e,t){return new c(e,t)}function c(e,t){if(!(this instanceof c))return new c(e,t);R.apply(this),this._parser=new i(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,P.forEach(function(e){Object.defineProperty(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){return t?void n.on(e,t):(n.removeAllListeners(e),n._parser["on"+e]=t)},enumerable:!0,configurable:!1})})}function p(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}function u(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function l(e,t){return u(e)?!!t.match(e):e[t]}function h(e,t){return!l(e,t)}function d(e,t,n){e[t]&&e[t](n)}function f(e,t,n){e.textNode&&m(e),d(e,t,n)}function m(e){e.textNode=v(e.opt,e.textNode),e.textNode&&d(e,"ontext",e.textNode),e.textNode=""}function v(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function y(e,t){return m(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,d(e,"onerror",t),e}function g(e){return e.closedRoot||x(e,"Unclosed root tag"),e.state!==W.BEGIN&&e.state!==W.TEXT&&y(e,"Unexpected end"),m(e),e.c="",e.closed=!0,d(e,"onend"),i.call(e,e.strict,e.opt),e}function x(e,t){if("object"!=typeof e||!(e instanceof i))throw new Error("bad call to strictFail");e.strict&&y(e,t)}function b(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0}function E(e,t){var n=e.indexOf(":"),i=0>n?["",e]:e.split(":"),r=i[0],o=i[1];return t&&"xmlns"===e&&(r="xmlns",o=""),{prefix:r,local:o}}function w(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))return e.attribName=e.attribValue="";if(e.opt.xmlns){var t=E(e.attribName,!0),n=t.prefix,i=t.local;if("xmlns"===n)if("xml"===i&&e.attribValue!==F)x(e,"xml: prefix must be bound to "+F+"\nActual: "+e.attribValue);else if("xmlns"===i&&e.attribValue!==z)x(e,"xmlns: prefix must be bound to "+z+"\nActual: "+e.attribValue);else{var r=e.tag,o=e.tags[e.tags.length-1]||e;r.ns===o.ns&&(r.ns=Object.create(o.ns)),r.ns[i]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,f(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}function _(e,t){if(e.opt.xmlns){var n=e.tag,i=E(e.tagName);n.prefix=i.prefix,n.local=i.local,n.uri=n.ns[i.prefix]||"",n.prefix&&!n.uri&&(x(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=i.prefix);var r=e.tags[e.tags.length-1]||e;n.ns&&r.ns!==n.ns&&Object.keys(n.ns).forEach(function(t){f(e,"onopennamespace",{prefix:t,uri:n.ns[t]})});for(var o=0,a=e.attribList.length;a>o;o++){var s=e.attribList[o],c=s[0],p=s[1],u=E(c,!0),l=u.prefix,h=u.local,d=""==l?"":n.ns[l]||"",m={name:c,value:p,prefix:l,local:h,uri:d};l&&"xmlns"!=l&&!d&&(x(e,"Unbound namespace prefix: "+JSON.stringify(l)),m.uri=l),e.tag.attributes[c]=m,f(e,"onattribute",m)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),f(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=W.TEXT:e.state=W.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function S(e){if(!e.tagName)return x(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=W.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=W.SCRIPT);f(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var i=n;t--;){var r=e.tags[t];if(r.name===i)break;x(e,"Unexpected close tag")}if(0>t)return x(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=W.TEXT);e.tagName=n;for(var o=e.tags.length;o-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,f(e,"onclosetag",e.tagName);var s={};for(var c in a.ns)s[c]=a.ns[c];var p=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==p.ns&&Object.keys(a.ns).forEach(function(t){var n=a.ns[t];f(e,"onclosenamespace",{prefix:t,uri:n})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=W.TEXT}function T(e){var t,n=e.entity,i=n.toLowerCase(),r="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[i]?e.ENTITIES[i]:(n=i,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),t=parseInt(n,16),r=t.toString(16)):(n=n.slice(1),t=parseInt(n,10),r=t.toString(10))),n=n.replace(/^0+/,""),r.toLowerCase()!==n?(x(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function A(e){var t=this;if(this.error)throw this.error;if(t.closed)return y(t,"Cannot write after close. Assign an onready handler.");if(null===e)return g(t);for(var n=0,i="";t.c=i=e.charAt(n++);)switch(t.trackPosition&&(t.position++,"\n"===i?(t.line++,t.column=0):t.column++),t.state){case W.BEGIN:"<"===i?(t.state=W.OPEN_WAKA,t.startTagPosition=t.position):h(M,i)&&(x(t,"Non-whitespace before first tag."),t.textNode=i,t.state=W.TEXT);continue;case W.TEXT:if(t.sawRoot&&!t.closedRoot){for(var o=n-1;i&&"<"!==i&&"&"!==i;)i=e.charAt(n++),i&&t.trackPosition&&(t.position++,"\n"===i?(t.line++,t.column=0):t.column++);t.textNode+=e.substring(o,n-1)}"<"===i?(t.state=W.OPEN_WAKA,t.startTagPosition=t.position):(!h(M,i)||t.sawRoot&&!t.closedRoot||x(t,"Text data outside of root node."),"&"===i?t.state=W.TEXT_ENTITY:t.textNode+=i);continue;case W.SCRIPT:"<"===i?t.state=W.SCRIPT_ENDING:t.script+=i;continue;case W.SCRIPT_ENDING:"/"===i?t.state=W.CLOSE_TAG:(t.script+="<"+i,t.state=W.SCRIPT);continue;case W.OPEN_WAKA:if("!"===i)t.state=W.SGML_DECL,t.sgmlDecl="";else if(l(M,i));else if(l(V,i))t.state=W.OPEN_TAG,t.tagName=i;else if("/"===i)t.state=W.CLOSE_TAG,t.tagName="";else if("?"===i)t.state=W.PROC_INST,t.procInstName=t.procInstBody="";else{if(x(t,"Unencoded <"),t.startTagPosition+1<t.position){var a=t.position-t.startTagPosition;i=new Array(a).join(" ")+i}t.textNode+="<"+i,t.state=W.TEXT}continue;case W.SGML_DECL:(t.sgmlDecl+i).toUpperCase()===L?(f(t,"onopencdata"),t.state=W.CDATA,t.sgmlDecl="",t.cdata=""):t.sgmlDecl+i==="--"?(t.state=W.COMMENT,t.comment="",t.sgmlDecl=""):(t.sgmlDecl+i).toUpperCase()===j?(t.state=W.DOCTYPE,(t.doctype||t.sawRoot)&&x(t,"Inappropriately located doctype declaration"),t.doctype="",t.sgmlDecl=""):">"===i?(f(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=W.TEXT):l(B,i)?(t.state=W.SGML_DECL_QUOTED,t.sgmlDecl+=i):t.sgmlDecl+=i;continue;case W.SGML_DECL_QUOTED:i===t.q&&(t.state=W.SGML_DECL,t.q=""),t.sgmlDecl+=i;continue;case W.DOCTYPE:">"===i?(t.state=W.TEXT,f(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=i,"["===i?t.state=W.DOCTYPE_DTD:l(B,i)&&(t.state=W.DOCTYPE_QUOTED,t.q=i));continue;case W.DOCTYPE_QUOTED:t.doctype+=i,i===t.q&&(t.q="",t.state=W.DOCTYPE);continue;case W.DOCTYPE_DTD:t.doctype+=i,"]"===i?t.state=W.DOCTYPE:l(B,i)&&(t.state=W.DOCTYPE_DTD_QUOTED,t.q=i);continue;case W.DOCTYPE_DTD_QUOTED:t.doctype+=i,i===t.q&&(t.state=W.DOCTYPE_DTD,t.q="");continue;case W.COMMENT:"-"===i?t.state=W.COMMENT_ENDING:t.comment+=i;continue;case W.COMMENT_ENDING:"-"===i?(t.state=W.COMMENT_ENDED,t.comment=v(t.opt,t.comment),t.comment&&f(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+i,t.state=W.COMMENT);continue;case W.COMMENT_ENDED:">"!==i?(x(t,"Malformed comment"),t.comment+="--"+i,t.state=W.COMMENT):t.state=W.TEXT;continue;case W.CDATA:"]"===i?t.state=W.CDATA_ENDING:t.cdata+=i;continue;case W.CDATA_ENDING:"]"===i?t.state=W.CDATA_ENDING_2:(t.cdata+="]"+i,t.state=W.CDATA);continue;case W.CDATA_ENDING_2:">"===i?(t.cdata&&f(t,"oncdata",t.cdata),f(t,"onclosecdata"),t.cdata="",t.state=W.TEXT):"]"===i?t.cdata+="]":(t.cdata+="]]"+i,t.state=W.CDATA);continue;case W.PROC_INST:"?"===i?t.state=W.PROC_INST_ENDING:l(M,i)?t.state=W.PROC_INST_BODY:t.procInstName+=i;continue;case W.PROC_INST_BODY:if(!t.procInstBody&&l(M,i))continue;"?"===i?t.state=W.PROC_INST_ENDING:t.procInstBody+=i;continue;case W.PROC_INST_ENDING:">"===i?(f(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=W.TEXT):(t.procInstBody+="?"+i,t.state=W.PROC_INST_BODY);continue;case W.OPEN_TAG:l($,i)?t.tagName+=i:(b(t),">"===i?_(t):"/"===i?t.state=W.OPEN_TAG_SLASH:(h(M,i)&&x(t,"Invalid character in tag name"),t.state=W.ATTRIB));continue;case W.OPEN_TAG_SLASH:">"===i?(_(t,!0),S(t)):(x(t,"Forward-slash in opening tag not followed by >"),t.state=W.ATTRIB);continue;case W.ATTRIB:if(l(M,i))continue;">"===i?_(t):"/"===i?t.state=W.OPEN_TAG_SLASH:l(V,i)?(t.attribName=i,t.attribValue="",t.state=W.ATTRIB_NAME):x(t,"Invalid attribute name");continue;case W.ATTRIB_NAME:"="===i?t.state=W.ATTRIB_VALUE:">"===i?(x(t,"Attribute without value"),t.attribValue=t.attribName,w(t),_(t)):l(M,i)?t.state=W.ATTRIB_NAME_SAW_WHITE:l($,i)?t.attribName+=i:x(t,"Invalid attribute name");continue;case W.ATTRIB_NAME_SAW_WHITE:if("="===i)t.state=W.ATTRIB_VALUE;else{if(l(M,i))continue;x(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",f(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===i?_(t):l(V,i)?(t.attribName=i,t.state=W.ATTRIB_NAME):(x(t,"Invalid attribute name"),t.state=W.ATTRIB)}continue;case W.ATTRIB_VALUE:if(l(M,i))continue;l(B,i)?(t.q=i,t.state=W.ATTRIB_VALUE_QUOTED):(x(t,"Unquoted attribute value"),t.state=W.ATTRIB_VALUE_UNQUOTED,t.attribValue=i);continue;case W.ATTRIB_VALUE_QUOTED:if(i!==t.q){"&"===i?t.state=W.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=i;continue}w(t),t.q="",t.state=W.ATTRIB_VALUE_CLOSED;continue;case W.ATTRIB_VALUE_CLOSED:l(M,i)?t.state=W.ATTRIB:">"===i?_(t):"/"===i?t.state=W.OPEN_TAG_SLASH:l(V,i)?(x(t,"No whitespace between attributes"),t.attribName=i,t.attribValue="",t.state=W.ATTRIB_NAME):x(t,"Invalid attribute name");continue;case W.ATTRIB_VALUE_UNQUOTED:if(h(I,i)){"&"===i?t.state=W.ATTRIB_VALUE_ENTITY_U:t.attribValue+=i;continue}w(t),">"===i?_(t):t.state=W.ATTRIB;continue;case W.CLOSE_TAG:if(t.tagName)">"===i?S(t):l($,i)?t.tagName+=i:t.script?(t.script+="</"+t.tagName,t.tagName="",t.state=W.SCRIPT):(h(M,i)&&x(t,"Invalid tagname in closing tag"),t.state=W.CLOSE_TAG_SAW_WHITE);else{if(l(M,i))continue;h(V,i)?t.script?(t.script+="</"+i,t.state=W.SCRIPT):x(t,"Invalid tagname in closing tag."):t.tagName=i}continue;case W.CLOSE_TAG_SAW_WHITE:if(l(M,i))continue;">"===i?S(t):x(t,"Invalid characters in closing tag");continue;case W.TEXT_ENTITY:case W.ATTRIB_VALUE_ENTITY_Q:case W.ATTRIB_VALUE_ENTITY_U:switch(t.state){case W.TEXT_ENTITY:var s=W.TEXT,c="textNode";break;case W.ATTRIB_VALUE_ENTITY_Q:var s=W.ATTRIB_VALUE_QUOTED,c="attribValue";break;case W.ATTRIB_VALUE_ENTITY_U:var s=W.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===i?(t[c]+=T(t),t.entity="",t.state=s):l(O,i)?t.entity+=i:(x(t,"Invalid character entity"),t[c]+="&"+t.entity+i,t.entity="",t.state=s);continue;default:throw new Error(t,"Unknown state: "+t.state)}return t.position>=t.bufferCheckPosition&&r(t),t}n.parser=function(e,t){return new i(e,t)},n.SAXParser=i,n.SAXStream=c,n.createStream=s,n.MAX_BUFFER_LENGTH=65536;var C=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){this.__proto__=e}return t.prototype=e,new t}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),i.prototype={end:function(){g(this)},write:A,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){a(this)}};try{var R=e("stream").Stream}catch(N){var R=function(){}}var P=n.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});c.prototype=Object.create(R.prototype,{constructor:{value:c}}),c.prototype.write=function(n){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(n)){if(!this._decoder){var i=e("string_decoder").StringDecoder;this._decoder=new i("utf8")}n=this._decoder.write(n)}return this._parser.write(n.toString()),this.emit("data",n),!0},c.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},c.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||-1===P.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),R.prototype.on.call(n,e,t)};var M="\r\n ",D="0124356789",k="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",B="'\"",O=D+k+"#",I=M+">",L="[CDATA[",j="DOCTYPE",F="http://www.w3.org/XML/1998/namespace",z="http://www.w3.org/2000/xmlns/",G={xml:F,xmlns:z};M=p(M),D=p(D),k=p(k);var V=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,$=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;B=p(B),O=p(O),I=p(I);var W=0;n.STATE={BEGIN:W++,TEXT:W++,TEXT_ENTITY:W++,OPEN_WAKA:W++,SGML_DECL:W++,SGML_DECL_QUOTED:W++,DOCTYPE:W++,DOCTYPE_QUOTED:W++,DOCTYPE_DTD:W++,DOCTYPE_DTD_QUOTED:W++,COMMENT_STARTING:W++,COMMENT:W++,COMMENT_ENDING:W++,COMMENT_ENDED:W++,CDATA:W++,CDATA_ENDING:W++,CDATA_ENDING_2:W++,PROC_INST:W++,PROC_INST_BODY:W++,PROC_INST_ENDING:W++,OPEN_TAG:W++,OPEN_TAG_SLASH:W++,ATTRIB:W++,ATTRIB_NAME:W++,ATTRIB_NAME_SAW_WHITE:W++,ATTRIB_VALUE:W++,ATTRIB_VALUE_QUOTED:W++,ATTRIB_VALUE_CLOSED:W++,ATTRIB_VALUE_UNQUOTED:W++,ATTRIB_VALUE_ENTITY_Q:W++,ATTRIB_VALUE_ENTITY_U:W++,CLOSE_TAG:W++,CLOSE_TAG_SAW_WHITE:W++,SCRIPT:W++,SCRIPT_ENDING:W++},n.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,
|
|
ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(n.ENTITIES).forEach(function(e){var t=n.ENTITIES[e],i="number"==typeof t?String.fromCharCode(t):t;n.ENTITIES[e]=i});for(var W in n.STATE)n.STATE[n.STATE[W]]=W;W=n.STATE,String.fromCodePoint||!function(){var e=String.fromCharCode,t=Math.floor,n=function(){var n,i,r=16384,o=[],a=-1,s=arguments.length;if(!s)return"";for(var c="";++a<s;){var p=Number(arguments[a]);if(!isFinite(p)||0>p||p>1114111||t(p)!=p)throw RangeError("Invalid code point: "+p);65535>=p?o.push(p):(p-=65536,n=(p>>10)+55296,i=p%1024+56320,o.push(n,i)),(a+1==s||o.length>r)&&(c+=e.apply(null,o),o.length=0)}return c};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n}()}("undefined"==typeof n?sax={}:n)}).call(this,void 0)},{undefined:void 0}],79:[function(t,n,i){!function(t){"use strict";function r(){this.data=[null],this.top=0}function o(){return new r}r.prototype.clear=function(){return this.data=[null],this.top=0,this},r.prototype.length=function(){return this.top},r.prototype.peek=function(){return this.data[this.top]},r.prototype.pop=function(){return this.top>0?(this.top--,this.data.pop()):void 0},r.prototype.push=function(e){return this.data[++this.top]=e,this},"undefined"!=typeof i?n.exports=o:"function"==typeof e?e(function(){return o}):t.stack=o}(this)},{}],80:[function(e,t,n){t.exports=e(84)},{84:84}],81:[function(e,t,n){"use strict";function i(){}i.prototype.get=function(e){return this.$model.properties.get(this,e)},i.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},t.exports=i},{}],82:[function(e,t,n){"use strict";function i(e){this.ns=e,this.name=e.name,this.allTypes=[],this.properties=[],this.propertiesByName={}}var r=e(383),o=e(377),a=e(255),s=e(85).parseName;t.exports=i,i.prototype.build=function(){return r(this,["ns","name","allTypes","properties","propertiesByName","bodyProperty","idProperty"])},i.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},i.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},i.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=s(r[0],i),a=s(r[1],o.prefix).name,c=this.propertiesByName[a];if(!c)throw new Error("refined property <"+a+"> not found");this.replaceProperty(c,e,n),delete e.redefines},i.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},i.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},i.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},i.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},i.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},i.prototype.hasProperty=function(e){return this.propertiesByName[e]},i.prototype.addTrait=function(e,t){var n=this.allTypes;-1===n.indexOf(e)&&(a(e.properties,function(n){n=o({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))},this),n.push(e))}},{255:255,377:377,383:383,85:85}],83:[function(e,t,n){"use strict";function i(e,t){this.model=e,this.properties=t}var r=e(255),o=e(81);t.exports=i,i.prototype.createType=function(e){function t(e){i.define(this,"$type",{value:s,enumerable:!0}),i.define(this,"$attrs",{value:{}}),i.define(this,"$parent",{writable:!0}),r(e,function(e,t){this.set(t,e)},this)}var n=this.model,i=this.properties,a=Object.create(o.prototype);r(e.properties,function(e){e.isMany||void 0===e["default"]||(a[e.name]=e["default"])}),i.defineModel(a,n),i.defineDescriptor(a,e);var s=e.ns.name;return t.prototype=a,t.hasType=a.$instanceOf=this.model.hasType,i.defineModel(t,n),i.defineDescriptor(t,e),t}},{255:255,81:81}],84:[function(e,t,n){"use strict";function i(e){this.properties=new u(this),this.factory=new c(this,this.properties),this.registry=new p(e,this.properties),this.typeCache={}}var r=e(374),o=e(372),a=e(255),s=e(254),c=e(83),p=e(87),u=e(86),l=e(85).parseName;t.exports=i,i.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},i.prototype.getType=function(e){var t=this.typeCache,n=r(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},i.prototype.createAny=function(e,t,n){var i=l(e),r={$type:e},s={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,s),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),a(n,function(e,t){o(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e}),r},i.prototype.getPackage=function(e){return this.registry.getPackage(e)},i.prototype.getPackages=function(){return this.registry.getPackages()},i.prototype.getElementDescriptor=function(e){return e.$descriptor},i.prototype.hasType=function(e,t){void 0===t&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return!!s(n.allTypes,function(e){return e.name===t})},i.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]}},{254:254,255:255,372:372,374:374,83:83,85:85,86:86,87:87}],85:[function(e,t,n){"use strict";t.exports.parseName=function(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}}},{}],86:[function(e,t,n){"use strict";function i(e){this.model=e}function r(e){return"undefined"==typeof e}function o(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}t.exports=i,i.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),a=i&&i.name;r(n)?i?delete e[a]:delete e.$attrs[t]:i?a in e?e[a]=n:o(e,i,n):e.$attrs[t]=n},i.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&o(e,n,[]),e[i]},i.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},i.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},i.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})}},{}],87:[function(e,t,n){"use strict";function i(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,o(e,this.registerPackage,this)}var r=e(377),o=e(255),a=e(88),s=e(82),c=e(85).parseName,p=a.isBuiltIn;t.exports=i,i.prototype.getPackage=function(e){return this.packageMap[e]},i.prototype.getPackages=function(){return this.packages},i.prototype.registerPackage=function(e){e=r({},e),o(e.types,function(t){this.registerType(t,e)},this),this.packageMap[e.uri]=this.packageMap[e.prefix]=e,this.packages.push(e)},i.prototype.registerType=function(e,t){e=r({},e,{superClass:(e.superClass||[]).slice(),"extends":(e["extends"]||[]).slice(),properties:(e.properties||[]).slice()});var n=c(e.name,t.prefix),i=n.name,a={};o(e.properties,function(e){var t=c(e.name,n.prefix),i=t.name;p(e.type)||(e.type=c(e.type,t.prefix).name),r(e,{ns:t,name:i}),a[i]=e}),r(e,{ns:n,name:i,propertiesByName:a}),o(e["extends"],function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)},this),this.definePackage(e,t),this.typeMap[i]=e},i.prototype.mapTypes=function(e,t,n){function i(e){return r(e,!0)}function r(n,i){var r=c(n,p(n)?"":e.prefix);s.mapTypes(r,t,i)}var a=p(e.name)?{name:e.name}:this.typeMap[e.name],s=this;if(!a)throw new Error("unknown type <"+e.name+">");o(a.superClass,n?i:r),t(a,!n),o(a.traits,i)},i.prototype.getEffectiveDescriptor=function(e){var t=c(e),n=new s(t);this.mapTypes(t,function(e,t){n.addTrait(e,t)});var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},i.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})}},{255:255,377:377,82:82,85:85,88:88}],88:[function(e,t,n){"use strict";var i={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},r={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e,10)}};t.exports.coerceType=function(e,t){var n=r[e];return n?n(t):t},t.exports.isBuiltIn=function(e){return!!i[e]},t.exports.isSimple=function(e){return!!r[e]}},{}],89:[function(e,t,n){t.exports={name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",type:"LaneSet",isMany:!0,replaces:"FlowElementsContainer#laneSets"},{name:"flowElements",type:"FlowElement",isMany:!0,replaces:"FlowElementsContainer#flowElements"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection","default":"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate","default":!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,"default":"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand","default":!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition"}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference","default":!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat","default":"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting","default":!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean","default":!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity","default":!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean"},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"assignment",type:"Assignment",isMany:!0},{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited","default":!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!0},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"body",type:"String",isBody:!0},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",type:"String",isAttr:!0},{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum","default":0,isAttr:!0,type:"Integer"},{name:"maximum","default":1,isAttr:!0,type:"Integer"}]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType","default":"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{
|
|
name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["FlowElementsContainer","Collaboration"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat","default":"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isVirtual:!0,isMany:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation","default":!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity","default":1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity","default":1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent","default":!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential","default":!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior","default":"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore","default":!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"CallActivity",superClass:["Activity"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate","default":!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances","default":!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage","default":"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage","default":"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],emumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],prefix:"bpmn",xml:{tagAlias:"lowerCase",typePrefix:"t"}}},{}],90:[function(e,t,n){t.exports={name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,"default":"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],emumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[],prefix:"bpmndi"}},{}],91:[function(e,t,n){t.exports={name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real","default":"0",isAttr:!0},{name:"y",type:"Real","default":"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real","default":"0",isAttr:!0},{name:"y",type:"Real","default":"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],prefix:"dc",associations:[]}},{}],92:[function(e,t,n){t.exports={name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0}]},{name:"Extension",properties:[{name:"values",type:"Element",isMany:!0}]}],associations:[],prefix:"di",xml:{tagAlias:"lowerCase"}}},{}],93:[function(e,t,n){t.exports={__depends__:[e(135)],__init__:["directEditing"],directEditing:["type",e(94)]}},{135:135,94:94}],94:[function(e,t,n){"use strict";function i(e,t){this._eventBus=e,this._providers=[],this._textbox=new a({container:t.getContainer(),keyHandler:r(this._handleKey,this)})}var r=e(264),o=e(254),a=e(95);i.$inject=["eventBus","canvas"],i.prototype.registerProvider=function(e){this._providers.push(e)},i.prototype.isActive=function(){return!!this._active},i.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},i.prototype._fire=function(e){this._eventBus.fire("directEditing."+e,{active:this._active})},i.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null},i.prototype.complete=function(){var e=this._active;if(e){var t=this.getValue();t!==e.context.text&&e.provider.update(e.element,t,e.context.text),this._fire("complete"),this.close()}},i.prototype.getValue=function(){return this._textbox.getValue()},i.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},i.prototype.activate=function(e){this.isActive()&&this.cancel();var t,n=o(this._providers,function(n){return(t=n.activate(e))?n:null});return t&&(this._textbox.create(t.bounds,t.style,t.text),this._active={element:e,context:t,provider:n},this._fire("activate")),!!t},t.exports=i},{254:254,264:264,95:95}],95:[function(e,t,n){"use strict";function i(e){e.stopPropagation()}function r(e){this.container=e.container,this.textarea=document.createElement("textarea"),this.keyHandler=e.keyHandler||function(){}}var o=e(377),a=e(395),s=e(398);t.exports=r,r.prototype.create=function(e,t,n){var r=this.textarea,s=this.container;o(r.style,{width:e.width+"px",height:e.height+"px",left:e.x+"px",top:e.y+"px",position:"absolute",textAlign:"center",boxSizing:"border-box"},t||{}),r.value=n,r.title="Press SHIFT+Enter for line feed",a.bind(r,"keydown",this.keyHandler),a.bind(r,"mousedown",i),s.appendChild(r),setTimeout(function(){r.parent&&r.select(),r.focus()},100)},r.prototype.destroy=function(){var e=this.textarea;e.value="",a.unbind(e,"keydown",this.keyHandler),a.unbind(e,"mousedown",i),s(e)},r.prototype.getValue=function(){return this.textarea.value}},{377:377,395:395,398:398}],96:[function(e,t,n){t.exports=e(97)},{97:97}],97:[function(e,t,n){"use strict";function i(e){function t(e){return r.indexOf(e)>=0}function n(e){r.push(e)}function i(e){t(e)||((e.__depends__||[]).forEach(i),t(e)||(n(e),(e.__init__||[]).forEach(function(e){o.push(e)})))}var r=[],o=[];e.forEach(i);var s=new a.Injector(r);return o.forEach(function(e){try{s["string"==typeof e?"get":"invoke"](e)}catch(t){throw console.error("Failed to instantiate component"),console.error(t.stack),t}}),s}function r(t){t=t||{};var n={config:["value",t]},r=e(106),o=[n,r].concat(t.modules||[]);return i(o)}function o(e,t){this.injector=t=t||r(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}var a=e(234);t.exports=o,o.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},o.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")}},{106:106,234:234}],98:[function(e,t,n){"use strict";function i(e){return"object"==typeof e}function r(e){this._eventBus=e}function o(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}var a=e(255),s=e(369),c=e(368),p=e(371),u=1e3;r.$inject=["eventBus"],t.exports=r,r.prototype.on=function(e,t,n,r,l,h){if((s(t)||p(t))&&(h=l,l=r,r=n,n=t,t=null),s(n)&&(h=l,l=r,r=n,n=u),i(l)&&(h=l,l=!1),!s(r))throw new Error("handlerFn must be a function");c(e)||(e=[e]);var d=this._eventBus;a(e,function(e){var i=["commandStack",e,t].filter(function(e){return e}).join(".");d.on(i,n,l?o(r,h):r,h)})};var l=["canExecute","preExecute","preExecuted","execute","executed","postExecute","postExecuted","revert","reverted"];a(l,function(e){r.prototype[e]=function(t,n,i,r,o){(s(t)||p(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}})},{255:255,368:368,369:369,371:371}],99:[function(e,t,n){"use strict";function i(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[]},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],this.clear,this)}var r=e(248),o=e(368),a=e(377),s=e(104).Event;i.$inject=["eventBus","injector"],t.exports=i,i.prototype.execute=function(e,t){if(!e)throw new Error("command required");var n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction(n)},i.prototype.canExecute=function(e,t){var n={command:e,context:t},i=this._getHandler(e);if(!i)return!1;var r=this._fire(e,"canExecute",n);return void 0===r&&i.canExecute&&(r=i.canExecute(t)),r},i.prototype.clear=function(){this._stack.length=0,this._stackIdx=-1,this._fire("changed")},i.prototype.undo=function(){var e,t=this._getUndoAction();if(t){for(this._pushAction(t);t&&(this._internalUndo(t),e=this._getUndoAction(),e&&e.id===t.id);)t=e;this._popAction()}},i.prototype.redo=function(){var e,t=this._getRedoAction();if(t){for(this._pushAction(t);t&&(this._internalExecute(t,!0),e=this._getRedoAction(),e&&e.id===t.id);)t=e;this._popAction()}},i.prototype.register=function(e,t){this._setHandler(e,t)},i.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");var n=this._injector.instantiate(t);this.register(e,n)},i.prototype.canUndo=function(){return!!this._getUndoAction()},i.prototype.canRedo=function(){return!!this._getRedoAction()},i.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},i.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},i.prototype._internalUndo=function(e){var t=e.command,n=e.context,i=this._getHandler(t);this._fire(t,"revert",e),i.revert&&this._markDirty(i.revert(n)),this._revertedAction(e),this._fire(t,"reverted",e)},i.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);var i,r,o,c=t?[e+"."+t,t]:[e];for(n=a(new s,n),i=0;(r=c[i])&&(o=this._eventBus.fire("commandStack."+r,n),!n.cancelBubble);i++);return o},i.prototype._createId=function(){return this._uid++},i.prototype._internalExecute=function(e,t){var n=e.command,i=e.context,r=this._getHandler(n);if(!r)throw new Error("no command handler registered for <"+n+">");this._pushAction(e),t||(this._fire(n,"preExecute",e),r.preExecute&&r.preExecute(i),this._fire(n,"preExecuted",e)),this._fire(n,"execute",e),r.execute&&this._markDirty(r.execute(i)),this._executedAction(e,t),this._fire(n,"executed",e),t||(this._fire(n,"postExecute",e),r.postExecute&&r.postExecute(i),this._fire(n,"postExecuted",e)),this._popAction(e)},i.prototype._pushAction=function(e){var t=this._currentExecution,n=t.actions,i=n[0];e.id||(e.id=i&&i.id||this._createId()),n.push(e)},i.prototype._popAction=function(){var e=this._currentExecution,t=e.actions,n=e.dirty;t.pop(),t.length||(this._eventBus.fire("elements.changed",{elements:r(n)}),n.length=0,this._fire("changed"))},i.prototype._markDirty=function(e){var t=this._currentExecution;e&&(e=o(e)?e:[e],t.dirty=t.dirty.concat(e))},i.prototype._executedAction=function(e,t){var n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},i.prototype._revertedAction=function(e){this._stackIdx--},i.prototype._getHandler=function(e){return this._handlerMap[e]},i.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t}},{104:104,248:248,368:368,377:377}],100:[function(e,t,n){t.exports={commandStack:["type",e(99)]}},{99:99}],101:[function(e,t,n){"use strict";function i(e,t){return Math.round(e*t)/t}function r(e){return p(e)?e+"px":e}function o(e){e=u({},{width:"100%",height:"100%"},e);var t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container"),u(n.style,{position:"relative",overflow:"hidden",width:r(e.width),height:r(e.height)}),t.appendChild(n),n}function a(e,t){return e.group().attr({"class":t})}function s(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._init(e||{})}function c(e,t){var n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}var p=e(371),u=e(377),l=e(255),h=e(252),d=e(265),f=e(219),m=e(221),v=e(240),y="base",g={shape:["x","y","width","height"],connection:["waypoints"]};s.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],t.exports=s,s.prototype._init=function(e){var t=this._eventBus,n=this._container=o(e),i=this._svg=v.createSnapAt("100%","100%",n),r=this._viewport=a(i,"viewport");this._layers={},e.deferUpdate!==!1&&(this._viewboxChanged=d(this._viewboxChanged,300)),t.on("diagram.init",function(){t.fire("canvas.init",{svg:i,viewport:r})},this),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},s.prototype._destroy=function(e){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});var t=this._container.parentNode;t&&t.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._rootElement,delete this._viewport},s.prototype._clear=function(){var e=this,t=this._elementRegistry.getAll();t.forEach(function(t){var n=m.getType(t);"root"===n?e.setRootElement(null,!0):e._removeElement(t,n)}),delete this._cachedViewbox},s.prototype.getDefaultLayer=function(){return this.getLayer(y)},s.prototype.getLayer=function(e){if(!e)throw new Error("must specify a name");var t=this._layers[e];return t||(t=this._layers[e]=a(this._viewport,"layer-"+e)),t},s.prototype.getContainer=function(){return this._container},s.prototype._updateMarker=function(e,t,n){var i;e.id||(e=this._elementRegistry.get(e)),i=this._elementRegistry._elements[e.id],i&&(l([i.gfx,i.secondaryGfx],function(e){e&&e[n?"addClass":"removeClass"](t)}),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},s.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},s.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},s.prototype.hasMarker=function(e,t){e.id||(e=this._elementRegistry.get(e));var n=this.getGraphics(e);return n&&n.hasClass(t)},s.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},s.prototype.getRootElement=function(){return this._rootElement||this.setRootElement({id:"__implicitroot",children:[]}),this._rootElement},s.prototype.setRootElement=function(e,t){e&&this._ensureValid("root",e);var n=this._rootElement,i=this._elementRegistry,r=this._eventBus;if(n){if(!t)throw new Error("rootElement already set, need to specify override");r.fire("root.remove",{element:n}),r.fire("root.removed",{element:n}),i.remove(n)}if(e){var o=this.getDefaultLayer();r.fire("root.add",{element:e}),i.add(e,o,this._svg),r.fire("root.added",{element:e,gfx:o})}return this._rootElement=e,e},s.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element with id "+t.id+" already exists");var n=g[e],i=h(n,function(e){return"undefined"!=typeof t[e]});if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},s.prototype._setParent=function(e,t,n){f.add(t.children,e,n),e.parent=t},s.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();var r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);var a=o.create(e,t);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},s.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},s.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},s.prototype._removeElement=function(e,t){var n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;return(e=n.get(e.id||e))?(r.fire(t+".remove",{element:e}),i.remove(e),f.remove(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e):void 0},s.prototype.removeShape=function(e){return this._removeElement(e,"shape")},s.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},s.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},s.prototype._viewboxChanging=function(){this._eventBus.fire("canvas.viewbox.changing")},s.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox(!1)})},s.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;var t,n,r,o,a,s=this._viewport,c=this.getSize();return e?(this._viewboxChanging(),r=Math.min(c.width/e.width,c.height/e.height),n=(new v.Matrix).scale(r).translate(-e.x,-e.y),s.transform(n),this._viewboxChanged(),e):(t=this.getDefaultLayer().getBBox(!0),n=s.transform().localMatrix,r=i(n.a,1e3),o=i(-n.e||0,1e3),a=i(-n.f||0,1e3),e=this._cachedViewbox={x:o?o/r:0,y:a?a/r:0,width:c.width/r,height:c.height/r,scale:r,inner:{width:t.width,height:t.height,x:t.x,y:t.y},outer:c})},s.prototype.scroll=function(e){var t=this._viewport.node,n=t.getCTM();return e&&(this._viewboxChanging(),e=u({dx:0,dy:0},e||{}),n=this._svg.node.createSVGMatrix().translate(e.dx,e.dy).multiply(n),c(t,n),this._viewboxChanged()),{x:n.e,y:n.f}},s.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);var n,r;return this._viewboxChanging(),"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t),this._viewboxChanged(),i(r.a,1e3)},s.prototype._fitViewport=function(e){var t,n,i=this.viewbox(),r=i.outer,o=i.inner;return o.x>=0&&o.y>=0&&o.x+o.width<=r.width&&o.y+o.height<=r.height&&!e?n={x:0,y:0,width:Math.max(o.width+o.x,r.width),height:Math.max(o.height+o.y,r.height)}:(t=Math.min(1,r.width/o.width,r.height/o.height),n={x:o.x+(e?o.width/2-r.width/t/2:0),y:o.y+(e?o.height/2-r.height/t/2:0),width:r.width/t,height:r.height/t}),this.viewbox(n),this.viewbox(!1).scale},s.prototype._setZoom=function(e,t){var n,i,r,o,a,s=this._svg.node,p=this._viewport.node,l=s.createSVGMatrix(),h=s.createSVGPoint();r=p.getCTM();var d=r.a;return t?(n=u(h,t),i=n.matrixTransform(r.inverse()),o=l.translate(i.x,i.y).scale(1/d*e).translate(-i.x,-i.y),a=r.multiply(o)):a=l.scale(e),c(this._viewport.node,a),a},s.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},s.prototype.getAbsoluteBBox=function(e){var t,n=this.viewbox();if(e.waypoints){var i=this.getGraphics(e),r=i.getBBox(!0);t=i.getBBox(),t.x-=r.x,t.y-=r.y,t.width+=2*r.x,t.height+=2*r.y}else t=e;var o=t.x*n.scale-n.x*n.scale,a=t.y*n.scale-n.y*n.scale,s=t.width*n.scale,c=t.height*n.scale;return{x:o,y:a,width:s,height:c}}},{219:219,221:221,240:240,252:252,255:255,265:265,371:371,377:377}],102:[function(e,t,n){"use strict";function i(){this._uid=12}var r=e(210);t.exports=i,i.prototype.createRoot=function(e){return this.create("root",e)},i.prototype.createLabel=function(e){return this.create("label",e)},i.prototype.createShape=function(e){return this.create("shape",e)},i.prototype.createConnection=function(e){return this.create("connection",e)},i.prototype.create=function(e,t){return t=t||{},t.id||(t.id=e+"_"+this._uid++),r.create(e,t)}},{210:210}],103:[function(e,t,n){"use strict";function i(){this._elements={}}var r="data-element-id";t.exports=i,i.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),t.attr(r,i),n&&n.attr(r,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},i.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(i.gfx.attr(r,""),i.secondaryGfx&&i.secondaryGfx.attr(r,""),delete t[n])},i.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e));var n=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},i.prototype.get=function(e){var t;t="string"==typeof e?e:e&&e.attr(r);var n=this._elements[t];return n&&n.element},i.prototype.filter=function(e){var t=[];return this.forEach(function(n,i){e(n,i)&&t.push(n)}),t},i.prototype.getAll=function(){return this.filter(function(e){return e})},i.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)})},i.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},i.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")}},{}],104:[function(e,t,n){"use strict";function i(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function r(){}function o(e,t){return e.apply(null,t)}var a=e(369),s=e(368),c=e(371),p=e(264),u=e(377),l="__fn",h=1e3,d=Array.prototype.slice;t.exports=i,i.prototype.on=function(e,t,n,i){if(e=s(e)?e:[e],a(t)&&(i=n,n=t,t=h),!c(t))throw new Error("priority must be a number");var r=n;i&&(r=p(n,i),r[l]=n[l]||n);var o=this,u={priority:t,callback:r};e.forEach(function(e){o._addListener(e,u)})},i.prototype.once=function(e,t,n,i){function r(){return o.off(e,r),n.apply(i,arguments)}var o=this;if(a(t)&&(i=n,n=t,t=h),!c(t))throw new Error("priority must be a number");r[l]=n,this.on(e,t,r)},i.prototype.off=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(r=o.length-1;n=o[r];r--)i=n.callback,i!==t&&i[l]!==t||o.splice(r,1);else o.length=0},i.prototype.fire=function(e,t){var n,i,o,a;if(a=d.call(arguments),"object"==typeof e&&(n=e,e=n.type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){t instanceof r?n=t:(n=new r,n.init(t)),a[0]=n;var s=n.type;e!==s&&(n.type=e);try{o=this._invokeListeners(n,a,i)}finally{e!==s&&(n.type=s)}return void 0===o&&n.defaultPrevented&&(o=!1),o}},i.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},i.prototype._destroy=function(){this._listeners={}},i.prototype._invokeListeners=function(e,t,n){var i,r,o;for(i=0;(r=n[i])&&!e.cancelBubble;i++)o=this._invokeListener(e,t,r);return o},i.prototype._invokeListener=function(e,t,n){var i;try{i=o(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),i===!1&&e.preventDefault()}catch(r){if(!this.handleError(r))throw console.error("unhandled error in event listener"),console.error(r.stack),r}return i},i.prototype._addListener=function(e,t){var n,i,r=this._getListeners(e);for(i=0;n=r[i];i++)if(n.priority<t.priority)return void r.splice(i,0,t);r.push(t)},i.prototype._getListeners=function(e){var t=this._listeners[e];return t||(this._listeners[e]=t=[]),
|
|
t},t.exports.Event=r,r.prototype.stopPropagation=function(){this.cancelBubble=!0},r.prototype.preventDefault=function(){this.defaultPrevented=!0},r.prototype.init=function(e){u(this,e||{})}},{264:264,368:368,369:369,371:371,377:377}],105:[function(e,t,n){"use strict";function i(e,t){this._eventBus=e,this._elementRegistry=t}var r=e(255),o=e(259),a=e(224),s=e(391);i.$inject=["eventBus","elementRegistry"],t.exports=i,i.prototype._getChildren=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=a.getChildren(n),t||(t=n.parent().group().attr("class","djs-children"))):t=n,t},i.prototype._clear=function(e){var t=a.getVisual(e);return s(t.node),t},i.prototype._createContainer=function(e,t){var n=t.group().attr("class","djs-group"),i=n.group().attr("class","djs-element djs-"+e);return i.group().attr("class","djs-visual"),i},i.prototype.create=function(e,t){var n=this._getChildren(t.parent);return this._createContainer(e,n)},i.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=o(e,function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e},{}),r(t,function(e){var t=n._getChildren(e),o=e.children;o&&r(o.slice().reverse(),function(e){var n=i.getGraphics(e);n.parent().prependTo(t)})})},i.prototype.drawShape=function(e,t){var n=this._eventBus;return n.fire("render.shape",{gfx:e,element:t})},i.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},i.prototype.drawConnection=function(e,t){var n=this._eventBus;return n.fire("render.connection",{gfx:e,element:t})},i.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},i.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),n.translate(t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}n.attr("display",t.hidden?"none":"block")}},i.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);t.parent().remove()}},{224:224,255:255,259:259,391:391}],106:[function(e,t,n){t.exports={__depends__:[e(110)],__init__:["canvas"],canvas:["type",e(101)],elementRegistry:["type",e(103)],elementFactory:["type",e(102)],eventBus:["type",e(104)],graphicsFactory:["type",e(105)]}},{101:101,102:102,103:103,104:104,105:105,110:110}],107:[function(e,t,n){"use strict";function i(e,t){var n=this;t=t||r,e.on(["render.shape","render.connection"],t,function(e,t){var i=e.type,r=t.element,o=t.gfx;return n.canRender(r)?"render.shape"===i?n.drawShape(o,r):n.drawConnection(o,r):void 0}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(e,t){return n.canRender(t)?"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t):void 0})}var r=1e3;i.prototype.canRender=function(){},i.prototype.drawShape=function(){},i.prototype.drawConnection=function(){},i.prototype.getShapePath=function(){},i.prototype.getConnectionPath=function(){},t.exports=i},{}],108:[function(e,t,n){"use strict";function i(e,t){o.call(this,e,p),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2})}var r=e(243),o=e(107),a=e(231),s=a.componentsToPath,c=a.createLine,p=1;r(i,o),i.prototype.canRender=function(){return!0},i.prototype.drawShape=function(e,t){return e.rect(0,0,t.width||0,t.height||0).attr(this.SHAPE_STYLE)},i.prototype.drawConnection=function(e,t){return c(t.waypoints,this.CONNECTION_STYLE).appendTo(e)},i.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width,r=e.height,o=[["M",t,n],["l",i,0],["l",0,r],["l",-i,0],["z"]];return s(o)},i.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return s(r)},i.$inject=["eventBus","styles"],t.exports=i},{107:107,231:231,243:243}],109:[function(e,t,n){"use strict";function i(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){var i=this.style(t,n);return o(i,{"class":e})},this.style=function(t,n){r(t)||n||(n=t,t=[]);var i=a(t,function(t,n){return o(t,e[n]||{})},{});return n?o(i,n):i},this.computeStyle=function(e,n,i){return r(n)||(i=n,n=[]),t.style(n||[],o({},i,e||{}))}}var r=e(368),o=e(377),a=e(259);t.exports=i},{259:259,368:368,377:377}],110:[function(e,t,n){t.exports={__init__:["defaultRenderer"],defaultRenderer:["type",e(108)],styles:["type",e(109)]}},{108:108,109:109}],111:[function(e,t,n){"use strict";function i(e,t,n,i){v.call(this,e),e.on("shape.move.start",m,function(e){var t=e.context,n=t.shapes;t.shapes=o(n)}),e.on("shape.move.start",f,function(e){var t=e.context,i=t.shapes,o=t.movedAttachers=r(i);a(o,function(e){n.makeDraggable(t,e,!0),e.label&&n.makeDraggable(t,e.label,!0)})}),this.postExecuted(["elements.move"],function(e){var n=e.context,i=n.delta,o=n.newParent,s=n.closure,c=s.enclosedElements,p=r(c);a(p,function(e){c[e.id]||t.moveShape(e,i,o),e.label&&!c[e.label.id]&&t.moveShape(e.label,i,o)})}),this.postExecuted(["elements.move"],function(e){var n,i=e.context,r=i.shapes,o=i.newHost;r.length>1||(n=o?r:c(r,function(e){return!!e.host}),a(n,function(e){t.updateAttachment(e,o)}))}),this.postExecuted(["elements.move"],function(e){var n=e.context.shapes;a(n,function(e){a(e.attachers,function(e){a(e.outgoing,function(e){var n=i.allowed("connection.reconnectStart",{connection:e,source:e.source,target:e.target});n||t.removeConnection(e)}),a(e.incoming,function(e){var n=i.allowed("connection.reconnectEnd",{connection:e,source:e.source,target:e.target});n||t.removeConnection(e)})})})}),this.postExecute(["shape.create"],function(e){var n=e.context,i=n.shape,r=n.host;r&&t.updateAttachment(i,r)}),this.postExecute(["shape.replace"],function(e){var n=e.context,r=n.oldShape,o=n.newShape;l(r.attachers,function(e){var n=i.allowed("elements.move",{target:o,shapes:[e]});"attach"===n?t.updateAttachment(e,o):t.removeShape(e)})}),this.postExecute(["shape.resize"],function(e){var n=e.context,i=n.shape,r=n.oldBounds,o=n.newBounds,s=i.attachers;s.length&&a(s,function(e){var n=h(e,r,o);t.moveShape(e,n,e.parent)})}),this.preExecute(["shape.delete"],function(e){var n=e.context.shape;l(n.attachers,function(e){t.removeShape(e)}),n.host&&t.updateAttachment(n,null)})}function r(e){return s(u(e,function(e){return e.attachers||[]}))}function o(e){var t=p(e,"id");return c(e,function(e){for(;e;){if(e.host&&t[e.host.id])return!1;e=e.parent}return!0})}var a=e(255),s=e(245),c=e(253),p=e(256),u=e(258),l=e(230).saveClear,h=e(217).getNewAttachShapeDelta,d=e(243),f=250,m=1500,v=e(98);d(i,v),i.$inject=["eventBus","modeling","moveVisuals","rules"],t.exports=i},{217:217,230:230,243:243,245:245,253:253,255:255,256:256,258:258,98:98}],112:[function(e,t,n){t.exports={__depends__:[e(166),e(139)],__init__:["attachSupport"],attachSupport:["type",e(111)]}},{111:111,139:139,166:166}],113:[function(e,t,n){"use strict";function i(e,t,n,i,f,m,v){function y(e){f.update("connection",e.connection,e.connectionGfx)}function g(e){return e.filter(function(t,n){return!r.pointsOnLine(e[n-1],e[n+1],t)})}var x=e.get("connectionDocking",!1);this.start=function(e,t,r,o){var a,s,c=t.waypoints,p=n.getGraphics(t);a=o||0!==r?o||r!==c.length-1?u:h:l,s={connection:t,bendpointIndex:r,insert:o,type:a},i.init(e,"bendpoint.move",{data:{connection:t,connectionGfx:p,context:s}})},t.on("bendpoint.move.start",function(e){var t=e.context,i=t.connection,r=i.waypoints,a=r.slice(),s=t.insert,c=t.bendpointIndex;t.originalWaypoints=r,s&&a.splice(c,0,null),i.waypoints=a,t.draggerGfx=o.addBendpoint(n.getLayer("overlays")),t.draggerGfx.addClass("djs-dragging"),n.addMarker(i,p)}),t.on("bendpoint.move.hover",function(e){e.context.hover=e.hover,n.addMarker(e.hover,c)}),t.on(["bendpoint.move.out","bendpoint.move.cleanup"],function(e){var t=e.context.hover;t&&(n.removeMarker(t,c),n.removeMarker(t,e.context.target?a:s))}),t.on("bendpoint.move.move",function(e){var t,i,r=e.context,o=r.type,c=e.connection;c.waypoints[r.bendpointIndex]={x:e.x,y:e.y},x&&(r.hover&&(o===l&&(t=r.hover),o===h&&(i=r.hover)),c.waypoints=x.getCroppedWaypoints(c,t,i));var p=r.allowed=m.allowed(r.type,r);p?r.hover&&(n.removeMarker(r.hover,s),n.addMarker(r.hover,a),r.target=r.hover):p===!1&&r.hover&&(n.removeMarker(r.hover,a),n.addMarker(r.hover,s),r.target=null),r.draggerGfx.translate(e.x,e.y),y(e)}),t.on(["bendpoint.move.end","bendpoint.move.cancel"],function(e){var t=e.context,i=t.hover,r=t.connection;t.draggerGfx.remove(),t.newWaypoints=r.waypoints.slice(),r.waypoints=t.originalWaypoints,n.removeMarker(r,p),i&&(n.removeMarker(i,a),n.removeMarker(i,s))}),t.on("bendpoint.move.end",function(e){var t=e.context,n=t.newWaypoints,i=t.bendpointIndex,r=n[i],o=t.allowed;if(r.x=d(r.x),r.y=d(r.y),o&&t.type===l)v.reconnectStart(t.connection,t.target,r);else if(o&&t.type===h)v.reconnectEnd(t.connection,t.target,r);else{if(o===!1||t.type!==u)return y(e),!1;v.updateWaypoints(t.connection,g(n))}}),t.on("bendpoint.move.cancel",function(e){y(e)})}var r=e(223),o=e(115),a="connect-ok",s="connect-not-ok",c="connect-hover",p="djs-updating",u="connection.updateWaypoints",l="connection.reconnectStart",h="connection.reconnectEnd",d=Math.round;i.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","rules","modeling"],t.exports=i},{115:115,223:223}],114:[function(e,t,n){"use strict";function i(e){function t(e,t){return c.snapTo(e,t)}function n(e){return o(e,["x","y"])}function i(e){return e.width?{x:p(e.width/2+e.x),y:p(e.height/2+e.y)}:void 0}function u(e){var t=e.snapPoints,n=e.connection,r=n.waypoints,o=e.segmentStart,s=e.segmentStartIndex,c=e.segmentEnd,p=e.segmentEndIndex,u=e.axis;if(t)return t;var l=[r[s-1],o,c,r[p+1]];return 2>s&&l.unshift(i(n.source)),p>r.length-3&&l.unshift(i(n.target)),e.snapPoints=t={horizontal:[],vertical:[]},a(l,function(e){e&&(e=e.original||e,"y"===u&&t.horizontal.push(e.y),"x"===u&&t.vertical.push(e.x))}),t}function l(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var r=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},a(r,function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))}),t}e.on("connectionSegment.move.start",function(e){var t=e.context,i=t.segmentStart,r=t.segmentEnd,o=s(i,r);t.snapStart=n(o)}),e.on("connectionSegment.move.move",1500,function(e){var n,i,o=e.context,a=u(o),s=o.snapStart,c=s.x+e.dx,p=s.y+e.dy;if(a){n=t(a.vertical,c),i=t(a.horizontal,p);var l=c-n,h=p-i;r(e,{dx:e.dx-l,dy:e.dy-h,x:e.x-l,y:e.y-h})}}),e.on("bendpoint.move.start",function(e){var t=e.context;t.snapStart=n(e)}),e.on("bendpoint.move.move",1500,function(e){var n,o,a=e.context,s=l(a),c=a.snapStart,p=a.target,u=p&&i(p),h=c.x+e.dx,d=c.y+e.dy;if(s){n=t(u?s.vertical.concat([u.x]):s.vertical,h),o=t(u?s.horizontal.concat([u.y]):s.horizontal,d);var f=h-n,m=d-o;r(e,{dx:e.dx-f,dy:e.dy-m,x:e.x-f,y:e.y-m})}})}var r=e(377),o=e(383),a=e(255),s=e(223).getMidPoint,c=e(240),p=Math.round;i.$inject=["eventBus"],t.exports=i},{223:223,240:240,255:255,377:377,383:383}],115:[function(e,t,n){"use strict";function i(e,t,n){var i=e.group(),r=14,o=3,s=6,c=r+s,p=o+s;i.rect(-r/2,-o/2,r,o).addClass("djs-visual"),i.rect(-c/2,-p/2,c,p).addClass("djs-hit");var u=(new a.Matrix).rotate("h"===n?90:0,0,0);return i.transform(u),i}var r=e(222),o=e(223),a=e(240),s=t.exports.BENDPOINT_CLS="djs-bendpoint",c=t.exports.SEGMENT_DRAGGER_CLS="djs-segment-dragger";t.exports.toCanvasCoordinates=function(e,t){var n,i=r.toPoint(t),o=e._container.getBoundingClientRect();n={x:o.left,y:o.top};var a=e.viewbox();return{x:a.x+(i.x-n.x)/a.scale,y:a.y+(i.y-n.y)/a.scale}},t.exports.addBendpoint=function(e,t){var n=e.group().addClass(s);return n.circle(0,0,4).addClass("djs-visual"),n.circle(0,0,10).addClass("djs-hit"),t&&n.addClass(t),n},t.exports.addSegmentDragger=function(e,t,n){var r=e.group(),a=o.getMidPoint(t,n),s=o.pointsAligned(t,n);return i(r,a,s),r.addClass(c),r.addClass("h"===s?"vertical":"horizontal"),r.translate(a.x,a.y),r}},{222:222,223:223,240:240}],116:[function(e,t,n){"use strict";function i(e,t,n,i,l){function h(e,n){var i=o.toCanvasCoordinates(t,n),r=u(e,i);return r}function d(e,t,n){var i,r,o,c,p,u,l=e.index,h=e.point;return 0>=l||e.bendpoint?!1:(i=t[l-1],r=t[l],o=s(i,r),c=a(i,r),p=Math.abs(h.x-o.x),u=Math.abs(h.y-o.y),c&&n>=p&&n>=u)}function f(e,t){var n=t.waypoints,r=h(n,e);r&&(d(r,n,10)?l.start(e,t,r.index):i.start(e,t,r.index,!r.bendpoint))}function m(e,t,i){r.bind(e,t,function(e){n.triggerMouseEvent(t,e,i),e.stopPropagation()})}function v(e,n){var i=t.getLayer("overlays"),r=i.select(".djs-bendpoints[data-element-id="+e.id+"]");return!r&&n&&(r=i.group().addClass("djs-bendpoints").attr("data-element-id",e.id),m(r.node,"mousedown",e),m(r.node,"click",e),m(r.node,"dblclick",e)),r}function y(e,t){t.waypoints.forEach(function(t,n){o.addBendpoint(e).translate(t.x,t.y)}),o.addBendpoint(e,"floating")}function g(e,t){for(var n,i,r=t.waypoints,s=1;s<r.length;s++)n=r[s-1],i=r[s],a(n,i)&&o.addSegmentDragger(e,n,i)}function x(e){e.selectAll("."+c).forEach(function(e){e.remove()})}function b(e){e.selectAll("."+p).forEach(function(e){e.remove()})}function E(e){var t=v(e);return t||(t=v(e,!0),y(t,e),g(t,e)),t}function w(e){var t=v(e);t&&(b(t),x(t),g(t,e),y(t,e))}e.on("connection.changed",function(e){w(e.element)}),e.on("connection.remove",function(e){var t=v(e.element);t&&t.remove()}),e.on("element.marker.update",function(e){var t,n=e.element;n.waypoints&&(t=E(n),t[e.add?"addClass":"removeClass"](e.marker))}),e.on("element.mousemove",function(e){var t,n,i,r=e.element,o=r.waypoints;if(o){if(t=v(r,!0),n=t.select(".floating"),!n)return;i=h(o,e.originalEvent),i&&n.translate(i.point.x,i.point.y)}}),e.on("element.mousedown",function(e){var t=e.originalEvent,n=e.element,i=n.waypoints;i&&f(t,n,i)}),e.on("selection.changed",function(e){var t=e.newSelection,n=t[0];n&&n.waypoints&&E(n)}),e.on("element.hover",function(e){var t=e.element;t.waypoints&&(E(t),n.registerEvent(e.gfx.node,"mousemove","element.mousemove"))}),e.on("element.out",function(e){n.unregisterEvent(e.gfx.node,"mousemove","element.mousemove")}),this.addHandles=E,this.updateHandles=w,this.getBendpointsContainer=v}var r=e(395),o=e(115),a=e(223).pointsAligned,s=e(223).getMidPoint,c=o.BENDPOINT_CLS,p=o.SEGMENT_DRAGGER_CLS,u=e(226).getApproxIntersection;i.$inject=["eventBus","canvas","interactionEvents","bendpointMove","connectionSegmentMove"],t.exports=i},{115:115,223:223,226:226,395:395}],117:[function(e,t,n){"use strict";function i(e,t,n){return r(e,t,e[t]+n)}function r(e,t,n){return{x:"x"===t?n:e.x,y:"y"===t?n:e.y}}function o(e,t,n,i){var o=Math.max(t[i],n[i]),a=Math.min(t[i],n[i]),s=20,c=Math.min(Math.max(a+s,e[i]),o-s);return r(t,i,c)}function a(e){return"x"===e?"y":"x"}function s(e,t,n){var i,o;return e.original?e.original:(i=l.getMid(t),o=a(n),r(e,o,i[o]))}function c(e,t,n,r,c,f,m){function v(e){c.update("connection",e.connection,e.connectionGfx)}function y(e,t,n){var i=e.newWaypoints,r=e.segmentStartIndex+t,s=i[r],c=e.segmentEndIndex+t,p=i[c],u=a(e.axis),l=o(n,s,p,u);e.draggerGfx.translate(l.x,l.y)}function g(e){return e.filter(function(t,n){return!p.pointsOnLine(e[n-1],e[n+1],t)})}var x=e.get("connectionDocking",!1);this.start=function(e,t,i){var o,a,c,u=n.getGraphics(t),l=i-1,h=i,d=t.waypoints,f=d[l],m=d[h];a=p.pointsAligned(f,m),a&&(c="v"===a?"y":"x",0===l&&(f=s(f,t.source,c)),h===d.length-1&&(m=s(m,t.target,c)),o={connection:t,segmentStartIndex:l,segmentEndIndex:h,segmentStart:f,segmentEnd:m,axis:c},r.init(e,"connectionSegment.move",{cursor:"x"===c?"resize-ew":"resize-ns",data:{connection:t,connectionGfx:u,context:o}}))},t.on("connectionSegment.move.start",function(e){var t=e.context,i=e.connection,r=n.getLayer("overlays");t.originalWaypoints=i.waypoints.slice(),t.draggerGfx=u.addSegmentDragger(r,t.segmentStart,t.segmentEnd),t.draggerGfx.addClass("djs-dragging"),n.addMarker(i,d)}),t.on("connectionSegment.move.move",function(e){var t=e.context,n=t.connection,r=t.segmentStartIndex,o=t.segmentEndIndex,a=t.segmentStart,s=t.segmentEnd,c=t.axis,p=t.originalWaypoints.slice(),u=i(a,c,e["d"+c]),h=i(s,c,e["d"+c]),d=p.length,f=0;p[r]=u,p[o]=h;var m,g;2>r&&(m=l.getOrientation(n.source,u),1===r?"intersect"===m&&(p.shift(),p[0]=u,f--):"intersect"!==m&&(p.unshift(a),f++)),o>d-3&&(g=l.getOrientation(n.target,h),o===d-2?"intersect"===g&&(p.pop(),p[p.length-1]=h):"intersect"!==g&&p.push(s)),n.waypoints=p,x&&(n.waypoints=p=x.getCroppedWaypoints(n)),t.newWaypoints=p,y(t,f,e),v(e)}),t.on("connectionSegment.move.hover",function(e){e.context.hover=e.hover,n.addMarker(e.hover,h)}),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],function(e){var t=e.context.hover;t&&n.removeMarker(t,h)}),t.on("connectionSegment.move.cleanup",function(e){var t=e.context,i=t.connection;t.draggerGfx&&t.draggerGfx.remove(),n.removeMarker(i,d)}),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],function(e){var t=e.context,n=t.connection;n.waypoints=t.originalWaypoints,v(e)}),t.on("connectionSegment.move.end",function(e){var t=e.context,n=t.newWaypoints;n.forEach(function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}),m.updateWaypoints(t.connection,g(n))})}var p=e(223),u=e(115),l=e(208),h="connect-hover",d="djs-updating";c.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","rules","modeling"],t.exports=c},{115:115,208:208,223:223}],118:[function(e,t,n){t.exports={__depends__:[e(129),e(185)],__init__:["bendpoints","bendpointSnapping"],bendpoints:["type",e(116)],bendpointMove:["type",e(113)],connectionSegmentMove:["type",e(117)],bendpointSnapping:["type",e(114)]}},{113:113,114:114,116:116,117:117,129:129,185:185}],119:[function(e,t,n){"use strict";function i(e,t,n,i){e.on("element.changed",function(t){var i=t.element;t.gfx||(t.gfx=n.getGraphics(i)),t.gfx&&e.fire(r(i)+".changed",t)}),e.on("elements.changed",function(t){var n=t.elements;n.forEach(function(t){e.fire("element.changed",{element:t})}),i.updateContainments(n)}),e.on("shape.changed",function(e){i.update("shape",e.element,e.gfx)}),e.on("connection.changed",function(e){i.update("connection",e.element,e.gfx)})}var r=e(221).getType;i.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"],t.exports=i},{221:221}],120:[function(e,t,n){t.exports={__init__:["changeSupport"],changeSupport:["type",e(119)]}},{119:119}],121:[function(e,t,n){"use strict";function i(e,t,n,i,s,c){function p(e,t){return i.allowed("connection.create",{source:e,target:t})}function u(e,t,n,i){var o=c.getShapePath(n),a=i&&c.getShapePath(i),s=c.getConnectionPath({waypoints:[e,t]});return e=r.getElementLineIntersection(o,s,!0)||e,t=i&&r.getElementLineIntersection(a,s,!1)||t,[e,t]}e.on("connect.move",function(e){var t,n,i,o=e.context,a=o.source,s=o.target,c=o.visual;t=r.getMid(a),n={x:e.x,y:e.y},i=u(t,n,a,s),c.attr("points",[i[0].x,i[0].y,i[1].x,i[1].y])}),e.on("connect.hover",function(e){var t,n=e.context,i=n.source,r=e.hover;t=n.canExecute=p(i,r),null!==t&&(n.target=r,s.addMarker(r,t?o:a))}),e.on(["connect.out","connect.cleanup"],function(e){var t=e.context;t.target&&s.removeMarker(t.target,t.canExecute?o:a),t.target=null}),e.on("connect.cleanup",function(e){var t=e.context;t.visual&&t.visual.remove()}),e.on("connect.start",function(e){var t,n=e.context;t=s.getDefaultLayer().polyline().attr({stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"}),n.visual=t}),e.on("connect.end",function(e){var t=e.context,i=t.source,r=t.target,o=t.canExecute||p(i,r);return o?void n.connect(i,r):!1}),this.start=function(e,n,i){t.init(e,"connect",{autoActivate:i,data:{shape:n,context:{source:n}}})}}var r=e(208),o="connect-ok",a="connect-not-ok";i.$inject=["eventBus","dragging","modeling","rules","canvas","graphicsFactory"],t.exports=i},{208:208}],122:[function(e,t,n){t.exports={__depends__:[e(189),e(185),e(129)],connect:["type",e(121)]}},{121:121,129:129,185:185,189:189}],123:[function(e,t,n){"use strict";function i(e,t){this._providers=[],this._eventBus=e,this._overlays=t,this._current=null,this._init()}var r=e(369),o=e(255),a=e(393),s=e(391),c=e(395),p=e(389),u=e(397),l=e(390),h=e(394),d=".entry";i.$inject=["eventBus","overlays"],i.prototype._init=function(){var e=this._eventBus,t=this;e.on("selection.changed",function(e){var n=e.newSelection;1===n.length?t.open(n[0]):t.close()}),e.on("element.changed",function(e){var n=e.element,i=t._current;i&&i.element===n&&n.parent&&t.open(n,!0)})},i.prototype.registerProvider=function(e){this._providers.push(e)},i.prototype.getEntries=function(e){var t={};return o(this._providers,function(n){var i=n.getContextPadEntries(e);o(i,function(e,n){t[n]=e})}),t},i.prototype.trigger=function(e,t,n){var i,o,a,s=this._current,c=s.element,u=s.entries,l=t.delegateTarget||t.target;if(!l)return t.preventDefault();if(i=u[p(l,"data-action")],o=i.action,a=t.originalEvent||t,r(o)){if("click"===e)return o(a,c,n)}else if(o[e])return o[e](a,c,n);t.preventDefault()},i.prototype.open=function(e,t){if(this._current&&this._current.open){if(t!==!0&&this._current.element===e)return;this.close()}this._updateAndOpen(e)},i.prototype._updateAndOpen=function(e){var t=this.getEntries(e),n=this.getPad(e),i=n.html;s(i),o(t,function(e,t){var n,r=e.group||"default",o=h(e.html||'<div class="entry" draggable="true"></div>');p(o,"data-action",t),n=u("[data-group="+r+"]",i),n||(n=h('<div class="group" data-group="'+r+'"></div>'),i.appendChild(n)),n.appendChild(o),e.className&&l(o).add(e.className),e.title&&p(o,"title",e.title),e.imageUrl&&o.appendChild(h('<img src="'+e.imageUrl+'">'))}),l(i).add("open"),this._current={element:e,pad:n,entries:t,open:!0},this._eventBus.fire("contextPad.open",{current:this._current})},i.prototype.getPad=function(e){var t=this,n=this._overlays,i=n.get({element:e,type:"context-pad"});if(!i.length){var r=h('<div class="djs-context-pad"></div>');a.bind(r,d,"click",function(e){t.trigger("click",e)}),a.bind(r,d,"dragstart",function(e){t.trigger("dragstart",e)}),c.bind(r,"mousedown",function(e){e.stopPropagation()}),n.add(e,"context-pad",{position:{right:-9,top:-6},html:r}),i=n.get({element:e,type:"context-pad"}),this._eventBus.fire("contextPad.create",{element:e,pad:i[0]})}return i[0]},i.prototype.close=function(){var e;this._current&&(this._current.open&&(e=this._current.pad.html,l(e).remove("open")),this._current.open=!1,this._eventBus.fire("contextPad.close",{current:this._current}))},i.prototype.isOpen=function(){return this._current&&this._current.open},t.exports=i},{255:255,369:369,389:389,390:390,391:391,393:393,394:394,395:395,397:397}],124:[function(e,t,n){t.exports={__depends__:[e(135),e(171)],contextPad:["type",e(123)]}},{123:123,135:135,171:171}],125:[function(e,t,n){"use strict";function i(e,t,n,i,c,p,u){function l(e,t,i,r){return i?n.allowed("shape.append",{source:i,shape:e,target:t,position:r}):n.allowed("shape.create",{shape:e,target:t,position:r})}function h(e,t){[a,r,o,s].forEach(function(n){n===t?c.addMarker(e,n):c.removeMarker(e,n)})}function d(e){var t,n,i;return t=c.getDefaultLayer().group().attr(p.cls("djs-drag-group",["no-events"])),n=t.group().addClass("djs-dragger"),n.translate(e.width/-2,e.height/-2),i=n.group().addClass("djs-visual"),u.drawShape(i,e),t}e.on("create.move",function(e){var t=e.context,n=t.shape,i=t.visual;i||(i=t.visual=d(n)),i.translate(e.x,e.y);var r,c=e.hover,p={x:e.x,y:e.y};r=t.canExecute=c&&l(t.shape,c,t.source,p),c&&null!==r&&(t.target=c,"attach"===r?h(c,a):h(c,t.canExecute?s:o))}),e.on(["create.end","create.out","create.cleanup"],function(e){var t=e.context,n=t.target;n&&h(n,null)}),e.on("create.end",function(e){var t,n=e.context,r=n.source,o=n.shape,a=n.target,s=n.canExecute,c={x:e.x,y:e.y};return s?(r?o=i.appendShape(r,o,c,a):(t="attach"===s,o=i.createShape(o,c,a,t)),void(n.shape=o)):!1}),e.on("create.cleanup",function(e){var t=e.context;t.visual&&t.visual.remove()}),this.start=function(e,n,i){t.init(e,"create",{cursor:"grabbing",autoActivate:!0,data:{shape:n,context:{shape:n,source:i}}})}}var r="drop-ok",o="drop-not-ok",a="attach-ok",s="new-parent";i.$inject=["eventBus","dragging","rules","modeling","canvas","styles","graphicsFactory"],t.exports=i},{}],126:[function(e,t,n){t.exports={__depends__:[e(129),e(189),e(185)],create:["type",e(125)]}},{125:125,129:129,185:185,189:189}],127:[function(e,t,n){"use strict";function i(e){e instanceof MouseEvent?l.stopEvent(e,!0):l.preventDefault(e)}function r(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function o(e,t){return{x:e.x-t.x,y:e.y-t.y}}function a(e,t){return{x:e.x+t.x,y:e.y+t.y}}function s(e,t,n){function s(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+c((e.x-i.left)/n.scale),y:n.y+c((e.y-i.top)/n.scale)}}function v(e){var n=t.viewbox();return{x:c(e.x/n.scale),y:c(e.y/n.scale)}}function y(t,n){n=n||R;var i=p(new f,n.payload,n.data);return e.fire("drag."+t,i)===!1?!1:e.fire(n.prefix+"."+t,i)}function g(e,s){var c=R.payload,u=R.globalStart,h=l.toPoint(e),f=o(h,u),g=R.localStart,x=v(f),b=a(g,x);if(!R.active&&(s||r(f)>R.threshold)){if(p(c,{x:g.x,y:g.y,dx:0,dy:0},{originalEvent:e}),!1===y("start"))return T();R.active=!0,R.keepSelection||(c.previousSelection=n.get(),n.select(null)),R.cursor&&d.set(R.cursor),t.addMarker(t.getRootElement(),m)}i(e),R.active&&(p(c,{x:b.x,y:b.y,dx:x.x,dy:x.y},{originalEvent:e}),y("move"))}function x(e){var t,n=!0;R.active&&(e&&(R.payload.originalEvent=e,i(e)),n=y("end")),n===!1&&y("rejected"),t=A(n!==!0),y("ended",t)}function b(e){27===e.which&&(e.preventDefault(),T())}function E(e){var t;R.active&&(t=h.install(),setTimeout(t,400)),x(e)}function w(e){g(e)}function _(e){var t=R.payload;t.hoverGfx=e.gfx,t.hover=e.element,y("hover")}function S(e){y("out");var t=R.payload;t.hoverGfx=null,t.hover=null}function T(e){var t;if(R){var n=R.active;n&&y("cancel"),t=A(e),n&&y("canceled",t)}}function A(i){var r,o;y("cleanup"),d.unset(),o=R.trapClick?E:x,u.unbind(document,"mousemove",g),u.unbind(document,"mousedown",o,!0),u.unbind(document,"mouseup",o,!0),u.unbind(document,"keyup",b),u.unbind(document,"touchstart",w,!0),u.unbind(document,"touchcancel",T,!0),u.unbind(document,"touchmove",g,!0),u.unbind(document,"touchend",x,!0),e.off("element.hover",_),e.off("element.out",S),t.removeMarker(t.getRootElement(),m);var a=R.payload.previousSelection;return i!==!1&&a&&!n.get().length&&n.select(a),r=R,R=null,r}function C(t,n,r,o){R&&T(!1),"string"==typeof n&&(o=r,r=n,n=null),o=p({},N,o||{});var a,c,h,d=o.data||{};h=o.trapClick?E:x,t?(a=l.getOriginal(t)||t,c=l.toPoint(t),i(t)):(a=null,c={x:0,y:0}),n||(n=s(c)),R=p({prefix:r,data:d,payload:{},globalStart:c,localStart:n},o),o.manual||("undefined"!=typeof TouchEvent&&a instanceof TouchEvent?(u.bind(document,"touchstart",w,!0),u.bind(document,"touchcancel",T,!0),u.bind(document,"touchmove",g,!0),u.bind(document,"touchend",x,!0)):(u.bind(document,"mousemove",g),u.bind(document,"mousedown",h,!0),u.bind(document,"mouseup",h,!0)),u.bind(document,"keyup",b),e.on("element.hover",_),e.on("element.out",S)),y("init"),o.autoActivate&&g(t,!0)}var R,N={threshold:5,trapClick:!0};e.on("diagram.destroy",T),this.init=C,this.move=g,this.hover=_,this.out=S,this.end=x,this.cancel=T,this.context=function(){return R},this.setOptions=function(e){p(N,e)}}var c=Math.round,p=e(377),u=e(395),l=e(222),h=e(218),d=e(220),f=e(104).Event,m="djs-drag-active";s.$inject=["eventBus","canvas","selection"],t.exports=s},{104:104,218:218,220:220,222:222,377:377,395:395}],128:[function(e,t,n){"use strict";function i(e){var t=o(e,"svg, .djs-element",!0);return t&&new a(t)}function r(e,t,n){var r=this;e.on("drag.start",function(t){e.once("drag.move",function(){e.once("drag.move",function(e){r.ensureHover(e)})})}),this.ensureHover=function(e){if(!e.hover){var r,o,a,c,p=e.originalEvent;p instanceof MouseEvent&&(r=s.toPoint(p),o=document.elementFromPoint(r.x,r.y),c=i(o),c&&(a=n.get(c),t.hover({element:a,gfx:c})))}}}var o=e(392),a=e(240),s=e(222);r.$inject=["eventBus","dragging","elementRegistry"],t.exports=r},{222:222,240:240,392:392}],129:[function(e,t,n){t.exports={__init__:["hoverFix"],__depends__:[e(189)],dragging:["type",e(127)],hoverFix:["type",e(128)]}},{127:127,128:128,189:189}],130:[function(e,t,n){"use strict";function i(e,t,n,i,r,o,s){this._actions={undo:function(){t.undo()},redo:function(){t.redo()},stepZoom:function(e){r.stepZoom(e.value)},zoom:function(e){o.zoom(e.value)},removeSelection:function(){var e=i.get();if(e.length){var t,r=s.allowed("elements.delete",{elements:e});if(r===!1)return;t=a(r)?r:e,t.length&&n.removeElements(t.slice())}},moveCanvas:function(e){var t=0,n=0,i=e.invertY,r=e.speed,a=r/Math.min(Math.sqrt(o.viewbox().scale),1);switch(e.direction){case"left":t=a;break;case"up":n=a;break;case"right":t=-a;break;case"down":n=-a}n&&i&&(n=-n),o.scroll({dx:t,dy:n})}}}function r(e,t){return new Error(e+" "+t)}var o=e(255),a=e(368),s="is not a registered action",c="is already registered";i.$inject=["eventBus","commandStack","modeling","selection","zoomScroll","canvas","rules"],t.exports=i,i.prototype.trigger=function(e,t){if(!this._actions[e])throw r(e,s);return this._actions[e](t)},i.prototype.register=function(e,t){return"string"==typeof e?this._registerAction(e,t):void o(e,function(e,t){this._registerAction(t,e)},this)},i.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw r(e,c);this._actions[e]=t},i.prototype.unregister=function(e){if(!this.isRegistered(e))throw r(e,s);this._actions[e]=void 0},i.prototype.length=function(){return Object.keys(this._actions).length},i.prototype.isRegistered=function(e){return!!this._actions[e]}},{255:255,368:368}],131:[function(e,t,n){t.exports={__depends__:[e(189),e(216)],__init__:["editorActions"],editorActions:["type",e(130)]}},{130:130,189:189,216:216}],132:[function(e,t,n){"use strict";function i(e,t,n,i){this._dragging=n,i.registerTool("hand",{tool:"hand",dragging:"hand.move"}),e.on("element.mousedown",a,function(e){return r(e)?(this.activateMove(e.originalEvent),!1):void 0},this),e.on("hand.end",function(t){var n=t.originalEvent.target;return t.hover||n instanceof SVGElement?void e.once("hand.ended",function(){this.activateMove(t.originalEvent,{reactivate:!0})},this):!1},this),e.on("hand.move.start",function(e){var t=e.context;t.start={x:e.x,y:e.y}}),e.on("hand.move.move",function(e){var n=e.context,i=n.start,r=n.delta,a={x:e.x,y:e.y},s=t.viewbox().scale,c=n.last||i;r=o(a,c),t.scroll({dx:r.x*s,dy:r.y*s}),n.last=a}),e.on("hand.move.end",function(t){var n=t.context,i=n.reactivate;return!r(t)&&i&&e.once("hand.move.ended",function(e){this.activateHand(e.originalEvent,!0,!0)},this),!1},this)}var r=e(228).hasPrimaryModifier,o=e(227).substract,a=1500,s="grab";i.$inject=["eventBus","canvas","dragging","toolManager"],t.exports=i,i.prototype.activateMove=function(e,t,n){"object"==typeof t&&(n=t,t=!1),this._dragging.init(e,"hand.move",{autoActivate:t,cursor:s,data:{context:n||{}}})},i.prototype.activateHand=function(e,t,n){this._dragging.init(e,"hand",{trapClick:!1,autoActivate:t,cursor:s,data:{context:{reactivate:n}}})},i.prototype.toggle=function(){this.isActive()?this._dragging.cancel():this.activateHand()},i.prototype.isActive=function(){var e=this._dragging.context();return e&&/^hand/.test(e.prefix)}},{227:227,228:228}],133:[function(e,t,n){"use strict";t.exports={__depends__:[e(198)],__init__:["handTool"],handTool:["type",e(132)]}},{132:132,198:198}],134:[function(e,t,n){"use strict";function i(e,t,n){function i(n,i,r){if(a(i)){var o,c,p;r?c=t.getGraphics(r):(o=i.delegateTarget||i.target,o&&(c=new s(o),r=t.get(c))),c&&r&&(p=e.fire(n,{element:r,gfx:c,originalEvent:i}),p===!1&&(i.stopPropagation(),i.preventDefault()))}}function c(e){var t=y[e];return t||(t=y[e]=function(t){i(e,t)}),t}function l(e,t,n){var r=g[e];if(!r)throw new Error("unmapped DOM event name <"+e+">");return i(r,t,n)}function h(e,t,n){var i=c(n);i.$delegate=o.bind(e,x,t,i)}function d(e,t,n){o.unbind(e,t,c(n).$delegate)}function f(e){r(g,function(t,n){h(e.node,n,t)})}function m(e){r(g,function(t,n){d(e.node,n,t)})}var v=n.cls("djs-hit",["no-fill","no-border"],{
|
|
stroke:"white",strokeWidth:15}),y={},g={mouseover:"element.hover",mouseout:"element.out",click:"element.click",dblclick:"element.dblclick",mousedown:"element.mousedown",mouseup:"element.mouseup"},x="svg, .djs-element";e.on("canvas.destroy",function(e){m(e.svg)}),e.on("canvas.init",function(e){f(e.svg)}),e.on(["shape.added","connection.added"],function(e){var t,n,i=e.element,r=e.gfx;i.waypoints?(t=p(i.waypoints),n="connection"):(t=s.create("rect",{x:0,y:0,width:i.width,height:i.height}),n="shape"),t.attr(v).appendTo(r.node)}),e.on("shape.changed",function(e){var t=e.element,n=e.gfx,i=n.select(".djs-hit");i.attr({width:t.width,height:t.height})}),e.on("connection.changed",function(e){var t=e.element,n=e.gfx,i=n.select(".djs-hit");u(i,t.waypoints)}),this.fire=i,this.triggerMouseEvent=l,this.mouseHandler=c,this.registerEvent=h,this.unregisterEvent=d}var r=e(255),o=e(393),a=e(228).isPrimaryButton,s=e(240),c=e(231),p=c.createLine,u=c.updateLine;i.$inject=["eventBus","elementRegistry","styles"],t.exports=i},{228:228,231:231,240:240,255:255,393:393}],135:[function(e,t,n){t.exports={__init__:["interactionEvents"],interactionEvents:["type",e(134)]}},{134:134}],136:[function(e,t,n){"use strict";function i(e,t,n){var i=this;this._config=e||{},this._eventBus=t,this._editorActions=n,this._listeners=[],this._keyHandler=function(e){var t,n,r=e.target,o=i._listeners,a=e.keyCode||e.charCode||-1;if(!c(r,"input, textarea"))for(t=0;n=o[t];t++)n(a,e)&&(e.preventDefault(),e.stopPropagation())},t.on("diagram.destroy",function(){i._fire("destroy"),i.unbind(),i._listeners=null}),t.on("diagram.init",function(){i._fire("init"),e&&e.bindTo&&i.bind(e.bindTo)}),this._init()}function r(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function o(e){return e.ctrlKey||e.metaKey}function a(e){return e.shiftKey}var s=e(395),c=e(396);i.$inject=["config.keyboard","eventBus","editorActions"],t.exports=i,i.prototype.bind=function(e){this.unbind(),this._node=e,s.bind(e,"keydown",this._keyHandler,!0),this._fire("bind")},i.prototype.getBinding=function(){return this._node},i.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),s.unbind(e,"keydown",this._keyHandler,!0)),this._node=null},i.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node,listeners:this._listeners})},i.prototype._init=function(){function e(e,t){return o(t)&&!a(t)&&90===e?(u.trigger("undo"),!0):void 0}function t(e,t){return o(t)&&(89===e||90===e&&a(t))?(u.trigger("redo"),!0):void 0}function n(e,t){return 107!==e&&187!==e&&171!==e&&61!==e||!o(t)?void 0:(u.trigger("stepZoom",{value:1}),!0)}function i(e,t){return 109!==e&&189!==e&&173!==e||!o(t)?void 0:(u.trigger("stepZoom",{value:-1}),!0)}function r(e,t){return 96!==e&&48!==e||!o(t)?void 0:(u.trigger("zoom",{value:1}),!0)}function s(e,t){return 46===e?(u.trigger("removeSelection"),!0):void 0}function c(e,t){if([37,38,39,40].indexOf(e)>=0){var n={invertY:l.invertY,speed:l.speed||50};switch(e){case 37:n.direction="left";break;case 38:n.direction="up";break;case 39:n.direction="right";break;case 40:n.direction="down"}return u.trigger("moveCanvas",n),!0}}var p=this._listeners,u=this._editorActions,l=this._config;p.push(e),p.push(t),p.push(s),p.push(n),p.push(i),p.push(r),p.push(c)},i.prototype.addListener=function(e){this._listeners.push(e)},i.prototype.hasModifier=r,i.prototype.isCmd=o,i.prototype.isShift=a},{395:395,396:396}],137:[function(e,t,n){t.exports={__depends__:[e(131)],__init__:["keyboard"],keyboard:["type",e(136)]}},{131:131,136:136}],138:[function(e,t,n){"use strict";function i(e,t,n){u.call(this,e),e.on("shape.move.start",p,function(e){var t=e.context,n=t.shapes;t.shapes=r(n)}),e.on("shape.move.start",c,function(e){var t=e.context,i=t.shapes,r=[];o(i,function(e){var n=e.label;n&&!n.hidden&&-1===t.shapes.indexOf(n)&&r.push(n),e.labelTarget&&r.push(e)}),o(r,function(e){n.makeDraggable(t,e,!0)})}),this.postExecuted(["elements.move"],function(e){var n=e.context,i=n.closure,r=i.enclosedElements;o(r,function(e){e.label&&!r[e.label.id]&&t.moveShape(e.label,n.delta,e.parent)})})}function r(e){return a(e,function(t){return-1===e.indexOf(t.labelTarget)})}var o=e(255),a=e(253),s=e(243),c=250,p=1500,u=e(98);s(i,u),i.$inject=["eventBus","modeling","moveVisuals"],t.exports=i},{243:243,253:253,255:255,98:98}],139:[function(e,t,n){t.exports={__depends__:[e(166)],__init__:["labelSupport"],labelSupport:["type",e(138)]}},{138:138,166:166}],140:[function(e,t,n){"use strict";function i(e,t,n,i,o,a){this._selection=o,this._dragging=n;var p=this,u={create:function(e){var n,i=t.getDefaultLayer();n=e.frame=c.create("rect",{"class":"djs-lasso-overlay",width:1,height:1,x:0,y:0}),n.appendTo(i)},update:function(e){var t=e.frame,n=e.bbox;t.attr({x:n.x,y:n.y,width:n.width,height:n.height})},remove:function(e){e.frame&&e.frame.remove()}};a.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",function(){p.activateLasso(t.originalEvent,!0)})}),e.on("lasso.end",function(e){var t=r(e),n=i.filter(function(e){return e});p.select(n,t)}),e.on("lasso.start",function(e){var t=e.context;t.bbox=r(e),u.create(t)}),e.on("lasso.move",function(e){var t=e.context;t.bbox=r(e),u.update(t)}),e.on("lasso.end",function(e){var t=e.context;u.remove(t)}),e.on("lasso.cleanup",function(e){var t=e.context;u.remove(t)}),e.on("element.mousedown",1500,function(e){s(e)&&(p.activateLasso(e.originalEvent),e.stopPropagation())})}function r(e){var t,n={x:e.x-e.dx,y:e.y-e.dy},i={x:e.x,y:e.y};return t=n.x<=i.x&&n.y<i.y||n.x<i.x&&n.y<=i.y?{x:n.x,y:n.y,width:i.x-n.x,height:i.y-n.y}:n.x>=i.x&&n.y<i.y||n.x>i.x&&n.y<=i.y?{x:i.x,y:n.y,width:n.x-i.x,height:i.y-n.y}:n.x<=i.x&&n.y>i.y||n.x<i.x&&n.y>=i.y?{x:n.x,y:i.y,width:i.x-n.x,height:n.y-i.y}:n.x>=i.x&&n.y>i.y||n.x>i.x&&n.y>=i.y?{x:i.x,y:i.y,width:n.x-i.x,height:n.y-i.y}:{x:i.x,y:i.y,width:0,height:0}}var o=e(385),a=e(221).getEnclosedElements,s=e(228).hasSecondaryModifier,c=e(240),p="crosshair";i.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager"],t.exports=i,i.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:p,data:{context:{}}})},i.prototype.activateSelection=function(e){this._dragging.init(e,"lasso.selection",{trapClick:!1,cursor:p,data:{context:{}}})},i.prototype.select=function(e,t){var n=a(e,t);this._selection.select(o(n))},i.prototype.toggle=function(){this.isActive()?this._dragging.cancel():this.activateSelection()},i.prototype.isActive=function(){var e=this._dragging.context();return e&&/^lasso/.test(e.prefix)}},{221:221,228:228,240:240,385:385}],141:[function(e,t,n){"use strict";t.exports={__depends__:[e(198)],__init__:["lassoTool"],lassoTool:["type",e(140)]}},{140:140,198:198}],142:[function(e,t,n){"use strict";function i(e,t,n){this._eventBus=e,this._elementFactory=t,this._commandStack=n;var i=this;e.on("diagram.init",function(){i.registerHandlers(n)})}var r=e(255),o=e(210);i.$inject=["eventBus","elementFactory","commandStack"],t.exports=i,i.prototype.getHandlers=function(){return{"shape.append":e(143),"shape.create":e(146),"shape.delete":e(149),"shape.move":e(153),"shape.resize":e(157),"shape.replace":e(156),spaceTool:e(158),"label.create":e(145),"connection.create":e(144),"connection.delete":e(147),"connection.move":e(151),"connection.layout":e(150),"connection.updateWaypoints":e(161),"connection.reconnectStart":e(155),"connection.reconnectEnd":e(155),"elements.move":e(152),"elements.delete":e(148),"element.updateAttachment":e(160),"element.updateAnchors":e(159)}},i.prototype.registerHandlers=function(e){r(this.getHandlers(),function(t,n){e.registerHandler(n,t)})},i.prototype.moveShape=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=null);var o={shape:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("shape.move",o)},i.prototype.updateAttachment=function(e,t){var n={shape:e,newHost:t};this._commandStack.execute("element.updateAttachment",n)},i.prototype.moveElements=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=void 0);var o,a=n;i===!0&&(o=n,a=n.parent),i===!1&&(o=null);var s={shapes:e,delta:t,newParent:a,newHost:o,hints:r||{}};this._commandStack.execute("elements.move",s)},i.prototype.updateAnchors=function(e,t){var n={element:e,oldBounds:t};this._commandStack.execute("element.updateAnchors",n)},i.prototype.moveConnection=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=void 0);var o={connection:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("connection.move",o)},i.prototype.layoutConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.layout",n)},i.prototype.createConnection=function(e,t,n,i,r){"object"==typeof n&&(r=i,i=n,n=void 0),i=this._create("connection",i);var o={source:e,target:t,parent:r,parentIndex:n,connection:i};return this._commandStack.execute("connection.create",o),o.connection},i.prototype.createShape=function(e,t,n,i,r){"boolean"==typeof i&&(r=i,i=void 0),e=this._create("shape",e);var o={position:t,shape:e,parent:n,parentIndex:i,host:e.host};return r&&(o.parent=n.parent,o.host=n),this._commandStack.execute("shape.create",o),o.shape},i.prototype.createLabel=function(e,t,n,i){n=this._create("label",n);var r={labelTarget:e,position:t,parent:i||e.parent,shape:n};return this._commandStack.execute("label.create",r),r.shape},i.prototype.appendShape=function(e,t,n,i,r,o){t=this._create("shape",t);var a={source:e,position:n,parent:i,shape:t,connection:r,connectionParent:o};return this._commandStack.execute("shape.append",a),a.shape},i.prototype.removeElements=function(e){var t={elements:e};this._commandStack.execute("elements.delete",t)},i.prototype.removeShape=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.delete",n)},i.prototype.removeConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.delete",n)},i.prototype.replaceShape=function(e,t,n){var i={oldShape:e,newData:t,hints:n||{}};return this._commandStack.execute("shape.replace",i),i.newShape},i.prototype.resizeShape=function(e,t){var n={shape:e,newBounds:t};this._commandStack.execute("shape.resize",n)},i.prototype.createSpace=function(e,t,n,i){var r={movingShapes:e,resizingShapes:t,delta:n,direction:i};this._commandStack.execute("spaceTool",r)},i.prototype.updateWaypoints=function(e,t){var n={connection:e,newWaypoints:t};this._commandStack.execute("connection.updateWaypoints",n)},i.prototype.reconnectStart=function(e,t,n){var i={connection:e,newSource:t,dockingOrPoints:n};this._commandStack.execute("connection.reconnectStart",i)},i.prototype.reconnectEnd=function(e,t,n){var i={connection:e,newTarget:t,dockingOrPoints:n};this._commandStack.execute("connection.reconnectEnd",i)},i.prototype.connect=function(e,t,n){return this.createConnection(e,t,n||{},e.parent)},i.prototype._create=function(e,t){return t instanceof o.Base?t:this._elementFactory.create(e,t)}},{143:143,144:144,145:145,146:146,147:147,148:148,149:149,150:150,151:151,152:152,153:153,155:155,156:156,157:157,158:158,159:159,160:160,161:161,210:210,255:255}],143:[function(e,t,n){"use strict";function i(e){this._modeling=e}function r(e,t){return o(e.outgoing,function(e){return e.target===t})}var o=e(251),a=e(243);a(i,e(154)),i.$inject=["modeling"],t.exports=i,i.prototype.preExecute=function(e){if(!e.source)throw new Error("source required");var t=e.parent||e.source.parent,n=this._modeling.createShape(e.shape,e.position,t);e.shape=n},i.prototype.postExecute=function(e){var t=e.connectionParent||e.shape.parent;r(e.source,e.shape)||this._modeling.connect(e.source,e.shape,e.connection,t)}},{154:154,243:243,251:251}],144:[function(e,t,n){"use strict";function i(e,t){this._canvas=e,this._layouter=t}i.$inject=["canvas","layouter"],t.exports=i,i.prototype.execute=function(e){var t=e.source,n=e.target,i=e.parent;if(!t||!n)throw new Error("source and target required");if(!i)throw new Error("parent required");var r=e.connection;return r.source=t,r.target=n,r.waypoints||(r.waypoints=this._layouter.layoutConnection(r)),this._canvas.addConnection(r,i),r},i.prototype.revert=function(e){var t=e.connection;this._canvas.removeConnection(t),t.source=null,t.target=null}},{}],145:[function(e,t,n){"use strict";function i(e){a.call(this,e)}function r(e){["width","height"].forEach(function(t){"undefined"==typeof e[t]&&(e[t]=0)})}var o=e(243),a=e(146);o(i,a),i.$inject=["canvas"],t.exports=i;var s=a.prototype.execute;i.prototype.execute=function(e){var t=e.shape;return r(t),t.labelTarget=e.labelTarget,s.call(this,e)};var c=a.prototype.revert;i.prototype.revert=function(e){return e.shape.labelTarget=null,c.call(this,e)}},{146:146,243:243}],146:[function(e,t,n){"use strict";function i(e){this._canvas=e}var r=e(377),o=Math.round;i.$inject=["canvas"],t.exports=i,i.prototype.execute=function(e){var t=e.shape,n=e.position,i=e.parent,a=e.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?r(t,n):r(t,{x:n.x-o(t.width/2),y:n.y-o(t.height/2)}),this._canvas.addShape(t,i,a),t},i.prototype.revert=function(e){this._canvas.removeShape(e.shape)}},{377:377}],147:[function(e,t,n){"use strict";function i(e,t){this._canvas=e,this._modeling=t}var r=e(219);i.$inject=["canvas","modeling"],t.exports=i,i.prototype.preExecute=function(e){var t=e.connection;t.label&&this._modeling.removeShape(t.label)},i.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=r.indexOf(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t.label=null,t},i.prototype.revert=function(e){var t=e.connection,n=e.parent,i=e.parentIndex;return t.source=e.source,t.target=e.target,r.add(n.children,t,i),this._canvas.addConnection(t,n),t}},{219:219}],148:[function(e,t,n){"use strict";function i(e,t){this._modeling=e,this._elementRegistry=t}var r=e(255),o=e(243);o(i,e(154)),i.$inject=["modeling","elementRegistry"],t.exports=i,i.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry,i=e.elements;r(i,function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))})}},{154:154,243:243,255:255}],149:[function(e,t,n){"use strict";function i(e,t){this._canvas=e,this._modeling=t}var r=e(219),o=e(230).saveClear;i.$inject=["canvas","modeling"],t.exports=i,i.prototype.preExecute=function(e){var t=this._modeling,n=e.shape,i=n.label;n.labelTarget&&(e.labelTarget=n.labelTarget,n.labelTarget=null),i&&this._modeling.removeShape(i,{nested:!0}),o(n.incoming,function(e){t.removeConnection(e,{nested:!0})}),o(n.outgoing,function(e){t.removeConnection(e,{nested:!0})}),o(n.children,function(e){t.removeShape(e,{nested:!0})})},i.prototype.execute=function(e){var t=this._canvas,n=e.shape,i=n.parent;return e.oldParent=i,e.oldParentIndex=r.indexOf(i.children,n),n.label=null,t.removeShape(n),n},i.prototype.revert=function(e){var t=this._canvas,n=e.shape,i=e.oldParent,o=e.oldParentIndex,a=e.labelTarget;return r.add(i.children,n,o),a&&(a.label=n),t.addShape(n,i),n}},{219:219,230:230}],150:[function(e,t,n){"use strict";function i(e,t){this._layouter=e,this._canvas=t}function r(e){return e[e.length-1]}function o(e){function t(e,n){var i=e.indexOf(n);if(0>i&&n){var r=n.parent;i=t(e,r)}return i}var n=e.parent.children,i=n.indexOf(e),r=t(n,e.source),o=t(n,e.target),a=Math.max(r+1,o+1,i);return a>i&&(n.splice(a,0,e),n.splice(i,1)),a}var a=e(377);i.$inject=["layouter","canvas"],t.exports=i,i.prototype.execute=function(e){var t=e.connection,n=t.parent,i=n.children,s=i.indexOf(t),c=t.waypoints;return a(e,{oldWaypoints:c,oldIndex:s}),o(t),t.waypoints=this._layouter.layoutConnection(t,e.hints),c.length?(c[0].original&&!t.waypoints[0].original&&(t.waypoints[0].original={x:c[0].original.x,y:c[0].original.y}),r(c).original&&!r(t.waypoints).original&&(r(t.waypoints).original={x:r(c).original.x,y:r(c).original.y}),t):t},i.prototype.revert=function(e){var t=e.connection,n=t.parent,i=n.children,r=i.indexOf(t),o=e.oldIndex;return t.waypoints=e.oldWaypoints,o!==r&&(i.splice(r,1),i.splice(o,0,t)),t}},{377:377}],151:[function(e,t,n){"use strict";function i(){}var r=e(255),o=e(219);t.exports=i,i.prototype.execute=function(e){var t=e.connection,n=e.delta,i=e.newParent||t.parent,a=e.newParentIndex,s=t.parent;e.oldParent=s,e.oldParentIndex=o.remove(s.children,t),o.add(i.children,t,a),t.parent=i;var c=e.hints.updateAnchors!==!1;return r(t.waypoints,function(e){e.x+=n.x,e.y+=n.y,c&&e.original&&(e.original.x+=n.x,e.original.y+=n.y)}),t},i.prototype.revert=function(e){var t=e.connection,n=t.parent,i=e.oldParent,a=e.oldParentIndex,s=e.delta;o.remove(n.children,t),o.add(i.children,t,a),t.parent=i;var c=e.hints.updateAnchors!==!1;return r(t.waypoints,function(e){e.x-=s.x,e.y-=s.y,c&&e.original&&(e.original.x-=s.x,e.original.y-=s.y)}),t}},{219:219,255:255}],152:[function(e,t,n){"use strict";function i(e){this._helper=new r(e)}var r=e(162);i.$inject=["modeling"],t.exports=i,i.prototype.preExecute=function(e){e.closure=this._helper.getClosure(e.shapes)},i.prototype.postExecute=function(e){var t,n=e.hints;n&&n.primaryShape&&(t=n.primaryShape,n.oldParent=t.parent),this._helper.moveClosure(e.closure,e.delta,e.newParent,e.newHost,t)},i.prototype.execute=function(e){},i.prototype.revert=function(e){}},{162:162}],153:[function(e,t,n){"use strict";function i(e){this._modeling=e,this._helper=new s(e)}var r=e(377),o=e(255),a=e(383),s=e(162),c=e(219);i.$inject=["modeling"],t.exports=i,i.prototype.execute=function(e){var t=e.shape,n=e.delta,i=e.newParent||t.parent,o=e.newParentIndex,s=t.parent;return e.oldBounds=a(t,["x","y","width","height"]),e.oldParent=s,e.oldParentIndex=c.remove(s.children,t),c.add(i.children,t,o),r(t,{parent:i,x:t.x+n.x,y:t.y+n.y}),t},i.prototype.postExecute=function(e){var t=e.shape,n=e.oldBounds,i=this._modeling;e.hints.updateAnchors!==!1&&i.updateAnchors(t,n),e.hints.layout!==!1&&(o(t.incoming,function(e){i.layoutConnection(e,{endChanged:!0})}),o(t.outgoing,function(e){i.layoutConnection(e,{startChanged:!0})})),e.hints.recurse!==!1&&this.moveChildren(e)},i.prototype.revert=function(e){var t=e.shape,n=e.oldParent,i=e.oldParentIndex,o=e.delta;return c.add(n.children,t,i),r(t,{parent:n,x:t.x-o.x,y:t.y-o.y}),t},i.prototype.moveChildren=function(e){var t=e.delta,n=e.shape;this._helper.moveRecursive(n.children,t,null)},i.prototype.getNewParent=function(e){return e.newParent||e.shape.parent}},{162:162,219:219,255:255,377:377,383:383}],154:[function(e,t,n){"use strict";function i(){}t.exports=i,i.prototype.execute=function(){},i.prototype.revert=function(){}},{}],155:[function(e,t,n){"use strict";function i(){}var r=e(368);i.$inject=[],t.exports=i,i.prototype.execute=function(e){var t,n=e.newSource,i=e.newTarget,o=e.connection,a=e.dockingOrPoints,s=o.waypoints;if(!n&&!i)throw new Error("newSource or newTarget are required");if(n&&i)throw new Error("must specify either newSource or newTarget");return e.oldWaypoints=s,r(a)?t=a:(t=s.slice(),t.splice(n?0:-1,1,a)),n&&(e.oldSource=o.source,o.source=n),i&&(e.oldTarget=o.target,o.target=i),o.waypoints=t,o},i.prototype.revert=function(e){var t=e.newSource,n=e.newTarget,i=e.connection;return t&&(i.source=e.oldSource),n&&(i.target=e.oldTarget),i.waypoints=e.oldWaypoints,i}},{368:368}],156:[function(e,t,n){"use strict";function i(e,t){this._modeling=e,this._rules=t}var r=e(255);i.$inject=["modeling","rules"],t.exports=i,i.prototype.preExecute=function(e){var t,n=this._modeling,i=this._rules,o=e.oldShape,a=e.newData,s=e.hints,c={x:a.x,y:a.y};t=e.newShape=e.newShape||n.createShape(a,c,o.parent),o.host&&n.updateAttachment(t,o.host),s.moveChildren!==!1&&n.moveElements(o.children,{x:0,y:0},t);var p=o.incoming.slice(),u=o.outgoing.slice();r(p,function(e){var r=e.waypoints,o=r[r.length-1],a=i.allowed("connection.reconnectEnd",{source:e.source,target:t,connection:e});a&&n.reconnectEnd(e,t,o)}),r(u,function(e){var r=e.waypoints,o=r[0],a=i.allowed("connection.reconnectStart",{source:t,target:e.target,connection:e});a&&n.reconnectStart(e,t,o)})},i.prototype.postExecute=function(e){var t=this._modeling,n=e.oldShape;t.removeShape(n)},i.prototype.execute=function(e){},i.prototype.revert=function(e){}},{255:255}],157:[function(e,t,n){"use strict";function i(e){this._modeling=e}var r=e(377),o=e(255);i.$inject=["modeling"],t.exports=i,i.prototype.execute=function(e){var t=e.shape,n=e.newBounds;if(void 0===n.x||void 0===n.y||void 0===n.width||void 0===n.height)throw new Error("newBounds must have {x, y, width, height} properties");if(n.width<10||n.height<10)throw new Error("width and height cannot be less than 10px");return e.oldBounds={width:t.width,height:t.height,x:t.x,y:t.y},r(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},i.prototype.postExecute=function(e){var t=e.shape,n=e.oldBounds,i=this._modeling;i.updateAnchors(t,n),o(t.incoming,function(e){i.layoutConnection(e,{endChanged:!0})}),o(t.outgoing,function(e){i.layoutConnection(e,{startChanged:!0})})},i.prototype.revert=function(e){var t=e.shape,n=e.oldBounds;return r(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t}},{255:255,377:377}],158:[function(e,t,n){"use strict";function i(e){this._modeling=e}var r=e(255),o=e(195);i.$inject=["modeling"],t.exports=i,i.prototype.preExecute=function(e){var t=this._modeling,n=e.resizingShapes,i=e.delta,a=e.direction;r(n,function(e){var n=o.resizeBounds(e,a,i);t.resizeShape(e,n)})},i.prototype.postExecute=function(e){var t=this._modeling,n=e.movingShapes,i=e.delta;t.moveElements(n,i)},i.prototype.execute=function(e){},i.prototype.revert=function(e){}},{195:195,255:255}],159:[function(e,t,n){"use strict";function i(){}var r=e(255),o=e(217).getNewAttachPoint;t.exports=i,i.prototype.execute=function(e){function t(e,t){r(e,function(e){var r=e.waypoints,c="end"===t?r.length-1:0,p=r[c];s.push({point:p,oldOriginal:p.original}),p.original=o(p.original||p,i,n),a.push(e)})}var n=e.element,i=e.oldBounds,a=e.changedConnections=[],s=e.oldAnchors=[];return t(n.incoming,"end"),t(n.outgoing,"start"),a},i.prototype.revert=function(e){var t=e.oldAnchors,n=e.changedConnections;return r(t,function(e){e.point.original=e.oldOriginal}),n}},{217:217,255:255}],160:[function(e,t,n){"use strict";function i(e){this._modeling=e}function r(e,t){return a.remove(e&&e.attachers,t)}function o(e,t,n){if(e){var i=e.attachers;i||(e.attachers=i=[]),a.add(i,t,n)}}var a=e(219);t.exports=i,i.$inject=["modeling"],i.prototype.execute=function(e){var t=e.shape,n=e.newHost,i=t.host;return e.oldHost=i,e.attacherIdx=r(i,t),o(n,t),t.host=n,t},i.prototype.revert=function(e){var t=e.shape,n=e.newHost,i=e.oldHost,a=e.attacherIdx;return t.host=i,r(n,t),o(i,t,a),t}},{219:219}],161:[function(e,t,n){"use strict";function i(){}t.exports=i,i.prototype.execute=function(e){var t=e.connection,n=e.newWaypoints;return e.oldWaypoints=t.waypoints,t.waypoints=n,t},i.prototype.revert=function(e){var t=e.connection,n=e.oldWaypoints;return t.waypoints=n,t}},{}],162:[function(e,t,n){"use strict";function i(e){this._modeling=e}var r=e(255),o=e(221);t.exports=i,i.prototype.moveRecursive=function(e,t,n){return e?this.moveClosure(this.getClosure(e),t,n):[]},i.prototype.moveClosure=function(e,t,n,i,o){var a=this._modeling,s=e.allShapes,c=e.allConnections,p=e.enclosedConnections,u=e.topLevel,l=!1;o&&o.parent===n&&(l=!0),r(s,function(e){a.moveShape(e,t,u[e.id]&&!l&&n,{recurse:!1,layout:!1})}),r(c,function(e){var i=!!s[e.source.id],r=!!s[e.target.id];p[e.id]&&i&&r?a.moveConnection(e,t,u[e.id]&&n,{updateAnchors:!1}):a.layoutConnection(e,{startChanged:i,endChanged:r})})},i.prototype.getClosure=function(e){return o.getClosure(e)}},{221:221,255:255}],163:[function(e,t,n){t.exports={__depends__:[e(100),e(120),e(185)],__init__:["modeling"],modeling:["type",e(142)],layouter:["type",e(206)]}},{100:100,120:120,142:142,185:185,206:206}],164:[function(e,t,n){"use strict";function i(e){return{x:e.x+d(e.width/2),y:e.y+d(e.height/2)}}function r(e,t,n,r,s){function c(e,t,n,i){return s.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function f(e,n,r){if(!n.waypoints&&n.parent){var o=i(n);t.init(e,o,"shape.move",{cursor:"grabbing",autoActivate:r,data:{shape:n,context:{}}})}}e.on("shape.move.start",l,function(e){var t=e.context,n=e.shape,i=r.get().slice();-1===i.indexOf(n)&&(i=[n]),i=o(i),a(t,{shapes:i,shape:n})}),e.on("shape.move.start",u,function(e){var t,n=e.context,i=n.shapes;return t=n.canExecute=c(i),t?void 0:(e.stopPropagation(),!1)}),e.on("shape.move.move",p,function(e){var t,n=e.context,i=n.shapes,r=e.hover,o={x:e.dx,y:e.dy},a={x:e.x,y:e.y};return t=c(i,o,a,r),n.delta=o,n.canExecute=t,null===t?void(n.target=null):void(n.target=r)}),e.on("shape.move.end",function(e){var t=e.context,i=t.delta,r=t.canExecute,o="attach"===r;return r?(i.x=d(i.x),i.y=d(i.y),void n.moveElements(t.shapes,i,t.target,o,{primaryShape:t.shape})):!1}),e.on("element.mousedown",function(e){var t=h(e);if(!t)throw new Error("must supply DOM mousedown event");f(t,e.element)}),this.start=f}function o(e){var t=c(e,"id");return s(e,function(e){for(;e=e.parent;)if(t[e.id])return!1;return!0})}var a=e(377),s=e(253),c=e(256),p=500,u=1250,l=1500,h=e(222).getOriginal,d=Math.round;r.$inject=["eventBus","dragging","modeling","selection","rules"],t.exports=r},{222:222,253:253,256:256,377:377}],165:[function(e,t,n){"use strict";function i(e,t,n,i){function c(e){return t.getGraphics(e)}function p(e){var t=d.selfAndDirectChildren(e,!0),n=r(t);return n}function u(e){var t=d.selfAndAllChildren(e,!0),n=h(t,function(e){return(e.incoming||[]).concat(e.outgoing||[])});return a(t.concat(n),!0)}function l(e,t){[x,v,y,g].forEach(function(i){i===t?n.addMarker(e,i):n.removeMarker(e,i)})}function b(e,t){var r=e.dragGroup;r||(r=e.dragGroup=n.getDefaultLayer().group().attr(i.cls("djs-drag-group",["no-events"])));var o=c(t),a=o.clone(),s=o.getBBox();return a.attr(i.cls("djs-dragger",[],{x:s.x,y:s.y})),r.add(a),a}function E(e,t,i){b(e,t),i&&n.addMarker(t,m),e.allDraggedElements?e.allDraggedElements.push(t):e.allDraggedElements=[t]}this.addDragger=b,this.makeDraggable=E,e.on("shape.move.start",f,function(e){var t=e.context,i=t.shapes,r=t.allDraggedElements,c=p(i);c.forEach(function(e){b(t,e)}),r=r?a(r,u(i)):u(i),s(r,function(e){n.addMarker(e,m)}),t.allDraggedElements=r,t.differentParents=o(i)}),e.on("shape.move.move",f,function(e){var t=e.context,n=t.dragGroup,i=t.target,r=t.shape.parent,o=t.canExecute;i&&("attach"===o?l(i,x):t.canExecute&&i&&i.id!==r.id?l(i,g):l(i,t.canExecute?v:y)),n.translate(e.dx,e.dy)}),e.on(["shape.move.out","shape.move.cleanup"],function(e){var t=e.context,n=t.target;n&&l(n,null)}),e.on("shape.move.cleanup",function(e){var t=e.context,i=t.allDraggedElements,r=t.dragGroup;s(i,function(e){n.removeMarker(e,m)}),r&&r.remove()})}function r(e){var t=c(e,function(t){if(t.waypoints){var n=p(e,t.source),i=p(e,t.target);return n&&i}return!0});return t}function o(e){return 1!==u(l(e,function(e){return e.parent&&e.parent.id}))}var a=e(245),s=e(255),c=e(253),p=e(254),u=e(260),l=e(256),h=e(258),d=e(221),f=500,m="djs-dragging",v="drop-ok",y="drop-not-ok",g="new-parent",x="attach-ok";i.$inject=["eventBus","elementRegistry","canvas","styles"],t.exports=i},{221:221,245:245,253:253,254:254,255:255,256:256,258:258,260:260}],166:[function(e,t,n){t.exports={__depends__:[e(135),e(189),e(169),e(185),e(129)],__init__:["move","moveVisuals"],move:["type",e(164)],moveVisuals:["type",e(165)]}},{129:129,135:135,164:164,165:165,169:169,185:185,189:189}],167:[function(e,t,n){"use strict";function i(e){o.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],function(e){var n=e.context,i=n.shape||n.connection,r=n.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.parent=o.parent),n.parentIndex=o.index)}),this.preExecute(["shape.move","connection.move"],function(e){var n=e.context,i=n.shape||n.connection,r=n.newParent||i.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.newParent=o.parent),n.newParentIndex=o.index)})}var r=e(243),o=e(98);i.prototype.getOrdering=function(e,t){return null},r(i,o),t.exports=i},{243:243,98:98}],168:[function(e,t,n){"use strict";function i(e,t,n){function i(e,t){return e.rect(10,10,0,0).attr(c)}function o(e,t){e.attr({x:-s,y:-s,width:t.width+2*s,height:t.height+2*s})}function a(e,t){var n=r(t);e.attr({x:n.x-s,y:n.y-s,width:n.width+2*s,height:n.height+2*s})}var s=6,c=t.cls("djs-outline",["no-fill"]);e.on(["shape.added","shape.changed"],function(e){var t=e.element,n=e.gfx,r=n.select(".djs-outline");r||(r=i(n,t)),o(r,t)}),e.on(["connection.added","connection.changed"],function(e){var t=e.element,n=e.gfx,r=n.select(".djs-outline");r||(r=i(n,t)),a(r,t)})}var r=e(221).getBBox;i.$inject=["eventBus","styles","elementRegistry"],t.exports=i},{221:221}],169:[function(e,t,n){"use strict";t.exports={__init__:["outline"],outline:["type",e(168)]}},{168:168}],170:[function(e,t,n){"use strict";function i(e){var t=d('<div class="djs-overlay-container" style="position: absolute; width: 0; height: 0;" />');return e.insertBefore(t,e.firstChild),t}function r(e,t,n){u(e.style,{left:t+"px",top:n+"px"})}function o(e,t){e.style.display=t===!1?"none":""}function a(e,t,n){this._eventBus=e,this._canvas=t,this._elementRegistry=n,this._ids=y,this._overlayDefaults={show:{minZoom:.7,maxZoom:5}},this._overlays={},this._overlayContainers={},this._overlayRoot=i(t.getContainer()),this._init()}var s=e(368),c=e(374),p=e(372),u=e(377),l=e(255),h=e(253),d=e(394),f=e(390),m=e(398),v=e(221).getBBox,y=new(e(225))("ov");a.$inject=["eventBus","canvas","elementRegistry"],t.exports=a,a.prototype.get=function(e){if(c(e)&&(e={id:e}),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?h(t.overlays,{type:e.type}):t.overlays.slice():[]}return e.type?h(this._overlays,{type:e.type}):e.id?this._overlays[e.id]:null},a.prototype.add=function(e,t,n){if(p(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return n=u({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},a.prototype.remove=function(e){var t=this.get(e)||[];s(t)||(t=[t]);var n=this;l(t,function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(m(e.html),m(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}})},a.prototype.show=function(){o(this._overlayRoot)},a.prototype.hide=function(){o(this._overlayRoot,!1)},a.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,o=t.y;if(t.waypoints){var a=v(t);i=a.x,o=a.y}r(n,i,o)},a.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,i=e.element,o=t.left,a=t.top;if(void 0!==t.right){var s;s=i.waypoints?v(i).width:i.width,o=-1*t.right+s}if(void 0!==t.bottom){var c;c=i.waypoints?v(i).height:i.height,a=-1*t.bottom+c}r(n,o||0,a||0)},a.prototype._createOverlayContainer=function(e){var t=d('<div class="djs-overlays djs-overlays-'+e.id+'" style="position: absolute" />');this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),n},a.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._overlayRoot.style.transform=i,this._overlayRoot.style["-ms-transform"]=i,this._overlayRoot.style["-webkit-transform"]=i},a.prototype._getOverlayContainer=function(e,t){var n=e&&e.id||e,i=this._overlayContainers[n];return i||t||(i=this._overlayContainers[n]=this._createOverlayContainer(e)),i},a.prototype._addOverlay=function(e){var t,n,i=e.id,r=e.element,o=e.html;o.get&&(o=o.get(0)),c(o)&&(o=d(o)),n=this._getOverlayContainer(r),t=d('<div class="djs-overlay" data-overlay-id="'+i+'" style="position: absolute">'),t.appendChild(o),e.type&&f(t).add("djs-overlay-"+e.type),
|
|
e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},a.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=e.htmlContainer,r=!0;n&&((n.minZoom>t.scale||n.maxZoom<t.scale)&&(r=!1),o(i,r))},a.prototype._updateOverlaysVisibilty=function(e){var t=this;l(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},a.prototype._init=function(){function e(e){n._updateRoot(e),n._updateOverlaysVisibilty(e),n.show()}var t=this._eventBus,n=this;t.on("canvas.viewbox.changing",function(e){n.hide()}),t.on("canvas.viewbox.changed",function(t){e(t.viewbox)}),t.on(["shape.remove","connection.remove"],function(e){var t=n.get({element:e.element});l(t,function(e){n.remove(e.id)})}),t.on(["element.changed"],function(e){var t=e.element,i=n._getOverlayContainer(t,!0);i&&(l(i.overlays,function(e){n._updateOverlay(e)}),n._updateOverlayContainer(i))}),t.on("element.marker.update",function(e){var t=n._getOverlayContainer(e.element,!0);t&&f(t.html)[e.add?"add":"remove"](e.marker)})}},{221:221,225:225,253:253,255:255,368:368,372:372,374:374,377:377,390:390,394:394,398:398}],171:[function(e,t,n){t.exports={__init__:["overlays"],overlays:["type",e(170)]}},{170:170}],172:[function(e,t,n){"use strict";function i(e,t,n){this._eventBus=e,this._canvas=t,this._dragging=n,this._providers=[];var i=this;e.on("tool-manager.update",function(e){var t=e.tool;i.updateToolHighlight(t)}),e.on("i18n.changed",function(){i._update()})}var r=e(369),o=e(255),a=e(394),s=e(397),c=e(389),p=e(391),u=e(390),l=e(396),h=e(393),d=e(395),f=".djs-palette-toggle",m=".entry",v=f+", "+m;i.$inject=["eventBus","canvas","dragging"],t.exports=i,i.prototype.registerProvider=function(e){this._providers.push(e),this._container||this._init(),this._update()},i.prototype.getEntries=function(){var e={};return o(this._providers,function(t){var n=t.getPaletteEntries();o(n,function(t,n){e[n]=t})}),e},i.prototype._init=function(){var e=this._canvas.getContainer(),t=this._container=a(i.HTML_MARKUP),n=this;e.appendChild(t),h.bind(t,v,"click",function(e){var t=e.delegateTarget;return l(t,f)?n.toggle():void n.trigger("click",e)}),d.bind(t,"mousedown",function(e){e.stopPropagation()}),h.bind(t,m,"dragstart",function(e){n.trigger("dragstart",e)}),this._eventBus.fire("palette.create",{html:t})},i.prototype._update=function(){var e=s(".djs-palette-entries",this._container),t=this._entries=this.getEntries();p(e),o(t,function(t,n){var i=t.group||"default",r=s("[data-group="+i+"]",e);r||(r=a('<div class="group" data-group="'+i+'"></div>'),e.appendChild(r));var o=t.html||(t.separator?'<hr class="separator" />':'<div class="entry" draggable="true"></div>'),p=a(o);r.appendChild(p),t.separator||(c(p,"data-action",n),t.title&&c(p,"title",t.title),t.className&&u(p).add(t.className),t.imageUrl&&p.appendChild(a('<img src="'+t.imageUrl+'">')))}),this.open(!0)},i.prototype.trigger=function(e,t,n){var i,o,a,s=this._entries,p=!1,u=t.delegateTarget||t.target;return u?(i=s[c(u,"data-action")],o=i.action,a=t.originalEvent||t,r(o)?"click"===e&&(p=o(a,n)):o[e]&&(p=o[e](a,n)),void t.preventDefault()):t.preventDefault()},i.prototype.close=function(){u(this._container).remove("open")},i.prototype.open=function(){u(this._container).add("open")},i.prototype.toggle=function(e){this.isOpen()?this.close():this.open()},i.prototype.isActiveTool=function(e){return e&&this._activeTool===e},i.prototype.updateToolHighlight=function(e){var t,n;this._toolsContainer||(t=s(".djs-palette-entries",this._container),this._toolsContainer=s("[data-group=tools]",t)),n=this._toolsContainer,o(n.children,function(t){var n=t.getAttribute("data-action");n&&(n=n.replace("-tool",""),t.classList.contains("entry")&&n===e?u(t).add("highlighted-entry"):u(t).remove("highlighted-entry"))})},i.prototype.isOpen=function(){return this._container&&u(this._container).has("open")},i.HTML_MARKUP='<div class="djs-palette"><div class="djs-palette-entries"></div><div class="djs-palette-toggle"></div></div>'},{255:255,369:369,389:389,390:390,391:391,393:393,394:394,395:395,396:396,397:397}],173:[function(e,t,n){"use strict";t.exports={__depends__:[e(198)],__init__:["palette"],palette:["type",e(172)]}},{172:172,198:198}],174:[function(e,t,n){"use strict";function i(e,t){this._eventBus=e,this._canvas=t,this._providers={}}var r=e(255),o=e(377),a=e(254),s=e(393),c=e(394),p=e(390),u=e(389),l=e(398),h="data-id";i.$inject=["eventBus","canvas"],i.prototype.registerProvider=function(e,t){this._providers[e]=t},i.prototype.create=function(e,t){var n=this._providers[e];if(!n)throw new Error("Provider is not registered: "+e);if(!t)throw new Error("Element is missing");var i=this._current={provider:n,className:e,element:t};return n.getHeaderEntries&&(i.headerEntries=n.getHeaderEntries(t)),i.entries=n.getEntries(t),this},i.prototype.isEmpty=function(){var e=this._current;return 0===e.entries.length&&e.headerEntries&&0===e.headerEntries.length},i.prototype.open=function(e){if(!e)throw new Error("the position argument is missing");this.isOpen()&&this.close();var t=this._current,n=this._canvas,i=n.getContainer();if(t.position=e,t.container=this._createContainer(),t.headerEntries){var r=this._createEntries(t.headerEntries,"djs-popup-header");t.container.appendChild(r)}if(t.entries){var o=this._createEntries(t.entries,"djs-popup-body");t.container.appendChild(o)}return this._attachContainer(t.container,i,e.cursor),this},i.prototype.close=function(){this.isOpen()&&(this._unbindHandlers(),l(this._current.container),this._current.container=null)},i.prototype.isOpen=function(){return!!this._current.container},i.prototype.trigger=function(e){e.preventDefault();var t=e.delegateTarget||e.target,n=u(t,h),i=this._getEntry(n);return i.action?i.action.call(null,e,i):void 0},i.prototype._getEntry=function(e){var t={id:e},n=a(this._current.entries,t)||a(this._current.headerEntries,t);if(!n)throw new Error("entry not found");return n},i.prototype._createContainer=function(){var e=c('<div class="djs-popup">'),t=this._current.position,n=this._current.className;return o(e.style,{position:"absolute",left:t.x+"px",top:t.y+"px",visibility:"hidden"}),p(e).add(n),e},i.prototype._attachContainer=function(e,t,n){var i=this;s.bind(e,".entry","click",function(e){i.trigger(e)});var r=this._canvas.zoom();e.style.transformOrigin="top left",e.style.transform="scale("+r+")",t.appendChild(e),n&&this._assureIsInbounds(e,n),this._bindHandlers()},i.prototype._assureIsInbounds=function(e,t){var n,i,r=this._canvas,a=r._container.getBoundingClientRect(),s=e.offsetLeft,c=e.offsetTop,p=e.scrollWidth,u=e.scrollHeight,l={},h={x:t.x-a.left,y:t.y-a.top};s+p>a.width&&(l.x=!0),c+u>a.height&&(l.y=!0),l.x&&l.y?(n=h.x-p+"px",i=h.y-u+"px"):l.x?(n=h.x-p+"px",i=h.y+"px"):l.y&&(n=h.x+"px",i=h.y-u+"px"),o(e.style,{left:n,top:i},{visibility:"visible","z-index":1e3})},i.prototype._createEntries=function(e,t){var n=c("<div>"),i=this;return p(n).add(t),r(e,function(e){var t=i._createEntry(e,n);n.appendChild(t)}),n},i.prototype._createEntry=function(e){if(!e.id)throw new Error("every entry must have the id property set");var t=c("<div>"),n=p(t);if(n.add("entry"),e.className&&n.add(e.className),u(t,h,e.id),e.label){var i=c("<span>");i.textContent=e.label,t.appendChild(i)}return e.imageUrl&&t.appendChild(c('<img src="'+e.imageUrl+'" />')),e.active===!0&&n.add("active"),e.disabled===!0&&n.add("disabled"),e.title&&(t.title=e.title),t},i.prototype._bindHandlers=function(){function e(){n.close()}var t=this._eventBus,n=this;t.once("contextPad.close",e),t.once("canvas.viewbox.changing",e),t.once("commandStack.changed",e)},i.prototype._unbindHandlers=function(){function e(){n.close()}var t=this._eventBus,n=this;t.off("contextPad.close",e),t.off("canvas.viewbox.changed",e),t.off("commandStack.changed",e)},t.exports=i},{254:254,255:255,377:377,389:389,390:390,393:393,394:394,398:398}],175:[function(e,t,n){"use strict";t.exports={__init__:["popupMenu"],popupMenu:["type",e(174)]}},{174:174}],176:[function(e,t,n){"use strict";function i(e){this._modeling=e}t.exports=i,i.$inject=["modeling"],i.prototype.replaceElement=function(e,t,n){var i=this._modeling,r=null;return e.waypoints||(t.x=e.x+(t.width||e.width)/2,t.y=e.y+(t.height||e.height)/2,r=i.replaceShape(e,t,n)),r}},{}],177:[function(e,t,n){"use strict";t.exports={__init__:["replace"],replace:["type",e(176)]}},{176:176}],178:[function(e,t,n){"use strict";function i(e,t,n,i){this._dragging=i,this._rules=t;var r=this;e.on("resize.start",function(e){var t=e.context,n=t.resizeConstraints,i=t.minBounds;void 0===n&&(void 0===i&&(i=r.computeMinResizeBox(t)),t.resizeConstraints={min:s(i)})}),e.on("resize.move",function(e){var t,n,i=e.context,o=i.shape,s=i.direction,c=i.resizeConstraints;t={x:e.dx,y:e.dy},i.delta=t,n=a.resizeBounds(o,s,t),i.newBounds=a.ensureConstraints(n,c),i.canExecute=r.canResize(i)}),e.on("resize.end",function(e){var t=e.context,i=t.shape,r=t.canExecute,o=t.newBounds;r&&(o=c(o),n.resizeShape(i,o))})}var r=e(383),o=e(377),a=e(180),s=e(208).asTRBL,c=e(208).roundBounds,p=10;i.prototype.canResize=function(e){var t=this._rules,n=r(e,["newBounds","shape","delta","direction"]);return t.allowed("shape.resize",n)},i.prototype.activate=function(e,t,n){var i,r,a=this._dragging;if("string"==typeof n&&(n={direction:n}),i=o({shape:t},n),r=i.direction,!r)throw new Error("must provide a direction (nw|se|ne|sw)");a.init(e,"resize",{autoActivate:!0,cursor:"resize-"+(/nw|se/.test(r)?"nwse":"nesw"),data:{shape:t,context:i}})},i.prototype.computeMinResizeBox=function(e){var t,n,i=e.shape,r=e.direction;return t=e.minDimensions||{width:p,height:p},n=a.computeChildrenBBox(i,e.childrenBoxPadding),a.getMinResizeBounds(r,i,t,n)},i.$inject=["eventBus","rules","modeling","dragging"],t.exports=i},{180:180,208:208,377:377,383:383}],179:[function(e,t,n){"use strict";function i(e,t,n,i){this._resize=i,this._canvas=t;var o=this;e.on("selection.changed",function(e){var t=e.newSelection;o.removeResizers(),1===t.length&&r(t,o.addResizer,o)}),e.on("shape.changed",function(e){var t=e.element;n.isSelected(t)&&(o.removeResizers(),o.addResizer(t))})}var r=e(255),o=e(240),a=-2,s=5,c=20,p="djs-resizer",u=e(395),l=e(228).isPrimaryButton,h=e(208).asTRBL;i.prototype.makeDraggable=function(e,t,n){function i(t){l(t)&&r.activate(t,e,n)}var r=this._resize;u.bind(t.node,"mousedown",i),u.bind(t.node,"touchstart",i)},i.prototype._createResizer=function(e,t,n,i,r){var u=this._getResizersParent(),l=u.group().addClass(p).addClass(p+"-"+e.id).addClass(p+"-"+r),h=-s+a;l.rect(h,h,s,s).addClass(p+"-visual"),l.rect(h,h,c,c).addClass(p+"-hit");var d=(new o.Matrix).translate(t,n).rotate(i,0,0);return l.transform(d),l},i.prototype.createResizer=function(e,t){var n,i=h(e);n="nw"===t?this._createResizer(e,i.left,i.top,0,t):"ne"===t?this._createResizer(e,i.right,i.top,90,t):"se"===t?this._createResizer(e,i.right,i.bottom,180,t):this._createResizer(e,i.left,i.bottom,270,t),this.makeDraggable(e,n,t)},i.prototype.addResizer=function(e){var t=this._resize;t.canResize({shape:e})&&(this.createResizer(e,"nw"),this.createResizer(e,"ne"),this.createResizer(e,"se"),this.createResizer(e,"sw"))},i.prototype.removeResizers=function(){var e=this._getResizersParent(),t=e.selectAll("."+p);r(t,function(e){e.remove()})},i.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},i.$inject=["eventBus","canvas","selection","resize"],t.exports=i},{208:208,228:228,240:240,255:255,395:395}],180:[function(e,t,n){"use strict";function i(e){return"number"==typeof e}function r(e,t,n){var r=t[e],o=n.min&&n.min[e],a=n.max&&n.max[e];return i(o)&&(r=(/top|left/.test(e)?l:u)(r,o)),i(a)&&(r=(/top|left/.test(e)?u:l)(r,a)),r}function o(e,t){return"undefined"!=typeof e?e:h}function a(e,t){var n,i,r,a;return"object"==typeof t?(n=o(t.left),i=o(t.right),r=o(t.top),a=o(t.bottom)):n=i=r=a=o(t),{x:e.x-n,y:e.y-r,width:e.width+n+i,height:e.height+r+a}}function s(e){return e.waypoints?!1:"label"!==e.type}function c(e,t){var n;return n=void 0===e.length?p(e.children,s):e,n.length?a(d(n),t):void 0}var p=e(253),u=Math.max,l=Math.min,h=20,d=e(221).getBBox,f=e(208).asTRBL,m=e(208).asBounds;t.exports.substractTRBL=function(e,t){return{top:e.top-t.top,right:e.right-t.right,bottom:e.bottom-t.bottom,left:e.left-t.left}},t.exports.resizeBounds=function(e,t,n){var i=n.x,r=n.y;switch(t){case"nw":return{x:e.x+i,y:e.y+r,width:e.width-i,height:e.height-r};case"sw":return{x:e.x+i,y:e.y,width:e.width-i,height:e.height+r};case"ne":return{x:e.x,y:e.y+r,width:e.width+i,height:e.height-r};case"se":return{x:e.x,y:e.y,width:e.width+i,height:e.height+r};default:throw new Error("unrecognized direction: "+t)}},t.exports.resizeTRBL=function(e,t){return{x:e.x+(t.left||0),y:e.y+(t.top||0),width:e.width-(t.left||0)+(t.right||0),height:e.height-(t.top||0)+(t.bottom||0)}},t.exports.reattachPoint=function(e,t,n){var i=e.width/t.width,r=e.height/t.height;return{x:Math.round(t.x+t.width/2)-Math.floor((e.x+e.width/2-n.x)/i),y:Math.round(t.y+t.height/2)-Math.floor((e.y+e.height/2-n.y)/r)}},t.exports.ensureConstraints=function(e,t){if(!t)return e;var n=f(e);return m({top:r("top",n,t),right:r("right",n,t),bottom:r("bottom",n,t),left:r("left",n,t)})},t.exports.getMinResizeBounds=function(e,t,n,i){var r=f(t),o={top:/n/.test(e)?r.bottom-n.height:r.top,left:/w/.test(e)?r.right-n.width:r.left,bottom:/s/.test(e)?r.top+n.height:r.bottom,right:/e/.test(e)?r.left+n.width:r.right},a=i?f(i):o,s={top:l(o.top,a.top),left:l(o.left,a.left),bottom:u(o.bottom,a.bottom),right:u(o.right,a.right)};return m(s)},t.exports.addPadding=a,t.exports.computeChildrenBBox=c},{208:208,221:221,253:253}],181:[function(e,t,n){"use strict";function i(e,t){this._canvas=t;var n=this;e.on("resize.start",s,function(e){var i=e.context,r=i.shape;t.addMarker(r,o),n.create(i)}),e.on("resize.move",s,function(e){var t=e.context;n.update(t)}),e.on("resize.cleanup",function(e){var i=e.context,r=i.shape;t.removeMarker(r,o),n.remove(i)})}var r=e(240),o="djs-resizing",a="resize-not-ok",s=500;i.prototype.create=function(e){var t,n=this._canvas.getDefaultLayer(),i=e.shape;t=e.frame=r.create("rect",{"class":"djs-resize-overlay",width:i.width+10,height:i.height+10,x:i.x-5,y:i.y-5}),t.appendTo(n)},i.prototype.update=function(e){var t=e.frame,n=e.newBounds;n.width>5&&t.attr({x:n.x,width:n.width}),n.height>5&&t.attr({y:n.y,height:n.height}),t[e.canExecute?"removeClass":"addClass"](a)},i.prototype.remove=function(e){e.frame&&e.frame.remove()},i.$inject=["eventBus","canvas"],t.exports=i},{240:240}],182:[function(e,t,n){t.exports={__depends__:[e(163),e(185),e(129)],__init__:["resize","resizeVisuals","resizeHandles"],resize:["type",e(178)],resizeVisuals:["type",e(181)],resizeHandles:["type",e(179)]}},{129:129,163:163,178:178,179:179,181:181,185:185}],183:[function(e,t,n){"use strict";function i(e){o.call(this,e),this.init()}var r=e(243),o=e(98);i.$inject=["eventBus"],r(i,o),t.exports=i,i.prototype.addRule=function(e,t,n){var i=this;"string"==typeof e&&(e=[e]),e.forEach(function(e){i.canExecute(e,t,function(e,t,i){return n(e)},!0)})},i.prototype.init=function(){}},{243:243,98:98}],184:[function(e,t,n){"use strict";function i(e){this._commandStack=e}i.$inject=["commandStack"],t.exports=i,i.prototype.allowed=function(e,t){var n=this._commandStack.canExecute(e,t);return void 0===n?!0:n}},{}],185:[function(e,t,n){t.exports={__depends__:[e(100)],__init__:["rules"],rules:["type",e(184)]}},{100:100,184:184}],186:[function(e,t,n){"use strict";function i(e){this._eventBus=e,this._selectedElements=[];var t=this;e.on(["shape.remove","connection.remove"],function(e){var n=e.element;t.deselect(n)}),e.on(["diagram.clear"],function(e){t.select(null)})}var r=e(368),o=e(255);i.$inject=["eventBus"],t.exports=i,i.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},i.prototype.get=function(){return this._selectedElements},i.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},i.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();r(e)||(e=e?[e]:[]),t?o(e,function(e){-1===n.indexOf(e)&&n.push(e)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})}},{255:255,368:368}],187:[function(e,t,n){"use strict";function i(e,t,n,i){e.on("create.end",500,function(e){e.context.canExecute&&t.select(e.context.shape)}),e.on("connect.end",500,function(e){e.context.canExecute&&e.context.target&&t.select(e.context.target)}),e.on("shape.move.end",500,function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);r&&-1===n.indexOf(r)&&t.select(r)}),e.on("element.click",function(e){var i=e.element;i===n.getRootElement()&&(i=null);var o=t.isSelected(i),a=t.get().length>1,s=r(e);return o&&a?s?t.deselect(i):t.select(i):void(o?t.deselect(i):t.select(i,s))})}var r=e(228).hasPrimaryModifier;i.$inject=["eventBus","selection","canvas","elementRegistry"],t.exports=i},{228:228}],188:[function(e,t,n){"use strict";function i(e,t,n,i,s){function c(e,n){t.addMarker(e,n)}function p(e,n){t.removeMarker(e,n)}this._multiSelectionBox=null,e.on("element.hover",function(e){c(e.element,o)}),e.on("element.out",function(e){p(e.element,o)}),e.on("selection.changed",function(e){function t(e){p(e,a)}function n(e){c(e,a)}var i=e.oldSelection,o=e.newSelection;r(i,function(e){-1===o.indexOf(e)&&t(e)}),r(o,function(e){-1===i.indexOf(e)&&n(e)})})}var r=e(255),o="hover",a="selected";i.$inject=["eventBus","canvas","selection","graphicsFactory","styles"],t.exports=i},{255:255}],189:[function(e,t,n){t.exports={__init__:["selectionVisuals","selectionBehavior"],__depends__:[e(135),e(169)],selection:["type",e(186)],selectionVisuals:["type",e(188)],selectionBehavior:["type",e(187)]}},{135:135,169:169,186:186,187:187,188:188}],190:[function(e,t,n){"use strict";function i(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function r(e){this._snapValues={}}var o=e(255),a=e(191).snapTo;i.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},i.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},i.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},i.prototype.getSnapLocations=function(){return this._snapLocations},i.prototype.setSnapLocations=function(e){this._snapLocations=e},i.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new r,n.initDefaults(this._defaultSnaps)),n},t.exports=i,r.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),-1===n.x.indexOf(t.x)&&n.x.push(t.x),-1===n.y.indexOf(t.y)&&n.y.push(t.y)},r.prototype.snap=function(e,t,n,i){var r=this._snapValues[t];return r&&a(e[n],r[n],i)},r.prototype.initDefaults=function(e){var t=this;o(e||{},function(e,n){o(e,function(e){t.add(n,e)})})}},{191:191,255:255}],191:[function(e,t,n){"use strict";function i(e,t,n){n=void 0===n?10:n;var i,r;for(i=0;i<t.length;i++)if(r=t[i],s(r-e)<=n)return r}function r(e){return{x:e.x,y:e.y}}function o(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:c(e.x+e.width/2),y:c(e.y+e.height/2)}}function a(e){return{x:e.x+e.width,y:e.y+e.height}}var s=Math.abs,c=Math.round;t.exports.snapTo=i,t.exports.topLeft=r,t.exports.mid=o,t.exports.bottomRight=a,t.exports.isSnapped=function(e,t){var n=e.snapped;return n?"string"==typeof t?n[t]:n.x&&n.y:!1},t.exports.setSnapped=function(e,t,n){if("string"!=typeof t)throw new Error("axis must be in [x, y]");if("number"!=typeof n&&n!==!1)throw new Error("value must be Number or false");var i,r=e[t],o=e.snapped=e.snapped||{};return n===!1?o[t]=!1:(o[t]=!0,i=n-r,e[t]+=i,e["d"+t]+=i),r}},{}],192:[function(e,t,n){"use strict";function i(e,t){this._canvas=t;var n=this;e.on(["shape.move.start","create.start"],function(e){n.initSnap(e)}),e.on(["shape.move.move","shape.move.end","create.move","create.end"],function(e){e.originalEvent&&e.originalEvent.ctrlKey||u(e)||n.snap(e)}),e.on(["shape.move.cleanup","create.cleanup"],function(e){n.hide()}),this._asyncHide=a(this.hide,1e3)}var r=e(253),o=e(255),a=e(265),s=e(191).mid,c=e(190),p=e(191),u=p.isSnapped,l=p.setSnapped;i.$inject=["eventBus","canvas"],t.exports=i,i.prototype.initSnap=function(e){var t=e.context,n=t.shape,i=t.snapContext;i||(i=t.snapContext=new c);var r=s(n,e);return i.setSnapOrigin("mid",{x:r.x-e.x,y:r.y-e.y}),i},i.prototype.snap=function(e){var t=e.context,n=t.snapContext,i=t.shape,r=t.target,a=n.getSnapLocations();if(r){var s=n.pointsForTarget(r);s.initialized||(this.addTargetSnaps(s,i,r),s.initialized=!0);var c={x:u(e,"x"),y:u(e,"y")};o(a,function(t){var i=n.getSnapOrigin(t),r={x:e.x+i.x,y:e.y+i.y};return o(["x","y"],function(e){var n;c[e]||(n=s.snap(r,t,e,7),void 0!==n&&(c[e]={value:n,originValue:n-i[e]}))}),c.x&&c.y?!1:void 0}),this.showSnapLine("vertical",c.x&&c.x.value),this.showSnapLine("horizontal",c.y&&c.y.value),o(["x","y"],function(t){var n=c[t];"object"==typeof n&&l(e,t,n.originValue)})}},i.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=t.path("M0,0 L0,0").addClass("djs-snap-line");return{update:function(t){"number"!=typeof t?n.attr({display:"none"}):"horizontal"===e?n.attr({path:"M-100000,"+t+" L+100000,"+t,display:""}):n.attr({path:"M "+t+",-100000 L "+t+", +100000",display:""})}}},i.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},i.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},i.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},i.prototype.hide=function(){o(this._snapLines,function(e){e.update()})},i.prototype.addTargetSnaps=function(e,t,n){var i=this.getSiblings(t,n);o(i,function(t){e.add("mid",s(t))})},i.prototype.getSiblings=function(e,t){return t&&r(t.children,function(t){return!t.hidden&&!t.labelTarget&&!t.waypoints&&t.host!==e&&t!==e})}},{190:190,191:191,253:253,255:255,265:265}],193:[function(e,t,n){"use strict";function i(e,t,n,i,r,o){this._canvas=n,this._dragging=t,this._modeling=i,this._rules=r,this._toolManager=o;var a=this;o.registerTool("space",{tool:"spaceTool.selection",dragging:"spaceTool"}),e.on("spaceTool.selection.end",function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("spaceTool.selection.ended",function(){a.activateMakeSpace(t.originalEvent)})}),e.on("spaceTool.move",p,function(e){var t=e.context;t.initialized||(t.initialized=a.initializeMakeSpace(e,t))}),e.on("spaceTool.end",function(e){var t=e.context,n=t.axis,i=t.direction,r=t.movingShapes,o=t.resizingShapes;if(t.initialized){var s={x:c(e.dx),y:c(e.dy)};s[h[n]]=0,a.makeSpace(r,o,s,i)}})}var r=e(195),o=e(220),a=e(228).hasPrimaryModifier,s=Math.abs,c=Math.round,p=1500,u="crosshair",l={x:"width",y:"height"},h={x:"y",y:"x"},d=e(221).selfAndAllChildren,f=e(377);i.$inject=["eventBus","dragging","canvas","modeling","rules","toolManager"],t.exports=i,i.prototype.activateSelection=function(e,t){this._dragging.init(e,"spaceTool.selection",{trapClick:!1,cursor:u,autoActivate:t,data:{context:{}}})},i.prototype.activateMakeSpace=function(e){this._dragging.init(e,"spaceTool",{autoActivate:!0,cursor:u,data:{context:{}}})},i.prototype.makeSpace=function(e,t,n,i){return this._modeling.createSpace(e,t,n,i)},i.prototype.initializeMakeSpace=function(e,t){var n=s(e.dx)>s(e.dy)?"x":"y",i=e["d"+n],c=e[n]-i;if(s(i)<5)return!1;a(e)&&(i*=-1);var p=this._canvas.getRootElement(),u=d(p,!0),l=this.calculateAdjustments(u,n,i,c);return f(t,l,{axis:n,direction:r.getDirection(n,i)}),o.set("resize-"+("x"===n?"ew":"ns")),!0},i.prototype.calculateAdjustments=function(e,t,n,i){var r=[],o=[],a=this._rules;return e.forEach(function(e){var s=e[t],c=s+e[l[t]];if(e.parent&&!e.waypoints)return n>0&&s>i?r.push(e):0>n&&i>c?r.push(e):i>s&&c>i&&a.allowed("shape.resize",{shape:e})?o.push(e):void 0}),{movingShapes:r,resizingShapes:o}},i.prototype.toggle=function(){this.isActive()?this._dragging.cancel():this.activateSelection()},i.prototype.isActive=function(){var e=this._dragging.context();return e&&/^spaceTool/.test(e.prefix)}},{195:195,220:220,221:221,228:228,377:377}],194:[function(e,t,n){"use strict";function i(e,t,n,i){function a(e){return t.getGraphics(e)}function s(e,t){var n=a(e),r=n.clone(),o=n.getBBox();r.attr(i.cls("djs-dragger",[],{x:o.x,y:o.y})),t.add(r)}e.on("spaceTool.selection.start",function(e){var t=n.getLayer("space"),r=e.context,o={x:"M 0,-10000 L 0,10000",y:"M -10000,0 L 10000,0"},a=t.group().attr(i.cls("djs-crosshair-group",["no-events"]));a.path(o.x).addClass("djs-crosshair"),a.path(o.y).addClass("djs-crosshair"),r.crosshairGroup=a}),e.on("spaceTool.selection.move",function(e){var t=e.context.crosshairGroup;t.translate(e.x,e.y)}),e.on("spaceTool.selection.cleanup",function(e){var t=e.context,n=t.crosshairGroup;n&&n.remove()}),e.on("spaceTool.move",function(e){var t=e.context,a=t.line,c=t.axis,p=t.movingShapes;if(t.initialized){if(!t.dragGroup){var u=n.getLayer("space");a=u.path("M0,0 L0,0").addClass("djs-crosshair"),t.line=a;var l=n.getDefaultLayer().group().attr(i.cls("djs-drag-group",["no-events"]));r(p,function(e){s(e,l),n.addMarker(e,o)}),t.dragGroup=l}var h={x:"M"+e.x+", -10000 L"+e.x+", 10000",y:"M -10000, "+e.y+" L 10000, "+e.y};a.attr({path:h[c],display:""});var d={x:"y",y:"x"},f={x:e.dx,y:e.dy};f[d[t.axis]]=0,t.dragGroup.translate(f.x,f.y)}}),e.on("spaceTool.cleanup",function(e){var t=e.context,i=t.movingShapes,a=t.line,s=t.dragGroup;r(i,function(e){n.removeMarker(e,o)}),s&&(a.remove(),s.remove())})}var r=e(255),o="djs-dragging";i.$inject=["eventBus","elementRegistry","canvas","styles"],t.exports=i},{255:255}],195:[function(e,t,n){"use strict";function i(e,t){if("x"===e){if(t>0)return"e";if(0>t)return"w"}if("y"===e){if(t>0)return"s";if(0>t)return"n"}return null}t.exports.getDirection=i,t.exports.resizeBounds=function(e,t,n){var i=n.x,r=n.y;switch(t){case"n":return{x:e.x,y:e.y+r,width:e.width,height:e.height-r};case"s":return{x:e.x,y:e.y,width:e.width,height:e.height+r};case"w":return{x:e.x+i,y:e.y,width:e.width-i,height:e.height};case"e":return{x:e.x,y:e.y,width:e.width+i,height:e.height};default:throw new Error("unrecognized direction: "+t)}}},{}],196:[function(e,t,n){"use strict";t.exports={__init__:["spaceToolVisuals"],__depends__:[e(129),e(163),e(185),e(198)],spaceTool:["type",e(193)],spaceToolVisuals:["type",e(194)]}},{129:129,163:163,185:185,193:193,194:194,198:198}],197:[function(e,t,n){"use strict";function i(e,t){this._eventBus=e,this._dragging=t,this._tools=[],this._active=null}var r=e(255),o=250;i.$inject=["eventBus","dragging"],t.exports=i,i.prototype.registerTool=function(e,t){var n=this._tools;if(!t)throw new Error('A tool has to be registered with it\'s "events"');n.push(e),this.bindEvents(e,t)},i.prototype.isActive=function(e){return e&&this._active===e},i.prototype.length=function(e){return this._tools.length},i.prototype.setActive=function(e){var t=this._eventBus;this._active!==e&&(this._active=e,t.fire("tool-manager.update",{tool:e}))},i.prototype.bindEvents=function(e,t){var n=this._eventBus,i=this._dragging,a=[];n.on(t.tool+".init",function(t){var n=t.context;return!n.reactivate&&this.isActive(e)?(this.setActive(null),void i.cancel()):void this.setActive(e)},this),r(t,function(e){a.push(e+".ended"),a.push(e+".canceled")}),n.on(a,o,function(e){var t=e.originalEvent;!this._active||t&&"tools"===t.target.parentElement.getAttribute("data-group")||this.setActive(null)},this)}},{255:255}],198:[function(e,t,n){"use strict";t.exports={__depends__:[e(129)],__init__:["toolManager"],toolManager:["type",e(197)]}},{129:129,197:197}],199:[function(e,t,n){"use strict";function i(e){var t=u('<div class="djs-tooltip-container" style="position: absolute; width: 0; height: 0;" />');return e.insertBefore(t,e.firstChild),t}function r(e,t,n){c(e.style,{left:t+"px",top:n+"px"})}function o(e,t){e.style.display=t===!1?"none":""}function a(e,t){this._eventBus=e,this._canvas=t,this._ids=m,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=i(t.getContainer());var n=this;f.bind(this._tooltipRoot,y,"mousedown",function(e){e.stopPropagation()}),f.bind(this._tooltipRoot,y,"mouseover",function(e){n.trigger("mouseover",e)}),f.bind(this._tooltipRoot,y,"mouseout",function(e){n.trigger("mouseout",e)}),this._init()}var s=e(374),c=e(377),p=e(255),u=e(394),l=e(389),h=e(390),d=e(398),f=e(393),m=new(e(225))("tt"),v="djs-tooltip",y="."+v;a.$inject=["eventBus","canvas"],t.exports=a,a.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=c({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},a.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,i=this.get(l(n,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},a.prototype.get=function(e){return"string"!=typeof e&&(e=e.id),this._tooltips[e]},a.prototype.clearTimeout=function(e){if(e=this.get(e)){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},a.prototype.setTimeout=function(e){if(e=this.get(e)){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout(function(){t.remove(e)},e.timeout)}},a.prototype.remove=function(e){var t=this.get(e);t&&(d(t.html),d(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},a.prototype.show=function(){o(this._tooltipRoot)},a.prototype.hide=function(){o(this._tooltipRoot,!1)},a.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},a.prototype._addTooltip=function(e){var t,n=e.id,i=e.html,r=this._tooltipRoot;i.get&&(i=i.get(0)),s(i)&&(i=u(i)),t=u('<div data-tooltip-id="'+n+'" class="'+v+'" style="position: absolute">'),t.appendChild(i),e.type&&h(t).add("djs-tooltip-"+e.type),e.className&&h(t).add(e.className),e.htmlContainer=t,r.appendChild(t),this._tooltips[n]=e,this._updateTooltip(e)},a.prototype._updateTooltip=function(e){var t=e.position,n=e.htmlContainer;r(n,t.x,t.y)},a.prototype._updateTooltipVisibilty=function(e){p(this._tooltips,function(t){var n=t.show,i=t.htmlContainer,r=!0;n&&((n.minZoom>e.scale||n.maxZoom<e.scale)&&(r=!1),o(i,r))})},a.prototype._init=function(){function e(e){t._updateRoot(e),t._updateTooltipVisibilty(e),t.show()}var t=this;this._eventBus.on("canvas.viewbox.changing",function(e){t.hide()}),this._eventBus.on("canvas.viewbox.changed",function(t){e(t.viewbox)})}},{225:225,255:255,374:374,377:377,389:389,390:390,393:393,394:394,398:398}],200:[function(e,t,n){t.exports={__init__:["tooltips"],tooltips:["type",e(199)]}},{199:199}],201:[function(e,t,n){"use strict";function i(e,t){var n=this;t.on("canvas.init",function(e){n.addBBoxMarker(e.svg)})}i.$inject=["canvas","eventBus"],t.exports=i,i.prototype.addBBoxMarker=function(e){var t={fill:"none","class":"outer-bound-marker"};e.rect(-1e4,-1e4,10,10).attr(t),e.rect(1e4,1e4,10,10).attr(t)}},{}],202:[function(e,t,n){"use strict";function i(){}function r(e,t){return t.get(e,!1)}function o(e){function t(e){h.stopEvent(e,!0)}function n(n){s(m,function(n){c.bind(e,n,t,!0)})}function r(n){setTimeout(function(){s(m,function(n){c.unbind(e,n,t,!0)})},500)}c.bind(e,"touchstart",n,!0),c.bind(e,"touchend",r,!0),c.bind(e,"touchcancel",r,!0);var o=new u.Manager(e,{inputClass:u.TouchInput,recognizers:[]}),a=new u.Tap,p=new u.Pan({threshold:10}),l=new u.Press,d=new u.Pinch,f=new u.Tap({event:"doubletap",taps:2});return d.requireFailure(p),d.requireFailure(l),o.add([p,l,d,f,a]),o.reset=function(e){var t=this.recognizers,n=this.session;n.stopped||(i("recognizer","stop"),o.stop(e),
|
|
setTimeout(function(){var e,r;for(i("recognizer","reset"),e=0;r=t[e];e++)r.reset(),r.state=8;n.curRecognizer=null},0))},o.on("hammer.input",function(e){e.srcEvent.defaultPrevented&&o.reset(!0)}),o}function a(e,t,n,a,s){function c(e){return function(t){i("element",e,t),s.fire(e,t)}}function u(e){var t=p(e,"svg, .djs-element",!0);return t&&new l(t)}function m(e){function n(e){function n(e){var n=e.deltaX-o,i=e.deltaY-a;t.scroll({dx:n,dy:i}),o=e.deltaX,a=e.deltaY}function r(e){v.off("panmove",n),v.off("panend",r),v.off("pancancel",r),i("canvas","grab end")}i("canvas","grab start");var o=0,a=0;v.on("panmove",n),v.on("panend",r),v.on("pancancel",r)}function r(e){var r=u(e.target),o=r&&a.get(r);return g&&t.getRootElement()!==o?(i("element","move start",o,e,!0),g.start(e,o,!0)):void n(e)}function s(e){function n(e){var n=1-(1-e.scale)/1.5,i=Math.max(d,Math.min(f,n*o));t.zoom(i,a),h.stopEvent(e,!0)}function r(e){v.off("pinchmove",n),v.off("pinchend",r),v.off("pinchcancel",r),v.reset(!0),i("canvas","zoom end")}i("canvas","zoom start");var o=t.zoom(),a=e.center;v.on("pinchmove",n),v.on("pinchend",r),v.on("pinchcancel",r)}v=o(e),v.on("doubletap",c("element.dblclick")),v.on("tap",c("element.click")),v.on("panstart",r),v.on("press",r),v.on("pinchstart",s)}var v,y=r("dragging",e),g=r("move",e),x=r("contextPad",e),b=r("palette",e);y&&n.on("drag.move",function(e){var t=e.originalEvent;if(t&&!(t instanceof MouseEvent)){var n=h.toPoint(t),i=document.elementFromPoint(n.x,n.y),r=u(i),o=r&&a.get(r);o!==e.hover&&(e.hover&&y.out(e),o&&(y.hover({element:o,gfx:r}),e.hover=o,e.hoverGfx=r))}}),x&&n.on("contextPad.create",function(e){var t=e.pad.html,n=o(t);n.on("panstart",function(e){i("context-pad","panstart",e),x.trigger("dragstart",e,!0)}),n.on("press",function(e){i("context-pad","press",e),x.trigger("dragstart",e,!0)}),n.on("tap",function(e){i("context-pad","tap",e),x.trigger("click",e)})}),b&&n.on("palette.create",function(e){var t=e.html,n=o(t);n.on("panstart",function(e){i("palette","panstart",e),b.trigger("dragstart",e,!0)}),n.on("press",function(e){i("palette","press",e),b.trigger("dragstart",e,!0)}),n.on("tap",function(e){i("palette","tap",e),b.trigger("click",e)})}),n.on("canvas.init",function(e){m(e.svg.node)})}var s=e(255),c=e(395),p=e(392),u=e(238),l=e(240),h=e(222),d=.2,f=4,m=["mousedown","mouseup","mouseover","mouseout","click","dblclick"];a.$inject=["injector","canvas","eventBus","elementRegistry","interactionEvents","touchFix"],t.exports=a},{222:222,238:238,240:240,255:255,392:392,395:395}],203:[function(e,t,n){t.exports={__depends__:[e(135)],__init__:["touchInteractionEvents"],touchInteractionEvents:["type",e(202)],touchFix:["type",e(201)]}},{135:135,201:201,202:202}],204:[function(e,t,n){t.exports={translate:["value",e(205)]}},{205:205}],205:[function(e,t,n){"use strict";t.exports=function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(e,n){return t[n]||"{"+n+"}"})}},{}],206:[function(e,t,n){"use strict";function i(){}var r=e(208).getMid;t.exports=i,i.prototype.layoutConnection=function(e,t){return[r(e.source),r(e.target)]}},{208:208}],207:[function(e,t,n){"use strict";function i(e){return o({original:e.point.original||e.point},e.actual)}function r(e,t){this._elementRegistry=e,this._graphicsFactory=t}var o=e(377),a=e(208);r.$inject=["elementRegistry","graphicsFactory"],t.exports=r,r.prototype.getCroppedWaypoints=function(e,t,n){t=t||e.source,n=n||e.target;var r=this.getDockingPoint(e,t,!0),o=this.getDockingPoint(e,n),a=e.waypoints.slice(r.idx+1,o.idx);return a.unshift(i(r)),a.push(i(o)),a},r.prototype.getDockingPoint=function(e,t,n){var i,r,o,a=e.waypoints;return i=n?0:a.length-1,r=a[i],o=this._getIntersection(t,e,n),{point:r,actual:o||r,idx:i}},r.prototype._getIntersection=function(e,t,n){var i=this._getShapePath(e),r=this._getConnectionPath(t);return a.getElementLineIntersection(i,r,n)},r.prototype._getConnectionPath=function(e){return this._graphicsFactory.getConnectionPath(e)},r.prototype._getShapePath=function(e){return this._graphicsFactory.getShapePath(e)},r.prototype._getGfx=function(e){return this._elementRegistry.getGraphics(e)}},{208:208,377:377}],208:[function(e,t,n){"use strict";function i(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function r(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function o(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function a(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function s(e){return r({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function c(e,t,n){n=n||0,l(n)||(n={x:n,y:n});var i=o(e),r=o(t),a=i.bottom+n.y<=r.top,s=i.left-n.x>=r.right,c=i.top-n.y>=r.bottom,p=i.right+n.x<=r.left,u=a?"top":c?"bottom":null,h=p?"left":s?"right":null;return h&&u?u+"-"+h:h||u||"intersect"}function p(e,t,n){var i=u(e,t);return 1===i.length?r(i[0]):2===i.length&&d(i[0],i[1])<1?r(i[0]):i.length>1?(i=h(i,function(e){var t=Math.floor(100*e.t2)||1;return t=100-t,t=(10>t?"0":"")+t,e.segment2+"#"+t}),r(i[n?0:i.length-1])):null}function u(e,t){return f.path.intersection(e,t)}var l=e(372),h=e(262),d=e(223).pointDistance,f=e(240);t.exports.roundBounds=i,t.exports.roundPoint=r,t.exports.asTRBL=o,t.exports.asBounds=a,t.exports.getMid=s,t.exports.getOrientation=c,t.exports.getElementLineIntersection=p,t.exports.getIntersections=u},{223:223,240:240,262:262,372:372}],209:[function(e,t,n){"use strict";function i(e,t,n){return e>=t&&n>=e}function r(e,t,n){var r={x:"width",y:"height"};return i(t[e],n[e],n[e]+n[r[e]])}function o(e,t){switch(e){case"intersect":return null;case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t}}var a=e(368),s=e(254),c=e(249),p=e(377),u=e(208),l=e(223),h=u.getOrientation,d=u.getMid,f=l.pointsAligned,m=l.pointInRect,v=l.pointDistance,y=20,g={"h:h":20,"v:v":20,"h:v":-10,"v:h":-10};t.exports.getBendpoints=function(e,t,n){n=n||"h:h";var i,r;if("h:v"===n)return[{x:t.x,y:e.y}];if("v:h"===n)return[{x:e.x,y:t.y}];if("h:h"===n)return i=Math.round((t.x-e.x)/2+e.x),[{x:i,y:e.y},{x:i,y:t.y}];if("v:v"===n)return r=Math.round((t.y-e.y)/2+e.y),[{x:e.x,y:r},{x:t.x,y:r}];throw new Error("unknown directions: <"+n+">: directions must be specified as {a direction}:{b direction} (direction in h|v)")},t.exports.connectPoints=function(e,t,n){var i=[];return f(e,t)||(i=this.getBendpoints(e,t,n)),i.unshift(e),i.push(t),i},t.exports.connectRectangles=function(e,t,n,i,r){var a=r&&r.preferredLayouts||[],s=c(a,"straight")[0]||"h:h",p=g[s]||0,u=h(e,t,p),l=o(u,s);if(n=n||d(e),i=i||d(t),l){if("h:h"===l)switch(u){case"top-right":case"right":case"bottom-right":n={original:n,x:e.x,y:n.y},i={original:i,x:t.x+t.width,y:i.y};break;case"top-left":case"left":case"bottom-left":n={original:n,x:e.x+e.width,y:n.y},i={original:i,x:t.x,y:i.y}}if("v:v"===l)switch(u){case"top-left":case"top":case"top-right":n={original:n,x:n.x,y:e.y+e.height},i={original:i,x:i.x,y:t.y};break;case"bottom-left":case"bottom":case"bottom-right":n={original:n,x:n.x,y:e.y},i={original:i,x:i.x,y:t.y+t.height}}return this.connectPoints(n,i,l)}},t.exports.repairConnection=function(e,t,n,i,r,o){a(n)&&(r=n,o=i,n=d(e),i=d(t)),o=p({preferredLayouts:[]},o);var s,c=o.preferredLayouts,u=-1!==c.indexOf("straight");return u&&(s=this.layoutStraight(e,t,n,i,o)),s||(o.endChanged?(s=this._repairConnectionSide(t,e,i,r.slice().reverse()),s=s&&s.reverse()):o.startChanged?s=this._repairConnectionSide(e,t,n,r):r&&r.length&&(s=r)),s||(s=this.connectRectangles(e,t,n,i,o)),s},t.exports.layoutStraight=function(e,t,n,i,o){var a,s,c,p={};return c=h(e,t),/^(top|bottom|left|right)$/.test(c)?(/top|bottom/.test(c)&&(a="x",s="y"),/left|right/.test(c)&&(a="y",s="x"),r(a,n,t)?(p[a]=n[a],[{x:n.x,y:n.y},{x:void 0!==p.x?p.x:i.x,y:void 0!==p.y?p.y:i.y,original:{x:void 0!==p.x?p.x:i.x,y:void 0!==p.y?p.y:i.y}}]):null):null},t.exports._repairConnectionSide=function(e,t,n,i){function r(e,t,n){return n.length<3?!0:n.length>4?!1:!!s(n,function(e,t){var i=n[t-1];return i&&v(e,i)<3})}function o(e,t,n){var i=f(t,e);switch(i){case"v":return{x:e.x,y:n.y};case"h":return{x:n.x,y:e.y}}return{x:e.x,y:e.y}}function a(e,t,n){var i;for(i=e.length-2;0!==i;i--)if(m(e[i],t,y)||m(e[i],n,y))return e.slice(i);return e}if(r(e,t,i))return null;var c,p=i[0],u=i.slice();return u[0]=n,u[1]=o(u[1],p,n),c=a(u,e,t),c!==u?this._repairConnectionSide(e,t,n,c):u}},{208:208,223:223,249:249,254:254,368:368,377:377}],210:[function(e,t,n){"use strict";function i(){Object.defineProperty(this,"businessObject",{writable:!0}),l.bind(this,"parent"),h.bind(this,"label"),f.bind(this,"outgoing"),m.bind(this,"incoming")}function r(){i.call(this),l.bind(this,"children"),d.bind(this,"host"),d.bind(this,"attachers")}function o(){r.call(this)}function a(){r.call(this),h.bind(this,"labelTarget")}function s(){i.call(this),f.bind(this,"source"),m.bind(this,"target")}var c=e(377),p=e(243),u=e(407),l=new u({name:"children",enumerable:!0,collection:!0},{name:"parent"}),h=new u({name:"label",enumerable:!0},{name:"labelTarget"}),d=new u({name:"attachers",collection:!0},{name:"host"}),f=new u({name:"outgoing",collection:!0},{name:"source"}),m=new u({name:"incoming",collection:!0},{name:"target"});p(r,i),p(o,r),p(a,r),p(s,i);var v={connection:s,shape:r,label:a,root:o};t.exports.create=function(e,t){var n=v[e];if(!n)throw new Error("unknown type: <"+e+">");return c(new n,t)},t.exports.Base=i,t.exports.Root=o,t.exports.Shape=r,t.exports.Connection=s,t.exports.Label=a},{243:243,377:377,407:407}],211:[function(e,t,n){"use strict";function i(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function r(e,t){function n(e){var n=h.start,r=p.toPoint(e),c=s(r,n);if(!h.dragging&&i(c)>u&&(h.dragging=!0,a.install(),o.set("grab")),h.dragging){var l=h.last||h.start;c=s(r,l),t.scroll({dx:c.x,dy:c.y}),h.last=r}e.preventDefault()}function r(e){c.unbind(document,"mousemove",n),c.unbind(document,"mouseup",r),h=null,o.unset(),p.stopEvent(e)}function l(e){e.button||e.ctrlKey||e.shiftKey||e.altKey||(h={start:p.toPoint(e)},c.bind(document,"mousemove",n),c.bind(document,"mouseup",r),p.stopEvent(e))}var h,d=t._container;c.bind(d,"mousedown",l)}var o=e(220),a=e(218),s=e(227).substract,c=e(395),p=e(222),u=15;r.$inject=["eventBus","canvas"],t.exports=r},{218:218,220:220,222:222,227:227,395:395}],212:[function(e,t,n){t.exports={__init__:["moveCanvas"],moveCanvas:["type",e(211)]}},{211:211}],213:[function(e,t,n){t.exports={__depends__:[e(203)]}},{203:203}],214:[function(e,t,n){"use strict";function i(e,t,n){this._enabled=!1,this._canvas=t,this._container=t._container,this._handleWheel=l(this._handleWheel,this);var i=!n||n.enabled!==!1,r=this;e.on("canvas.init",function(e){r._init(i)})}var r=e(395),o=e(228).hasPrimaryModifier,a=e(228).hasSecondaryModifier,s=e(229).isMac,c=e(215).getStepRange,p=e(215).cap,u=e(227).log10,l=e(264),h={min:.2,max:4},d=10;i.$inject=["eventBus","canvas","config.zoomScroll"],t.exports=i,i.prototype.scroll=function(e){this._canvas.scroll(e)},i.prototype.reset=function(){this._canvas.zoom("fit-viewport")},i.prototype.zoom=function(e,t){var n=this._canvas,i=n.zoom(!1),r=Math.pow(1+Math.abs(e),e>0?1:-1);n.zoom(p(h,i*r),t)},i.prototype._handleWheel=function(e){var t=this._container;e.preventDefault();var n,i=o(e),r=a(e);if(i||r){n=s?0===e.deltaMode?1.25:50:0===e.deltaMode?.025:.5;var c={};r?c.dx=n*(e.deltaX||e.deltaY):c.dy=n*e.deltaY,this.scroll(c)}else{n=0===e.deltaMode?.025:.5;var p=t.getBoundingClientRect(),u={x:e.clientX-p.left,y:e.clientY-p.top};this.zoom(e.deltaY*n/-5,u)}},i.prototype.stepZoom=function(e,t){var n=this._canvas,i=c(h,d);e=e>0?1:-1;var r=u(n.zoom()),o=Math.round(r/i)*i;o+=i*e;var a=Math.pow(10,o);n.zoom(p(h,a),t)},i.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return"undefined"==typeof e&&(e=!i),i!==e&&r[e?"bind":"unbind"](t,"wheel",n,!0),this._enabled=e,e},i.prototype._init=function(e){this.toggle(e)}},{215:215,227:227,228:228,229:229,264:264,395:395}],215:[function(e,t,n){"use strict";var i=e(227).log10;t.exports.getStepRange=function(e,t){var n=i(e.min),r=i(e.max),o=Math.abs(n)+Math.abs(r);return o/t},t.exports.cap=function(e,t){return Math.max(e.min,Math.min(e.max,t))}},{227:227}],216:[function(e,t,n){t.exports={__init__:["zoomScroll"],zoomScroll:["type",e(214)]}},{214:214}],217:[function(e,t,n){"use strict";function i(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function r(e,t){return{x:e.x-t.x,y:e.y-t.y}}function o(e,t,n){var o=i(t),a=i(n),c=r(e,o),p={x:c.x*(n.width/t.width),y:c.y*(n.height/t.height)};return s({x:a.x+p.x,y:a.y+p.y})}function a(e,t,n){var o=i(e),a=i(t),c=i(n),p=r(e,o),u=r(o,a),l={x:u.x*(n.width/t.width),y:u.y*(n.height/t.height)},h={x:c.x+l.x,y:c.y+l.y};return s({x:h.x+p.x-e.x,y:h.y+p.y-e.y})}var s=e(208).roundPoint;t.exports.getNewAttachPoint=o,t.exports.getNewAttachShapeDelta=a},{208:208}],218:[function(e,t,n){"use strict";function i(e){s(e),r(!1)}function r(e){a[e?"bind":"unbind"](document.body,"click",i,!0)}function o(){return r(!0),function(){r(!1)}}var a=e(395),s=e(222).stopEvent;t.exports.install=o},{222:222,395:395}],219:[function(e,t,n){"use strict";t.exports.remove=function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n},t.exports.add=function(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}},t.exports.indexOf=function(e,t){return e&&t?e.indexOf(t):-1}},{}],220:[function(e,t,n){"use strict";var i=e(390),r=/^djs-cursor-.*$/;t.exports.set=function(e){var t=i(document.body);t.removeMatching(r),e&&t.add("djs-cursor-"+e)},t.exports.unset=function(){this.set(null)},t.exports.has=function(e){var t=i(document.body);return t.has("djs-cursor-"+e)}},{390:390}],221:[function(e,t,n){"use strict";function i(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function r(e,t,n){n=n||0,h(e)||(e=[e]),m(e,function(e,i){var o=t(e,i,n);h(o)&&o.length&&r(o,t,n+1)})}function o(e,t,n){var o=[],a=[];return r(e,function(e,r,s){i(o,e,t);var c=e.children;return(-1===n||n>s)&&c&&i(a,c,t)?c:void 0}),o}function a(e,t){return o(e,!t,1)}function s(e,t){return o(e,!t,-1)}function c(e){function t(e){i[e.source.id]&&i[e.target.id]&&(i[e.id]=e),o[e.source.id]&&o[e.target.id]&&(c[e.id]=s[e.id]=e),a[e.id]=e}function n(e){return s[e.id]=e,e.waypoints?void(c[e.id]=a[e.id]=e):(o[e.id]=e,m(e.incoming,t),m(e.outgoing,t),e.children)}var i=f(e,function(e){return e.id}),o={},a={},s={},c={};return r(e,n),{allShapes:o,allConnections:a,topLevel:i,enclosedConnections:c,enclosedElements:s}}function p(e,t){t=!!t,h(e)||(e=[e]);var n,i,r,o;return m(e,function(e){var a=e;e.waypoints&&!t&&(a=p(e.waypoints,!0));var s=a.x,c=a.y,u=a.height||0,l=a.width||0;(n>s||void 0===n)&&(n=s),(i>c||void 0===i)&&(i=c),(s+l>r||void 0===r)&&(r=s+l),(c+u>o||void 0===o)&&(o=c+u)}),{x:n,y:i,height:o-i,width:r-n}}function u(e,t){var n={};return m(e,function(e){var i=e;i.waypoints&&(i=p(i)),!d(t.y)&&i.x>t.x&&(n[e.id]=e),!d(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(d(t.width)&&d(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y?n[e.id]=e:d(t.width)&&d(t.height)||(n[e.id]=e))}),n}function l(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}var h=e(368),d=e(371),f=e(256),m=e(255);t.exports.eachElement=r,t.exports.selfAndDirectChildren=a,t.exports.selfAndAllChildren=s,t.exports.getBBox=p,t.exports.getEnclosedElements=u,t.exports.getClosure=c,t.exports.getType=l},{255:255,256:256,368:368,371:371}],222:[function(e,t,n){"use strict";function i(e){return e&&e.preventDefault()}function r(e,t){e&&(e.stopPropagation&&e.stopPropagation(),t&&e.stopImmediatePropagation&&e.stopImmediatePropagation())}function o(e){return e.originalEvent||e.srcEvent}function a(e,t){c(e,t),s(e)}function s(e){i(e),i(o(e))}function c(e,t){r(e,t),r(o(e),t)}function p(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}t.exports.getOriginal=o,t.exports.stopEvent=a,t.exports.preventDefault=s,t.exports.stopPropagation=c,t.exports.toPoint=p},{}],223:[function(e,t,n){"use strict";function i(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function r(e,t){return Math.abs(e.x-t.x)<=o?"h":Math.abs(e.y-t.y)<=o?"v":!1}t.exports.pointDistance=i,t.exports.pointsOnLine=function(e,t,n){if(!e||!t||!n)return!1;var r=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),o=i(e,t);return Math.abs(r/o)<5};var o=2;t.exports.pointsAligned=r,t.exports.pointInRect=function(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n},t.exports.getMidPoint=function(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}},{}],224:[function(e,t,n){"use strict";function i(e){return e.select(".djs-visual")}function r(e){return e.parent().children()[1]}function o(e){return i(e).select("*").getBBox()}t.exports.getVisual=i,t.exports.getChildren=r,t.exports.getBBox=o},{}],225:[function(e,t,n){"use strict";function i(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}t.exports=i,i.prototype.next=function(){return this._prefix+ ++this._counter}},{}],226:[function(e,t,n){"use strict";function i(e,t){var n=e.x,i=e.y;return[["M",n,i],["m",0,-t],["a",t,t,0,1,1,0,2*t],["a",t,t,0,1,1,0,-2*t],["z"]]}function r(e){var t=[];return e.forEach(function(e,n){t.push([0===n?"M":"L",e.x,e.y])}),t}function o(e,t){var n,i;for(n=0;i=e[n];n++)if(s(i,t)<=l)return{point:e[n],bendpoint:!0,index:n};return null}function a(e,t){var n,o=c.path.intersection(i(t,l),r(e)),a=o[0],s=o[o.length-1];return a?a!==s?a.segment2!==s.segment2?(n=u(a.segment2,s.segment2)-1,{point:e[n],bendpoint:!0,index:n}):{point:{x:p(a.x+s.x)/2,y:p(a.y+s.y)/2},index:a.segment2}:{point:{x:p(a.x),y:p(a.y)},index:a.segment2}:null}var s=e(223).pointDistance,c=e(240),p=Math.round,u=Math.max,l=10;t.exports.getApproxIntersection=function(e,t){return o(e,t)||a(e,t)}},{223:223,240:240}],227:[function(e,t,n){"use strict";function i(e){return Math.log(e)/Math.log(10)}function r(e,t){return{x:e.x-t.x,y:e.y-t.y}}t.exports.log10=i,t.exports.substract=r},{}],228:[function(e,t,n){"use strict";function i(e){return!(r(e)||e).button}var r=e(222).getOriginal,o=e(229).isMac;t.exports.isPrimaryButton=i,t.exports.isMac=o,t.exports.hasPrimaryModifier=function(e){var t=r(e)||e;return i(e)?o()?t.altKey:t.ctrlKey:!1},t.exports.hasSecondaryModifier=function(e){var t=r(e)||e;return i(e)&&t.shiftKey}},{222:222,229:229}],229:[function(e,t,n){"use strict";t.exports.isMac=function(){return/mac/i.test(navigator.platform)}},{}],230:[function(e,t,n){"use strict";t.exports.saveClear=function(e,t){if("function"!=typeof t)throw new Error("removeFn iterator must be a function");if(e){for(var n;n=e[0];)t(n);return e}}},{}],231:[function(e,t,n){"use strict";function i(e){for(var t,n="",i=0;t=e[i];i++)n+=t.x+","+t.y+" ";return n}var r=e(240);t.exports.componentsToPath=function(e){return e.join(",").replace(/,?([A-z]),?/g,"$1")},t.exports.toSVGPoints=i,t.exports.createLine=function(e,t){return r.create("polyline",{points:i(e)}).attr(t||{})},t.exports.updateLine=function(e,t){return e.attr({points:i(t)})}},{240:240}],232:[function(e,t,n){"use strict";function i(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function r(e){return l(e)?h({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}function o(e,t){return t.textContent=e,d(t.getBBox(),["width","height"])}function a(e,t,n){for(var i,r=e.shift(),a=r;;){if(i=o(a,n),i.width=a?i.width:0," "===a||""===a||i.width<Math.round(t)||a.length<4)return s(e,a,r,i);a=p(a,i.width,t)}}function s(e,t,n,i){if(t.length<n.length){var r=e[0]||"",o=n.slice(t.length).trim();r=/-\s*$/.test(o)?o.replace(/-\s*$/,"")+r.replace(/^\s+/,""):o+" "+r,e[0]=r}return{width:i.width,height:i.height,text:t}}function c(e,t){var n,i=e.split(/(\s|-)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"===n&&r.pop();break}r.push(n),o+=n.length}return r.join("")}function p(e,t,n){var i=Math.max(e.length*(n/t),1),r=c(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function u(e){this._config=h({},{size:x,padding:g,style:{},align:"center-top"},e||{})}var l=e(372),h=e(377),d=e(383),f=e(255),m=e(259),v=e(380),y=e(240),g=0,x={width:150,height:50};u.prototype.createText=function(e,t,n){for(var o=v({},this._config.size,n.box||{}),s=v({},this._config.style,n.style||{}),c=i(n.align||this._config.align),p=r(void 0!==n.padding?n.padding:this._config.padding),u=t.split(/\r?\n/g),l=[],h=o.width-p.left-p.right,d=e.paper.text(0,0,"").attr(s).node;u.length;)l.push(a(u,h,d));var g,x,b=m(l,function(e,t,n){return e+t.height},0);switch(c.vertical){case"middle":g=(o.height-b)/2-l[0].height/4;break;default:g=p.top}var E=e.text().attr(s);return f(l,function(e){switch(g+=e.height,c.horizontal){case"left":x=p.left;break;case"right":x=h-p.right-e.width;break;default:x=Math.max((h-e.width)/2+p.left,0)}var t=y.create("tspan",{x:x,y:g}).node;t.textContent=e.text,E.append(t)}),d.parentNode.removeChild(d),E},t.exports=u},{240:240,255:255,259:259,372:372,377:377,380:380,383:383}],233:[function(e,t,n){var i=function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=function(){var e=Array.prototype.slice.call(arguments);1===e.length&&i(e[0])&&(e=e[0]);var t=e.pop();return t.$inject=e,t},o=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,a=/\/\*([^\*]*)\*\//m,s=function(e){if("function"!=typeof e)throw new Error('Cannot annotate "'+e+'". Expected a function!');var t=e.toString().match(o);return t[1]&&t[1].split(",").map(function(e){return t=e.match(a),t?t[1].trim():e.trim()})||[]};n.annotate=r,n.parse=s,n.isArray=i},{}],234:[function(e,t,n){t.exports={annotate:e(233).annotate,Module:e(236),Injector:e(235)}},{233:233,235:235,236:236}],235:[function(e,t,n){var i=e(236),r=e(233).parse,o=e(233).annotate,a=e(233).isArray,s=function(e,t){t=t||{get:function(e,t){if(n.push(e),t===!1)return null;throw l('No provider for "'+e+'"!')}};var n=[],c=this._providers=Object.create(t._providers||null),p=this._instances=Object.create(null),u=p.injector=this,l=function(e){var t=n.join(" -> ");return n.length=0,new Error(t?e+" (Resolving: "+t+")":e)},h=function(e,i){if(!c[e]&&-1!==e.indexOf(".")){for(var r=e.split("."),o=h(r.shift());r.length;)o=o[r.shift()];return o}if(Object.hasOwnProperty.call(p,e))return p[e];if(Object.hasOwnProperty.call(c,e)){if(-1!==n.indexOf(e))throw n.push(e),l("Cannot resolve circular dependency!");return n.push(e),p[e]=c[e][0](c[e][1]),n.pop(),p[e]}return t.get(e,i)},d=function(e){var t=Object.create(e.prototype),n=f(e,t);return"object"==typeof n?n:t},f=function(e,t){if("function"!=typeof e){if(!a(e))throw new Error('Cannot invoke "'+e+'". Expected a function!');e=o(e.slice())}var n=e.$inject&&e.$inject||r(e),i=n.map(function(e){return h(e)});return e.apply(t,i)},m=function(e){return o(function(t){return e.get(t)})},v=function(e,t){if(t&&t.length){var n,i,r,o,a=Object.create(null),p=Object.create(null),l=[],h=[],d=[];for(var f in c)n=c[f],-1!==t.indexOf(f)&&("private"===n[2]?(i=l.indexOf(n[3]),-1===i?(r=n[3].createChild([],t),o=m(r),l.push(n[3]),h.push(r),d.push(o),a[f]=[o,f,"private",r]):a[f]=[d[i],f,"private",h[i]]):a[f]=[n[2],n[1]],p[f]=!0),"factory"!==n[2]&&"type"!==n[2]||!n[1].$scope||t.forEach(function(e){-1!==n[1].$scope.indexOf(e)&&(a[f]=[n[2],n[1]],p[e]=!0)});t.forEach(function(e){if(!p[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')}),e.unshift(a)}return new s(e,u)},y={factory:f,type:d,value:function(e){return e}};e.forEach(function(e){function t(e,t){return"value"!==e&&a(t)&&(t=o(t.slice())),t}if(e instanceof i)e.forEach(function(e){var n=e[0],i=e[1],r=e[2];c[n]=[y[i],t(i,r),i]});else if("object"==typeof e)if(e.__exports__){var n=Object.keys(e).reduce(function(t,n){return"__"!==n.substring(0,2)&&(t[n]=e[n]),t},Object.create(null)),r=new s((e.__modules__||[]).concat([n]),u),p=o(function(e){return r.get(e)});e.__exports__.forEach(function(e){c[e]=[p,e,"private",r]})}else Object.keys(e).forEach(function(n){if("private"===e[n][2])return void(c[n]=e[n]);var i=e[n][0],r=e[n][1];c[n]=[y[i],t(i,r),i]})}),this.get=h,this.invoke=f,this.instantiate=d,this.createChild=v};t.exports=s},{233:233,236:236}],236:[function(e,t,n){var i=function(){var e=[];this.factory=function(t,n){return e.push([t,"factory",n]),this},this.value=function(t,n){return e.push([t,"value",n]),this},this.type=function(t,n){return e.push([t,"type",n]),this},this.forEach=function(t){e.forEach(t)}};t.exports=i},{}],237:[function(t,n,i){!function(t){var i,r,o="0.4.2",a="hasOwnProperty",s=/[\.\/]/,c=/\s*,\s*/,p="*",u=function(e,t){return e-t},l={n:{}},h=function(){for(var e=0,t=this.length;t>e;e++)if("undefined"!=typeof this[e])return this[e]},d=function(){for(var e=this.length;--e;)if("undefined"!=typeof this[e])return this[e]},f=function(e,t){e=String(e);var n,o=r,a=Array.prototype.slice.call(arguments,2),s=f.listeners(e),c=0,p=[],l={},m=[],v=i;m.firstDefined=h,m.lastDefined=d,i=e,r=0;for(var y=0,g=s.length;g>y;y++)"zIndex"in s[y]&&(p.push(s[y].zIndex),s[y].zIndex<0&&(l[s[y].zIndex]=s[y]));for(p.sort(u);p[c]<0;)if(n=l[p[c++]],m.push(n.apply(t,a)),r)return r=o,m;for(y=0;g>y;y++)if(n=s[y],"zIndex"in n)if(n.zIndex==p[c]){if(m.push(n.apply(t,a)),r)break;do if(c++,n=l[p[c]],n&&m.push(n.apply(t,a)),r)break;while(n)}else l[n.zIndex]=n;else if(m.push(n.apply(t,a)),r)break;return r=o,i=v,m};f._events=l,f.listeners=function(e){var t,n,i,r,o,a,c,u,h=e.split(s),d=l,f=[d],m=[];for(r=0,o=h.length;o>r;r++){for(u=[],a=0,c=f.length;c>a;a++)for(d=f[a].n,n=[d[h[r]],d[p]],i=2;i--;)t=n[i],t&&(u.push(t),m=m.concat(t.f||[]));f=u}return m},f.on=function(e,t){if(e=String(e),"function"!=typeof t)return function(){};for(var n=e.split(c),i=0,r=n.length;r>i;i++)!function(e){for(var n,i=e.split(s),r=l,o=0,a=i.length;a>o;o++)r=r.n,r=r.hasOwnProperty(i[o])&&r[i[o]]||(r[i[o]]={n:{}});for(r.f=r.f||[],o=0,a=r.f.length;a>o;o++)if(r.f[o]==t){n=!0;break}!n&&r.f.push(t)}(n[i]);return function(e){+e==+e&&(t.zIndex=+e)}},f.f=function(e){var t=[].slice.call(arguments,1);return function(){f.apply(null,[e,null].concat(t).concat([].slice.call(arguments,0)))}},f.stop=function(){r=1},f.nt=function(e){return e?new RegExp("(?:\\.|\\/|^)"+e+"(?:\\.|\\/|$)").test(i):i},f.nts=function(){return i.split(s)},f.off=f.unbind=function(e,t){if(!e)return void(f._events=l={n:{}});var n=e.split(c);if(n.length>1)for(var i=0,r=n.length;r>i;i++)f.off(n[i],t);else{n=e.split(s);var o,u,h,i,r,d,m,v=[l];for(i=0,r=n.length;r>i;i++)for(d=0;d<v.length;d+=h.length-2){if(h=[d,1],o=v[d].n,n[i]!=p)o[n[i]]&&h.push(o[n[i]]);else for(u in o)o[a](u)&&h.push(o[u]);v.splice.apply(v,h)}for(i=0,r=v.length;r>i;i++)for(o=v[i];o.n;){if(t){if(o.f){for(d=0,m=o.f.length;m>d;d++)if(o.f[d]==t){o.f.splice(d,1);break}!o.f.length&&delete o.f}for(u in o.n)if(o.n[a](u)&&o.n[u].f){var y=o.n[u].f;for(d=0,m=y.length;m>d;d++)if(y[d]==t){y.splice(d,1);break}!y.length&&delete o.n[u].f}}else{delete o.f;for(u in o.n)o.n[a](u)&&o.n[u].f&&delete o.n[u].f}o=o.n}}},f.once=function(e,t){var n=function(){return f.unbind(e,n),t.apply(this,arguments)};return f.on(e,n)},f.version=o,f.toString=function(){return"You are running Eve "+o},"undefined"!=typeof n&&n.exports?n.exports=f:"function"==typeof e&&e.amd?e("eve",[],function(){return f}):t.eve=f}(this)},{}],238:[function(t,n,i){!function(t,i,r,o){"use strict";function a(e,t,n){return setTimeout(l(e,n),t)}function s(e,t,n){return Array.isArray(e)?(c(e,n[t],n),!0):!1}function c(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==o)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function p(e,n,i){var r="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,r,i),e.apply(this,arguments)}}function u(e,t,n){var i,r=t.prototype;i=e.prototype=Object.create(r),i.constructor=e,i._super=r,n&&pe(i,n)}function l(e,t){return function(){return e.apply(t,arguments)}}function h(e,t){return typeof e==he?e.apply(t?t[0]||o:o,t):e}function d(e,t){return e===o?t:e}function f(e,t,n){c(g(t),function(t){e.addEventListener(t,n,!1)})}function m(e,t,n){c(g(t),function(t){e.removeEventListener(t,n,!1)})}function v(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function y(e,t){return e.indexOf(t)>-1}function g(e){return e.trim().split(/\s+/g)}function x(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function b(e){return Array.prototype.slice.call(e,0)}function E(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];x(r,a)<0&&i.push(e[o]),r[o]=a,o++}return n&&(i=t?i.sort(function(e,n){return e[t]>n[t]}):i.sort()),i}function w(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),a=0;a<ue.length;){if(n=ue[a],i=n?n+r:t,i in e)return i;a++}return o}function _(){return ge++}function S(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}function T(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){h(e.options.enable,[e])&&n.handler(t)},this.init()}function A(e){var t,n=e.options.inputClass;return new(t=n?n:Ee?z:we?$:be?U:F)(e,C)}function C(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=t&Re&&i-r===0,a=t&(Pe|Me)&&i-r===0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,R(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function R(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=M(t)),r>1&&!n.firstMultiple?n.firstMultiple=M(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,c=t.center=D(i);t.timeStamp=me(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=I(s,c),t.distance=O(s,c),N(n,t),t.offsetDirection=B(t.deltaX,t.deltaY);var p=k(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=p.x,t.overallVelocityY=p.y,t.overallVelocity=fe(p.x)>fe(p.y)?p.x:p.y,t.scale=a?j(a.pointers,i):1,t.rotation=a?L(a.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,P(n,t);var u=e.element;v(t.srcEvent.target,u)&&(u=t.srcEvent.target),t.target=u}function N(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};t.eventType!==Re&&o.eventType!==Pe||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}function P(e,t){var n,i,r,a,s=e.lastInterval||t,c=t.timeStamp-s.timeStamp;if(t.eventType!=Me&&(c>Ce||s.velocity===o)){var p=t.deltaX-s.deltaX,u=t.deltaY-s.deltaY,l=k(c,p,u);i=l.x,r=l.y,n=fe(l.x)>fe(l.y)?l.x:l.y,a=B(p,u),e.lastInterval=t}else n=s.velocity,i=s.velocityX,r=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=a}function M(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:de(e.pointers[n].clientX),clientY:de(e.pointers[n].clientY)},n++;return{timeStamp:me(),pointers:t,center:D(t),deltaX:e.deltaX,deltaY:e.deltaY}}function D(e){var t=e.length;if(1===t)return{x:de(e[0].clientX),y:de(e[0].clientY)};for(var n=0,i=0,r=0;t>r;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:de(n/t),y:de(i/t)}}function k(e,t,n){return{x:t/e||0,y:n/e||0}}function B(e,t){return e===t?De:fe(e)>=fe(t)?0>e?ke:Be:0>t?Oe:Ie}function O(e,t,n){n||(n=ze);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function I(e,t,n){n||(n=ze);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}function L(e,t){return I(t[1],t[0],Ge)+I(e[1],e[0],Ge)}function j(e,t){return O(t[0],t[1],Ge)/O(e[0],e[1],Ge)}function F(){this.evEl=$e,this.evWin=We,this.allow=!0,this.pressed=!1,T.apply(this,arguments)}function z(){this.evEl=qe,this.evWin=Ye,T.apply(this,arguments),this.store=this.manager.session.pointerEvents=[];
|
|
}function G(){this.evTarget=Ke,this.evWin=Ze,this.started=!1,T.apply(this,arguments)}function V(e,t){var n=b(e.touches),i=b(e.changedTouches);return t&(Pe|Me)&&(n=E(n.concat(i),"identifier",!0)),[n,i]}function $(){this.evTarget=Je,this.targetIds={},T.apply(this,arguments)}function W(e,t){var n=b(e.touches),i=this.targetIds;if(t&(Re|Ne)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,a=b(e.changedTouches),s=[],c=this.target;if(o=n.filter(function(e){return v(e.target,c)}),t===Re)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<a.length;)i[a[r].identifier]&&s.push(a[r]),t&(Pe|Me)&&delete i[a[r].identifier],r++;return s.length?[E(o.concat(s),"identifier",!0),s]:void 0}function U(){T.apply(this,arguments);var e=l(this.handler,this);this.touch=new $(this.manager,e),this.mouse=new F(this.manager,e)}function H(e,t){this.manager=e,this.set(t)}function q(e){if(y(e,ot))return ot;var t=y(e,at),n=y(e,st);return t&&n?ot:t||n?t?at:st:y(e,rt)?rt:it}function Y(e){this.options=pe({},this.defaults,e||{}),this.id=_(),this.manager=null,this.options.enable=d(this.options.enable,!0),this.state=ct,this.simultaneous={},this.requireFail=[]}function X(e){return e&dt?"cancel":e<?"end":e&ut?"move":e&pt?"start":""}function K(e){return e==Ie?"down":e==Oe?"up":e==ke?"left":e==Be?"right":""}function Z(e,t){var n=t.manager;return n?n.get(e):e}function Q(){Y.apply(this,arguments)}function J(){Q.apply(this,arguments),this.pX=null,this.pY=null}function ee(){Q.apply(this,arguments)}function te(){Y.apply(this,arguments),this._timer=null,this._input=null}function ne(){Q.apply(this,arguments)}function ie(){Q.apply(this,arguments)}function re(){Y.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function oe(e,t){return t=t||{},t.recognizers=d(t.recognizers,oe.defaults.preset),new ae(e,t)}function ae(e,t){this.options=pe({},oe.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.element=e,this.input=A(this),this.touchAction=new H(this,this.options.touchAction),se(this,!0),c(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function se(e,t){var n=e.element;n.style&&c(e.options.cssProps,function(e,i){n.style[w(n.style,i)]=t?e:""})}function ce(e,t){var n=i.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var pe,ue=["","webkit","Moz","MS","ms","o"],le=i.createElement("div"),he="function",de=Math.round,fe=Math.abs,me=Date.now;pe="function"!=typeof Object.assign?function(e){if(e===o||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==o&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var ve=p(function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)(!n||n&&e[i[r]]===o)&&(e[i[r]]=t[i[r]]),r++;return e},"extend","Use `assign`."),ye=p(function(e,t){return ve(e,t,!0)},"merge","Use `assign`."),ge=1,xe=/mobile|tablet|ip(ad|hone|od)|android/i,be="ontouchstart"in t,Ee=w(t,"PointerEvent")!==o,we=be&&xe.test(navigator.userAgent),_e="touch",Se="pen",Te="mouse",Ae="kinect",Ce=25,Re=1,Ne=2,Pe=4,Me=8,De=1,ke=2,Be=4,Oe=8,Ie=16,Le=ke|Be,je=Oe|Ie,Fe=Le|je,ze=["x","y"],Ge=["clientX","clientY"];T.prototype={handler:function(){},init:function(){this.evEl&&f(this.element,this.evEl,this.domHandler),this.evTarget&&f(this.target,this.evTarget,this.domHandler),this.evWin&&f(S(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&m(this.element,this.evEl,this.domHandler),this.evTarget&&m(this.target,this.evTarget,this.domHandler),this.evWin&&m(S(this.element),this.evWin,this.domHandler)}};var Ve={mousedown:Re,mousemove:Ne,mouseup:Pe},$e="mousedown",We="mousemove mouseup";u(F,T,{handler:function(e){var t=Ve[e.type];t&Re&&0===e.button&&(this.pressed=!0),t&Ne&&1!==e.which&&(t=Pe),this.pressed&&this.allow&&(t&Pe&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Te,srcEvent:e}))}});var Ue={pointerdown:Re,pointermove:Ne,pointerup:Pe,pointercancel:Me,pointerout:Me},He={2:_e,3:Se,4:Te,5:Ae},qe="pointerdown",Ye="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(qe="MSPointerDown",Ye="MSPointerMove MSPointerUp MSPointerCancel"),u(z,T,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=Ue[i],o=He[e.pointerType]||e.pointerType,a=o==_e,s=x(t,e.pointerId,"pointerId");r&Re&&(0===e.button||a)?0>s&&(t.push(e),s=t.length-1):r&(Pe|Me)&&(n=!0),0>s||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var Xe={touchstart:Re,touchmove:Ne,touchend:Pe,touchcancel:Me},Ke="touchstart",Ze="touchstart touchmove touchend touchcancel";u(G,T,{handler:function(e){var t=Xe[e.type];if(t===Re&&(this.started=!0),this.started){var n=V.call(this,e,t);t&(Pe|Me)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:_e,srcEvent:e})}}});var Qe={touchstart:Re,touchmove:Ne,touchend:Pe,touchcancel:Me},Je="touchstart touchmove touchend touchcancel";u($,T,{handler:function(e){var t=Qe[e.type],n=W.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:_e,srcEvent:e})}}),u(U,T,{handler:function(e,t,n){var i=n.pointerType==_e,r=n.pointerType==Te;if(i)this.mouse.allow=!1;else if(r&&!this.mouse.allow)return;t&(Pe|Me)&&(this.mouse.allow=!0),this.callback(e,t,n)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var et=w(le.style,"touchAction"),tt=et!==o,nt="compute",it="auto",rt="manipulation",ot="none",at="pan-x",st="pan-y";H.prototype={set:function(e){e==nt&&(e=this.compute()),tt&&this.manager.element.style&&(this.manager.element.style[et]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return c(this.manager.recognizers,function(t){h(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),q(e.join(" "))},preventDefaults:function(e){if(!tt){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)return void t.preventDefault();var i=this.actions,r=y(i,ot),o=y(i,st),a=y(i,at);if(r){var s=1===e.pointers.length,c=e.distance<2,p=e.deltaTime<250;if(s&&c&&p)return}if(!a||!o)return r||o&&n&Le||a&&n&je?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var ct=1,pt=2,ut=4,lt=8,ht=lt,dt=16,ft=32;Y.prototype={defaults:{},set:function(e){return pe(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(s(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=Z(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return s(e,"dropRecognizeWith",this)?this:(e=Z(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(s(e,"requireFailure",this))return this;var t=this.requireFail;return e=Z(e,this),-1===x(t,e)&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(s(e,"dropRequireFailure",this))return this;e=Z(e,this);var t=x(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){n.manager.emit(t,e)}var n=this,i=this.state;lt>i&&t(n.options.event+X(i)),t(n.options.event),e.additionalEvent&&t(e.additionalEvent),i>=lt&&t(n.options.event+X(i))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=ft)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(ft|ct)))return!1;e++}return!0},recognize:function(e){var t=pe({},e);return h(this.options.enable,[this,t])?(this.state&(ht|dt|ft)&&(this.state=ct),this.state=this.process(t),void(this.state&(pt|ut|lt|dt)&&this.tryEmit(t))):(this.reset(),void(this.state=ft))},process:function(e){},getTouchAction:function(){},reset:function(){}},u(Q,Y,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=t&(pt|ut),r=this.attrTest(e);return i&&(n&Me||!r)?t|dt:i||r?n&Pe?t|lt:t&pt?t|ut:pt:ft}}),u(J,Q,{defaults:{event:"pan",threshold:10,pointers:1,direction:Fe},getTouchAction:function(){var e=this.options.direction,t=[];return e&Le&&t.push(st),e&je&&t.push(at),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(t.direction&Le?(r=0===o?De:0>o?ke:Be,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===a?De:0>a?Oe:Ie,n=a!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return Q.prototype.attrTest.call(this,e)&&(this.state&pt||!(this.state&pt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=K(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),u(ee,Q,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ot]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&pt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),u(te,Y,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[it]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||e.eventType&(Pe|Me)&&!r)this.reset();else if(e.eventType&Re)this.reset(),this._timer=a(function(){this.state=ht,this.tryEmit()},t.time,this);else if(e.eventType&Pe)return ht;return ft},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===ht&&(e&&e.eventType&Pe?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=me(),this.manager.emit(this.options.event,this._input)))}}),u(ne,Q,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ot]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&pt)}}),u(ie,Q,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Le|je,pointers:1},getTouchAction:function(){return J.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(Le|je)?t=e.overallVelocity:n&Le?t=e.overallVelocityX:n&je&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&fe(t)>this.options.velocity&&e.eventType&Pe},emit:function(e){var t=K(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),u(re,Y,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[rt]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),e.eventType&Re&&0===this.count)return this.failTimeout();if(i&&r&&n){if(e.eventType!=Pe)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<t.interval:!0,s=!this.pCenter||O(this.pCenter,e.center)<t.posThreshold;this.pTime=e.timeStamp,this.pCenter=e.center,s&&o?this.count+=1:this.count=1,this._input=e;var c=this.count%t.taps;if(0===c)return this.hasRequireFailures()?(this._timer=a(function(){this.state=ht,this.tryEmit()},t.interval,this),pt):ht}return ft},failTimeout:function(){return this._timer=a(function(){this.state=ft},this.options.interval,this),ft},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ht&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),oe.VERSION="2.0.6",oe.defaults={domEvents:!1,touchAction:nt,enable:!0,inputTarget:null,inputClass:null,preset:[[ne,{enable:!1}],[ee,{enable:!1},["rotate"]],[ie,{direction:Le}],[J,{direction:Le},["swipe"]],[re],[re,{event:"doubletap",taps:2},["tap"]],[te]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var mt=1,vt=2;ae.prototype={set:function(e){return pe(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?vt:mt},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,i=this.recognizers,r=t.curRecognizer;(!r||r&&r.state&ht)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],t.stopped===vt||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&n.state&(pt|ut|lt)&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Y)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(s(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(s(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=x(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){var n=this.handlers;return c(g(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},off:function(e,t){var n=this.handlers;return c(g(e),function(e){t?n[e]&&n[e].splice(x(n[e],t),1):delete n[e]}),this},emit:function(e,t){this.options.domEvents&&ce(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},destroy:function(){this.element&&se(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},pe(oe,{INPUT_START:Re,INPUT_MOVE:Ne,INPUT_END:Pe,INPUT_CANCEL:Me,STATE_POSSIBLE:ct,STATE_BEGAN:pt,STATE_CHANGED:ut,STATE_ENDED:lt,STATE_RECOGNIZED:ht,STATE_CANCELLED:dt,STATE_FAILED:ft,DIRECTION_NONE:De,DIRECTION_LEFT:ke,DIRECTION_RIGHT:Be,DIRECTION_UP:Oe,DIRECTION_DOWN:Ie,DIRECTION_HORIZONTAL:Le,DIRECTION_VERTICAL:je,DIRECTION_ALL:Fe,Manager:ae,Input:T,TouchAction:H,TouchInput:$,MouseInput:F,PointerEventInput:z,TouchMouseInput:U,SingleTouchInput:G,Recognizer:Y,AttrRecognizer:Q,Tap:re,Pan:J,Swipe:ie,Pinch:ee,Rotate:ne,Press:te,on:f,off:m,each:c,merge:ye,extend:ve,assign:pe,inherit:u,bindFn:l,prefixed:w});var yt="undefined"!=typeof t?t:"undefined"!=typeof self?self:{};yt.Hammer=oe,"function"==typeof e&&e.amd?e(function(){return oe}):"undefined"!=typeof n&&n.exports?n.exports=oe:t[r]=oe}(window,document,"Hammer")},{}],239:[function(t,n,i){!function(r,o){if("function"==typeof e&&e.amd)e(["eve"],function(e){return o(r,e)});else if("undefined"!=typeof i){var a=t(237);n.exports=o(r,a)}else o(r,r.eve)}(window||this,function(e,t){var n=function(t){var n={},i=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,16)},r=Array.isArray||function(e){return e instanceof Array||"[object Array]"==Object.prototype.toString.call(e)},o=0,a="M"+(+new Date).toString(36),s=function(){return a+(o++).toString(36)},c=Date.now||function(){return+new Date},p=function(e){var t=this;if(null==e)return t.s;var n=t.s-e;t.b+=t.dur*n,t.B+=t.dur*n,t.s=e},u=function(e){var t=this;return null==e?t.spd:void(t.spd=e)},l=function(e){var t=this;return null==e?t.dur:(t.s=t.s*e/t.dur,void(t.dur=e))},h=function(){var e=this;delete n[e.id],e.update(),t("mina.stop."+e.id,e)},d=function(){var e=this;e.pdif||(delete n[e.id],e.update(),e.pdif=e.get()-e.b)},f=function(){var e=this;e.pdif&&(e.b=e.get()-e.pdif,delete e.pdif,n[e.id]=e)},m=function(){var e,t=this;if(r(t.start)){e=[];for(var n=0,i=t.start.length;i>n;n++)e[n]=+t.start[n]+(t.end[n]-t.start[n])*t.easing(t.s)}else e=+t.start+(t.end-t.start)*t.easing(t.s);t.set(e)},v=function(){var e=0;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r],a=o.get();e++,o.s=(a-o.b)/(o.dur/o.spd),o.s>=1&&(delete n[r],o.s=1,e--,function(e){setTimeout(function(){t("mina.finish."+e.id,e)})}(o)),o.update()}e&&i(v)},y=function(e,t,r,o,a,c,g){var x={id:s(),start:e,end:t,b:r,s:0,dur:o-r,spd:1,get:a,set:c,easing:g||y.linear,status:p,speed:u,duration:l,stop:h,pause:d,resume:f,update:m};n[x.id]=x;var b,E=0;for(b in n)if(n.hasOwnProperty(b)&&(E++,2==E))break;return 1==E&&i(v),x};return y.time=c,y.getById=function(e){return n[e]||null},y.linear=function(e){return e},y.easeout=function(e){return Math.pow(e,1.7)},y.easein=function(e){return Math.pow(e,.48)},y.easeinout=function(e){if(1==e)return 1;if(0==e)return 0;var t=.48-e/1.04,n=Math.sqrt(.1734+t*t),i=n-t,r=Math.pow(Math.abs(i),1/3)*(0>i?-1:1),o=-n-t,a=Math.pow(Math.abs(o),1/3)*(0>o?-1:1),s=r+a+.5;return 3*(1-s)*s*s+s*s*s},y.backin=function(e){if(1==e)return 1;var t=1.70158;return e*e*((t+1)*e-t)},y.backout=function(e){if(0==e)return 0;e-=1;var t=1.70158;return e*e*((t+1)*e+t)+1},y.elastic=function(e){return e==!!e?e:Math.pow(2,-10*e)*Math.sin((e-.075)*(2*Math.PI)/.3)+1},y.bounce=function(e){var t,n=7.5625,i=2.75;return 1/i>e?t=n*e*e:2/i>e?(e-=1.5/i,t=n*e*e+.75):2.5/i>e?(e-=2.25/i,t=n*e*e+.9375):(e-=2.625/i,t=n*e*e+.984375),t},e.mina=y,y}("undefined"==typeof t?function(){}:t),i=function(e){function n(e,t){if(e){if(e.tagName)return w(e);if(r(e,"array")&&n.set)return n.set.apply(n,e);if(e instanceof y)return e;if(null==t)return e=_.doc.querySelector(e),w(e)}return e=null==e?"100%":e,t=null==t?"100%":t,new E(e,t)}function i(e,t){if(t){if("#text"==e&&(e=_.doc.createTextNode(t.text||"")),"string"==typeof e&&(e=i(e)),"string"==typeof t)return"xlink:"==t.substring(0,6)?e.getAttributeNS(W,t.substring(6)):"xml:"==t.substring(0,4)?e.getAttributeNS(U,t.substring(4)):e.getAttribute(t);for(var n in t)if(t[S](n)){var r=T(t[n]);r?"xlink:"==n.substring(0,6)?e.setAttributeNS(W,n.substring(6),r):"xml:"==n.substring(0,4)?e.setAttributeNS(U,n.substring(4),r):e.setAttribute(n,r):e.removeAttribute(n)}}else e=_.doc.createElementNS(U,e);return e}function r(e,t){return t=T.prototype.toLowerCase.call(t),"finite"==t?isFinite(e):"array"==t&&(e instanceof Array||Array.isArray&&Array.isArray(e))?!0:"null"==t&&null===e||t==typeof e&&null!==e||"object"==t&&e===Object(e)||B.call(e).slice(8,-1).toLowerCase()==t}function o(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)e[S](n)&&(t[n]=o(e[n]));return t}function a(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function s(e,t,n){function i(){var r=Array.prototype.slice.call(arguments,0),o=r.join("␀"),s=i.cache=i.cache||{},c=i.count=i.count||[];return s[S](o)?(a(c,o),n?n(s[o]):s[o]):(c.length>=1e3&&delete s[c.shift()],c.push(o),s[o]=e.apply(t,r),n?n(s[o]):s[o])}return i}function c(e,t,n,i,r,o){if(null==r){var a=e-n,s=t-i;return a||s?(180+180*R.atan2(-s,-a)/D+360)%360:0}return c(e,t,r,o)-c(n,i,r,o)}function p(e){return e%360*D/180}function u(e){return 180*e/D%360}function l(e){var t=[];return e=e.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,function(e,n,i){return i=i.split(/\s*,\s*|\s+/),"rotate"==n&&1==i.length&&i.push(0,0),"scale"==n&&(i.length>2?i=i.slice(0,2):2==i.length&&i.push(0,0),1==i.length&&i.push(i[0],0,0)),"skewX"==n?t.push(["m",1,0,R.tan(p(i[0])),1,0,0]):"skewY"==n?t.push(["m",1,R.tan(p(i[0])),0,1,0,0]):t.push([n.charAt(0)].concat(i)),e}),t}function h(e,t){var i=J(e),r=new n.Matrix;if(i)for(var o=0,a=i.length;a>o;o++){var s,c,p,u,l,h=i[o],d=h.length,f=T(h[0]).toLowerCase(),m=h[0]!=f,v=m?r.invert():0;"t"==f&&2==d?r.translate(h[1],0):"t"==f&&3==d?m?(s=v.x(0,0),c=v.y(0,0),p=v.x(h[1],h[2]),u=v.y(h[1],h[2]),r.translate(p-s,u-c)):r.translate(h[1],h[2]):"r"==f?2==d?(l=l||t,r.rotate(h[1],l.x+l.width/2,l.y+l.height/2)):4==d&&(m?(p=v.x(h[2],h[3]),u=v.y(h[2],h[3]),r.rotate(h[1],p,u)):r.rotate(h[1],h[2],h[3])):"s"==f?2==d||3==d?(l=l||t,r.scale(h[1],h[d-1],l.x+l.width/2,l.y+l.height/2)):4==d?m?(p=v.x(h[2],h[3]),u=v.y(h[2],h[3]),r.scale(h[1],h[1],p,u)):r.scale(h[1],h[1],h[2],h[3]):5==d&&(m?(p=v.x(h[3],h[4]),u=v.y(h[3],h[4]),r.scale(h[1],h[2],p,u)):r.scale(h[1],h[2],h[3],h[4])):"m"==f&&7==d&&r.add(h[1],h[2],h[3],h[4],h[5],h[6])}return r}function d(e){var t=e.node.ownerSVGElement&&w(e.node.ownerSVGElement)||e.node.parentNode&&w(e.node.parentNode)||n.select("svg")||n(0,0),i=t.select("defs"),r=null==i?!1:i.node;return r||(r=b("defs",t.node).node),r}function f(e){return e.node.ownerSVGElement&&w(e.node.ownerSVGElement)||n.select("svg")}function m(e,t,n){function r(e){if(null==e)return k;if(e==+e)return e;i(p,{width:e});try{return p.getBBox().width}catch(t){return 0}}function o(e){if(null==e)return k;if(e==+e)return e;i(p,{height:e});try{return p.getBBox().height}catch(t){return 0}}function a(i,r){null==t?c[i]=r(e.attr(i)||0):i==t&&(c=r(null==n?e.attr(i)||0:n))}var s=f(e).node,c={},p=s.querySelector(".svg---mgr");switch(p||(p=i("rect"),i(p,{x:-9e9,y:-9e9,width:10,height:10,"class":"svg---mgr",fill:"none"}),s.appendChild(p)),e.type){case"rect":a("rx",r),a("ry",o);case"image":a("width",r),a("height",o);case"text":a("x",r),a("y",o);break;case"circle":a("cx",r),a("cy",o),a("r",r);break;case"ellipse":a("cx",r),a("cy",o),a("rx",r),a("ry",o);break;case"line":a("x1",r),a("x2",r),a("y1",o),a("y2",o);break;case"marker":a("refX",r),a("markerWidth",r),a("refY",o),a("markerHeight",o);break;case"radialGradient":a("fx",r),a("fy",o);break;case"tspan":a("dx",r),a("dy",o);break;default:a(t,r)}return s.removeChild(p),c}function v(e){r(e,"array")||(e=Array.prototype.slice.call(arguments,0));for(var t=0,n=0,i=this.node;this[t];)delete this[t++];for(t=0;t<e.length;t++)"set"==e[t].type?e[t].forEach(function(e){i.appendChild(e.node)}):i.appendChild(e[t].node);var o=i.childNodes;for(t=0;t<o.length;t++)this[n++]=w(o[t]);return this}function y(e){if(e.snap in H)return H[e.snap];var t;try{t=e.ownerSVGElement}catch(n){}this.node=e,t&&(this.paper=new E(t)),this.type=e.tagName;var i=this.id=$(this);if(this.anims={},this._={transform:[]},e.snap=i,H[i]=this,"g"==this.type&&(this.add=v),this.type in{g:1,mask:1,pattern:1,symbol:1})for(var r in E.prototype)E.prototype[S](r)&&(this[r]=E.prototype[r])}function x(e){this.node=e}function b(e,t){var n=i(e);t.appendChild(n);var r=w(n);return r}function E(e,t){var n,r,o,a=E.prototype;if(e&&"svg"==e.tagName){if(e.snap in H)return H[e.snap];var s=e.ownerDocument;n=new y(e),r=e.getElementsByTagName("desc")[0],o=e.getElementsByTagName("defs")[0],r||(r=i("desc"),r.appendChild(s.createTextNode("Created with Snap")),n.node.appendChild(r)),o||(o=i("defs"),n.node.appendChild(o)),n.defs=o;for(var c in a)a[S](c)&&(n[c]=a[c]);n.paper=n.root=n}else n=b("svg",_.doc.body),i(n.node,{height:t,version:1.1,width:e,xmlns:U});return n}function w(e){return e?e instanceof y||e instanceof x?e:e.tagName&&"svg"==e.tagName.toLowerCase()?new E(e):e.tagName&&"object"==e.tagName.toLowerCase()&&"image/svg+xml"==e.type?new E(e.contentDocument.getElementsByTagName("svg")[0]):new y(e):e}n.version="0.3.0",n.toString=function(){return"Snap v"+this.version},n._={};var _={win:e.window,doc:e.window.document};n._.glob=_;var S="hasOwnProperty",T=String,A=parseFloat,C=parseInt,R=Math,N=R.max,P=R.min,M=R.abs,D=(R.pow,R.PI),k=(R.round,""),B=Object.prototype.toString,O=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?%?)\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?%?)\s*\))\s*$/i,I=(n._.separator=/[,\s]+/,/[\s]*,[\s]*/),L={hs:1,rg:1},j=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?[\s]*)+)/gi,F=/([rstm])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?[\s]*)+)/gi,z=/(-?\d*\.?\d*(?:e[\-+]?\\d+)?)[\s]*,?[\s]*/gi,G=0,V="S"+(+new Date).toString(36),$=function(e){return(e&&e.type?e.type:k)+V+(G++).toString(36)},W="http://www.w3.org/1999/xlink",U="http://www.w3.org/2000/svg",H={};n.url=function(e){return"url('#"+e+"')"};n._.$=i,n._.id=$,n.format=function(){var e=/\{([^\}]+)\}/g,t=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,n=function(e,n,i){var r=i;return n.replace(t,function(e,t,n,i,o){t=t||i,r&&(t in r&&(r=r[t]),"function"==typeof r&&o&&(r=r()))}),r=(null==r||r==i?e:r)+""};return function(t,i){return T(t).replace(e,function(e,t){return n(e,t,i)})}}(),n._.clone=o,n._.cacher=s,n.rad=p,n.deg=u,n.angle=c,n.is=r,n.snapTo=function(e,t,n){if(n=r(n,"finite")?n:10,r(e,"array")){for(var i=e.length;i--;)if(M(e[i]-t)<=n)return e[i]}else{e=+e;var o=t%e;if(n>o)return t-o;if(o>e-n)return t-o+e}return t},n.getRGB=s(function(e){if(!e||(e=T(e)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:K};if("none"==e)return{r:-1,g:-1,b:-1,hex:"none",toString:K};if(!(L[S](e.toLowerCase().substring(0,2))||"#"==e.charAt())&&(e=q(e)),!e)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:K};var t,i,o,a,s,c,p=e.match(O);return p?(p[2]&&(o=C(p[2].substring(5),16),i=C(p[2].substring(3,5),16),t=C(p[2].substring(1,3),16)),p[3]&&(o=C((s=p[3].charAt(3))+s,16),i=C((s=p[3].charAt(2))+s,16),t=C((s=p[3].charAt(1))+s,16)),p[4]&&(c=p[4].split(I),t=A(c[0]),"%"==c[0].slice(-1)&&(t*=2.55),i=A(c[1]),"%"==c[1].slice(-1)&&(i*=2.55),o=A(c[2]),"%"==c[2].slice(-1)&&(o*=2.55),"rgba"==p[1].toLowerCase().slice(0,4)&&(a=A(c[3])),c[3]&&"%"==c[3].slice(-1)&&(a/=100)),p[5]?(c=p[5].split(I),t=A(c[0]),"%"==c[0].slice(-1)&&(t/=100),i=A(c[1]),"%"==c[1].slice(-1)&&(i/=100),o=A(c[2]),"%"==c[2].slice(-1)&&(o/=100),("deg"==c[0].slice(-3)||"°"==c[0].slice(-1))&&(t/=360),"hsba"==p[1].toLowerCase().slice(0,4)&&(a=A(c[3])),c[3]&&"%"==c[3].slice(-1)&&(a/=100),n.hsb2rgb(t,i,o,a)):p[6]?(c=p[6].split(I),t=A(c[0]),"%"==c[0].slice(-1)&&(t/=100),i=A(c[1]),"%"==c[1].slice(-1)&&(i/=100),o=A(c[2]),"%"==c[2].slice(-1)&&(o/=100),("deg"==c[0].slice(-3)||"°"==c[0].slice(-1))&&(t/=360),"hsla"==p[1].toLowerCase().slice(0,4)&&(a=A(c[3])),c[3]&&"%"==c[3].slice(-1)&&(a/=100),n.hsl2rgb(t,i,o,a)):(t=P(R.round(t),255),i=P(R.round(i),255),o=P(R.round(o),255),a=P(N(a,0),1),p={r:t,g:i,b:o,toString:K},p.hex="#"+(16777216|o|i<<8|t<<16).toString(16).slice(1),p.opacity=r(a,"finite")?a:1,p)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:K}},n),n.hsb=s(function(e,t,i){return n.hsb2rgb(e,t,i).hex}),n.hsl=s(function(e,t,i){return n.hsl2rgb(e,t,i).hex}),n.rgb=s(function(e,t,n,i){if(r(i,"finite")){var o=R.round;return"rgba("+[o(e),o(t),o(n),+i.toFixed(2)]+")"}return"#"+(16777216|n|t<<8|e<<16).toString(16).slice(1)});var q=function(e){var t=_.doc.getElementsByTagName("head")[0]||_.doc.getElementsByTagName("svg")[0],n="rgb(255, 0, 0)";return(q=s(function(e){if("red"==e.toLowerCase())return n;t.style.color=n,t.style.color=e;var i=_.doc.defaultView.getComputedStyle(t,k).getPropertyValue("color");return i==n?null:i}))(e)},Y=function(){return"hsb("+[this.h,this.s,this.b]+")"},X=function(){return"hsl("+[this.h,this.s,this.l]+")"},K=function(){return 1==this.opacity||null==this.opacity?this.hex:"rgba("+[this.r,this.g,this.b,this.opacity]+")"},Z=function(e,t,i){if(null==t&&r(e,"object")&&"r"in e&&"g"in e&&"b"in e&&(i=e.b,t=e.g,e=e.r),null==t&&r(e,string)){var o=n.getRGB(e);e=o.r,t=o.g,i=o.b}return(e>1||t>1||i>1)&&(e/=255,t/=255,i/=255),[e,t,i]},Q=function(e,t,i,o){e=R.round(255*e),t=R.round(255*t),i=R.round(255*i);var a={r:e,g:t,b:i,opacity:r(o,"finite")?o:1,hex:n.rgb(e,t,i),toString:K};return r(o,"finite")&&(a.opacity=o),a};n.color=function(e){var t;return r(e,"object")&&"h"in e&&"s"in e&&"b"in e?(t=n.hsb2rgb(e),e.r=t.r,e.g=t.g,e.b=t.b,e.opacity=1,e.hex=t.hex):r(e,"object")&&"h"in e&&"s"in e&&"l"in e?(t=n.hsl2rgb(e),e.r=t.r,e.g=t.g,e.b=t.b,e.opacity=1,e.hex=t.hex):(r(e,"string")&&(e=n.getRGB(e)),r(e,"object")&&"r"in e&&"g"in e&&"b"in e&&!("error"in e)?(t=n.rgb2hsl(e),e.h=t.h,e.s=t.s,e.l=t.l,t=n.rgb2hsb(e),e.v=t.b):(e={hex:"none"},e.r=e.g=e.b=e.h=e.s=e.v=e.l=-1,e.error=1)),e.toString=K,e},n.hsb2rgb=function(e,t,n,i){r(e,"object")&&"h"in e&&"s"in e&&"b"in e&&(n=e.b,t=e.s,e=e.h,i=e.o),e*=360;var o,a,s,c,p;return e=e%360/60,p=n*t,c=p*(1-M(e%2-1)),o=a=s=n-p,e=~~e,o+=[p,c,0,0,c,p][e],a+=[c,p,p,c,0,0][e],s+=[0,0,c,p,p,c][e],Q(o,a,s,i)},n.hsl2rgb=function(e,t,n,i){r(e,"object")&&"h"in e&&"s"in e&&"l"in e&&(n=e.l,t=e.s,e=e.h),(e>1||t>1||n>1)&&(e/=360,t/=100,n/=100),e*=360;var o,a,s,c,p;return e=e%360/60,p=2*t*(.5>n?n:1-n),c=p*(1-M(e%2-1)),o=a=s=n-p/2,e=~~e,o+=[p,c,0,0,c,p][e],a+=[c,p,p,c,0,0][e],s+=[0,0,c,p,p,c][e],Q(o,a,s,i)},n.rgb2hsb=function(e,t,n){n=Z(e,t,n),e=n[0],t=n[1],n=n[2];var i,r,o,a;return o=N(e,t,n),a=o-P(e,t,n),i=0==a?null:o==e?(t-n)/a:o==t?(n-e)/a+2:(e-t)/a+4,i=(i+360)%6*60/360,r=0==a?0:a/o,{h:i,s:r,b:o,toString:Y}},n.rgb2hsl=function(e,t,n){n=Z(e,t,n),e=n[0],t=n[1],n=n[2];var i,r,o,a,s,c;return a=N(e,t,n),s=P(e,t,n),c=a-s,i=0==c?null:a==e?(t-n)/c:a==t?(n-e)/c+2:(e-t)/c+4,i=(i+360)%6*60/360,o=(a+s)/2,r=0==c?0:.5>o?c/(2*o):c/(2-2*o),{h:i,s:r,l:o,toString:X}},n.parsePathString=function(e){if(!e)return null;var t=n.path(e);if(t.arr)return n.path.clone(t.arr);var i={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},o=[];return r(e,"array")&&r(e[0],"array")&&(o=n.path.clone(e)),o.length||T(e).replace(j,function(e,t,n){var r=[],a=t.toLowerCase();if(n.replace(z,function(e,t){t&&r.push(+t)}),"m"==a&&r.length>2&&(o.push([t].concat(r.splice(0,2))),a="l",t="m"==t?"l":"L"),"o"==a&&1==r.length&&o.push([t,r[0]]),"r"==a)o.push([t].concat(r));else for(;r.length>=i[a]&&(o.push([t].concat(r.splice(0,i[a]))),i[a]););}),o.toString=n.path.toString,t.arr=n.path.clone(o),o};var J=n.parseTransformString=function(e){if(!e)return null;var t=[];return r(e,"array")&&r(e[0],"array")&&(t=n.path.clone(e)),t.length||T(e).replace(F,function(e,n,i){var r=[];n.toLowerCase();i.replace(z,function(e,t){t&&r.push(+t)}),t.push([n].concat(r))}),t.toString=n.path.toString,t};n._.svgTransform2string=l,n._.rgTransform=/^[a-z][\s]*-?\.?\d/i,n._.transform2matrix=h,n._unit2px=m;_.doc.contains||_.doc.compareDocumentPosition?function(e,t){var n=9==e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e==i||!(!i||1!=i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t;)if(t=t.parentNode,t==e)return!0;return!1};n._.getSomeDefs=d,n._.getSomeSVG=f,n.select=function(e){return e=T(e).replace(/([^\\]):/g,"$1\\:"),w(_.doc.querySelector(e))},n.selectAll=function(e){for(var t=_.doc.querySelectorAll(e),i=(n.set||Array)(),r=0;r<t.length;r++)i.push(w(t[r]));return i},setInterval(function(){for(var e in H)if(H[S](e)){var t=H[e],n=t.node;("svg"!=t.type&&!n.ownerSVGElement||"svg"==t.type&&(!n.parentNode||"ownerSVGElement"in n.parentNode&&!n.ownerSVGElement))&&delete H[e]}},1e4),y.prototype.attr=function(e,n){var i=this;i.node;if(!e)return i;if(r(e,"string")){if(!(arguments.length>1))return t("snap.util.getattr."+e,i).firstDefined();var o={};o[e]=n,e=o}for(var a in e)e[S](a)&&t("snap.util.attr."+a,i,e[a]);return i},n.parse=function(e){var t=_.doc.createDocumentFragment(),n=!0,i=_.doc.createElement("div");if(e=T(e),e.match(/^\s*<\s*svg(?:\s|>)/)||(e="<svg>"+e+"</svg>",n=!1),i.innerHTML=e,e=i.getElementsByTagName("svg")[0])if(n)t=e;else{for(;e.firstChild;)t.appendChild(e.firstChild);i.innerHTML=k}return new x(t)},n.fragment=function(){for(var e=Array.prototype.slice.call(arguments,0),t=_.doc.createDocumentFragment(),i=0,r=e.length;r>i;i++){var o=e[i];o.node&&o.node.nodeType&&t.appendChild(o.node),o.nodeType&&t.appendChild(o),"string"==typeof o&&t.appendChild(n.parse(o).node)}return new x(t)},n._.make=b,n._.wrap=w,E.prototype.el=function(e,t){var n=b(e,this.node);return t&&n.attr(t),n},t.on("snap.util.getattr",function(){var e=t.nt();e=e.substring(e.lastIndexOf(".")+1);var n=e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});return ee[S](n)?this.node.ownerDocument.defaultView.getComputedStyle(this.node,null).getPropertyValue(n):i(this.node,e)});
|
|
var ee={"alignment-baseline":0,"baseline-shift":0,clip:0,"clip-path":0,"clip-rule":0,color:0,"color-interpolation":0,"color-interpolation-filters":0,"color-profile":0,"color-rendering":0,cursor:0,direction:0,display:0,"dominant-baseline":0,"enable-background":0,fill:0,"fill-opacity":0,"fill-rule":0,filter:0,"flood-color":0,"flood-opacity":0,font:0,"font-family":0,"font-size":0,"font-size-adjust":0,"font-stretch":0,"font-style":0,"font-variant":0,"font-weight":0,"glyph-orientation-horizontal":0,"glyph-orientation-vertical":0,"image-rendering":0,kerning:0,"letter-spacing":0,"lighting-color":0,marker:0,"marker-end":0,"marker-mid":0,"marker-start":0,mask:0,opacity:0,overflow:0,"pointer-events":0,"shape-rendering":0,"stop-color":0,"stop-opacity":0,stroke:0,"stroke-dasharray":0,"stroke-dashoffset":0,"stroke-linecap":0,"stroke-linejoin":0,"stroke-miterlimit":0,"stroke-opacity":0,"stroke-width":0,"text-anchor":0,"text-decoration":0,"text-rendering":0,"unicode-bidi":0,visibility:0,"word-spacing":0,"writing-mode":0};t.on("snap.util.attr",function(e){var n=t.nt(),r={};n=n.substring(n.lastIndexOf(".")+1),r[n]=e;var o=n.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()}),a=n.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});ee[S](a)?this.node.style[o]=null==e?k:e:i(this.node,r)}),function(e){}(E.prototype),n.ajax=function(e,n,i,o){var a=new XMLHttpRequest,s=$();if(a){if(r(n,"function"))o=i,i=n,n=null;else if(r(n,"object")){var c=[];for(var p in n)n.hasOwnProperty(p)&&c.push(encodeURIComponent(p)+"="+encodeURIComponent(n[p]));n=c.join("&")}return a.open(n?"POST":"GET",e,!0),n&&(a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.setRequestHeader("Content-type","application/x-www-form-urlencoded")),i&&(t.once("snap.ajax."+s+".0",i),t.once("snap.ajax."+s+".200",i),t.once("snap.ajax."+s+".304",i)),a.onreadystatechange=function(){4==a.readyState&&t("snap.ajax."+s+"."+a.status,o,a)},4==a.readyState?a:(a.send(n),a)}},n.load=function(e,t,i){n.ajax(e,function(e){var r=n.parse(e.responseText);i?t.call(i,r):t(r)})};var te=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,i=n.body,r=n.documentElement,o=r.clientTop||i.clientTop||0,a=r.clientLeft||i.clientLeft||0,s=t.top+(g.win.pageYOffset||r.scrollTop||i.scrollTop)-o,c=t.left+(g.win.pageXOffset||r.scrollLeft||i.scrollLeft)-a;return{y:s,x:c}};return n.getElementByPoint=function(e,t){var n=this,i=(n.canvas,_.doc.elementFromPoint(e,t));if(_.win.opera&&"svg"==i.tagName){var r=te(i),o=i.createSVGRect();o.x=e-r.x,o.y=t-r.y,o.width=o.height=1;var a=i.getIntersectionList(o,null);a.length&&(i=a[a.length-1])}return i?w(i):null},n.plugin=function(e){e(n,y,E,_,x)},_.win.Snap=n,n}(e||this);return i.plugin(function(i,r,o,a,s){function c(e,t){if(null==t){var n=!0;if(t="linearGradient"==e.type||"radialGradient"==e.type?e.node.getAttribute("gradientTransform"):"pattern"==e.type?e.node.getAttribute("patternTransform"):e.node.getAttribute("transform"),!t)return new i.Matrix;t=i._.svgTransform2string(t)}else t=i._.rgTransform.test(t)?f(t).replace(/\.{3}|\u2026/g,e._.transform||E):i._.svgTransform2string(t),d(t,"array")&&(t=i.path?i.path.toString.call(t):f(t)),e._.transform=t;var r=i._.transform2matrix(t,e.getBBox(1));return n?r:void(e.matrix=r)}function p(e){function t(e,t){var n=v(e.node,t);n=n&&n.match(o),n=n&&n[2],n&&"#"==n.charAt()&&(n=n.substring(1),n&&(s[n]=(s[n]||[]).concat(function(n){var i={};i[t]=URL(n),v(e.node,i)})))}function n(e){var t=v(e.node,"xlink:href");t&&"#"==t.charAt()&&(t=t.substring(1),t&&(s[t]=(s[t]||[]).concat(function(t){e.attr("xlink:href","#"+t)})))}for(var i,r=e.selectAll("*"),o=/^\s*url\(("|'|)(.*)\1\)\s*$/,a=[],s={},c=0,p=r.length;p>c;c++){i=r[c],t(i,"fill"),t(i,"stroke"),t(i,"filter"),t(i,"mask"),t(i,"clip-path"),n(i);var u=v(i.node,"id");u&&(v(i.node,{id:i.id}),a.push({old:u,id:i.id}))}for(c=0,p=a.length;p>c;c++){var l=s[a[c].old];if(l)for(var h=0,d=l.length;d>h;h++)l[h](a[c].id)}}function u(e,t,n){return function(i){var r=i.slice(e,t);return 1==r.length&&(r=r[0]),n?n(r):r}}function l(e){return function(){var t=e?"<"+this.type:"",n=this.node.attributes,i=this.node.childNodes;if(e)for(var r=0,o=n.length;o>r;r++)t+=" "+n[r].name+'="'+n[r].value.replace(/"/g,'\\"')+'"';if(i.length){for(e&&(t+=">"),r=0,o=i.length;o>r;r++)3==i[r].nodeType?t+=i[r].nodeValue:1==i[r].nodeType&&(t+=b(i[r]).toString());e&&(t+="</"+this.type+">")}else e&&(t+="/>");return t}}var h=r.prototype,d=i.is,f=String,m=i._unit2px,v=i._.$,y=i._.make,g=i._.getSomeDefs,x="hasOwnProperty",b=i._.wrap;h.getBBox=function(e){if(!i.Matrix||!i.path)return this.node.getBBox();var t=this,n=new i.Matrix;if(t.removed)return i._.box();for(;"use"==t.type;)if(e||(n=n.add(t.transform().localMatrix.translate(t.attr("x")||0,t.attr("y")||0))),t.original)t=t.original;else{var r=t.attr("xlink:href");t=t.original=t.node.ownerDocument.getElementById(r.substring(r.indexOf("#")+1))}var o=t._,a=i.path.get[t.type]||i.path.get.deflt;try{return e?(o.bboxwt=a?i.path.getBBox(t.realPath=a(t)):i._.box(t.node.getBBox()),i._.box(o.bboxwt)):(t.realPath=a(t),t.matrix=t.transform().localMatrix,o.bbox=i.path.getBBox(i.path.map(t.realPath,n.add(t.matrix))),i._.box(o.bbox))}catch(s){return i._.box()}};var w=function(){return this.string};h.transform=function(e){var t=this._;if(null==e){for(var n,r=this,o=new i.Matrix(this.node.getCTM()),a=c(this),s=[a],p=new i.Matrix,u=a.toTransformString(),l=f(a)==f(this.matrix)?f(t.transform):u;"svg"!=r.type&&(r=r.parent());)s.push(c(r));for(n=s.length;n--;)p.add(s[n]);return{string:l,globalMatrix:o,totalMatrix:p,localMatrix:a,diffMatrix:o.clone().add(a.invert()),global:o.toTransformString(),total:p.toTransformString(),local:u,toString:w}}return e instanceof i.Matrix?(this.matrix=e,this._.transform=e.toTransformString()):c(this,e),this.node&&("linearGradient"==this.type||"radialGradient"==this.type?v(this.node,{gradientTransform:this.matrix}):"pattern"==this.type?v(this.node,{patternTransform:this.matrix}):v(this.node,{transform:this.matrix})),this},h.parent=function(){return b(this.node.parentNode)},h.append=h.add=function(e){if(e){if("set"==e.type){var t=this;return e.forEach(function(e){t.add(e)}),this}e=b(e),this.node.appendChild(e.node),e.paper=this.paper}return this},h.appendTo=function(e){return e&&(e=b(e),e.append(this)),this},h.prepend=function(e){if(e){if("set"==e.type){var t,n=this;return e.forEach(function(e){t?t.after(e):n.prepend(e),t=e}),this}e=b(e);var i=e.parent();this.node.insertBefore(e.node,this.node.firstChild),this.add&&this.add(),e.paper=this.paper,this.parent()&&this.parent().add(),i&&i.add()}return this},h.prependTo=function(e){return e=b(e),e.prepend(this),this},h.before=function(e){if("set"==e.type){var t=this;return e.forEach(function(e){var n=e.parent();t.node.parentNode.insertBefore(e.node,t.node),n&&n.add()}),this.parent().add(),this}e=b(e);var n=e.parent();return this.node.parentNode.insertBefore(e.node,this.node),this.parent()&&this.parent().add(),n&&n.add(),e.paper=this.paper,this},h.after=function(e){e=b(e);var t=e.parent();return this.node.nextSibling?this.node.parentNode.insertBefore(e.node,this.node.nextSibling):this.node.parentNode.appendChild(e.node),this.parent()&&this.parent().add(),t&&t.add(),e.paper=this.paper,this},h.insertBefore=function(e){e=b(e);var t=this.parent();return e.node.parentNode.insertBefore(this.node,e.node),this.paper=e.paper,t&&t.add(),e.parent()&&e.parent().add(),this},h.insertAfter=function(e){e=b(e);var t=this.parent();return e.node.parentNode.insertBefore(this.node,e.node.nextSibling),this.paper=e.paper,t&&t.add(),e.parent()&&e.parent().add(),this},h.remove=function(){var e=this.parent();return this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.paper,this.removed=!0,e&&e.add(),this},h.select=function(e){return e=f(e).replace(/([^\\]):/g,"$1\\:"),b(this.node.querySelector(e))},h.selectAll=function(e){for(var t=this.node.querySelectorAll(e),n=(i.set||Array)(),r=0;r<t.length;r++)n.push(b(t[r]));return n},h.asPX=function(e,t){return null==t&&(t=this.attr(e)),+m(this,e,t)},h.use=function(){var e,t=this.node.id;return t||(t=this.id,v(this.node,{id:t})),e="linearGradient"==this.type||"radialGradient"==this.type||"pattern"==this.type?y(this.type,this.node.parentNode):y("use",this.node.parentNode),v(e.node,{"xlink:href":"#"+t}),e.original=this,e},h.clone=function(){var e=b(this.node.cloneNode(!0));return v(e.node,"id")&&v(e.node,{id:e.id}),p(e),e.insertAfter(this),e},h.toDefs=function(){var e=g(this);return e.appendChild(this.node),this},h.pattern=h.toPattern=function(e,t,n,i){var r=y("pattern",g(this));return null==e&&(e=this.getBBox()),d(e,"object")&&"x"in e&&(t=e.y,n=e.width,i=e.height,e=e.x),v(r.node,{x:e,y:t,width:n,height:i,patternUnits:"userSpaceOnUse",id:r.id,viewBox:[e,t,n,i].join(" ")}),r.node.appendChild(this.node),r},h.marker=function(e,t,n,i,r,o){var a=y("marker",g(this));return null==e&&(e=this.getBBox()),d(e,"object")&&"x"in e&&(t=e.y,n=e.width,i=e.height,r=e.refX||e.cx,o=e.refY||e.cy,e=e.x),v(a.node,{viewBox:[e,t,n,i].join(" "),markerWidth:n,markerHeight:i,orient:"auto",refX:r||0,refY:o||0,id:a.id}),a.node.appendChild(this.node),a};var _=function(e,t,i,r){"function"!=typeof i||i.length||(r=i,i=n.linear),this.attr=e,this.dur=t,i&&(this.easing=i),r&&(this.callback=r)};i._.Animation=_,i.animation=function(e,t,n,i){return new _(e,t,n,i)},h.inAnim=function(){var e=this,t=[];for(var n in e.anims)e.anims[x](n)&&!function(e){t.push({anim:new _(e._attrs,e.dur,e.easing,e._callback),mina:e,curStatus:e.status(),status:function(t){return e.status(t)},stop:function(){e.stop()}})}(e.anims[n]);return t},i.animate=function(e,i,r,o,a,s){"function"!=typeof a||a.length||(s=a,a=n.linear);var c=n.time(),p=n(e,i,c,c+o,n.time,r,a);return s&&t.once("mina.finish."+p.id,s),p},h.stop=function(){for(var e=this.inAnim(),t=0,n=e.length;n>t;t++)e[t].stop();return this},h.animate=function(e,i,r,o){"function"!=typeof r||r.length||(o=r,r=n.linear),e instanceof _&&(o=e.callback,r=e.easing,i=r.dur,e=e.attr);var a,s,c,p,l=[],h=[],m={},v=this;for(var y in e)if(e[x](y)){v.equal?(p=v.equal(y,f(e[y])),a=p.from,s=p.to,c=p.f):(a=+v.attr(y),s=+e[y]);var g=d(a,"array")?a.length:1;m[y]=u(l.length,l.length+g,c),l=l.concat(a),h=h.concat(s)}var b=n.time(),E=n(l,h,b,b+i,n.time,function(e){var t={};for(var n in m)m[x](n)&&(t[n]=m[n](e));v.attr(t)},r);return v.anims[E.id]=E,E._attrs=e,E._callback=o,t("snap.animcreated."+v.id,E),t.once("mina.finish."+E.id,function(){delete v.anims[E.id],o&&o.call(v)}),t.once("mina.stop."+E.id,function(){delete v.anims[E.id]}),v};var S={};h.data=function(e,n){var r=S[this.id]=S[this.id]||{};if(0==arguments.length)return t("snap.data.get."+this.id,this,r,null),r;if(1==arguments.length){if(i.is(e,"object")){for(var o in e)e[x](o)&&this.data(o,e[o]);return this}return t("snap.data.get."+this.id,this,r[e],e),r[e]}return r[e]=n,t("snap.data.set."+this.id,this,n,e),this},h.removeData=function(e){return null==e?S[this.id]={}:S[this.id]&&delete S[this.id][e],this},h.outerSVG=h.toString=l(1),h.innerSVG=l(),h.toDataURL=function(){if(e&&e.btoa){var t=this.getBBox(),n=i.format('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="{width}" height="{height}" viewBox="{x} {y} {width} {height}">{contents}</svg>',{x:+t.x.toFixed(3),y:+t.y.toFixed(3),width:+t.width.toFixed(3),height:+t.height.toFixed(3),contents:this.outerSVG()});return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))}},s.prototype.select=h.select,s.prototype.selectAll=h.selectAll}),i.plugin(function(e,t,n,i,r){function o(e,t,n,i,r,o){return null==t&&"[object SVGMatrix]"==a.call(e)?(this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.e=e.e,void(this.f=e.f)):void(null!=e?(this.a=+e,this.b=+t,this.c=+n,this.d=+i,this.e=+r,this.f=+o):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0))}var a=Object.prototype.toString,s=String,c=Math,p="";!function(t){function n(e){return e[0]*e[0]+e[1]*e[1]}function i(e){var t=c.sqrt(n(e));e[0]&&(e[0]/=t),e[1]&&(e[1]/=t)}t.add=function(e,t,n,i,r,a){var s,c,p,u,l=[[],[],[]],h=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],d=[[e,n,r],[t,i,a],[0,0,1]];for(e&&e instanceof o&&(d=[[e.a,e.c,e.e],[e.b,e.d,e.f],[0,0,1]]),s=0;3>s;s++)for(c=0;3>c;c++){for(u=0,p=0;3>p;p++)u+=h[s][p]*d[p][c];l[s][c]=u}return this.a=l[0][0],this.b=l[1][0],this.c=l[0][1],this.d=l[1][1],this.e=l[0][2],this.f=l[1][2],this},t.invert=function(){var e=this,t=e.a*e.d-e.b*e.c;return new o(e.d/t,-e.b/t,-e.c/t,e.a/t,(e.c*e.f-e.d*e.e)/t,(e.b*e.e-e.a*e.f)/t)},t.clone=function(){return new o(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(e,t){return this.add(1,0,0,1,e,t)},t.scale=function(e,t,n,i){return null==t&&(t=e),(n||i)&&this.add(1,0,0,1,n,i),this.add(e,0,0,t,0,0),(n||i)&&this.add(1,0,0,1,-n,-i),this},t.rotate=function(t,n,i){t=e.rad(t),n=n||0,i=i||0;var r=+c.cos(t).toFixed(9),o=+c.sin(t).toFixed(9);return this.add(r,o,-o,r,n,i),this.add(1,0,0,1,-n,-i)},t.x=function(e,t){return e*this.a+t*this.c+this.e},t.y=function(e,t){return e*this.b+t*this.d+this.f},t.get=function(e){return+this[s.fromCharCode(97+e)].toFixed(4)},t.toString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.determinant=function(){return this.a*this.d-this.b*this.c},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var r=[[this.a,this.c],[this.b,this.d]];t.scalex=c.sqrt(n(r[0])),i(r[0]),t.shear=r[0][0]*r[1][0]+r[0][1]*r[1][1],r[1]=[r[1][0]-r[0][0]*t.shear,r[1][1]-r[0][1]*t.shear],t.scaley=c.sqrt(n(r[1])),i(r[1]),t.shear/=t.scaley,this.determinant()<0&&(t.scalex=-t.scalex);var o=-r[0][1],a=r[1][1];return 0>a?(t.rotate=e.deg(c.acos(a)),0>o&&(t.rotate=360-t.rotate)):t.rotate=e.deg(c.asin(o)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(e){var t=e||this.split();return+t.shear.toFixed(9)?"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]:(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx||t.dy?"t"+[+t.dx.toFixed(4),+t.dy.toFixed(4)]:p)+(1!=t.scalex||1!=t.scaley?"s"+[t.scalex,t.scaley,0,0]:p)+(t.rotate?"r"+[+t.rotate.toFixed(4),0,0]:p))}}(o.prototype),e.Matrix=o,e.matrix=function(e,t,n,i,r,a){return new o(e,t,n,i,r,a)}}),i.plugin(function(e,n,i,r,o){function a(i){return function(r){if(t.stop(),r instanceof o&&1==r.node.childNodes.length&&("radialGradient"==r.node.firstChild.tagName||"linearGradient"==r.node.firstChild.tagName||"pattern"==r.node.firstChild.tagName)&&(r=r.node.firstChild,d(this).appendChild(r),r=l(r)),r instanceof n)if("radialGradient"==r.type||"linearGradient"==r.type||"pattern"==r.type){r.node.id||m(r.node,{id:r.id});var a=v(r.node.id)}else a=r.attr(i);else if(a=e.color(r),a.error){var s=e(d(this).ownerSVGElement).gradient(r);s?(s.node.id||m(s.node,{id:s.id}),a=v(s.node.id)):a=r}else a=y(a);var c={};c[i]=a,m(this.node,c),this.node.style[i]=x}}function s(e){t.stop(),e==+e&&(e+="px"),this.node.style.fontSize=e}function c(e){for(var t=[],n=e.childNodes,i=0,r=n.length;r>i;i++){var o=n[i];3==o.nodeType&&t.push(o.nodeValue),"tspan"==o.tagName&&(1==o.childNodes.length&&3==o.firstChild.nodeType?t.push(o.firstChild.nodeValue):t.push(c(o)))}return t}function p(){return t.stop(),this.node.style.fontSize}var u=e._.make,l=e._.wrap,h=e.is,d=e._.getSomeDefs,f=/^url\(#?([^)]+)\)$/,m=e._.$,v=e.url,y=String,g=e._.separator,x="";t.on("snap.util.attr.mask",function(e){if(e instanceof n||e instanceof o){if(t.stop(),e instanceof o&&1==e.node.childNodes.length&&(e=e.node.firstChild,d(this).appendChild(e),e=l(e)),"mask"==e.type)var i=e;else i=u("mask",d(this)),i.node.appendChild(e.node);!i.node.id&&m(i.node,{id:i.id}),m(this.node,{mask:v(i.id)})}}),function(e){t.on("snap.util.attr.clip",e),t.on("snap.util.attr.clip-path",e),t.on("snap.util.attr.clipPath",e)}(function(e){if(e instanceof n||e instanceof o){if(t.stop(),"clipPath"==e.type)var i=e;else i=u("clipPath",d(this)),i.node.appendChild(e.node),!i.node.id&&m(i.node,{id:i.id});m(this.node,{"clip-path":v(i.node.id||i.id)})}}),t.on("snap.util.attr.fill",a("fill")),t.on("snap.util.attr.stroke",a("stroke"));var b=/^([lr])(?:\(([^)]*)\))?(.*)$/i;t.on("snap.util.grad.parse",function(e){e=y(e);var t=e.match(b);if(!t)return null;var n=t[1],i=t[2],r=t[3];return i=i.split(/\s*,\s*/).map(function(e){return+e==e?+e:e}),1==i.length&&0==i[0]&&(i=[]),r=r.split("-"),r=r.map(function(e){e=e.split(":");var t={color:e[0]};return e[1]&&(t.offset=parseFloat(e[1])),t}),{type:n,params:i,stops:r}}),t.on("snap.util.attr.d",function(n){t.stop(),h(n,"array")&&h(n[0],"array")&&(n=e.path.toString.call(n)),n=y(n),n.match(/[ruo]/i)&&(n=e.path.toAbsolute(n)),m(this.node,{d:n})})(-1),t.on("snap.util.attr.#text",function(e){t.stop(),e=y(e);for(var n=r.doc.createTextNode(e);this.node.firstChild;)this.node.removeChild(this.node.firstChild);this.node.appendChild(n)})(-1),t.on("snap.util.attr.path",function(e){t.stop(),this.attr({d:e})})(-1),t.on("snap.util.attr.class",function(e){t.stop(),this.node.className.baseVal=e})(-1),t.on("snap.util.attr.viewBox",function(e){var n;n=h(e,"object")&&"x"in e?[e.x,e.y,e.width,e.height].join(" "):h(e,"array")?e.join(" "):e,m(this.node,{viewBox:n}),t.stop()})(-1),t.on("snap.util.attr.transform",function(e){this.transform(e),t.stop()})(-1),t.on("snap.util.attr.r",function(e){"rect"==this.type&&(t.stop(),m(this.node,{rx:e,ry:e}))})(-1),t.on("snap.util.attr.textpath",function(e){if(t.stop(),"text"==this.type){var i,r,o;if(!e&&this.textPath){for(r=this.textPath;r.node.firstChild;)this.node.appendChild(r.node.firstChild);return r.remove(),void delete this.textPath}if(h(e,"string")){var a=d(this),s=l(a.parentNode).path(e);a.appendChild(s.node),i=s.id,s.attr({id:i})}else e=l(e),e instanceof n&&(i=e.attr("id"),i||(i=e.id,e.attr({id:i})));if(i)if(r=this.textPath,o=this.node,r)r.attr({"xlink:href":"#"+i});else{for(r=m("textPath",{"xlink:href":"#"+i});o.firstChild;)r.appendChild(o.firstChild);o.appendChild(r),this.textPath=l(r)}}})(-1),t.on("snap.util.attr.text",function(e){if("text"==this.type){for(var n=this.node,i=function(e){var t=m("tspan");if(h(e,"array"))for(var n=0;n<e.length;n++)t.appendChild(i(e[n]));else t.appendChild(r.doc.createTextNode(e));return t.normalize&&t.normalize(),t};n.firstChild;)n.removeChild(n.firstChild);for(var o=i(e);o.firstChild;)n.appendChild(o.firstChild)}t.stop()})(-1),t.on("snap.util.attr.fontSize",s)(-1),t.on("snap.util.attr.font-size",s)(-1),t.on("snap.util.getattr.transform",function(){return t.stop(),this.transform()})(-1),t.on("snap.util.getattr.textpath",function(){return t.stop(),this.textPath})(-1),function(){function n(n){return function(){t.stop();var i=r.doc.defaultView.getComputedStyle(this.node,null).getPropertyValue("marker-"+n);return"none"==i?i:e(r.doc.getElementById(i.match(f)[1]))}}function i(e){return function(n){t.stop();var i="marker"+e.charAt(0).toUpperCase()+e.substring(1);if(""==n||!n)return void(this.node.style[i]="none");if("marker"==n.type){var r=n.node.id;return r||m(n.node,{id:n.id}),void(this.node.style[i]=v(r))}}}t.on("snap.util.getattr.marker-end",n("end"))(-1),t.on("snap.util.getattr.markerEnd",n("end"))(-1),t.on("snap.util.getattr.marker-start",n("start"))(-1),t.on("snap.util.getattr.markerStart",n("start"))(-1),t.on("snap.util.getattr.marker-mid",n("mid"))(-1),t.on("snap.util.getattr.markerMid",n("mid"))(-1),t.on("snap.util.attr.marker-end",i("end"))(-1),t.on("snap.util.attr.markerEnd",i("end"))(-1),t.on("snap.util.attr.marker-start",i("start"))(-1),t.on("snap.util.attr.markerStart",i("start"))(-1),t.on("snap.util.attr.marker-mid",i("mid"))(-1),t.on("snap.util.attr.markerMid",i("mid"))(-1)}(),t.on("snap.util.getattr.r",function(){return"rect"==this.type&&m(this.node,"rx")==m(this.node,"ry")?(t.stop(),m(this.node,"rx")):void 0})(-1),t.on("snap.util.getattr.text",function(){if("text"==this.type||"tspan"==this.type){t.stop();var e=c(this.node);return 1==e.length?e[0]:e}})(-1),t.on("snap.util.getattr.#text",function(){return this.node.textContent})(-1),t.on("snap.util.getattr.viewBox",function(){t.stop();var n=m(this.node,"viewBox");return n?(n=n.split(g),e._.box(+n[0],+n[1],+n[2],+n[3])):void 0})(-1),t.on("snap.util.getattr.points",function(){var e=m(this.node,"points");return t.stop(),e?e.split(g):void 0})(-1),t.on("snap.util.getattr.path",function(){var e=m(this.node,"d");return t.stop(),e})(-1),t.on("snap.util.getattr.class",function(){return this.node.className.baseVal})(-1),t.on("snap.util.getattr.fontSize",p)(-1),t.on("snap.util.getattr.font-size",p)(-1)}),i.plugin(function(n,i,r,o,a){var s=r.prototype,c=n.is;s.rect=function(e,t,n,i,r,o){var a;return null==o&&(o=r),c(e,"object")&&"[object Object]"==e?a=e:null!=e&&(a={x:e,y:t,width:n,height:i},null!=r&&(a.rx=r,a.ry=o)),this.el("rect",a)},s.circle=function(e,t,n){var i;return c(e,"object")&&"[object Object]"==e?i=e:null!=e&&(i={cx:e,cy:t,r:n}),this.el("circle",i)};var p=function(){function e(){this.parentNode.removeChild(this)}return function(t,n){var i=o.doc.createElement("img"),r=o.doc.body;i.style.cssText="position:absolute;left:-9999em;top:-9999em",i.onload=function(){n.call(i),i.onload=i.onerror=null,r.removeChild(i)},i.onerror=e,r.appendChild(i),i.src=t}}();s.image=function(e,t,i,r,o){var a=this.el("image");if(c(e,"object")&&"src"in e)a.attr(e);else if(null!=e){var s={"xlink:href":e,preserveAspectRatio:"none"};null!=t&&null!=i&&(s.x=t,s.y=i),null!=r&&null!=o?(s.width=r,s.height=o):p(e,function(){n._.$(a.node,{width:this.offsetWidth,height:this.offsetHeight})}),n._.$(a.node,s)}return a},s.ellipse=function(e,t,n,i){var r;return c(e,"object")&&"[object Object]"==e?r=e:null!=e&&(r={cx:e,cy:t,rx:n,ry:i}),this.el("ellipse",r)},s.path=function(e){var t;return c(e,"object")&&!c(e,"array")?t=e:e&&(t={d:e}),this.el("path",t)},s.group=s.g=function(e){var t=this.el("g");return 1==arguments.length&&e&&!e.type?t.attr(e):arguments.length&&t.add(Array.prototype.slice.call(arguments,0)),t},s.svg=function(e,t,n,i,r,o,a,s){var p={};return c(e,"object")&&null==t?p=e:(null!=e&&(p.x=e),null!=t&&(p.y=t),null!=n&&(p.width=n),null!=i&&(p.height=i),null!=r&&null!=o&&null!=a&&null!=s&&(p.viewBox=[r,o,a,s])),this.el("svg",p)},s.mask=function(e){var t=this.el("mask");return 1==arguments.length&&e&&!e.type?t.attr(e):arguments.length&&t.add(Array.prototype.slice.call(arguments,0)),t},s.ptrn=function(e,t,n,i,r,o,a,s){if(c(e,"object"))var p=e;else p={patternUnits:"userSpaceOnUse"},e&&(p.x=e),t&&(p.y=t),null!=n&&(p.width=n),null!=i&&(p.height=i),null!=r&&null!=o&&null!=a&&null!=s&&(p.viewBox=[r,o,a,s]);return this.el("pattern",p)},s.use=function(e){return null!=e?(e instanceof i&&(e.attr("id")||e.attr({id:n._.id(e)}),e=e.attr("id")),"#"==String(e).charAt()&&(e=e.substring(1)),this.el("use",{"xlink:href":"#"+e})):i.prototype.use.call(this)},s.symbol=function(e,t,n,i){var r={};return null!=e&&null!=t&&null!=n&&null!=i&&(r.viewBox=[e,t,n,i]),this.el("symbol",r)},s.text=function(e,t,n){var i={};return c(e,"object")?i=e:null!=e&&(i={x:e,y:t,text:n||""}),this.el("text",i)},s.line=function(e,t,n,i){var r={};return c(e,"object")?r=e:null!=e&&(r={x1:e,x2:n,y1:t,y2:i}),this.el("line",r)},s.polyline=function(e){arguments.length>1&&(e=Array.prototype.slice.call(arguments,0));var t={};return c(e,"object")&&!c(e,"array")?t=e:null!=e&&(t={points:e}),this.el("polyline",t)},s.polygon=function(e){arguments.length>1&&(e=Array.prototype.slice.call(arguments,0));var t={};return c(e,"object")&&!c(e,"array")?t=e:null!=e&&(t={points:e}),this.el("polygon",t)},function(){function i(){return this.selectAll("stop")}function r(e,t){var i=u("stop"),r={offset:+t+"%"};return e=n.color(e),r["stop-color"]=e.hex,e.opacity<1&&(r["stop-opacity"]=e.opacity),u(i,r),this.node.appendChild(i),this}function o(){if("linearGradient"==this.type){var e=u(this.node,"x1")||0,t=u(this.node,"x2")||1,i=u(this.node,"y1")||0,r=u(this.node,"y2")||0;return n._.box(e,i,math.abs(t-e),math.abs(r-i))}var o=this.node.cx||.5,a=this.node.cy||.5,s=this.node.r||0;return n._.box(o-s,a-s,2*s,2*s)}function a(e,n){function i(e,t){for(var n=(t-l)/(e-h),i=h;e>i;i++)a[i].offset=+(+l+n*(i-h)).toFixed(2);h=e,l=t}var r,o=t("snap.util.grad.parse",null,n).firstDefined();if(!o)return null;o.params.unshift(e),r="l"==o.type.toLowerCase()?c.apply(0,o.params):p.apply(0,o.params),o.type!=o.type.toLowerCase()&&u(r.node,{gradientUnits:"userSpaceOnUse"});var a=o.stops,s=a.length,l=0,h=0;s--;for(var d=0;s>d;d++)"offset"in a[d]&&i(d,a[d].offset);for(a[s].offset=a[s].offset||100,i(s,a[s].offset),d=0;s>=d;d++){var f=a[d];r.addStop(f.color,f.offset)}return r}function c(e,t,a,s,c){var p=n._.make("linearGradient",e);return p.stops=i,p.addStop=r,p.getBBox=o,null!=t&&u(p.node,{x1:t,y1:a,x2:s,y2:c}),p}function p(e,t,a,s,c,p){var l=n._.make("radialGradient",e);return l.stops=i,l.addStop=r,l.getBBox=o,null!=t&&u(l.node,{cx:t,cy:a,r:s}),null!=c&&null!=p&&u(l.node,{fx:c,fy:p}),l}var u=n._.$;s.gradient=function(e){return a(this.defs,e)},s.gradientLinear=function(e,t,n,i){return c(this.defs,e,t,n,i)},s.gradientRadial=function(e,t,n,i,r){return p(this.defs,e,t,n,i,r)},s.toString=function(){var e,t=this.node.ownerDocument,i=t.createDocumentFragment(),r=t.createElement("div"),o=this.node.cloneNode(!0);return i.appendChild(r),r.appendChild(o),n._.$(o,{xmlns:"http://www.w3.org/2000/svg"}),e=r.innerHTML,i.removeChild(i.firstChild),e},s.toDataURL=function(){return e&&e.btoa?"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(this))):void 0},s.clear=function(){for(var e,t=this.node.firstChild;t;)e=t.nextSibling,"defs"!=t.tagName?t.parentNode.removeChild(t):s.clear.call({node:t}),t=e}}()}),i.plugin(function(e,t,n,i){function r(e){var t=r.ps=r.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout(function(){for(var n in t)t[j](n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])}),t[e]}function o(e,t,n,i){return null==e&&(e=t=n=i=0),null==t&&(t=e.y,n=e.width,i=e.height,e=e.x),{x:e,y:t,width:n,w:n,height:i,h:i,x2:e+n,y2:t+i,cx:e+n/2,cy:t+i/2,r1:G.min(n,i)/2,r2:G.max(n,i)/2,r0:G.sqrt(n*n+i*i)/2,path:S(e,t,n,i),vb:[e,t,n,i].join(" ")}}function a(){return this.join(",").replace(F,"$1")}function s(e){var t=L(e);return t.toString=a,t}function c(e,t,n,i,r,o,a,s,c){return null==c?m(e,t,n,i,r,o,a,s):u(e,t,n,i,r,o,a,s,v(e,t,n,i,r,o,a,s,c))}function p(n,i){function r(e){return+(+e).toFixed(3)}return e._.cacher(function(e,o,a){e instanceof t&&(e=e.attr("d")),e=D(e);for(var s,p,l,h,d,f="",m={},v=0,y=0,g=e.length;g>y;y++){if(l=e[y],"M"==l[0])s=+l[1],p=+l[2];else{if(h=c(s,p,l[1],l[2],l[3],l[4],l[5],l[6]),v+h>o){if(i&&!m.start){if(d=c(s,p,l[1],l[2],l[3],l[4],l[5],l[6],o-v),f+=["C"+r(d.start.x),r(d.start.y),r(d.m.x),r(d.m.y),r(d.x),r(d.y)],a)return f;m.start=f,f=["M"+r(d.x),r(d.y)+"C"+r(d.n.x),r(d.n.y),r(d.end.x),r(d.end.y),r(l[5]),r(l[6])].join(),v+=h,s=+l[5],p=+l[6];continue}if(!n&&!i)return d=c(s,p,l[1],l[2],l[3],l[4],l[5],l[6],o-v)}v+=h,s=+l[5],p=+l[6]}f+=l.shift()+l}return m.end=f,d=n?v:i?m:u(s,p,l[0],l[1],l[2],l[3],l[4],l[5],1)},null,e._.clone)}function u(e,t,n,i,r,o,a,s,c){var p=1-c,u=U(p,3),l=U(p,2),h=c*c,d=h*c,f=u*e+3*l*c*n+3*p*c*c*r+d*a,m=u*t+3*l*c*i+3*p*c*c*o+d*s,v=e+2*c*(n-e)+h*(r-2*n+e),y=t+2*c*(i-t)+h*(o-2*i+t),g=n+2*c*(r-n)+h*(a-2*r+n),x=i+2*c*(o-i)+h*(s-2*o+i),b=p*e+c*n,E=p*t+c*i,w=p*r+c*a,_=p*o+c*s,S=90-180*G.atan2(v-g,y-x)/V;return{x:f,y:m,m:{x:v,y:y},n:{x:g,y:x},start:{x:b,y:E},end:{x:w,y:_},alpha:S}}function l(t,n,i,r,a,s,c,p){e.is(t,"array")||(t=[t,n,i,r,a,s,c,p]);var u=M.apply(null,t);return o(u.min.x,u.min.y,u.max.x-u.min.x,u.max.y-u.min.y)}function h(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function d(e,t){return e=o(e),t=o(t),h(t,e.x,e.y)||h(t,e.x2,e.y)||h(t,e.x,e.y2)||h(t,e.x2,e.y2)||h(e,t.x,t.y)||h(e,t.x2,t.y)||h(e,t.x,t.y2)||h(e,t.x2,t.y2)||(e.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}function f(e,t,n,i,r){var o=-3*t+9*n-9*i+3*r,a=e*o+6*t-12*n+6*i;return e*a-3*t+3*n}function m(e,t,n,i,r,o,a,s,c){null==c&&(c=1),c=c>1?1:0>c?0:c;for(var p=c/2,u=12,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,m=0;u>m;m++){var v=p*l[m]+p,y=f(v,e,n,r,a),g=f(v,t,i,o,s),x=y*y+g*g;d+=h[m]*G.sqrt(x)}return p*d}function v(e,t,n,i,r,o,a,s,c){if(!(0>c||m(e,t,n,i,r,o,a,s)<c)){var p,u=1,l=u/2,h=u-l,d=.01;for(p=m(e,t,n,i,r,o,a,s,h);H(p-c)>d;)l/=2,h+=(c>p?1:-1)*l,p=m(e,t,n,i,r,o,a,s,h);return h}}function y(e,t,n,i,r,o,a,s){if(!(W(e,n)<$(r,a)||$(e,n)>W(r,a)||W(t,i)<$(o,s)||$(t,i)>W(o,s))){var c=(e*i-t*n)*(r-a)-(e-n)*(r*s-o*a),p=(e*i-t*n)*(o-s)-(t-i)*(r*s-o*a),u=(e-n)*(o-s)-(t-i)*(r-a);if(u){var l=c/u,h=p/u,d=+l.toFixed(2),f=+h.toFixed(2);if(!(d<+$(e,n).toFixed(2)||d>+W(e,n).toFixed(2)||d<+$(r,a).toFixed(2)||d>+W(r,a).toFixed(2)||f<+$(t,i).toFixed(2)||f>+W(t,i).toFixed(2)||f<+$(o,s).toFixed(2)||f>+W(o,s).toFixed(2)))return{x:l,y:h}}}}function g(e,t,n){var i=l(e),r=l(t);if(!d(i,r))return n?0:[];for(var o=m.apply(0,e),a=m.apply(0,t),s=~~(o/8),c=~~(a/8),p=[],h=[],f={},v=n?0:[],g=0;s+1>g;g++){var x=u.apply(0,e.concat(g/s));p.push({x:x.x,y:x.y,t:g/s})}for(g=0;c+1>g;g++)x=u.apply(0,t.concat(g/c)),h.push({x:x.x,y:x.y,t:g/c});for(g=0;s>g;g++)for(var b=0;c>b;b++){var E=p[g],w=p[g+1],_=h[b],S=h[b+1],T=H(w.x-E.x)<.001?"y":"x",A=H(S.x-_.x)<.001?"y":"x",C=y(E.x,E.y,w.x,w.y,_.x,_.y,S.x,S.y);if(C){if(f[C.x.toFixed(4)]==C.y.toFixed(4))continue;f[C.x.toFixed(4)]=C.y.toFixed(4);var R=E.t+H((C[T]-E[T])/(w[T]-E[T]))*(w.t-E.t),N=_.t+H((C[A]-_[A])/(S[A]-_[A]))*(S.t-_.t);R>=0&&1>=R&&N>=0&&1>=N&&(n?v++:v.push({x:C.x,y:C.y,t1:R,t2:N}))}}return v}function x(e,t){return E(e,t)}function b(e,t){return E(e,t,1)}function E(e,t,n){e=D(e),t=D(t);for(var i,r,o,a,s,c,p,u,l,h,d=n?0:[],f=0,m=e.length;m>f;f++){var v=e[f];if("M"==v[0])i=s=v[1],r=c=v[2];else{"C"==v[0]?(l=[i,r].concat(v.slice(1)),i=l[6],r=l[7]):(l=[i,r,i,r,s,c,s,c],i=s,r=c);for(var y=0,x=t.length;x>y;y++){var b=t[y];if("M"==b[0])o=p=b[1],a=u=b[2];else{"C"==b[0]?(h=[o,a].concat(b.slice(1)),o=h[6],a=h[7]):(h=[o,a,o,a,p,u,p,u],o=p,a=u);var E=g(l,h,n);if(n)d+=E;else{for(var w=0,_=E.length;_>w;w++)E[w].segment1=f,E[w].segment2=y,E[w].bez1=l,E[w].bez2=h;d=d.concat(E)}}}}}return d}function w(e,t,n){var i=_(e);return h(i,t,n)&&E(e,[["M",t,n],["H",i.x2+10]],1)%2==1}function _(e){var t=r(e);if(t.bbox)return L(t.bbox);if(!e)return o();e=D(e);for(var n,i=0,a=0,s=[],c=[],p=0,u=e.length;u>p;p++)if(n=e[p],"M"==n[0])i=n[1],a=n[2],s.push(i),c.push(a);else{var l=M(i,a,n[1],n[2],n[3],n[4],n[5],n[6]);s=s.concat(l.min.x,l.max.x),c=c.concat(l.min.y,l.max.y),i=n[5],a=n[6]}var h=$.apply(0,s),d=$.apply(0,c),f=W.apply(0,s),m=W.apply(0,c),v=o(h,d,f-h,m-d);return t.bbox=L(v),v}function S(e,t,n,i,r){if(r)return[["M",+e+ +r,t],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]];var o=[["M",e,t],["l",n,0],["l",0,i],["l",-n,0],["z"]];return o.toString=a,o}function T(e,t,n,i,r){if(null==r&&null==i&&(i=n),e=+e,t=+t,n=+n,i=+i,null!=r)var o=Math.PI/180,s=e+n*Math.cos(-i*o),c=e+n*Math.cos(-r*o),p=t+n*Math.sin(-i*o),u=t+n*Math.sin(-r*o),l=[["M",s,p],["A",n,n,0,+(r-i>180),0,c,u]];else l=[["M",e,t],["m",0,-i],["a",n,i,0,1,1,0,2*i],["a",n,i,0,1,1,0,-2*i],["z"]];return l.toString=a,l}function A(t){var n=r(t),i=String.prototype.toLowerCase;if(n.rel)return s(n.rel);e.is(t,"array")&&e.is(t&&t[0],"array")||(t=e.parsePathString(t));var o=[],c=0,p=0,u=0,l=0,h=0;"M"==t[0][0]&&(c=t[0][1],p=t[0][2],u=c,l=p,h++,o.push(["M",c,p]));for(var d=h,f=t.length;f>d;d++){var m=o[d]=[],v=t[d];if(v[0]!=i.call(v[0]))switch(m[0]=i.call(v[0]),m[0]){case"a":m[1]=v[1],m[2]=v[2],m[3]=v[3],m[4]=v[4],m[5]=v[5],m[6]=+(v[6]-c).toFixed(3),m[7]=+(v[7]-p).toFixed(3);break;case"v":m[1]=+(v[1]-p).toFixed(3);break;case"m":u=v[1],l=v[2];default:for(var y=1,g=v.length;g>y;y++)m[y]=+(v[y]-(y%2?c:p)).toFixed(3);
|
|
}else{m=o[d]=[],"m"==v[0]&&(u=v[1]+c,l=v[2]+p);for(var x=0,b=v.length;b>x;x++)o[d][x]=v[x]}var E=o[d].length;switch(o[d][0]){case"z":c=u,p=l;break;case"h":c+=+o[d][E-1];break;case"v":p+=+o[d][E-1];break;default:c+=+o[d][E-2],p+=+o[d][E-1]}}return o.toString=a,n.rel=s(o),o}function C(t){var n=r(t);if(n.abs)return s(n.abs);if(I(t,"array")&&I(t&&t[0],"array")||(t=e.parsePathString(t)),!t||!t.length)return[["M",0,0]];var i,o=[],c=0,p=0,u=0,l=0,h=0;"M"==t[0][0]&&(c=+t[0][1],p=+t[0][2],u=c,l=p,h++,o[0]=["M",c,p]);for(var d,f,m=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),v=h,y=t.length;y>v;v++){if(o.push(d=[]),f=t[v],i=f[0],i!=i.toUpperCase())switch(d[0]=i.toUpperCase(),d[0]){case"A":d[1]=f[1],d[2]=f[2],d[3]=f[3],d[4]=f[4],d[5]=f[5],d[6]=+f[6]+c,d[7]=+f[7]+p;break;case"V":d[1]=+f[1]+p;break;case"H":d[1]=+f[1]+c;break;case"R":for(var g=[c,p].concat(f.slice(1)),x=2,b=g.length;b>x;x++)g[x]=+g[x]+c,g[++x]=+g[x]+p;o.pop(),o=o.concat(B(g,m));break;case"O":o.pop(),g=T(c,p,f[1],f[2]),g.push(g[0]),o=o.concat(g);break;case"U":o.pop(),o=o.concat(T(c,p,f[1],f[2],f[3])),d=["U"].concat(o[o.length-1].slice(-2));break;case"M":u=+f[1]+c,l=+f[2]+p;default:for(x=1,b=f.length;b>x;x++)d[x]=+f[x]+(x%2?c:p)}else if("R"==i)g=[c,p].concat(f.slice(1)),o.pop(),o=o.concat(B(g,m)),d=["R"].concat(f.slice(-2));else if("O"==i)o.pop(),g=T(c,p,f[1],f[2]),g.push(g[0]),o=o.concat(g);else if("U"==i)o.pop(),o=o.concat(T(c,p,f[1],f[2],f[3])),d=["U"].concat(o[o.length-1].slice(-2));else for(var E=0,w=f.length;w>E;E++)d[E]=f[E];if(i=i.toUpperCase(),"O"!=i)switch(d[0]){case"Z":c=+u,p=+l;break;case"H":c=d[1];break;case"V":p=d[1];break;case"M":u=d[d.length-2],l=d[d.length-1];default:c=d[d.length-2],p=d[d.length-1]}}return o.toString=a,n.abs=s(o),o}function R(e,t,n,i){return[e,t,n,i,n,i]}function N(e,t,n,i,r,o){var a=1/3,s=2/3;return[a*e+s*n,a*t+s*i,a*r+s*n,a*o+s*i,r,o]}function P(t,n,i,r,o,a,s,c,p,u){var l,h=120*V/180,d=V/180*(+o||0),f=[],m=e._.cacher(function(e,t,n){var i=e*G.cos(n)-t*G.sin(n),r=e*G.sin(n)+t*G.cos(n);return{x:i,y:r}});if(u)S=u[0],T=u[1],w=u[2],_=u[3];else{l=m(t,n,-d),t=l.x,n=l.y,l=m(c,p,-d),c=l.x,p=l.y;var v=(G.cos(V/180*o),G.sin(V/180*o),(t-c)/2),y=(n-p)/2,g=v*v/(i*i)+y*y/(r*r);g>1&&(g=G.sqrt(g),i=g*i,r=g*r);var x=i*i,b=r*r,E=(a==s?-1:1)*G.sqrt(H((x*b-x*y*y-b*v*v)/(x*y*y+b*v*v))),w=E*i*y/r+(t+c)/2,_=E*-r*v/i+(n+p)/2,S=G.asin(((n-_)/r).toFixed(9)),T=G.asin(((p-_)/r).toFixed(9));S=w>t?V-S:S,T=w>c?V-T:T,0>S&&(S=2*V+S),0>T&&(T=2*V+T),s&&S>T&&(S-=2*V),!s&&T>S&&(T-=2*V)}var A=T-S;if(H(A)>h){var C=T,R=c,N=p;T=S+h*(s&&T>S?1:-1),c=w+i*G.cos(T),p=_+r*G.sin(T),f=P(c,p,i,r,o,0,s,R,N,[T,C,w,_])}A=T-S;var M=G.cos(S),D=G.sin(S),k=G.cos(T),B=G.sin(T),O=G.tan(A/4),I=4/3*i*O,L=4/3*r*O,j=[t,n],F=[t+I*D,n-L*M],z=[c+I*B,p-L*k],$=[c,p];if(F[0]=2*j[0]-F[0],F[1]=2*j[1]-F[1],u)return[F,z,$].concat(f);f=[F,z,$].concat(f).join().split(",");for(var W=[],U=0,q=f.length;q>U;U++)W[U]=U%2?m(f[U-1],f[U],d).y:m(f[U],f[U+1],d).x;return W}function M(e,t,n,i,r,o,a,s){for(var c,p,u,l,h,d,f,m,v=[],y=[[],[]],g=0;2>g;++g)if(0==g?(p=6*e-12*n+6*r,c=-3*e+9*n-9*r+3*a,u=3*n-3*e):(p=6*t-12*i+6*o,c=-3*t+9*i-9*o+3*s,u=3*i-3*t),H(c)<1e-12){if(H(p)<1e-12)continue;l=-u/p,l>0&&1>l&&v.push(l)}else f=p*p-4*u*c,m=G.sqrt(f),0>f||(h=(-p+m)/(2*c),h>0&&1>h&&v.push(h),d=(-p-m)/(2*c),d>0&&1>d&&v.push(d));for(var x,b=v.length,E=b;b--;)l=v[b],x=1-l,y[0][b]=x*x*x*e+3*x*x*l*n+3*x*l*l*r+l*l*l*a,y[1][b]=x*x*x*t+3*x*x*l*i+3*x*l*l*o+l*l*l*s;return y[0][E]=e,y[1][E]=t,y[0][E+1]=a,y[1][E+1]=s,y[0].length=y[1].length=E+2,{min:{x:$.apply(0,y[0]),y:$.apply(0,y[1])},max:{x:W.apply(0,y[0]),y:W.apply(0,y[1])}}}function D(e,t){var n=!t&&r(e);if(!t&&n.curve)return s(n.curve);for(var i=C(e),o=t&&C(t),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},c={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},p=(function(e,t,n){var i,r;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"].concat(P.apply(0,[t.x,t.y].concat(e.slice(1))));break;case"S":"C"==n||"S"==n?(i=2*t.x-t.bx,r=2*t.y-t.by):(i=t.x,r=t.y),e=["C",i,r].concat(e.slice(1));break;case"T":"Q"==n||"T"==n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C"].concat(N(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"].concat(N(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"].concat(R(t.x,t.y,e[1],e[2]));break;case"H":e=["C"].concat(R(t.x,t.y,e[1],t.y));break;case"V":e=["C"].concat(R(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"].concat(R(t.x,t.y,t.X,t.Y))}return e}),u=function(e,t){if(e[t].length>7){e[t].shift();for(var n=e[t];n.length;)h[t]="A",o&&(d[t]="A"),e.splice(t++,0,["C"].concat(n.splice(0,6)));e.splice(t,1),y=W(i.length,o&&o.length||0)}},l=function(e,t,n,r,a){e&&t&&"M"==e[a][0]&&"M"!=t[a][0]&&(t.splice(a,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=e[a][1],n.y=e[a][2],y=W(i.length,o&&o.length||0))},h=[],d=[],f="",m="",v=0,y=W(i.length,o&&o.length||0);y>v;v++){i[v]&&(f=i[v][0]),"C"!=f&&(h[v]=f,v&&(m=h[v-1])),i[v]=p(i[v],a,m),"A"!=h[v]&&"C"==f&&(h[v]="C"),u(i,v),o&&(o[v]&&(f=o[v][0]),"C"!=f&&(d[v]=f,v&&(m=d[v-1])),o[v]=p(o[v],c,m),"A"!=d[v]&&"C"==f&&(d[v]="C"),u(o,v)),l(i,o,a,c,v),l(o,i,c,a,v);var g=i[v],x=o&&o[v],b=g.length,E=o&&x.length;a.x=g[b-2],a.y=g[b-1],a.bx=z(g[b-4])||a.x,a.by=z(g[b-3])||a.y,c.bx=o&&(z(x[E-4])||c.x),c.by=o&&(z(x[E-3])||c.y),c.x=o&&x[E-2],c.y=o&&x[E-1]}return o||(n.curve=s(i)),o?[i,o]:i}function k(e,t){if(!t)return e;var n,i,r,o,a,s,c;for(e=D(e),r=0,a=e.length;a>r;r++)for(c=e[r],o=1,s=c.length;s>o;o+=2)n=t.x(c[o],c[o+1]),i=t.y(c[o],c[o+1]),c[o]=n,c[o+1]=i;return e}function B(e,t){for(var n=[],i=0,r=e.length;r-2*!t>i;i+=2){var o=[{x:+e[i-2],y:+e[i-1]},{x:+e[i],y:+e[i+1]},{x:+e[i+2],y:+e[i+3]},{x:+e[i+4],y:+e[i+5]}];t?i?r-4==i?o[3]={x:+e[0],y:+e[1]}:r-2==i&&(o[2]={x:+e[0],y:+e[1]},o[3]={x:+e[2],y:+e[3]}):o[0]={x:+e[r-2],y:+e[r-1]}:r-4==i?o[3]=o[2]:i||(o[0]={x:+e[i],y:+e[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n}var O=t.prototype,I=e.is,L=e._.clone,j="hasOwnProperty",F=/,?([a-z]),?/gi,z=parseFloat,G=Math,V=G.PI,$=G.min,W=G.max,U=G.pow,H=G.abs,q=p(1),Y=p(),X=p(0,1),K=e._unit2px,Z={path:function(e){return e.attr("path")},circle:function(e){var t=K(e);return T(t.cx,t.cy,t.r)},ellipse:function(e){var t=K(e);return T(t.cx||0,t.cy||0,t.rx,t.ry)},rect:function(e){var t=K(e);return S(t.x||0,t.y||0,t.width,t.height,t.rx,t.ry)},image:function(e){var t=K(e);return S(t.x||0,t.y||0,t.width,t.height)},line:function(e){return"M"+[e.attr("x1")||0,e.attr("y1")||0,e.attr("x2"),e.attr("y2")]},polyline:function(e){return"M"+e.attr("points")},polygon:function(e){return"M"+e.attr("points")+"z"},deflt:function(e){var t=e.node.getBBox();return S(t.x,t.y,t.width,t.height)}};e.path=r,e.path.getTotalLength=q,e.path.getPointAtLength=Y,e.path.getSubpath=function(e,t,n){if(this.getTotalLength(e)-n<1e-6)return X(e,t).end;var i=X(e,n,1);return t?X(i,t).end:i},O.getTotalLength=function(){return this.node.getTotalLength?this.node.getTotalLength():void 0},O.getPointAtLength=function(e){return Y(this.attr("d"),e)},O.getSubpath=function(t,n){return e.path.getSubpath(this.attr("d"),t,n)},e._.box=o,e.path.findDotsAtSegment=u,e.path.bezierBBox=l,e.path.isPointInsideBBox=h,e.path.isBBoxIntersect=d,e.path.intersection=x,e.path.intersectionNumber=b,e.path.isPointInside=w,e.path.getBBox=_,e.path.get=Z,e.path.toRelative=A,e.path.toAbsolute=C,e.path.toCubic=D,e.path.map=k,e.path.toString=a,e.path.clone=s}),i.plugin(function(e,n,i,r){for(var o=n.prototype,a="hasOwnProperty",s=("createTouch"in r.doc),c=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","touchstart","touchmove","touchend","touchcancel"],p={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},u=(function(e,t){var n="y"==e?"scrollTop":"scrollLeft",i=t&&t.node?t.node.ownerDocument:r.doc;return i[n in i.documentElement?"documentElement":"body"][n]}),l=function(){this.returnValue=!1},h=function(){return this.originalEvent.preventDefault()},d=function(){this.cancelBubble=!0},f=function(){return this.originalEvent.stopPropagation()},m=function(){return r.doc.addEventListener?function(e,t,n,i){var r=s&&p[t]?p[t]:t,o=function(r){var o=u("y",i),c=u("x",i);if(s&&p[a](t))for(var l=0,d=r.targetTouches&&r.targetTouches.length;d>l;l++)if(r.targetTouches[l].target==e||e.contains(r.targetTouches[l].target)){var m=r;r=r.targetTouches[l],r.originalEvent=m,r.preventDefault=h,r.stopPropagation=f;break}var v=r.clientX+c,y=r.clientY+o;return n.call(i,r,v,y)};return t!==r&&e.addEventListener(t,o,!1),e.addEventListener(r,o,!1),function(){return t!==r&&e.removeEventListener(t,o,!1),e.removeEventListener(r,o,!1),!0}}:r.doc.attachEvent?function(e,t,n,i){var r=function(e){e=e||i.node.ownerDocument.window.event;var t=u("y",i),r=u("x",i),o=e.clientX+r,a=e.clientY+t;return e.preventDefault=e.preventDefault||l,e.stopPropagation=e.stopPropagation||d,n.call(i,e,o,a)};e.attachEvent("on"+t,r);var o=function(){return e.detachEvent("on"+t,r),!0};return o}:void 0}(),v=[],y=function(e){for(var n,i=e.clientX,r=e.clientY,o=u("y"),a=u("x"),c=v.length;c--;){if(n=v[c],s){for(var p,l=e.touches&&e.touches.length;l--;)if(p=e.touches[l],p.identifier==n.el._drag.id||n.el.node.contains(p.target)){i=p.clientX,r=p.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var h=n.el.node;h.nextSibling,h.parentNode,h.style.display;i+=a,r+=o,t("snap.drag.move."+n.el.id,n.move_scope||n.el,i-n.el._drag.x,r-n.el._drag.y,i,r,e)}},g=function(n){e.unmousemove(y).unmouseup(g);for(var i,r=v.length;r--;)i=v[r],i.el._drag={},t("snap.drag.end."+i.el.id,i.end_scope||i.start_scope||i.move_scope||i.el,n);v=[]},x=c.length;x--;)!function(t){e[t]=o[t]=function(n,i){return e.is(n,"function")&&(this.events=this.events||[],this.events.push({name:t,f:n,unbind:m(this.node||document,t,n,i||this)})),this},e["un"+t]=o["un"+t]=function(e){for(var n=this.events||[],i=n.length;i--;)if(n[i].name==t&&(n[i].f==e||!e))return n[i].unbind(),n.splice(i,1),!n.length&&delete this.events,this;return this}}(c[x]);o.hover=function(e,t,n,i){return this.mouseover(e,n).mouseout(t,i||n)},o.unhover=function(e,t){return this.unmouseover(e).unmouseout(t)};var b=[];o.drag=function(n,i,r,o,a,s){function c(c,p,u){(c.originalEvent||c).preventDefault(),this._drag.x=p,this._drag.y=u,this._drag.id=c.identifier,!v.length&&e.mousemove(y).mouseup(g),v.push({el:this,move_scope:o,start_scope:a,end_scope:s}),i&&t.on("snap.drag.start."+this.id,i),n&&t.on("snap.drag.move."+this.id,n),r&&t.on("snap.drag.end."+this.id,r),t("snap.drag.start."+this.id,a||o||this,p,u,c)}if(!arguments.length){var p;return this.drag(function(e,t){this.attr({transform:p+(p?"T":"t")+[e,t]})},function(){p=this.transform().local})}return this._drag={},b.push({el:this,start:c}),this.mousedown(c),this},o.undrag=function(){for(var n=b.length;n--;)b[n].el==this&&(this.unmousedown(b[n].start),b.splice(n,1),t.unbind("snap.drag.*."+this.id));return!b.length&&e.unmousemove(y).unmouseup(g),this}}),i.plugin(function(e,n,i,r){var o=(n.prototype,i.prototype),a=/^\s*url\((.+)\)/,s=String,c=e._.$;e.filter={},o.filter=function(t){var i=this;"svg"!=i.type&&(i=i.paper);var r=e.parse(s(t)),o=e._.id(),a=(i.node.offsetWidth,i.node.offsetHeight,c("filter"));return c(a,{id:o,filterUnits:"userSpaceOnUse"}),a.appendChild(r.node),i.defs.appendChild(a),new n(a)},t.on("snap.util.getattr.filter",function(){t.stop();var n=c(this.node,"filter");if(n){var i=s(n).match(a);return i&&e.select(i[1])}}),t.on("snap.util.attr.filter",function(i){if(i instanceof n&&"filter"==i.type){t.stop();var r=i.node.id;r||(c(i.node,{id:i.id}),r=i.id),c(this.node,{filter:e.url(r)})}i&&"none"!=i||(t.stop(),this.node.removeAttribute("filter"))}),e.filter.blur=function(t,n){null==t&&(t=2);var i=null==n?t:[t,n];return e.format('<feGaussianBlur stdDeviation="{def}"/>',{def:i})},e.filter.blur.toString=function(){return this()},e.filter.shadow=function(t,n,i,r,o){return"string"==typeof i&&(r=i,o=r,i=4),"string"!=typeof r&&(o=r,r="#000"),r=r||"#000",null==i&&(i=4),null==o&&(o=1),null==t&&(t=0,n=2),null==n&&(n=t),r=e.color(r),e.format('<feGaussianBlur in="SourceAlpha" stdDeviation="{blur}"/><feOffset dx="{dx}" dy="{dy}" result="offsetblur"/><feFlood flood-color="{color}"/><feComposite in2="offsetblur" operator="in"/><feComponentTransfer><feFuncA type="linear" slope="{opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>',{color:r,dx:t,dy:n,blur:i,opacity:o})},e.filter.shadow.toString=function(){return this()},e.filter.grayscale=function(t){return null==t&&(t=1),e.format('<feColorMatrix type="matrix" values="{a} {b} {c} 0 0 {d} {e} {f} 0 0 {g} {b} {h} 0 0 0 0 0 1 0"/>',{a:.2126+.7874*(1-t),b:.7152-.7152*(1-t),c:.0722-.0722*(1-t),d:.2126-.2126*(1-t),e:.7152+.2848*(1-t),f:.0722-.0722*(1-t),g:.2126-.2126*(1-t),h:.0722+.9278*(1-t)})},e.filter.grayscale.toString=function(){return this()},e.filter.sepia=function(t){return null==t&&(t=1),e.format('<feColorMatrix type="matrix" values="{a} {b} {c} 0 0 {d} {e} {f} 0 0 {g} {h} {i} 0 0 0 0 0 1 0"/>',{a:.393+.607*(1-t),b:.769-.769*(1-t),c:.189-.189*(1-t),d:.349-.349*(1-t),e:.686+.314*(1-t),f:.168-.168*(1-t),g:.272-.272*(1-t),h:.534-.534*(1-t),i:.131+.869*(1-t)})},e.filter.sepia.toString=function(){return this()},e.filter.saturate=function(t){return null==t&&(t=1),e.format('<feColorMatrix type="saturate" values="{amount}"/>',{amount:1-t})},e.filter.saturate.toString=function(){return this()},e.filter.hueRotate=function(t){return t=t||0,e.format('<feColorMatrix type="hueRotate" values="{angle}"/>',{angle:t})},e.filter.hueRotate.toString=function(){return this()},e.filter.invert=function(t){return null==t&&(t=1),e.format('<feComponentTransfer><feFuncR type="table" tableValues="{amount} {amount2}"/><feFuncG type="table" tableValues="{amount} {amount2}"/><feFuncB type="table" tableValues="{amount} {amount2}"/></feComponentTransfer>',{amount:t,amount2:1-t})},e.filter.invert.toString=function(){return this()},e.filter.brightness=function(t){return null==t&&(t=1),e.format('<feComponentTransfer><feFuncR type="linear" slope="{amount}"/><feFuncG type="linear" slope="{amount}"/><feFuncB type="linear" slope="{amount}"/></feComponentTransfer>',{amount:t})},e.filter.brightness.toString=function(){return this()},e.filter.contrast=function(t){return null==t&&(t=1),e.format('<feComponentTransfer><feFuncR type="linear" slope="{amount}" intercept="{amount2}"/><feFuncG type="linear" slope="{amount}" intercept="{amount2}"/><feFuncB type="linear" slope="{amount}" intercept="{amount2}"/></feComponentTransfer>',{amount:t,amount2:.5-t/2})},e.filter.contrast.toString=function(){return this()}}),i})},{237:237}],240:[function(e,t,n){"use strict";var i=t.exports=e(239);i.plugin(function(e,t){t.prototype.children=function(){for(var t=[],n=this.node.childNodes,i=0,r=n.length;r>i;i++)t[i]=new e(n[i]);return t}}),i.plugin(function(e,t,n,i){function r(e){return e.split(/\s+/)}function o(e){return e.join(" ")}function a(e){return r(e.attr("class")||"")}function s(e,t){e.attr("class",o(t))}t.prototype.addClass=function(e){var t,n,i=a(this),o=r(e);for(t=0,n;n=o[t];t++)-1===i.indexOf(n)&&i.push(n);return s(this,i),this},t.prototype.hasClass=function(e){if(!e)throw new Error("[snapsvg] syntax: hasClass(clsStr)");return-1!==a(this).indexOf(e)},t.prototype.removeClass=function(e){var t,n,i,o=a(this),c=r(e);for(t=0,n;n=c[t];t++)i=o.indexOf(n),-1!==i&&o.splice(i,1);return s(this,o),this}}),i.plugin(function(e,t,n,i){t.prototype.translate=function(t,n){var i=new e.Matrix;return i.translate(t,n),this.transform(i)}}),i.plugin(function(e){e.create=function(t,n){return e._.wrap(e._.$(t,n))}}),i.plugin(function(e,t,n,i){e.createSnapAt=function(t,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("width",t),r.setAttribute("height",n),i||(i=document.body),i.appendChild(r),new e(r)}})},{239:239}],241:[function(e,t,n){"use strict";function i(e){return this instanceof i?(e=e||[128,36,1],void(this._seed=e.length?r.rack(e[0],e[1],e[2]):e)):new i(e)}var r=e(242);t.exports=i,i.prototype.next=function(e){return this._seed(e||!0)},i.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},i.prototype.claim=function(e,t){this._seed.set(e,t||!0)},i.prototype.assigned=function(e){return this._seed.get(e)||!1},i.prototype.unclaim=function(e){delete this._seed.hats[e]},i.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)}},{242:242}],242:[function(e,t,n){var i=t.exports=function(e,t){if(t||(t=16),void 0===e&&(e=128),0>=e)return"0";for(var n=Math.log(Math.pow(2,e))/Math.log(t),r=2;n===1/0;r*=2)n=Math.log(Math.pow(2,e/r))/Math.log(t)*r;for(var o=n-Math.floor(n),a="",r=0;r<Math.floor(n);r++){var s=Math.floor(Math.random()*t).toString(t);a=s+a}if(o){var c=Math.pow(t,o),s=Math.floor(Math.random()*c).toString(t);a=s+a}var p=parseInt(a,t);return p!==1/0&&p>=Math.pow(2,e)?i(e,t):a};i.rack=function(e,t,n){var r=function(r){var a=0;do{if(a++>10){if(!n)throw new Error("too many ID collisions, use more bits");e+=n}var s=i(e,t)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=t||16,r}},{}],243:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],244:[function(e,t,n){var i=e(331),r=i();t.exports=r},{331:331}],245:[function(e,t,n){function i(e,t,n){var i=e?e.length:0;return n&&o(e,t,n)&&(t=!1),i?r(e,t):[]}var r=e(292),o=e(348);t.exports=i},{292:292,348:348}],246:[function(e,t,n){function i(e){var t=e?e.length:0;return t?e[t-1]:void 0}t.exports=i},{}],247:[function(e,t,n){function i(e,t,n,i){var c=e?e.length:0;return c?(null!=t&&"boolean"!=typeof t&&(i=n,n=a(e,t,i)?void 0:t,t=!1),n=null==n?n:r(n,i,3),t?s(e,n):o(e,n)):[]}var r=e(281),o=e(315),a=e(348),s=e(363);t.exports=i},{281:281,315:315,348:348,363:363}],248:[function(e,t,n){t.exports=e(247)},{247:247}],249:[function(e,t,n){var i=e(286),r=e(346),o=e(267),a=o(function(e,t){return r(e)?i(e,t):[]});t.exports=a},{267:267,286:286,346:346}],250:[function(e,t,n){function i(e){if(c(e)&&!s(e)&&!(e instanceof r)){if(e instanceof o)return e;if(l.call(e,"__chain__")&&l.call(e,"__wrapped__"))return p(e)}return new o(e)}var r=e(268),o=e(269),a=e(301),s=e(368),c=e(352),p=e(366),u=Object.prototype,l=u.hasOwnProperty;i.prototype=a.prototype,t.exports=i},{268:268,269:269,301:301,352:352,366:366,368:368}],251:[function(e,t,n){t.exports=e(261)},{261:261}],252:[function(e,t,n){function i(e,t,n){var i=s(e)?r:a;return n&&c(e,t,n)&&(t=void 0),"function"==typeof t&&void 0===n||(t=o(t,n,3)),i(e,t)}var r=e(273),o=e(281),a=e(288),s=e(368),c=e(348);t.exports=i},{273:273,281:281,288:288,348:348,368:368}],253:[function(e,t,n){function i(e,t,n){var i=s(e)?r:a;return t=o(t,n,3),i(e,t)}var r=e(274),o=e(281),a=e(289),s=e(368);t.exports=i},{274:274,281:281,289:289,368:368}],254:[function(e,t,n){var i=e(287),r=e(330),o=r(i);t.exports=o},{287:287,330:330}],255:[function(e,t,n){var i=e(272),r=e(287),o=e(332),a=o(i,r);t.exports=a},{272:272,287:287,332:332}],256:[function(e,t,n){var i=e(323),r=Object.prototype,o=r.hasOwnProperty,a=i(function(e,t,n){o.call(e,n)?e[n].push(t):e[n]=[t]});t.exports=a},{323:323}],257:[function(e,t,n){function i(e,t,n,i){var h=e?o(e):0;return c(h)||(e=u(e),h=e.length),n="number"!=typeof n||i&&s(t,n,i)?0:0>n?l(h+n,0):n||0,"string"==typeof e||!a(e)&&p(e)?h>=n&&e.indexOf(t,n)>-1:!!h&&r(e,t,n)>-1}var r=e(297),o=e(342),a=e(368),s=e(348),c=e(351),p=e(374),u=e(385),l=Math.max;t.exports=i},{297:297,342:342,348:348,351:351,368:368,374:374,385:385}],258:[function(e,t,n){function i(e,t,n){var i=s(e)?r:a;return t=o(t,n,3),i(e,t)}var r=e(275),o=e(281),a=e(302),s=e(368);t.exports=i},{275:275,281:281,302:302,368:368}],259:[function(e,t,n){var i=e(277),r=e(287),o=e(335),a=o(i,r);t.exports=a},{277:277,287:287,335:335}],260:[function(e,t,n){function i(e){var t=e?r(e):0;return o(t)?t:a(e).length}var r=e(342),o=e(351),a=e(378);t.exports=i},{342:342,351:351,378:378}],261:[function(e,t,n){function i(e,t,n){var i=s(e)?r:a;return n&&c(e,t,n)&&(t=void 0),"function"==typeof t&&void 0===n||(t=o(t,n,3)),i(e,t)}var r=e(278),o=e(281),a=e(312),s=e(368),c=e(348);t.exports=i},{278:278,281:281,312:312,348:348,368:368}],262:[function(e,t,n){function i(e,t,n){if(null==e)return[];n&&c(e,t,n)&&(t=void 0);var i=-1;t=r(t,n,3);var p=o(e,function(e,n,r){return{criteria:t(e,n,r),index:++i,value:e}});return a(p,s)}var r=e(281),o=e(302),a=e(313),s=e(320),c=e(348);t.exports=i},{281:281,302:302,313:313,320:320,348:348}],263:[function(e,t,n){var i=e(344),r=i(Date,"now"),o=r||function(){return(new Date).getTime()};t.exports=o},{344:344}],264:[function(e,t,n){var i=e(336),r=e(360),o=e(267),a=1,s=32,c=o(function(e,t,n){var o=a;if(n.length){var p=r(n,c.placeholder);o|=s}return i(e,o,t,n,p)});c.placeholder={},t.exports=c},{267:267,336:336,360:360}],265:[function(e,t,n){function i(e,t,n){function i(){y&&clearTimeout(y),d&&clearTimeout(d),x=0,d=y=g=void 0}function c(t,n){n&&clearTimeout(n),d=y=g=void 0,t&&(x=o(),f=e.apply(v,h),y||d||(h=v=void 0))}function p(){var e=t-(o()-m);0>=e||e>t?c(g,d):y=setTimeout(p,e)}function u(){c(E,y)}function l(){if(h=arguments,m=o(),v=this,g=E&&(y||!w),b===!1)var n=w&&!y;else{d||w||(x=m);var i=b-(m-x),r=0>=i||i>b;r?(d&&(d=clearTimeout(d)),x=m,f=e.apply(v,h)):d||(d=setTimeout(u,i))}return r&&y?y=clearTimeout(y):y||t===b||(y=setTimeout(p,t)),n&&(r=!0,f=e.apply(v,h)),!r||y||d||(h=v=void 0),f}var h,d,f,m,v,y,g,x=0,b=!1,E=!0;if("function"!=typeof e)throw new TypeError(a);if(t=0>t?0:+t||0,n===!0){var w=!0;E=!1}else r(n)&&(w=!!n.leading,b="maxWait"in n&&s(+n.maxWait||0,t),E="trailing"in n?!!n.trailing:E);return l.cancel=i,l}var r=e(372),o=e(263),a="Expected a function",s=Math.max;t.exports=i},{263:263,372:372}],266:[function(e,t,n){var i=e(285),r=e(267),o=r(function(e,t){return i(e,1,t)});t.exports=o},{267:267,285:285}],267:[function(e,t,n){function i(e,t){if("function"!=typeof e)throw new TypeError(r);return t=o(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,i=-1,r=o(n.length-t,0),a=Array(r);++i<r;)a[i]=n[t+i];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,n[0],a);case 2:return e.call(this,n[0],n[1],a)}var s=Array(t+1);for(i=-1;++i<t;)s[i]=n[i];return s[t]=a,e.apply(this,s)}}var r="Expected a function",o=Math.max;t.exports=i},{}],268:[function(e,t,n){function i(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=a,this.__views__=[]}var r=e(284),o=e(301),a=Number.POSITIVE_INFINITY;i.prototype=r(o.prototype),i.prototype.constructor=i,t.exports=i},{284:284,301:301}],269:[function(e,t,n){function i(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}var r=e(284),o=e(301);i.prototype=r(o.prototype),i.prototype.constructor=i,t.exports=i},{284:284,301:301}],270:[function(e,t,n){(function(n){function i(e){var t=e?e.length:0;for(this.data={hash:s(null),set:new a};t--;)this.push(e[t])}var r=e(319),o=e(344),a=o(n,"Set"),s=o(Object,"create");i.prototype.push=r,t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{319:319,344:344}],271:[function(e,t,n){function i(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}t.exports=i},{}],272:[function(e,t,n){function i(e,t){for(var n=-1,i=e.length;++n<i&&t(e[n],n,e)!==!1;);return e}t.exports=i},{}],273:[function(e,t,n){function i(e,t){for(var n=-1,i=e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}t.exports=i},{}],274:[function(e,t,n){function i(e,t){for(var n=-1,i=e.length,r=-1,o=[];++n<i;){var a=e[n];t(a,n,e)&&(o[++r]=a)}return o}t.exports=i},{}],275:[function(e,t,n){function i(e,t){for(var n=-1,i=e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}t.exports=i},{}],276:[function(e,t,n){function i(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}t.exports=i},{}],277:[function(e,t,n){function i(e,t,n,i){var r=-1,o=e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}t.exports=i},{}],278:[function(e,t,n){function i(e,t){for(var n=-1,i=e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}t.exports=i},{}],279:[function(e,t,n){function i(e,t,n){for(var i=-1,o=r(t),a=o.length;++i<a;){var s=o[i],c=e[s],p=n(c,t[s],s,e,t);(p===p?p===c:c!==c)&&(void 0!==c||s in e)||(e[s]=p)}return e}var r=e(378);t.exports=i},{378:378}],280:[function(e,t,n){function i(e,t){return null==t?e:r(t,o(t),e)}var r=e(283),o=e(378);t.exports=i},{283:283,378:378}],281:[function(e,t,n){function i(e,t,n){var i=typeof e;return"function"==i?void 0===t?e:a(e,t,n):null==e?s:"object"==i?r(e):void 0===t?c(e):o(e,t)}var r=e(303),o=e(304),a=e(317),s=e(386),c=e(388);t.exports=i},{303:303,304:304,317:317,386:386,388:388}],282:[function(e,t,n){function i(e,t){if(e!==t){var n=null===e,i=void 0===e,r=e===e,o=null===t,a=void 0===t,s=t===t;if(e>t&&!o||!r||n&&!a&&s||i&&s)return 1;if(t>e&&!n||!s||o&&!i&&r||a&&r)return-1}return 0}t.exports=i},{}],283:[function(e,t,n){function i(e,t,n){n||(n={});for(var i=-1,r=t.length;++i<r;){var o=t[i];n[o]=e[o]}return n}t.exports=i},{}],284:[function(e,t,n){var i=e(372),r=function(){function e(){}return function(t){if(i(t)){e.prototype=t;var n=new e;e.prototype=void 0}return n||{}}}();t.exports=r},{372:372}],285:[function(e,t,n){function i(e,t,n){if("function"!=typeof e)throw new TypeError(r);return setTimeout(function(){e.apply(void 0,n)},t)}var r="Expected a function";t.exports=i},{}],286:[function(e,t,n){function i(e,t){var n=e?e.length:0,i=[];if(!n)return i;var c=-1,p=r,u=!0,l=u&&t.length>=s?a(t):null,h=t.length;l&&(p=o,u=!1,t=l);e:for(;++c<n;){var d=e[c];if(u&&d===d){for(var f=h;f--;)if(t[f]===d)continue e;i.push(d)}else p(t,d,0)<0&&i.push(d)}return i}var r=e(297),o=e(318),a=e(328),s=200;t.exports=i},{297:297,318:318,328:328}],287:[function(e,t,n){var i=e(295),r=e(325),o=r(i);t.exports=o},{295:295,325:325}],288:[function(e,t,n){function i(e,t){var n=!0;return r(e,function(e,i,r){return n=!!t(e,i,r)}),n}var r=e(287);t.exports=i},{287:287}],289:[function(e,t,n){function i(e,t){var n=[];return r(e,function(e,i,r){t(e,i,r)&&n.push(e)}),n}var r=e(287);t.exports=i},{287:287}],290:[function(e,t,n){function i(e,t,n,i){var r;return n(e,function(e,n,o){return t(e,n,o)?(r=i?n:e,!1):void 0}),r}t.exports=i},{}],291:[function(e,t,n){function i(e,t,n){for(var i=e.length,r=n?i:-1;n?r--:++r<i;)if(t(e[r],r,e))return r;return-1}t.exports=i},{}],292:[function(e,t,n){function i(e,t,n,p){p||(p=[]);for(var u=-1,l=e.length;++u<l;){var h=e[u];c(h)&&s(h)&&(n||a(h)||o(h))?t?i(h,t,n,p):r(p,h):n||(p[p.length]=h)}return p}var r=e(276),o=e(367),a=e(368),s=e(346),c=e(352);t.exports=i},{276:276,346:346,352:352,367:367,368:368}],293:[function(e,t,n){var i=e(326),r=i();t.exports=r},{326:326}],294:[function(e,t,n){function i(e,t){return r(e,t,o)}var r=e(293),o=e(379);t.exports=i},{293:293,379:379}],295:[function(e,t,n){function i(e,t){return r(e,t,o)}var r=e(293),o=e(378);t.exports=i},{293:293,378:378}],296:[function(e,t,n){function i(e,t,n){if(null!=e){void 0!==n&&n in r(e)&&(t=[n]);for(var i=0,o=t.length;null!=e&&o>i;)e=e[t[i++]];return i&&i==o?e:void 0}}var r=e(364);t.exports=i},{364:364}],297:[function(e,t,n){function i(e,t,n){if(t!==t)return r(e,n);for(var i=n-1,o=e.length;++i<o;)if(e[i]===t)return i;return-1}var r=e(345);t.exports=i},{345:345}],298:[function(e,t,n){function i(e,t,n,s,c,p){return e===t?!0:null==e||null==t||!o(e)&&!a(t)?e!==e&&t!==t:r(e,t,i,n,s,c,p)}var r=e(299),o=e(372),a=e(352);t.exports=i},{299:299,352:352,372:372}],299:[function(e,t,n){function i(e,t,n,i,h,m,v){var y=s(e),g=s(t),x=u,b=u;y||(x=f.call(e),x==p?x=l:x!=l&&(y=c(e))),g||(b=f.call(t),b==p?b=l:b!=l&&(g=c(t)));var E=x==l,w=b==l,_=x==b;if(_&&!y&&!E)return o(e,t,x);if(!h){var S=E&&d.call(e,"__wrapped__"),T=w&&d.call(t,"__wrapped__");if(S||T)return n(S?e.value():e,T?t.value():t,i,h,m,v)}if(!_)return!1;m||(m=[]),v||(v=[]);for(var A=m.length;A--;)if(m[A]==e)return v[A]==t;m.push(e),v.push(t);var C=(y?r:a)(e,t,n,i,h,m,v);return m.pop(),v.pop(),C}var r=e(337),o=e(338),a=e(339),s=e(368),c=e(375),p="[object Arguments]",u="[object Array]",l="[object Object]",h=Object.prototype,d=h.hasOwnProperty,f=h.toString;t.exports=i},{337:337,338:338,339:339,368:368,375:375}],300:[function(e,t,n){function i(e,t,n){var i=t.length,a=i,s=!n;if(null==e)return!a;for(e=o(e);i--;){var c=t[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){c=t[i];var p=c[0],u=e[p],l=c[1];if(s&&c[2]){if(void 0===u&&!(p in e))return!1}else{var h=n?n(u,l,p):void 0;if(!(void 0===h?r(l,u,n,!0):h))return!1}}return!0}var r=e(298),o=e(364);t.exports=i},{298:298,364:364}],301:[function(e,t,n){function i(){}t.exports=i},{}],302:[function(e,t,n){function i(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,function(e,r,o){i[++n]=t(e,r,o)}),i}var r=e(287),o=e(346);t.exports=i},{287:287,346:346}],303:[function(e,t,n){function i(e){var t=o(e);if(1==t.length&&t[0][2]){var n=t[0][0],i=t[0][1];return function(e){return null==e?!1:e[n]===i&&(void 0!==i||n in a(e))}}return function(e){return r(e,t)}}var r=e(300),o=e(343),a=e(364);t.exports=i},{300:300,343:343,364:364}],304:[function(e,t,n){function i(e,t){var n=s(e),i=c(e)&&p(t),d=e+"";return e=h(e),function(s){if(null==s)return!1;var c=d;if(s=l(s),(n||!i)&&!(c in s)){if(s=1==e.length?s:r(s,a(e,0,-1)),null==s)return!1;c=u(e),s=l(s)}return s[c]===t?void 0!==t||c in s:o(t,s[c],void 0,!0)}}var r=e(296),o=e(298),a=e(311),s=e(368),c=e(349),p=e(353),u=e(246),l=e(364),h=e(365);t.exports=i},{246:246,296:296,298:298,311:311,349:349,353:353,364:364,365:365,368:368}],305:[function(e,t,n){function i(e,t,n,h,d){if(!c(e))return e;var f=s(t)&&(a(t)||u(t)),m=f?void 0:l(t);return r(m||t,function(r,a){if(m&&(a=r,r=t[a]),p(r))h||(h=[]),d||(d=[]),o(e,t,a,i,n,h,d);else{var s=e[a],c=n?n(s,r,a,e,t):void 0,u=void 0===c;u&&(c=r),void 0===c&&(!f||a in e)||!u&&(c===c?c===s:s!==s)||(e[a]=c)}}),e}var r=e(272),o=e(306),a=e(368),s=e(346),c=e(372),p=e(352),u=e(375),l=e(378);t.exports=i},{272:272,306:306,346:346,352:352,368:368,372:372,375:375,378:378}],306:[function(e,t,n){function i(e,t,n,i,l,h,d){for(var f=h.length,m=t[n];f--;)if(h[f]==m)return void(e[n]=d[f]);var v=e[n],y=l?l(v,m,n,e,t):void 0,g=void 0===y;g&&(y=m,s(m)&&(a(m)||p(m))?y=a(v)?v:s(v)?r(v):[]:c(m)||o(m)?y=o(v)?u(v):c(v)?v:{}:g=!1),h.push(m),d.push(y),g?e[n]=i(y,m,l,h,d):(y===y?y!==v:v===v)&&(e[n]=y)}var r=e(271),o=e(367),a=e(368),s=e(346),c=e(373),p=e(375),u=e(376);t.exports=i},{271:271,346:346,367:367,368:368,373:373,375:375,376:376}],307:[function(e,t,n){function i(e){return function(t){return null==t?void 0:t[e]}}t.exports=i},{}],308:[function(e,t,n){function i(e){var t=e+"";return e=o(e),function(n){return r(n,e,t)}}var r=e(296),o=e(365);t.exports=i},{296:296,365:365}],309:[function(e,t,n){function i(e,t,n,i,r){return r(e,function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)}),n}t.exports=i},{}],310:[function(e,t,n){var i=e(386),r=e(355),o=r?function(e,t){return r.set(e,t),e}:i;t.exports=o},{355:355,386:386}],311:[function(e,t,n){function i(e,t,n){var i=-1,r=e.length;t=null==t?0:+t||0,0>t&&(t=-t>r?0:r+t),n=void 0===n||n>r?r:+n||0,0>n&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(r);++i<r;)o[i]=e[i+t];return o}t.exports=i},{}],312:[function(e,t,n){function i(e,t){var n;return r(e,function(e,i,r){return n=t(e,i,r),!n}),!!n}var r=e(287);t.exports=i},{287:287}],313:[function(e,t,n){function i(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=i},{}],314:[function(e,t,n){function i(e){return null==e?"":e+""}t.exports=i},{}],315:[function(e,t,n){function i(e,t){var n=-1,i=r,c=e.length,p=!0,u=p&&c>=s,l=u?a():null,h=[];l?(i=o,p=!1):(u=!1,l=t?[]:h);
|
|
e:for(;++n<c;){var d=e[n],f=t?t(d,n,e):d;if(p&&d===d){for(var m=l.length;m--;)if(l[m]===f)continue e;t&&l.push(f),h.push(d)}else i(l,f,0)<0&&((t||u)&&l.push(f),h.push(d))}return h}var r=e(297),o=e(318),a=e(328),s=200;t.exports=i},{297:297,318:318,328:328}],316:[function(e,t,n){function i(e,t){for(var n=-1,i=t.length,r=Array(i);++n<i;)r[n]=e[t[n]];return r}t.exports=i},{}],317:[function(e,t,n){function i(e,t,n){if("function"!=typeof e)return r;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,i,r){return e.call(t,n,i,r)};case 4:return function(n,i,r,o){return e.call(t,n,i,r,o)};case 5:return function(n,i,r,o,a){return e.call(t,n,i,r,o,a)}}return function(){return e.apply(t,arguments)}}var r=e(386);t.exports=i},{386:386}],318:[function(e,t,n){function i(e,t){var n=e.data,i="string"==typeof t||r(t)?n.set.has(t):n.hash[t];return i?0:-1}var r=e(372);t.exports=i},{372:372}],319:[function(e,t,n){function i(e){var t=this.data;"string"==typeof e||r(e)?t.set.add(e):t.hash[e]=!0}var r=e(372);t.exports=i},{372:372}],320:[function(e,t,n){function i(e,t){return r(e.criteria,t.criteria)||e.index-t.index}var r=e(282);t.exports=i},{282:282}],321:[function(e,t,n){function i(e,t,n){for(var i=n.length,o=-1,a=r(e.length-i,0),s=-1,c=t.length,p=Array(c+a);++s<c;)p[s]=t[s];for(;++o<i;)p[n[o]]=e[o];for(;a--;)p[s++]=e[o++];return p}var r=Math.max;t.exports=i},{}],322:[function(e,t,n){function i(e,t,n){for(var i=-1,o=n.length,a=-1,s=r(e.length-o,0),c=-1,p=t.length,u=Array(s+p);++a<s;)u[a]=e[a];for(var l=a;++c<p;)u[l+c]=t[c];for(;++i<o;)u[l+n[i]]=e[a++];return u}var r=Math.max;t.exports=i},{}],323:[function(e,t,n){function i(e,t){return function(n,i,s){var c=t?t():{};if(i=r(i,s,3),a(n))for(var p=-1,u=n.length;++p<u;){var l=n[p];e(c,l,i(l,p,n),n)}else o(n,function(t,n,r){e(c,t,i(t,n,r),r)});return c}}var r=e(281),o=e(287),a=e(368);t.exports=i},{281:281,287:287,368:368}],324:[function(e,t,n){function i(e){return a(function(t,n){var i=-1,a=null==t?0:n.length,s=a>2?n[a-2]:void 0,c=a>2?n[2]:void 0,p=a>1?n[a-1]:void 0;for("function"==typeof s?(s=r(s,p,5),a-=2):(s="function"==typeof p?p:void 0,a-=s?1:0),c&&o(n[0],n[1],c)&&(s=3>a?void 0:s,a=1);++i<a;){var u=n[i];u&&e(t,u,s)}return t})}var r=e(317),o=e(348),a=e(267);t.exports=i},{267:267,317:317,348:348}],325:[function(e,t,n){function i(e,t){return function(n,i){var s=n?r(n):0;if(!o(s))return e(n,i);for(var c=t?s:-1,p=a(n);(t?c--:++c<s)&&i(p[c],c,p)!==!1;);return n}}var r=e(342),o=e(351),a=e(364);t.exports=i},{342:342,351:351,364:364}],326:[function(e,t,n){function i(e){return function(t,n,i){for(var o=r(t),a=i(t),s=a.length,c=e?s:-1;e?c--:++c<s;){var p=a[c];if(n(o[p],p,o)===!1)break}return t}}var r=e(364);t.exports=i},{364:364}],327:[function(e,t,n){(function(n){function i(e,t){function i(){var r=this&&this!==n&&this instanceof i?o:e;return r.apply(t,arguments)}var o=r(e);return i}var r=e(329);t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{329:329}],328:[function(e,t,n){(function(n){function i(e){return s&&a?new r(e):null}var r=e(270),o=e(344),a=o(n,"Set"),s=o(Object,"create");t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{270:270,344:344}],329:[function(e,t,n){function i(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=r(e.prototype),i=e.apply(n,t);return o(i)?i:n}}var r=e(284),o=e(372);t.exports=i},{284:284,372:372}],330:[function(e,t,n){function i(e,t){return function(n,i,c){if(i=r(i,c,3),s(n)){var p=a(n,i,t);return p>-1?n[p]:void 0}return o(n,i,e)}}var r=e(281),o=e(290),a=e(291),s=e(368);t.exports=i},{281:281,290:290,291:291,368:368}],331:[function(e,t,n){function i(e){return function(t,n,i){return t&&t.length?(n=r(n,i,3),o(t,n,e)):-1}}var r=e(281),o=e(291);t.exports=i},{281:281,291:291}],332:[function(e,t,n){function i(e,t){return function(n,i,a){return"function"==typeof i&&void 0===a&&o(n)?e(n,i):t(n,r(i,a,3))}}var r=e(317),o=e(368);t.exports=i},{317:317,368:368}],333:[function(e,t,n){(function(n){function i(e,t,E,w,_,S,T,A,C,R){function N(){for(var f=arguments.length,m=f,v=Array(f);m--;)v[m]=arguments[m];if(w&&(v=o(v,w,_)),S&&(v=a(v,S,T)),k||O){var x=N.placeholder,L=u(v,x);if(f-=L.length,R>f){var j=A?r(A):void 0,F=b(R-f,0),z=k?L:void 0,G=k?void 0:L,V=k?v:void 0,$=k?void 0:v;t|=k?y:g,t&=~(k?g:y),B||(t&=~(h|d));var W=[e,t,E,V,z,$,G,j,C,F],U=i.apply(void 0,W);return c(e)&&l(U,W),U.placeholder=x,U}}var H=M?E:this,q=D?H[e]:e;return A&&(v=p(v,A)),P&&C<v.length&&(v.length=C),this&&this!==n&&this instanceof N&&(q=I||s(e)),q.apply(H,v)}var P=t&x,M=t&h,D=t&d,k=t&m,B=t&f,O=t&v,I=D?void 0:s(e);return N}var r=e(271),o=e(321),a=e(322),s=e(329),c=e(350),p=e(359),u=e(360),l=e(361),h=1,d=2,f=4,m=8,v=16,y=32,g=64,x=128,b=Math.max;t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{271:271,321:321,322:322,329:329,350:350,359:359,360:360,361:361}],334:[function(e,t,n){(function(n){function i(e,t,i,a){function s(){for(var t=-1,r=arguments.length,o=-1,u=a.length,l=Array(u+r);++o<u;)l[o]=a[o];for(;r--;)l[o++]=arguments[++t];var h=this&&this!==n&&this instanceof s?p:e;return h.apply(c?i:this,l)}var c=t&o,p=r(e);return s}var r=e(329),o=1;t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{329:329}],335:[function(e,t,n){function i(e,t){return function(n,i,s,c){var p=arguments.length<3;return"function"==typeof i&&void 0===c&&a(n)?e(n,i,s,p):o(n,r(i,c,4),s,p,t)}}var r=e(281),o=e(309),a=e(368);t.exports=i},{281:281,309:309,368:368}],336:[function(e,t,n){function i(e,t,n,i,y,g,x,b){var E=t&h;if(!E&&"function"!=typeof e)throw new TypeError(m);var w=i?i.length:0;if(w||(t&=~(d|f),i=y=void 0),w-=y?y.length:0,t&f){var _=i,S=y;i=y=void 0}var T=E?void 0:c(e),A=[e,t,n,i,y,_,S,g,x,b];if(T&&(p(A,T),t=A[1],b=A[9]),A[9]=null==b?E?0:e.length:v(b-w,0)||0,t==l)var C=o(A[0],A[2]);else C=t!=d&&t!=(l|d)||A[4].length?a.apply(void 0,A):s.apply(void 0,A);var R=T?r:u;return R(C,A)}var r=e(310),o=e(327),a=e(333),s=e(334),c=e(340),p=e(354),u=e(361),l=1,h=2,d=32,f=64,m="Expected a function",v=Math.max;t.exports=i},{310:310,327:327,333:333,334:334,340:340,354:354,361:361}],337:[function(e,t,n){function i(e,t,n,i,o,a,s){var c=-1,p=e.length,u=t.length;if(p!=u&&!(o&&u>p))return!1;for(;++c<p;){var l=e[c],h=t[c],d=i?i(o?h:l,o?l:h,c):void 0;if(void 0!==d){if(d)continue;return!1}if(o){if(!r(t,function(e){return l===e||n(l,e,i,o,a,s)}))return!1}else if(l!==h&&!n(l,h,i,o,a,s))return!1}return!0}var r=e(278);t.exports=i},{278:278}],338:[function(e,t,n){function i(e,t,n){switch(n){case r:case o:return+e==+t;case a:return e.name==t.name&&e.message==t.message;case s:return e!=+e?t!=+t:e==+t;case c:case p:return e==t+""}return!1}var r="[object Boolean]",o="[object Date]",a="[object Error]",s="[object Number]",c="[object RegExp]",p="[object String]";t.exports=i},{}],339:[function(e,t,n){function i(e,t,n,i,o,s,c){var p=r(e),u=p.length,l=r(t),h=l.length;if(u!=h&&!o)return!1;for(var d=u;d--;){var f=p[d];if(!(o?f in t:a.call(t,f)))return!1}for(var m=o;++d<u;){f=p[d];var v=e[f],y=t[f],g=i?i(o?y:v,o?v:y,f):void 0;if(!(void 0===g?n(v,y,i,o,s,c):g))return!1;m||(m="constructor"==f)}if(!m){var x=e.constructor,b=t.constructor;if(x!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof b&&b instanceof b))return!1}return!0}var r=e(378),o=Object.prototype,a=o.hasOwnProperty;t.exports=i},{378:378}],340:[function(e,t,n){var i=e(355),r=e(387),o=i?function(e){return i.get(e)}:r;t.exports=o},{355:355,387:387}],341:[function(e,t,n){function i(e){for(var t=e.name+"",n=r[t],i=n?n.length:0;i--;){var o=n[i],a=o.func;if(null==a||a==e)return o.name}return t}var r=e(358);t.exports=i},{358:358}],342:[function(e,t,n){var i=e(307),r=i("length");t.exports=r},{307:307}],343:[function(e,t,n){function i(e){for(var t=o(e),n=t.length;n--;)t[n][2]=r(t[n][1]);return t}var r=e(353),o=e(382);t.exports=i},{353:353,382:382}],344:[function(e,t,n){function i(e,t){var n=null==e?void 0:e[t];return r(n)?n:void 0}var r=e(370);t.exports=i},{370:370}],345:[function(e,t,n){function i(e,t,n){for(var i=e.length,r=t+(n?0:-1);n?r--:++r<i;){var o=e[r];if(o!==o)return r}return-1}t.exports=i},{}],346:[function(e,t,n){function i(e){return null!=e&&o(r(e))}var r=e(342),o=e(351);t.exports=i},{342:342,351:351}],347:[function(e,t,n){function i(e,t){return e="number"==typeof e||r.test(e)?+e:-1,t=null==t?o:t,e>-1&&e%1==0&&t>e}var r=/^\d+$/,o=9007199254740991;t.exports=i},{}],348:[function(e,t,n){function i(e,t,n){if(!a(n))return!1;var i=typeof t;if("number"==i?r(n)&&o(t,n.length):"string"==i&&t in n){var s=n[t];return e===e?e===s:s!==s}return!1}var r=e(346),o=e(347),a=e(372);t.exports=i},{346:346,347:347,372:372}],349:[function(e,t,n){function i(e,t){var n=typeof e;if("string"==n&&s.test(e)||"number"==n)return!0;if(r(e))return!1;var i=!a.test(e);return i||null!=t&&e in o(t)}var r=e(368),o=e(364),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=i},{364:364,368:368}],350:[function(e,t,n){function i(e){var t=a(e),n=s[t];if("function"!=typeof n||!(t in r.prototype))return!1;if(e===n)return!0;var i=o(n);return!!i&&e===i[0]}var r=e(268),o=e(340),a=e(341),s=e(250);t.exports=i},{250:250,268:268,340:340,341:341}],351:[function(e,t,n){function i(e){return"number"==typeof e&&e>-1&&e%1==0&&r>=e}var r=9007199254740991;t.exports=i},{}],352:[function(e,t,n){function i(e){return!!e&&"object"==typeof e}t.exports=i},{}],353:[function(e,t,n){function i(e){return e===e&&!r(e)}var r=e(372);t.exports=i},{372:372}],354:[function(e,t,n){function i(e,t){var n=e[1],i=t[1],m=n|i,v=l>m,y=i==l&&n==u||i==l&&n==h&&e[7].length<=t[8]||i==(l|h)&&n==u;if(!v&&!y)return e;i&c&&(e[2]=t[2],m|=n&c?0:p);var g=t[3];if(g){var x=e[3];e[3]=x?o(x,g,t[4]):r(g),e[4]=x?s(e[3],d):r(t[4])}return g=t[5],g&&(x=e[5],e[5]=x?a(x,g,t[6]):r(g),e[6]=x?s(e[5],d):r(t[6])),g=t[7],g&&(e[7]=r(g)),i&l&&(e[8]=null==e[8]?t[8]:f(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=m,e}var r=e(271),o=e(321),a=e(322),s=e(360),c=1,p=4,u=8,l=128,h=256,d="__lodash_placeholder__",f=Math.min;t.exports=i},{271:271,321:321,322:322,360:360}],355:[function(e,t,n){(function(n){var i=e(344),r=i(n,"WeakMap"),o=r&&new r;t.exports=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{344:344}],356:[function(e,t,n){function i(e,t){e=r(e);for(var n=-1,i=t.length,o={};++n<i;){var a=t[n];a in e&&(o[a]=e[a])}return o}var r=e(364);t.exports=i},{364:364}],357:[function(e,t,n){function i(e,t){var n={};return r(e,function(e,i,r){t(e,i,r)&&(n[i]=e)}),n}var r=e(294);t.exports=i},{294:294}],358:[function(e,t,n){var i={};t.exports=i},{}],359:[function(e,t,n){function i(e,t){for(var n=e.length,i=a(t.length,n),s=r(e);i--;){var c=t[i];e[i]=o(c,n)?s[c]:void 0}return e}var r=e(271),o=e(347),a=Math.min;t.exports=i},{271:271,347:347}],360:[function(e,t,n){function i(e,t){for(var n=-1,i=e.length,o=-1,a=[];++n<i;)e[n]===t&&(e[n]=r,a[++o]=n);return a}var r="__lodash_placeholder__";t.exports=i},{}],361:[function(e,t,n){var i=e(310),r=e(263),o=150,a=16,s=function(){var e=0,t=0;return function(n,s){var c=r(),p=a-(c-t);if(t=c,p>0){if(++e>=o)return n}else e=0;return i(n,s)}}();t.exports=s},{263:263,310:310}],362:[function(e,t,n){function i(e){for(var t=c(e),n=t.length,i=n&&e.length,p=!!i&&s(i)&&(o(e)||r(e)),l=-1,h=[];++l<n;){var d=t[l];(p&&a(d,i)||u.call(e,d))&&h.push(d)}return h}var r=e(367),o=e(368),a=e(347),s=e(351),c=e(379),p=Object.prototype,u=p.hasOwnProperty;t.exports=i},{347:347,351:351,367:367,368:368,379:379}],363:[function(e,t,n){function i(e,t){for(var n,i=-1,r=e.length,o=-1,a=[];++i<r;){var s=e[i],c=t?t(s,i,e):s;i&&n===c||(n=c,a[++o]=s)}return a}t.exports=i},{}],364:[function(e,t,n){function i(e){return r(e)?e:Object(e)}var r=e(372);t.exports=i},{372:372}],365:[function(e,t,n){function i(e){if(o(e))return e;var t=[];return r(e).replace(a,function(e,n,i,r){t.push(i?r.replace(s,"$1"):n||e)}),t}var r=e(314),o=e(368),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,s=/\\(\\)?/g;t.exports=i},{314:314,368:368}],366:[function(e,t,n){function i(e){return e instanceof r?e.clone():new o(e.__wrapped__,e.__chain__,a(e.__actions__))}var r=e(268),o=e(269),a=e(271);t.exports=i},{268:268,269:269,271:271}],367:[function(e,t,n){function i(e){return o(e)&&r(e)&&s.call(e,"callee")&&!c.call(e,"callee")}var r=e(346),o=e(352),a=Object.prototype,s=a.hasOwnProperty,c=a.propertyIsEnumerable;t.exports=i},{346:346,352:352}],368:[function(e,t,n){var i=e(344),r=e(351),o=e(352),a="[object Array]",s=Object.prototype,c=s.toString,p=i(Array,"isArray"),u=p||function(e){return o(e)&&r(e.length)&&c.call(e)==a};t.exports=u},{344:344,351:351,352:352}],369:[function(e,t,n){function i(e){return r(e)&&s.call(e)==o}var r=e(372),o="[object Function]",a=Object.prototype,s=a.toString;t.exports=i},{372:372}],370:[function(e,t,n){function i(e){return null==e?!1:r(e)?u.test(c.call(e)):o(e)&&a.test(e)}var r=e(369),o=e(352),a=/^\[object .+?Constructor\]$/,s=Object.prototype,c=Function.prototype.toString,p=s.hasOwnProperty,u=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=i},{352:352,369:369}],371:[function(e,t,n){function i(e){return"number"==typeof e||r(e)&&s.call(e)==o}var r=e(352),o="[object Number]",a=Object.prototype,s=a.toString;t.exports=i},{352:352}],372:[function(e,t,n){function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=i},{}],373:[function(e,t,n){function i(e){var t;if(!a(e)||u.call(e)!=s||o(e)||!p.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return r(e,function(e,t){n=t}),void 0===n||p.call(e,n)}var r=e(294),o=e(367),a=e(352),s="[object Object]",c=Object.prototype,p=c.hasOwnProperty,u=c.toString;t.exports=i},{294:294,352:352,367:367}],374:[function(e,t,n){function i(e){return"string"==typeof e||r(e)&&s.call(e)==o}var r=e(352),o="[object String]",a=Object.prototype,s=a.toString;t.exports=i},{352:352}],375:[function(e,t,n){function i(e){return o(e)&&r(e.length)&&!!N[M.call(e)]}var r=e(351),o=e(352),a="[object Arguments]",s="[object Array]",c="[object Boolean]",p="[object Date]",u="[object Error]",l="[object Function]",h="[object Map]",d="[object Number]",f="[object Object]",m="[object RegExp]",v="[object Set]",y="[object String]",g="[object WeakMap]",x="[object ArrayBuffer]",b="[object Float32Array]",E="[object Float64Array]",w="[object Int8Array]",_="[object Int16Array]",S="[object Int32Array]",T="[object Uint8Array]",A="[object Uint8ClampedArray]",C="[object Uint16Array]",R="[object Uint32Array]",N={};N[b]=N[E]=N[w]=N[_]=N[S]=N[T]=N[A]=N[C]=N[R]=!0,N[a]=N[s]=N[x]=N[c]=N[p]=N[u]=N[l]=N[h]=N[d]=N[f]=N[m]=N[v]=N[y]=N[g]=!1;var P=Object.prototype,M=P.toString;t.exports=i},{351:351,352:352}],376:[function(e,t,n){function i(e){return r(e,o(e))}var r=e(283),o=e(379);t.exports=i},{283:283,379:379}],377:[function(e,t,n){var i=e(279),r=e(280),o=e(324),a=o(function(e,t,n){return n?i(e,t,n):r(e,t)});t.exports=a},{279:279,280:280,324:324}],378:[function(e,t,n){var i=e(344),r=e(346),o=e(372),a=e(362),s=i(Object,"keys"),c=s?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&r(e)?a(e):o(e)?s(e):[]}:a;t.exports=c},{344:344,346:346,362:362,372:372}],379:[function(e,t,n){function i(e){if(null==e)return[];c(e)||(e=Object(e));var t=e.length;t=t&&s(t)&&(o(e)||r(e))&&t||0;for(var n=e.constructor,i=-1,p="function"==typeof n&&n.prototype===e,l=Array(t),h=t>0;++i<t;)l[i]=i+"";for(var d in e)h&&a(d,t)||"constructor"==d&&(p||!u.call(e,d))||l.push(d);return l}var r=e(367),o=e(368),a=e(347),s=e(351),c=e(372),p=Object.prototype,u=p.hasOwnProperty;t.exports=i},{347:347,351:351,367:367,368:368,372:372}],380:[function(e,t,n){var i=e(305),r=e(324),o=r(i);t.exports=o},{305:305,324:324}],381:[function(e,t,n){var i=e(275),r=e(286),o=e(292),a=e(317),s=e(379),c=e(356),p=e(357),u=e(267),l=u(function(e,t){if(null==e)return{};if("function"!=typeof t[0]){var t=i(o(t),String);return c(e,r(s(e),t))}var n=a(t[0],t[1],3);return p(e,function(e,t,i){return!n(e,t,i)})});t.exports=l},{267:267,275:275,286:286,292:292,317:317,356:356,357:357,379:379}],382:[function(e,t,n){function i(e){e=o(e);for(var t=-1,n=r(e),i=n.length,a=Array(i);++t<i;){var s=n[t];a[t]=[s,e[s]]}return a}var r=e(378),o=e(364);t.exports=i},{364:364,378:378}],383:[function(e,t,n){var i=e(292),r=e(317),o=e(356),a=e(357),s=e(267),c=s(function(e,t){return null==e?{}:"function"==typeof t[0]?a(e,r(t[0],t[1],3)):o(e,i(t))});t.exports=c},{267:267,292:292,317:317,356:356,357:357}],384:[function(e,t,n){function i(e,t,n,i){var h=c(e)||l(e);if(t=o(t,i,4),null==n)if(h||u(e)){var d=e.constructor;n=h?c(e)?new d:[]:a(p(d)?d.prototype:void 0)}else n={};return(h?r:s)(e,function(e,i,r){return t(n,e,i,r)}),n}var r=e(272),o=e(281),a=e(284),s=e(295),c=e(368),p=e(369),u=e(372),l=e(375);t.exports=i},{272:272,281:281,284:284,295:295,368:368,369:369,372:372,375:375}],385:[function(e,t,n){function i(e){return r(e,o(e))}var r=e(316),o=e(378);t.exports=i},{316:316,378:378}],386:[function(e,t,n){function i(e){return e}t.exports=i},{}],387:[function(e,t,n){function i(){}t.exports=i},{}],388:[function(e,t,n){function i(e){return a(e)?r(e):o(e)}var r=e(307),o=e(308),a=e(349);t.exports=i},{307:307,308:308,349:349}],389:[function(e,t,n){t.exports=function(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}},{}],390:[function(e,t,n){t.exports=e(399)},{399:399}],391:[function(e,t,n){t.exports=function(e){for(var t;e.childNodes.length;)t=e.childNodes[0],e.removeChild(t);return e}},{}],392:[function(e,t,n){t.exports=e(401)},{401:401}],393:[function(e,t,n){t.exports=e(402)},{402:402}],394:[function(e,t,n){t.exports=e(406)},{406:406}],395:[function(e,t,n){t.exports=e(403)},{403:403}],396:[function(e,t,n){t.exports=e(404)},{404:404}],397:[function(e,t,n){t.exports=e(405)},{405:405}],398:[function(e,t,n){t.exports=function(e){e.parentNode&&e.parentNode.removeChild(e)}},{}],399:[function(e,t,n){function i(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}var r=e(400),o=/\s+/,a=Object.prototype.toString;t.exports=function(e){return new i(e)},i.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array(),n=r(t,e);return~n||t.push(e),this.el.className=t.join(" "),this},i.prototype.remove=function(e){if("[object RegExp]"==a.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=r(t,e);return~n&&t.splice(n,1),this.el.className=t.join(" "),this},i.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},i.prototype.toggle=function(e,t){return this.list?("undefined"!=typeof t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):("undefined"!=typeof t?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},i.prototype.array=function(){var e=this.el.getAttribute("class")||"",t=e.replace(/^\s+|\s+$/g,""),n=t.split(o);return""===n[0]&&n.shift(),n},i.prototype.has=i.prototype.contains=function(e){return this.list?this.list.contains(e):!!~r(this.array(),e)}},{400:400}],400:[function(e,t,n){t.exports=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}},{}],401:[function(e,t,n){var i=e(404);t.exports=function(e,t,n,r){for(e=n?{parentNode:e}:e,r=r||document;(e=e.parentNode)&&e!==document;){if(i(e,t))return e;if(e===r)return}}},{404:404}],402:[function(e,t,n){var i=e(401),r=e(403);n.bind=function(e,t,n,o,a){return r.bind(e,n,function(n){var r=n.target||n.srcElement;n.delegateTarget=i(r,t,!0,e),n.delegateTarget&&o.call(e,n)},a)},n.unbind=function(e,t,n,i){r.unbind(e,t,n,i)}},{401:401,403:403}],403:[function(e,t,n){var i=window.addEventListener?"addEventListener":"attachEvent",r=window.removeEventListener?"removeEventListener":"detachEvent",o="addEventListener"!==i?"on":"";n.bind=function(e,t,n,r){return e[i](o+t,n,r||!1),n},n.unbind=function(e,t,n,i){return e[r](o+t,n,i||!1),n}},{}],404:[function(e,t,n){function i(e,t){if(!e||1!==e.nodeType)return!1;if(a)return a.call(e,t);for(var n=r.all(t,e.parentNode),i=0;i<n.length;++i)if(n[i]==e)return!0;return!1}var r=e(405),o=Element.prototype,a=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector;t.exports=i},{405:405}],405:[function(e,t,n){function i(e,t){return t.querySelector(e)}n=t.exports=function(e,t){return t=t||document,i(e,t)},n.all=function(e,t){return t=t||document,t.querySelectorAll(e)},n.engine=function(e){if(!e.one)throw new Error(".one callback required");if(!e.all)throw new Error(".all callback required");return i=e.one,n.all=e.all,n}},{}],406:[function(e,t,n){function i(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){var r=t.createElement("html");return r.innerHTML=e,r.removeChild(r.lastChild)}var o=a[i]||a._default,s=o[0],c=o[1],p=o[2],r=t.createElement("div");for(r.innerHTML=c+e+p;s--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);for(var u=t.createDocumentFragment();r.firstChild;)u.appendChild(r.removeChild(r.firstChild));return u}t.exports=i;var r,o=!1;"undefined"!=typeof document&&(r=document.createElement("div"),r.innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',o=!r.getElementsByTagName("link").length,r=void 0);var a={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:o?[1,"X<div>","</div>"]:[0,"",""]};a.td=a.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],a.option=a.optgroup=[1,'<select multiple="multiple">',"</select>"],a.thead=a.tbody=a.colgroup=a.caption=a.tfoot=[1,"<table>","</table>"],a.polyline=a.ellipse=a.polygon=a.circle=a.text=a.line=a.path=a.rect=a.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"]},{}],407:[function(e,t,n){t.exports=e(409),t.exports.Collection=e(408)},{408:408,409:409}],408:[function(e,t,n){"use strict";function i(e,t,n,i){var r=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,r,i)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e){this.contains(e)||(this.push(e),t.set(e,r,i))}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function r(e){return e.__refs_collection===!0}t.exports.extend=i,t.exports.isExtended=r},{}],409:[function(e,t,n){"use strict";function i(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function r(e,t,n){Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:s.extend(n[t.name]||[],e,t,n)})}function o(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}function a(e,t){return this instanceof a?(e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,void(this.props[t.name]=t)):new a(e,t)}var s=e(408);a.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?r(this,t,e):o(this,t,e)},a.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return s.isExtended(n)||r(this,t,e),n},a.prototype.ensureBound=function(e,t){i(e,t)||this.bind(e,t)},a.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},a.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)},t.exports=a},{408:408}]},{},[1])(1)}); |