@leadal/flowstream-ui-plus 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- (function(de,xe){typeof exports=="object"&&typeof module<"u"?xe(exports,require("element-plus"),require("vue")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue"],xe):(de=typeof globalThis<"u"?globalThis:de||self,xe(de.FlowstreamUIPlus={},de.ElementPlus,de.Vue))})(this,(function(de,xe,l){"use strict";/*! Element Plus Icons Vue v2.3.2 */var Ol=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),Bl=Ol,Ml=l.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),Ll=Ml,Fl=l.defineComponent({name:"Back",__name:"back",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),l.createElementVNode("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),uo=Fl,$l=l.defineComponent({name:"Check",__name:"check",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),fo=$l,Vl=l.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),l.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),jl=Vl,Ul=l.defineComponent({name:"Delete",__name:"delete",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),zl=Ul,Hl=l.defineComponent({name:"Document",__name:"document",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),Wl=Hl,ql=l.defineComponent({name:"Promotion",__name:"promotion",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),Yl=ql,Kl=l.defineComponent({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),$n=Kl,Gl=l.defineComponent({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),Vn=Gl,Xl=l.defineComponent({name:"Switch",__name:"switch",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344M64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"})]))}}),po=Xl,Jl=l.defineComponent({name:"VideoPause",__name:"video-pause",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),Zl=Jl,Ql=l.defineComponent({name:"VideoPlay",__name:"video-play",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),ho=Ql;const ec={key:1,"aria-hidden":"true"},tc=["href"],nc=l.defineComponent({name:"SvgIcon",inheritAttrs:!1,__name:"SvgIcon",props:{iconClass:{},className:{}},setup(e){const t=e,n={back:uo,delete:zl,save:Wl,enable:ho,start:ho,hang:Zl,restore:Vn,revocation:$n,taskWithdraw:$n,taskRecyle:Vn,terminate:jl,jump:po,taskJump:po,taskComplete:fo,taskSend:Yl,taskRollback:uo,taskClaim:fo,turnBefore:$n,taskTurnBefore:$n,turnAfter:Vn,taskTurnAfter:Vn},r=l.computed(()=>n[t.iconClass]);return(i,o)=>(l.openBlock(),l.createElementBlock("span",l.mergeProps({class:"workflow-svg-icon"},i.$attrs),[r.value?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.value),{key:0})):(l.openBlock(),l.createElementBlock("svg",ec,[l.createElementVNode("use",{href:`#icon-${e.iconClass}`},null,8,tc)]))],16))}}),gt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},rc=gt(nc,[["__scopeId","data-v-7aad397e"]]),ic={class:"ui-flow-btn"},oc=gt(l.defineComponent({name:"UiFlowButton",__name:"FlowButton",props:{type:{},label:{}},emits:["click"],setup(e,{emit:t}){const n=e,r=t,i=[{label:"保存",value:"save",icon:"save"},{label:"启动",value:"start",icon:"enable"},{label:"撤回",value:"revocation",icon:"taskWithdraw"},{label:"撤回",value:"taskWithdraw",icon:"taskWithdraw"},{label:"收回",value:"taskRecyle",icon:"taskRecyle"},{label:"挂起",value:"hang",icon:"hang"},{label:"恢复",value:"restore",icon:"restore"},{label:"恢复",value:"processActivate",icon:"restore"},{label:"终止",value:"terminate",icon:"terminate"},{label:"终止",value:"processTerminate",icon:"terminate"},{label:"挂起",value:"processSuspend",icon:"hang"},{label:"挂起",value:"processSupspend",icon:"hang"},{label:"跳转",value:"jump",icon:"jump"},{label:"跳转",value:"taskJump",icon:"jump"},{label:"办毕",value:"taskComplete",icon:"taskComplete"},{label:"发送",value:"taskSend",icon:"taskSend"},{label:"退回",value:"taskRollback",icon:"taskRollback"},{label:"拾取",value:"taskClaim",icon:"taskClaim"},{label:"前加签",value:"turnBefore",icon:"turnBefore"},{label:"前加签",value:"taskTurnBefore",icon:"turnBefore"},{label:"后加签",value:"turnAfter",icon:"turnAfter"},{label:"后加签",value:"taskTurnAfter",icon:"turnAfter"}],o=l.computed(()=>i.find(s=>s.value===n.type));function a(){var s;r("click",((s=o.value)==null?void 0:s.value)||n.type)}return(s,c)=>{const d=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("span",ic,[o.value?(l.openBlock(),l.createBlock(d,{key:0,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.createVNode(rc,{"icon-class":o.value.icon},null,8,["icon-class"]),l.createTextVNode(" "+l.toDisplayString(e.label||o.value.label),1)]),_:1})):(l.openBlock(),l.createBlock(d,{key:1,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.renderSlot(s.$slots,"default",{},()=>[l.createTextVNode(l.toDisplayString(e.label||e.type),1)],!0)]),_:3}))])}}}),[["__scopeId","data-v-12932ad8"]]);function mo(e,t){return function(){return e.apply(t,arguments)}}const{toString:ac}=Object.prototype,{getPrototypeOf:rn}=Object,{iterator:vn,toStringTag:yo}=Symbol,jn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),wn=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),jn(n,t))return!0;n=rn(n)}return!1},sc=(e,t)=>e!=null&&wn(e,t)?e[t]:void 0,Br=(e=>t=>{const n=ac.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),et=e=>(e=e.toLowerCase(),t=>Br(t)===e),Un=e=>t=>typeof t===e,{isArray:zt}=Array,Ht=Un("undefined");function on(e){return e!==null&&!Ht(e)&&e.constructor!==null&&!Ht(e.constructor)&&qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const go=et("ArrayBuffer");function lc(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&go(e.buffer),t}const cc=Un("string"),qe=Un("function"),vo=Un("number"),an=e=>e!==null&&typeof e=="object",uc=e=>e===!0||e===!1,zn=e=>{if(!an(e))return!1;const t=rn(e);return(t===null||t===Object.prototype||rn(t)===null)&&!wn(e,yo)&&!wn(e,vn)},fc=e=>{if(!an(e)||on(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},dc=et("Date"),pc=et("File"),hc=e=>!!(e&&typeof e.uri<"u"),mc=e=>e&&typeof e.getParts<"u",yc=et("Blob"),gc=et("FileList"),vc=et("Set"),wc=e=>an(e)&&qe(e.pipe);function bc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const wo=bc(),bo=typeof wo.FormData<"u"?wo.FormData:void 0,Ec=e=>{if(!e)return!1;if(bo&&e instanceof bo)return!0;const t=rn(e);if(!t||t===Object.prototype||!qe(e.append))return!1;const n=Br(e);return n==="formdata"||n==="object"&&qe(e.toString)&&e.toString()==="[object FormData]"},_c=et("URLSearchParams"),[xc,Sc,Ac,kc]=["ReadableStream","Request","Response","Headers"].map(et),Cc=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),zt(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(on(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function Eo(e,t){if(on(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Wt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_o=e=>!Ht(e)&&e!==Wt;function Mr(...e){const{caseless:t,skipUndefined:n}=_o(this)&&this||{},r={},i=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=t&&typeof a=="string"&&Eo(r,a)||a,c=jn(r,s)?r[s]:void 0;zn(c)&&zn(o)?r[s]=Mr(c,o):zn(o)?r[s]=Mr({},o):zt(o)?r[s]=o.slice():(!n||!Ht(o))&&(r[s]=o)};for(let o=0,a=e.length;o<a;o++){const s=e[o];if(!s||on(s)||(bn(s,i),typeof s!="object"||zt(s)))continue;const c=Object.getOwnPropertySymbols(s);for(let d=0;d<c.length;d++){const h=c[d];$c.call(s,h)&&i(s[h],h)}}return r}const Rc=(e,t,n,{allOwnKeys:r}={})=>(bn(t,(i,o)=>{n&&qe(i)?Object.defineProperty(e,o,{__proto__:null,value:mo(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Tc=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Pc=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Nc=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&rn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Dc=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ic=e=>{if(!e)return null;if(zt(e))return e;let t=e.length;if(!vo(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Oc=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&rn(Uint8Array)),Bc=(e,t)=>{const r=(e&&e[vn]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Mc=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Lc=et("HTMLFormElement"),Fc=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:$c}=Object.prototype,Vc=et("RegExp"),xo=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};bn(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},jc=e=>{xo(e,(t,n)=>{if(qe(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(qe(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Uc=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return zt(e)?r(e):r(String(e).split(t)),n},zc=()=>{},Hc=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Wc(e){return!!(e&&qe(e.append)&&e[yo]==="FormData"&&e[vn])}const qc=e=>{const t=new WeakSet,n=r=>{if(an(r)){if(t.has(r))return;if(on(r))return r;if(!("toJSON"in r)){t.add(r);let i;if(vc(r)){i=[];for(const o of r){const a=n(o);!Ht(a)&&i.push(a)}}else i=zt(r)?[]:{},bn(r,(o,a)=>{const s=n(o);!Ht(s)&&(i[a]=s)});return t.delete(r),i}}return r};return n(e)},Yc=et("AsyncFunction"),Kc=e=>e&&(an(e)||qe(e))&&qe(e.then)&&qe(e.catch),So=((e,t)=>e?setImmediate:t?((n,r)=>(Wt.addEventListener("message",({source:i,data:o})=>{i===Wt&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Wt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",qe(Wt.postMessage)),Gc=typeof queueMicrotask<"u"?queueMicrotask.bind(Wt):typeof process<"u"&&process.nextTick||So,Ao=e=>e!=null&&qe(e[vn]),x={isArray:zt,isArrayBuffer:go,isBuffer:on,isFormData:Ec,isArrayBufferView:lc,isString:cc,isNumber:vo,isBoolean:uc,isObject:an,isPlainObject:zn,isEmptyObject:fc,isReadableStream:xc,isRequest:Sc,isResponse:Ac,isHeaders:kc,isUndefined:Ht,isDate:dc,isFile:pc,isReactNativeBlob:hc,isReactNative:mc,isBlob:yc,isRegExp:Vc,isFunction:qe,isStream:wc,isURLSearchParams:_c,isTypedArray:Oc,isFileList:gc,forEach:bn,merge:Mr,extend:Rc,trim:Cc,stripBOM:Tc,inherits:Pc,toFlatObject:Nc,kindOf:Br,kindOfTest:et,endsWith:Dc,toArray:Ic,forEachEntry:Bc,matchAll:Mc,isHTMLForm:Lc,hasOwnProperty:jn,hasOwnProp:jn,hasOwnInPrototypeChain:wn,getSafeProp:sc,reduceDescriptors:xo,freezeMethods:jc,toObjectSet:Uc,toCamelCase:Fc,noop:zc,toFiniteNumber:Hc,findKey:Eo,global:Wt,isContextDefined:_o,isSpecCompliantForm:Wc,toJSONObject:qc,isAsyncFn:Yc,isThenable:Kc,setImmediate:So,asap:Gc,isIterable:Ao,isSafeIterable:e=>e!=null&&wn(e,vn)&&Ao(e)},Xc=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Jc=e=>{const t={};let n,r,i;return e&&e.split(`
2
- `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim();const s=x.hasOwnProp(t,n);!n||s&&x.hasOwnProp(Xc,n)||(n==="set-cookie"?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t};function Zc(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const Qc=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),eu=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Lr(e,t){return x.isArray(e)?e.map(n=>Lr(n,t)):Zc(String(e).replace(t,""))}const tu=e=>Lr(e,Qc),nu=e=>Lr(e,eu);function ko(e){const t=Object.create(null);return x.forEach(e.toJSON(),(n,r)=>{t[r]=nu(n)}),t}const Co=Symbol("internals");function En(e){return e&&String(e).trim().toLowerCase()}function Hn(e){return e===!1||e==null?e:x.isArray(e)?e.map(Hn):tu(String(e))}function ru(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const iu=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Fr(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function ou(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function au(e){const t=Object.create(null),n=String(e);let r=0,i=!1,o=!1;function a(s){const c=Fr(n.slice(r,s)),d=c.indexOf("=");if(d<1)return;const h=Fr(c.slice(0,d));if(!iu.test(h))return;const m=h.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const w=Fr(c.slice(d+1));t[m]=ou(w)}for(let s=0;s<n.length;s++){const c=n.charCodeAt(s);i?o?o=!1:c===92?o=!0:c===34&&(i=!1):c===34?i=!0:(c===44||c===59)&&(a(s),r=s+1)}return a(n.length),t}const su=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function $r(e,t,n,r,i){if(x.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function lu(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function cu(e,t){const n=x.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}let $e=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,c,d){const h=En(c);if(!h)return;const m=x.findKey(i,h);(!m||i[m]===void 0||d===!0||d===void 0&&i[m]!==!1)&&(i[m||c]=Hn(s))}const a=(s,c)=>x.forEach(s,(d,h)=>o(d,h,c));if(x.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(x.isString(t)&&(t=t.trim())&&!su(t))a(Jc(t),n);else if(x.isObject(t)&&x.isSafeIterable(t)){let s=Object.create(null),c,d;for(const h of t){if(!x.isArray(h))throw new TypeError("Object iterator must return a key-value pair");d=h[0],x.hasOwnProp(s,d)?(c=s[d],s[d]=x.isArray(c)?[...c,h[1]]:[c,h[1]]):s[d]=h[1]}a(s,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=En(t),t){const r=x.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return ru(i);if(x.isFunction(n))return n.call(this,i,r);if(x.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=En(t),t){const r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||$r(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=En(a),a){const s=x.findKey(r,a);s&&(!n||$r(r,r[s],s,n))&&(delete r[s],i=!0)}}return x.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||$r(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return x.forEach(this,(i,o)=>{const a=x.findKey(r,o);if(a){n[a]=Hn(i),delete n[o];return}const s=t?lu(o):String(o).trim();s!==o&&delete n[o],n[s]=Hn(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return x.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&x.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}getSetCookie(){const t=this.get("set-cookie");return x.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return au(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Co]=this[Co]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=En(a);r[s]||(cu(i,a),r[s]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors($e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),x.freezeMethods($e);const Wn="[REDACTED ****]";function uu(e){if(x.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(x.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function fu(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],i=o=>{if(o===null||typeof o!="object"||x.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof $e&&(o=o.toJSON()),r.push(o);let a;if(x.isArray(o))a=[],o.forEach((s,c)=>{const d=i(s);x.isUndefined(d)||(a[c]=d)});else{if(!x.isPlainObject(o)&&uu(o))return r.pop(),o;a=Object.create(null);for(const[s,c]of Object.entries(o)){const d=n.has(s.toLowerCase())?Wn:i(c);x.isUndefined(d)||(a[s]=d)}}return r.pop(),a};return i(e)}function Ro(e){try{return String(e)}catch{return""}}function du(e){return e.errors.map(n=>{try{return n&&n.message?Ro(n.message):Ro(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let ne=class Dl extends Error{static from(t,n,r,i,o,a){let s=t.message;!s&&x.isArray(t.errors)&&t.errors.length&&(s=du(t));const c=new Dl(s,n||t.code,r,i,o);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&x.hasOwnProp(t,"redact")?t.redact:void 0,r=x.isArray(n)&&n.length>0?fu(t,n):x.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ne.ERR_BAD_OPTION="ERR_BAD_OPTION",ne.ECONNABORTED="ECONNABORTED",ne.ETIMEDOUT="ETIMEDOUT",ne.ECONNREFUSED="ECONNREFUSED",ne.ERR_NETWORK="ERR_NETWORK",ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ne.ERR_DEPRECATED="ERR_DEPRECATED",ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ne.ERR_CANCELED="ERR_CANCELED",ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ne.ERR_INVALID_URL="ERR_INVALID_URL",ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const pu=null,To=100;function Vr(e){return x.isPlainObject(e)||x.isArray(e)}function Po(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function jr(e,t,n){return e?e.concat(t).map(function(i,o){return i=Po(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function hu(e){return x.isArray(e)&&!e.some(Vr)}const mu=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function qn(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,y){return!x.isUndefined(y[P])});const r=n.metaTokens,i=n.visitor||I,o=n.dots,a=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?To:n.maxDepth,d=s&&x.isSpecCompliantForm(t),h=[];if(!x.isFunction(i))throw new TypeError("visitor must be a function");function m(E){if(E===null)return"";if(x.isDate(E))return E.toISOString();if(x.isBoolean(E))return E.toString();if(!d&&x.isBlob(E))throw new ne("Blob is not supported. Use a Buffer instead.");if(x.isArrayBuffer(E)||x.isTypedArray(E)){if(d&&typeof s=="function")return new s([E]);throw new ne("Blob is not supported. Use a Buffer instead.",ne.ERR_NOT_SUPPORT)}return E}function w(E){if(E>c)throw new ne("Object is too deeply nested ("+E+" levels). Max depth: "+c,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(E,P){if(c===1/0)return JSON.stringify(E);const y=[];return JSON.stringify(E,function(R,D){if(!x.isObject(D))return D;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(D),w(P+y.length-1),D})}function I(E,P,y){let v=E;if(x.isReactNative(t)&&x.isReactNativeBlob(E))return t.append(jr(y,P,o),m(E)),!1;if(E&&!y&&typeof E=="object"){if(x.endsWith(P,"{}"))P=r?P:P.slice(0,-2),E=g(E,1);else if(x.isArray(E)&&hu(E)||(x.isFileList(E)||x.endsWith(P,"[]"))&&(v=x.toArray(E)))return P=Po(P),v.forEach(function(D,S){!(x.isUndefined(D)||D===null)&&t.append(a===!0?jr([P],S,o):a===null?P:P+"[]",m(D))}),!1}return Vr(E)?!0:(t.append(jr(y,P,o),m(E)),!1)}const B=Object.assign(mu,{defaultVisitor:I,convertValue:m,isVisitable:Vr});function C(E,P,y=0){if(!x.isUndefined(E)){if(w(y),h.indexOf(E)!==-1)throw new Error("Circular reference detected in "+P.join("."));h.push(E),x.forEach(E,function(R,D){(!(x.isUndefined(R)||R===null)&&i.call(t,R,x.isString(D)?D.trim():D,P,B))===!0&&C(R,P?P.concat(D):[D],y+1)}),h.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return C(e),t}function No(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ur(e,t){this._pairs=[],e&&qn(e,this,t)}const Do=Ur.prototype;Do.append=function(t,n){this._pairs.push([t,n])},Do.toString=function(t){const n=t?r=>t.call(this,r,No):No;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function yu(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Io(e,t,n){if(!t)return e;e=e||"";const r=x.isFunction(n)?{serialize:n}:n,i=x.getSafeProp(r,"encode")||yu,o=x.getSafeProp(r,"serialize");let a;if(o?a=o(t,r):a=x.isURLSearchParams(t)?t.toString():new Ur(t,r).toString(i),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Oo{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(r){r!==null&&t(r)})}}const zr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},gu={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ur,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Hr=typeof window<"u"&&typeof document<"u",Wr=typeof navigator=="object"&&navigator||void 0,vu=Hr&&(!Wr||["ReactNative","NativeScript","NS"].indexOf(Wr.product)<0),wu=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bu=Hr&&window.location.href||"http://localhost",Me={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hr,hasStandardBrowserEnv:vu,hasStandardBrowserWebWorkerEnv:wu,navigator:Wr,origin:bu},Symbol.toStringTag,{value:"Module"})),...gu};function Eu(e,t){return qn(e,new Me.classes.URLSearchParams,{visitor:function(n,r,i,o){return Me.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const Bo=To;function Mo(e){if(e>Bo)throw new ne("FormData field is too deeply nested ("+e+" levels). Max depth: "+Bo,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function _u(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Mo(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function xu(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function Lo(e){function t(n,r,i,o){Mo(o);let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),c=o>=n.length;return a=!a&&x.isArray(i)?i.length:a,c?(x.hasOwnProp(i,a)?i[a]=x.isArray(i[a])?i[a].concat(r):[i[a],r]:i[a]=r,!s):((!x.hasOwnProp(i,a)||!x.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&x.isArray(i[a])&&(i[a]=xu(i[a])),!s)}if(x.isFormData(e)&&x.isFunction(e.entries)){const n={};return x.forEachEntry(e,(r,i)=>{t(_u(r),i,n,0)}),n}return null}const sn=(e,t)=>e!=null&&x.hasOwnProp(e,t)?e[t]:void 0;function Su(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _n={transitional:zr,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return i?JSON.stringify(Lo(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){const c=sn(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Eu(t,c).toString();if((s=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=sn(this,"env"),h=d&&d.FormData;return qn(s?{"files[]":t}:t,h&&new h,c)}}return o||i?(n.setContentType("application/json",!1),Su(t)):t}],transformResponse:[function(t){const n=sn(this,"transitional")||_n.transitional,r=n&&n.forcedJSONParsing,i=sn(this,"responseType"),o=i==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(r&&!i||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,sn(this,"parseReviver"))}catch(c){if(s)throw c.name==="SyntaxError"?ne.from(c,ne.ERR_BAD_RESPONSE,this,null,sn(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Me.classes.FormData,Blob:Me.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch","query"],e=>{_n.headers[e]={}});function qr(e,t){const n=this||_n,r=t||n,i=$e.from(r.headers);let o=r.data;return x.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Fo(e){return!!(e&&e.__CANCEL__)}let xn=class extends ne{constructor(t,n,r){super(t??"canceled",ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function $o(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?ne.ERR_BAD_REQUEST:ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function Au(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function ku(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),h=r[o];a||(a=d),n[i]=c,r[i]=d;let m=o,w=0;for(;m!==i;)w+=n[m++],m=m%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-a<t)return;const g=h&&d-h;return g?Math.round(w*1e3/g):void 0}}function Cu(e,t){let n=0,r=1e3/t,i,o;const a=(d,h=Date.now())=>{n=h,i=null,o&&(clearTimeout(o),o=null),e(...d)};return[(...d)=>{const h=Date.now(),m=h-n;m>=r?a(d,h):(i=d,o||(o=setTimeout(()=>{o=null,a(i)},r-m)))},()=>i&&a(i)]}const Yn=(e,t,n=3)=>{let r=0;const i=ku(50,250);return Cu(o=>{if(!o||typeof o.loaded!="number")return;const a=o.loaded,s=o.lengthComputable?o.total:void 0,c=Math.max(0,s!=null?Math.min(a,s):a),d=Math.max(0,c-r),h=i(d);r=Math.max(r,c);const m={loaded:c,total:s,progress:s?c/s:void 0,bytes:d,rate:h||void 0,estimated:h&&s?(s-c)/h:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(m)},n)},Vo=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},jo=(e,t=x.asap)=>(...n)=>t(()=>e(...n)),Ru=Me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Me.origin),Me.navigator&&/(msie|trident)/i.test(Me.navigator.userAgent)):()=>!0,Tu=Me.hasStandardBrowserEnv?{write(e,t,n,r,i,o,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];x.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),x.isString(r)&&s.push(`path=${r}`),x.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),x.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Pu(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nu(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const Du=/^https?:(?!\/\/)/i,Iu=/[\t\n\r]/g;function Ou(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Bu(e){return Ou(e).replace(Iu,"")}function Mu(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${Wn}`)}function Lu(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Wn}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Wn}`);return n===-1?i:`${i}#${Mu(t.slice(n+1))}`}function Uo(e,t){if(typeof e=="string"){const n=Bu(e);if(Du.test(n))throw new ne(`Invalid URL ${JSON.stringify(Lu(n))}: missing "//" after protocol`,ne.ERR_INVALID_URL,t)}}function zo(e,t,n,r){Uo(t,r);let i=!Pu(t);return e&&(i||n===!1)?(Uo(e,r),Nu(e,t)):t}const Ho=e=>e instanceof $e?{...e}:e,Fu=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function qt(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(h,m,w,g){return x.isPlainObject(h)&&x.isPlainObject(m)?x.merge.call({caseless:g},h,m):x.isPlainObject(m)?x.merge({},m):x.isArray(m)?m.slice():m}function i(h,m,w,g){if(x.isUndefined(m)){if(!x.isUndefined(h))return r(void 0,h,w,g)}else return r(h,m,w,g)}function o(h,m){if(!x.isUndefined(m))return r(void 0,m)}function a(h,m){if(x.isUndefined(m)){if(!x.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function s(h){const m=x.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!x.isUndefined(m))if(x.isPlainObject(m)){if(x.hasOwnProp(m,h))return m[h]}else return;const w=x.hasOwnProp(e,"transitional")?e.transitional:void 0;if(x.isPlainObject(w)&&x.hasOwnProp(w,h))return w[h]}function c(h,m,w){if(x.hasOwnProp(t,w))return r(h,m);if(x.hasOwnProp(e,w))return r(void 0,h)}const d={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:c,headers:(h,m,w)=>i(Ho(h),Ho(m),w,!0)};return x.forEach(Fu({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const w=x.hasOwnProp(d,m)?d[m]:i,g=x.hasOwnProp(e,m)?e[m]:void 0,I=x.hasOwnProp(t,m)?t[m]:void 0,B=w(g,I,m);x.isUndefined(B)&&w!==c||(n[m]=B)}),x.hasOwnProp(t,"validateStatus")&&x.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(x.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const $u=["content-type","content-length"];function Vu(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{$u.includes(r.toLowerCase())&&e.set(r,i)})}const ju=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Wo(e){const t=qt({},e),n=w=>x.hasOwnProp(t,w)?t[w]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const c=n("auth"),d=n("baseURL"),h=n("allowAbsoluteUrls"),m=n("url");if(t.headers=s=$e.from(s),t.url=Io(zo(d,m,h,t),n("params"),n("paramsSerializer")),c){const w=x.getSafeProp(c,"username")||"",g=x.getSafeProp(c,"password")||"";try{s.set("Authorization","Basic "+btoa(w+":"+(g?ju(g):"")))}catch(I){throw ne.from(I,ne.ERR_BAD_OPTION_VALUE,e)}}if(x.isFormData(r)&&(Me.hasStandardBrowserEnv||Me.hasStandardBrowserWebWorkerEnv||x.isReactNative(r)?s.setContentType(void 0):x.isFunction(r.getHeaders)&&Vu(s,r.getHeaders(),n("formDataHeaderPolicy"))),Me.hasStandardBrowserEnv&&(x.isFunction(i)&&(i=i(t)),i===!0||i==null&&Ru(t.url))){const g=o&&a&&Tu.read(a);g&&s.set(o,g)}return t}const Uu=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=Wo(e);let o=i.data;const a=$e.from(i.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:d}=i,h,m,w,g,I;function B(){g&&g(),I&&I(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let C=new XMLHttpRequest;C.open(i.method.toUpperCase(),i.url,!0),C.timeout=i.timeout;function E(){if(!C)return;const y=$e.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),R={data:!s||s==="text"||s==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:y,config:e,request:C};$o(function(S){n(S),B()},function(S){r(S),B()},R),C=null}"onloadend"in C?C.onloadend=E:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.startsWith("file:"))||setTimeout(E)},C.onabort=function(){C&&(r(new ne("Request aborted",ne.ECONNABORTED,e,C)),B(),C=null)},C.onerror=function(v){const R=v&&v.message?v.message:"Network Error",D=new ne(R,ne.ERR_NETWORK,e,C);D.event=v||null,r(D),B(),C=null},C.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const R=i.transitional||zr;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new ne(v,R.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,e,C)),B(),C=null},o===void 0&&a.setContentType(null),"setRequestHeader"in C&&x.forEach(ko(a),function(v,R){C.setRequestHeader(R,v)}),x.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),s&&s!=="json"&&(C.responseType=i.responseType),d&&([w,I]=Yn(d,!0),C.addEventListener("progress",w)),c&&C.upload&&([m,g]=Yn(c),C.upload.addEventListener("progress",m),C.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(h=y=>{C&&(r(!y||y.type?new xn(null,e,C):y),C.abort(),B(),C=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const P=Au(i.url);if(P&&!Me.protocols.includes(P)){r(new ne("Unsupported protocol "+P+":",ne.ERR_BAD_REQUEST,e)),B();return}C.send(o||null)})},zu=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(c){if(!r){r=!0,a();const d=c instanceof Error?c:this.reason;n.abort(d instanceof ne?d:new xn(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,i(new ne(`timeout of ${t}ms exceeded`,ne.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>{if(!r){if(c.aborted){i.call(c);return}c.addEventListener("abort",i,{once:!0})}});const{signal:s}=n;return s.unsubscribe=()=>x.asap(a),s},Hu=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Wu=async function*(e,t){for await(const n of qu(e))yield*Hu(n,t)},qu=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},qo=(e,t,n,r)=>{const i=Wu(e,t);let o=0,a,s=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:h}=await i.next();if(d){s(),c.close();return}let m=h.byteLength;if(n){let w=o+=m;n(w)}c.enqueue(new Uint8Array(h))}catch(d){throw s(d),d}},cancel(c){return s(c),i.return()}},{highWaterMark:2})},Yo=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Ko=(e,t,n)=>t+2<n&&Yo(e.charCodeAt(t+1))&&Yo(e.charCodeAt(t+2)),Go=e=>e<=57?e-48:(e&223)-55,Yu=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,Ku=e=>e===9||e===10||e===12||e===13||e===32,Gu=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},Xu=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Ju=e=>{const t=e.length;let n=0,r=0,i=!1;for(let o=0;o<t;o++){let a=e.charCodeAt(o);if(a===37&&Ko(e,o,t)&&(a=Go(e.charCodeAt(o+1))*16+Go(e.charCodeAt(o+2)),o+=2),!Ku(a)){if(a===61){r++;continue}if(!Yu(a)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?Xu(e):Gu(n)},Zu=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let s=0,c=i.length;s<c;s++){const d=i.charCodeAt(s);if(d===37&&Ko(i,s,c))a+=1,s+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&s+1<c){const h=i.charCodeAt(s+1);h>=56320&&h<=57343?(a+=4,s++):a+=3}else a+=3}return a};function Qu(e){const t=typeof e=="string"?e.indexOf("#"):-1;return Zu(t===-1?e:e.slice(0,t),Ju)}const Yr="1.19.0",Xo=64*1024,{isFunction:Kn}=x,ef=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Jo=e=>{if(!x.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Zo=(e,...t)=>{try{return!!e(...t)}catch{return!1}},tf=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},nf=e=>{const t=x.global!==void 0&&x.global!==null?x.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=x.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:o,Response:a}=e,s=i?Kn(i):typeof fetch=="function",c=Kn(o),d=Kn(a);if(!s)return!1;const h=s&&Kn(n),m=s&&(typeof r=="function"?(E=>P=>E.encode(P))(new r):async E=>new Uint8Array(await new o(E).arrayBuffer())),w=c&&h&&Zo(()=>{let E=!1;const P=new o(Me.origin,{body:new n,method:"POST",get duplex(){return E=!0,"half"}}),y=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),E&&!y}),g=d&&h&&Zo(()=>x.isReadableStream(new a("").body)),I={stream:g&&(E=>E.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!I[E]&&(I[E]=(P,y)=>{let v=P&&P[E];if(v)return v.call(P);throw new ne(`Response type '${E}' is not supported`,ne.ERR_NOT_SUPPORT,y)})});const B=async E=>{if(E==null)return 0;if(x.isBlob(E))return E.size;if(x.isSpecCompliantForm(E))return(await new o(Me.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(x.isArrayBufferView(E)||x.isArrayBuffer(E))return E.byteLength;if(x.isURLSearchParams(E)&&(E=E+""),x.isString(E))return(await m(E)).byteLength},C=async(E,P)=>{const y=x.toFiniteNumber(E.getContentLength());return y??B(P)};return async E=>{let{url:P,method:y,data:v,signal:R,cancelToken:D,timeout:S,onDownloadProgress:_,onUploadProgress:V,responseType:F,headers:T,withCredentials:W="same-origin",fetchOptions:re,maxContentLength:J,maxBodyLength:H}=Wo(E);const Y=x.isNumber(J)&&J>-1,Z=x.isNumber(H)&&H>-1,q=se=>x.hasOwnProp(E,se)?E[se]:void 0;let K=i||fetch;F=F?(F+"").toLowerCase():"text";let O=zu([R,D&&D.toAbortSignal()],S),j=null;const k=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let N,U=null;const ie=()=>new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,E,j);try{let se;const p=q("auth");if(p){const oe=x.getSafeProp(p,"username")||"",M=x.getSafeProp(p,"password")||"";se={username:oe,password:M}}if(tf(P)){const oe=new URL(P,Me.origin);if(!se&&(oe.username||oe.password)){const M=Jo(oe.username),G=Jo(oe.password);se={username:M,password:G}}(oe.username||oe.password)&&(oe.username="",oe.password="",P=oe.href)}if(se&&(T.delete("authorization"),T.set("Authorization","Basic "+btoa(ef((se.username||"")+":"+(se.password||""))))),Y&&typeof P=="string"&&P.startsWith("data:")&&Qu(P)>J)throw new ne("maxContentLength size of "+J+" exceeded",ne.ERR_BAD_RESPONSE,E,j);if(Z&&y!=="get"&&y!=="head"){const oe=await B(v);if(typeof oe=="number"&&isFinite(oe)&&(N=oe,oe>H))throw ie()}const f=Z&&(x.isReadableStream(v)||x.isStream(v)),u=(oe,M,G)=>qo(oe,Xo,Q=>{if(Z&&Q>H)throw U=ie();M&&M(Q)},G);if(w&&y!=="get"&&y!=="head"&&(V||f)){if(N=N??await C(T,v),N!==0||f){let oe=new o(P,{method:"POST",body:v,duplex:"half"}),M;if(x.isFormData(v)&&(M=oe.headers.get("content-type"))&&T.setContentType(M),oe.body){const[G,Q]=V&&Vo(N,Yn(jo(V)))||[];v=u(oe.body,G,Q)}}}else if(f&&!c&&h&&y!=="get"&&y!=="head")v=u(v);else if(f&&c&&!w&&y!=="get"&&y!=="head")throw new ne("Stream request bodies are not supported by the current fetch implementation",ne.ERR_NOT_SUPPORT,E,j);x.isString(W)||(W=W?"include":"omit");const b=c&&"credentials"in o.prototype;if(x.isFormData(v)){const oe=T.getContentType();oe&&/^multipart\/form-data/i.test(oe)&&!/boundary=/i.test(oe)&&T.delete("content-type")}T.set("User-Agent","axios/"+Yr,!1);const A={...re,signal:O,method:y.toUpperCase(),headers:ko(T.normalize()),body:v,duplex:"half",credentials:b?W:void 0};j=c&&new o(P,A);let L=await(c?K(j,re):K(P,A));const ee=$e.from(L.headers);if(Y){const oe=x.toFiniteNumber(ee.getContentLength());if(oe!=null&&oe>J)throw new ne("maxContentLength size of "+J+" exceeded",ne.ERR_BAD_RESPONSE,E,j)}const fe=g&&(F==="stream"||F==="response");if(g&&L.body&&(_||Y||fe&&k)){const oe={};["status","statusText","headers"].forEach(ve=>{oe[ve]=L[ve]});const M=x.toFiniteNumber(ee.getContentLength()),[G,Q]=_&&Vo(M,Yn(jo(_),!0))||[];let he=0;const ye=ve=>{if(Y&&(he=ve,he>J))throw new ne("maxContentLength size of "+J+" exceeded",ne.ERR_BAD_RESPONSE,E,j);G&&G(ve)};L=new a(qo(L.body,Xo,ye,()=>{Q&&Q(),k&&k()}),oe)}F=F||"text";let me=await I[x.findKey(I,F)||"text"](L,E);if(Y&&!g&&!fe){let oe;if(me!=null&&(typeof me.byteLength=="number"?oe=me.byteLength:typeof me.size=="number"?oe=me.size:typeof me=="string"&&(oe=typeof r=="function"?new r().encode(me).byteLength:me.length)),typeof oe=="number"&&oe>J)throw new ne("maxContentLength size of "+J+" exceeded",ne.ERR_BAD_RESPONSE,E,j)}return!fe&&k&&k(),await new Promise((oe,M)=>{$o(oe,M,{data:me,headers:$e.from(L.headers),status:L.status,statusText:L.statusText,config:E,request:j})})}catch(se){if(k&&k(),O&&O.aborted&&O.reason instanceof ne){const p=O.reason;throw p.config=E,j&&(p.request=j),se!==p&&Object.defineProperty(p,"cause",{__proto__:null,value:se,writable:!0,enumerable:!1,configurable:!0}),p}if(U)throw j&&!U.request&&(U.request=j),U;if(se instanceof ne)throw j&&!se.request&&(se.request=j),se;if(se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)){const p=new ne("Network Error",ne.ERR_NETWORK,E,j,se&&se.response);throw Object.defineProperty(p,"cause",{__proto__:null,value:se.cause||se,writable:!0,enumerable:!1,configurable:!0}),p}throw ne.from(se,se&&se.code,E,j,se&&se.response)}}},rf=new Map,Qo=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let a=o.length,s=a,c,d,h=rf;for(;s--;)c=o[s],d=h.get(c),d===void 0&&h.set(c,d=s?new Map:nf(t)),h=d;return d};Qo();const Kr={http:pu,xhr:Uu,fetch:{get:Qo}};x.forEach(Kr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const ea=e=>`- ${e}`,of=e=>x.isFunction(e)||e===null||e===!1;function af(e,t){e=x.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let a=0;a<n;a++){r=e[a];let s;if(i=r,!of(r)&&(i=Kr[(s=String(r)).toLowerCase()],i===void 0))throw new ne(`Unknown adapter '${s}'`);if(i&&(x.isFunction(i)||(i=i.get(t))))break;o[s||"#"+a]=i}if(!i){const a=Object.entries(o).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since :
4
- `+a.map(ea).join(`
5
- `):" "+ea(a[0]):"as no adapter specified";throw new ne("There is no suitable adapter to dispatch the request "+s,ne.ERR_NOT_SUPPORT)}return i}const ta={getAdapter:af,adapters:Kr};function Gr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xn(null,e)}function Xr(e){return Gr(e),e.headers=$e.from(e.headers),e.data=qr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ta.getAdapter(e.adapter||_n.adapter,e)(e).then(function(r){Gr(e),e.response=r;try{r.data=qr.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=$e.from(r.headers),r},function(r){if(!Fo(r)&&(Gr(e),r&&r.response)){e.response=r.response;try{r.response.data=qr.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=$e.from(r.response.headers)}return Promise.reject(r)})}const Gn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const na={};Gn.transitional=function(t,n,r){function i(o,a){return"[Axios v"+Yr+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new ne(i(a," has been removed"+(n?" in "+n:"")),ne.ERR_DEPRECATED);return n&&!na[a]&&(na[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}},Gn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function sf(e,t,n){if(typeof e!="object"||e===null)throw new ne("options must be an object",ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){const s=e[o],c=s===void 0||a(s,o,e);if(c!==!0)throw new ne("option "+o+" must be "+c,ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ne("Unknown option "+o,ne.ERR_BAD_OPTION)}}const Xn={assertOptions:sf,validators:Gn},Ve=Xn.validators;let Yt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Oo,response:new Oo}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=(()=>{if(!i.stack)return"";const a=i.stack.indexOf(`
6
- `);return a===-1?"":i.stack.slice(a+1)})();try{if(!r.stack)r.stack=o;else if(o){const a=o.indexOf(`
7
- `),s=a===-1?-1:o.indexOf(`
8
- `,a+1),c=s===-1?"":o.slice(s+1);String(r.stack).endsWith(c)||(r.stack+=`
9
- `+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Xn.assertOptions(r,{silentJSONParsing:Ve.transitional(Ve.boolean),forcedJSONParsing:Ve.transitional(Ve.boolean),clarifyTimeoutError:Ve.transitional(Ve.boolean),legacyInterceptorReqResOrdering:Ve.transitional(Ve.boolean),advertiseZstdAcceptEncoding:Ve.transitional(Ve.boolean),validateStatusUndefinedResolves:Ve.transitional(Ve.boolean)},!1),i!=null&&(x.isFunction(i)?n.paramsSerializer={serialize:i}:Xn.assertOptions(i,{encode:Ve.function,serialize:Ve.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Xn.assertOptions(n,{baseUrl:Ve.spelling("baseURL"),withXsrfToken:Ve.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","query","common"],I=>{delete o[I]}),n.headers=$e.concat(a,o);const s=[];let c=!0;this.interceptors.request.forEach(function(B){if(typeof B.runWhen=="function"&&B.runWhen(n)===!1)return;c=c&&B.synchronous;const C=n.transitional||zr;C&&C.legacyInterceptorReqResOrdering?s.unshift(B.fulfilled,B.rejected):s.push(B.fulfilled,B.rejected)});const d=[];this.interceptors.response.forEach(function(B){d.push(B.fulfilled,B.rejected)});let h,m=0,w;if(!c){const I=[Xr.bind(this),void 0];for(I.unshift(...s),I.push(...d),w=I.length,h=Promise.resolve(n);m<w;)h=h.then(I[m++],I[m++]);return h}w=s.length;let g=n;for(;m<w;){const I=s[m++],B=s[m++];try{g=I?I(g):g}catch(C){if(!B){h=Promise.reject(C);break}try{const E=B.call(this,C);x.isThenable(E)&&(h=Promise.resolve(E).then(()=>Xr.call(this,g)))}catch(E){h=Promise.reject(E)}break}}if(!h)try{h=Xr.call(this,g)}catch(I){h=Promise.reject(I)}for(m=0,w=d.length;m<w;)h=h.then(d[m++],d[m++]);return h}getUri(t){t=qt(this.defaults,t);const n=zo(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Io(n,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){Yt.prototype[t]=function(n,r){return this.request(qt(r||{},{method:t,url:n,data:r&&x.hasOwnProp(r,"data")?r.data:void 0}))}}),x.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,a,s){return this.request(qt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Yt.prototype[t]=n(),t!=="query"&&(Yt.prototype[t+"Form"]=n(!0))});let lf=class Il{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new xn(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Il(function(i){t=i}),cancel:t}}};function cf(e){return function(n){return e.apply(null,n)}}function uf(e){return x.isObject(e)&&e.isAxiosError===!0}const Jr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Jr).forEach(([e,t])=>{Jr[t]=e});function ra(e){const t=new Yt(e),n=mo(Yt.prototype.request,t);return x.extend(n,Yt.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ra(qt(e,i))},n}const De=ra(_n);De.Axios=Yt,De.CanceledError=xn,De.CancelToken=lf,De.isCancel=Fo,De.VERSION=Yr,De.toFormData=qn,De.AxiosError=ne,De.Cancel=De.CanceledError,De.all=function(t){return Promise.all(t)},De.spread=cf,De.isAxiosError=uf,De.mergeConfig=qt,De.AxiosHeaders=$e,De.formToJSON=e=>Lo(x.isHTMLForm(e)?new FormData(e):e),De.getAdapter=ta.getAdapter,De.HttpStatusCode=Jr,De.default=De;const{Axios:Sg,AxiosError:Ag,CanceledError:kg,isCancel:Cg,CancelToken:Rg,VERSION:Tg,all:Pg,Cancel:Ng,isAxiosError:Dg,spread:Ig,toFormData:Og,AxiosHeaders:Bg,HttpStatusCode:Mg,formToJSON:Lg,getAdapter:Fg,mergeConfig:$g,create:Vg}=De,vt={baseURL:"",timeout:6e4,getToken:void 0};function ia(e={}){e.baseURL!==void 0&&(vt.baseURL=e.baseURL),e.timeout!==void 0&&(vt.timeout=e.timeout),e.getToken!==void 0&&(vt.getToken=e.getToken)}const ff="";function df(e){return(e||"").replace(/\/$/,"")||ff}const Jn=De.create({timeout:vt.timeout});Jn.interceptors.request.use(e=>{var n;e.baseURL=df(vt.baseURL||e.baseURL),e.timeout=vt.timeout;const t=(n=vt.getToken)==null?void 0:n.call(vt);return t&&(e.headers.Authorization=t),e}),Jn.interceptors.response.use(e=>{const t=e.config,n=e.data;return t.responseType==="blob"?e:t.noCode?n:n&&![0,200].includes(n.code)?Promise.reject(new Error(n.msg||n.message||"服务错误")):n},e=>Promise.reject(e));function _e(e){return Jn.request(e)}const oa=e=>_e({url:"/server/repository/flowdef/event/latest",method:"post",data:e}),Zr=e=>_e({url:"/server/app/event/list",method:"get",data:e}),Qr=e=>_e({url:"/server/repository/flowdef/event/query",method:"post",data:e}),ei=(e,t)=>_e({url:`/console/plugin/simulate/event/page/draft/${e.currentPage}/${e.pageSize}`,method:"post",data:t}),aa=e=>_e({url:"/console/plugin/simulate/event/delete",method:"post",data:e}),sa=e=>_e({url:"/console/plugin/simulate",method:"post",data:e}),la=e=>_e({url:"/server/runtime/event/start",method:"post",data:e}),ti=e=>_e({url:"/server/runtime/event/quickStart",method:"post",data:e}),Zn=e=>_e({url:"/server/runtime/event/delete",method:"post",data:e}),ca=e=>_e({url:"/server/runtime/event/messageEventReceived",method:"post",data:e}),Qn=e=>_e({url:"/server/work/event/query",method:"post",data:e}),ni=e=>_e({url:"/server/history/workinst/event/query",method:"post",data:e}),ri=e=>_e({url:"/server/operate/def/event/get",method:"post",data:e}),ii=e=>_e({url:"/server/task/event/claim",method:"post",data:e}),oi=e=>_e({url:"/server/task/event/withdraw",method:"post",data:e}),ai=e=>_e({url:"/server/task/event/rollback",method:"post",data:e}),si=e=>_e({url:"/server/task/event/recyle",method:"post",data:e}),li=e=>_e({url:"/server/task/event/complete",method:"post",data:e}),ci=e=>_e({url:"/server/task/event/turnBefore",method:"post",data:e}),ui=e=>_e({url:"/server/task/event/turnAfter",method:"post",data:e}),fi=e=>_e({url:"/server/runtime/event/suspend",method:"post",data:e}),di=e=>_e({url:"/server/runtime/event/activate",method:"post",data:e}),pi=e=>_e({url:"/server/runtime/event/terminate",method:"post",data:e}),er=e=>_e({url:`/console/flowdef/event/download/procdefId/${e.procdefId}/extname/bpmn`,method:"get",noCode:!0}),hi=e=>_e({url:"/server/task/event/send",method:"post",data:e}),tr=e=>_e({url:"/server/model/event/get/firsthandle",method:"post",data:e}),ua=tr,nr=e=>_e({url:"/server/assignment/event/query",method:"post",data:e}),mi=(e="")=>_e({url:`/console/plugin/identify/usertree/organ/event/tree/${e}`,method:"get"}),yi=e=>_e({url:"/server/model/event/get/succeding",method:"post",data:e}),gi=e=>_e({url:"/server/task/event/jump",method:"post",data:e}),vi=e=>_e({url:"/server/model/event/get/usertasks",method:"post",data:e}),pf=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:di,claimTask:ii,completeTask:li,deleteDraftTask:aa,deleteProcessInstance:Zn,doneTaskList:ni,downloadBpmn:er,draftFlowList:oa,draftTaskList:ei,flowStartNodeList:ua,getAppList:Zr,getFirstHandleNodes:tr,getFlowList:Qr,getOptList:ri,jumpTask:gi,nextSendNode:yi,nodeAssistant:nr,organUserTree:mi,quickStart:ti,receiveMessageEvent:ca,recycleTask:si,revocationTask:oi,rollbackTask:ai,saveDraft:sa,sendTask:hi,startDraft:la,startNodes:vi,suspendFlow:fi,terminateFlow:pi,todoTaskList:Qn,turnAfterTask:ui,turnBeforeTask:ci},Symbol.toStringTag,{value:"Module"})),fa=3e3;function rr(e){if(e!==void 0)return e;if(typeof window>"u"||typeof document>"u")return fa;let t=fa-2;return document.querySelectorAll([".ui-overlay",".ui-overlay-message-box",".ui-modal",".el-overlay",".el-overlay-message-box"].join(",")).forEach(r=>{const i=Number.parseInt(window.getComputedStyle(r).zIndex,10);Number.isFinite(i)&&(t=Math.max(t,i))}),t+2}const hf={class:"ui-flow-jump"},mf={class:"dialog-footer"},da=gt(l.defineComponent({name:"UiFlowJump",__name:"FlowJump",props:{processDefinitionId:{},workId:{default:""},processInstanceId:{default:""},dealUser:{default:()=>({})},assignmentQueryParams:{default:()=>({})},modelValue:{type:Boolean,default:!1},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"跳转"},dialogWidth:{default:"960px"},zIndex:{}},emits:["update:modelValue","click","open","close","beforeJump","afterJump","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(!1),a=l.ref(),s=l.ref(!1),c=l.ref(!1),d=l.ref(!1),h=l.ref([]),m=l.ref([]),w=l.ref(""),g=l.ref(""),I=new Map;let B=0;const C=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),E=l.computed(()=>String(r.dealUser.name||C.value)),P={children:"children",label:"label",value:"value",disabled:"disabled",isLeaf:O=>O.hasChild===!1};function y(O){return O?String(O.id||O.activityId||""):""}function v(O){return O?String(O.activityName||O.name||O.id||O.activityId||""):""}function R(O){return Array.isArray(O)?O.map(j=>{const k=j||{},N=y(k);return{...k,id:N,name:v(k)}}).filter(j=>j.id):[]}function D(O){return O.map(j=>{const k=j||{},N=String(k.id||k.userId||""),U=String(k.ntype||"").trim().toLowerCase(),ie=Array.isArray(k.childs)?k.childs:Array.isArray(k.children)?k.children:void 0,se=String(k.caption||k.name||k.id||k.userId||"");return N&&U==="user"&&I.set(N,se||N),{...k,id:N,value:N,label:se,caption:se,ntype:U,hasChild:!!(k.hasChild||ie!=null&&ie.length),disabled:U!=="user",children:ie?D(ie):void 0}}).filter(j=>j.id)}function S(){return C.value?(I.set(C.value,E.value),[{id:C.value,value:C.value,label:E.value,caption:E.value,name:E.value,ntype:"user",hasChild:!1,disabled:!1}]):[]}async function _(){const O=String(r.processDefinitionId||""),j=++B;if(!O)return h.value=[],h.value;c.value=!0;try{const k=await vi({processDefinitionId:O}),N=R(k==null?void 0:k.data);return j!==B||O!==String(r.processDefinitionId||"")?N:(h.value=N,h.value)}catch(k){throw j===B&&(h.value=[]),i("error",k),k}finally{j===B&&(c.value=!1)}}async function V(O="",j){const k=await nr({processDefinitionId:String(r.processDefinitionId),activityId:w.value,ntype:j||"",parentId:O,userId:C.value,extendParams:{...r.assignmentQueryParams}});return D(Array.isArray(k.data)?k.data:[])}async function F(){if(m.value=[],g.value="",I.clear(),!w.value)return[];d.value=!0;try{const O=await V();m.value=O.length?O:S()}catch{m.value=S()}finally{d.value=!1}return m.value.length===1&&m.value[0].ntype==="user"&&(g.value=m.value[0].id),m.value}async function T(O,j){if(O.level===0){j(m.value);return}if(O.data.hasChild===!1||O.data.ntype==="user"){j([]);return}if(Array.isArray(O.data.children)&&O.data.children.length){j(O.data.children);return}try{const k=await V(String(O.data.id),String(O.data.ntype||""));j(k)}catch(k){i("error",k),j([])}}async function W(){await F()}function re(O,j){const k=O?y(O):w.value,N=String(j||g.value||C.value),U=I.get(N)||(N===C.value?E.value:N);return{workId:r.workId,flowNodeAssignee:{activityId:k,assignees:[{name:U,userId:N}]},variables:{}}}async function J(O){const j=O||re();i("beforeJump",j),s.value=!0;try{const k=await gi(j);return i("afterJump",k,j),k}catch(k){throw i("error",k),k}finally{s.value=!1}}async function H(){if(!r.workId){xe.ElMessage.warning("当前任务缺少 workId,无法执行跳转");return}if(!w.value){xe.ElMessage.warning("请选择开始节点");return}if(!g.value){xe.ElMessage.warning("请选择办理人");return}try{await J(),o.value=!1,xe.ElMessage.success("跳转任务成功")}catch{}}async function Y(){a.value=rr(r.zIndex),o.value=!0,w.value="",g.value="",m.value=[],i("open");try{await _()}catch{}}function Z(){o.value=!1}function q(){i("close")}function K(){i("click"),Y()}return l.watch(()=>r.modelValue,O=>{O&&!o.value&&Y(),!O&&o.value&&(o.value=!1)}),l.watch(o,O=>i("update:modelValue",O)),l.watch(()=>r.processDefinitionId,()=>{w.value="",g.value="",m.value=[],r.processDefinitionId?_().catch(()=>{}):h.value=[]}),l.watch(C,()=>{o.value&&w.value&&F()}),l.onMounted(()=>{r.modelValue?Y():r.processDefinitionId&&_().catch(()=>{})}),t({visible:o,effectiveZIndex:a,loading:s,nodeLoading:c,assigneeLoading:d,startNodeList:h,selectedActivityId:w,selectedAssigneeId:g,open:Y,close:Z,getStartNodes:_,assembleData:re,jump:J}),(O,j)=>{const k=l.resolveComponent("el-button"),N=l.resolveComponent("el-option"),U=l.resolveComponent("el-select"),ie=l.resolveComponent("el-form-item"),se=l.resolveComponent("el-tree-select"),p=l.resolveComponent("el-form"),f=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",hf,[e.showTrigger?(l.openBlock(),l.createBlock(k,{key:0,type:"primary",loading:s.value,onClick:K},{default:l.withCtx(()=>[l.renderSlot(O.$slots,"default",{},()=>[j[3]||(j[3]=l.createTextVNode("跳转",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(f,{modelValue:o.value,"onUpdate:modelValue":j[2]||(j[2]=u=>o.value=u),"append-to-body":"",class:"ui-flow-jump-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":a.value,onClosed:q},{footer:l.withCtx(()=>[l.createElementVNode("div",mf,[l.createVNode(k,{type:"primary",loading:s.value,onClick:H},{default:l.withCtx(()=>[...j[4]||(j[4]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(k,{disabled:s.value,onClick:Z},{default:l.withCtx(()=>[...j[5]||(j[5]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createVNode(p,{class:"jump-form","label-width":"108px"},{default:l.withCtx(()=>[l.createVNode(ie,{label:"开始节点",required:""},{default:l.withCtx(()=>[l.createVNode(U,{modelValue:w.value,"onUpdate:modelValue":j[0]||(j[0]=u=>w.value=u),clearable:"",filterable:"",loading:c.value,teleported:!1,placeholder:"请选择",style:{width:"100%"},onChange:W},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,u=>(l.openBlock(),l.createBlock(N,{key:y(u),label:v(u),value:y(u)},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),l.createVNode(ie,{label:"办理人",required:""},{default:l.withCtx(()=>[l.createVNode(se,{modelValue:g.value,"onUpdate:modelValue":j[1]||(j[1]=u=>g.value=u),"check-strictly":"",clearable:"",data:m.value,disabled:!w.value,load:T,loading:d.value,props:P,lazy:"","node-key":"id",teleported:!1,placeholder:"请选择","render-after-expand":!1,style:{width:"100%"}},null,8,["modelValue","data","disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-3c08ca6e"]]),yf={class:"ui-flow-send"},gf={class:"send-panel"},vf={class:"current-activity"},wf={class:"node-groups"},bf=["onClick"],Ef={class:"group-name"},_f={class:"group-deal-type"},xf={class:"send-center"},Sf={class:"assignee-transfer"},Af={class:"assignee-box"},kf={class:"tree-node"},Cf={key:1,class:"candidate-list"},Rf={class:"assignee-box selected-list"},Tf={key:0,class:"node-state"},Pf={class:"opinion-panel"},Nf={class:"dialog-footer"},wi=gt(l.defineComponent({name:"UiFlowSend",__name:"FlowSend",props:{processDefinitionId:{},activity:{},workId:{},processInstanceId:{default:""},variables:{default:()=>({})},assignmentQueryParams:{default:()=>({})},dealUser:{default:()=>({})},bpmnXml:{default:""},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},zIndex:{},defaultOpinion:{default:""},modelValue:{type:Boolean,default:!1},forceSingleAssignee:{type:Boolean,default:!1},deleteInstanceOnCancel:{type:Boolean,default:!1}},emits:["update:modelValue","click","open","close","nextNodesResolved","beforeSend","afterSend","error"],setup(e,{expose:t,emit:n}){const r={signle:"单人单办",single:"单人单办",candidategroups:"群组单办",candidateusers:"多人单办",multiparallel:"多人并行",multisequential:"多人顺序",auto:"自动触发"},i=e,o=n,a=l.ref(!1),s=l.ref(),c=l.ref(!1),d=l.ref(!1),h=l.ref(!1),m=l.ref(!1),w=l.ref([]),g=l.ref([]),I=l.ref([]),B=l.ref([]),C=l.ref([]),E=l.ref(!1),P=l.ref(""),y=l.ref("nextNode"),v=l.ref(""),R=l.ref([]),D=l.ref(!1),S=l.ref(0),_=l.ref(),V=l.ref(!1),F={children:"childs",label:"caption",isLeaf:$=>$.hasChild===!1},T=l.computed(()=>String(i.dealUser.userId||i.dealUser.id||"")),W=l.computed(()=>g.value.find($=>re($)===P.value));function re($){return $?String($.id||$.activityId||""):""}function J($){return["userTask","USER_TASK"].includes(String($.flowElementType||""))}function H($){return`${$.activity}:${$.id}`}function Y($){return typeof $=="boolean"?"boolean":typeof $=="number"?Number.isInteger($)?"integer":"double":$ instanceof Date?"date":"string"}function Z(){R.value=Object.entries(i.variables).map(([$,z])=>({variableName:$,variableType:Y(z),variableValue:z})),D.value=!1}function q(){return R.value.reduce(($,z)=>(z.variableName&&($[z.variableName]=z.variableValue),$),{})}function K(){P.value="",w.value=[],g.value=[],I.value=[],B.value=[],C.value=[],E.value=!1}function O($){if(!i.bpmnXml||!$||typeof DOMParser>"u")return;const z=new DOMParser().parseFromString(i.bpmnXml,"text/xml");return Array.from(z.getElementsByTagName("*")).find(le=>le.getAttribute("id")===$)}function j($){if(i.forceSingleAssignee)return!0;const z=O($);if(!z)return!0;if(Array.from(z.children||[]).some(Qe=>Qe.localName==="multiInstanceLoopCharacteristics"))return!1;const X=["assigneUser","candidateUser"],be=Array.from(z.getElementsByTagName("*")).filter(Qe=>Qe.localName==="properties"&&X.includes(Qe.getAttribute("type")||"")).flatMap(Qe=>Array.from(Qe.getElementsByTagName("*")).filter(Ue=>Ue.localName==="property"));if(be.some(Qe=>{const Ue=Qe.getAttribute("assignType");return!!(Ue&&Ue!=="user")}))return!1;const Ee=be.map(Qe=>Qe.getAttribute("value")).filter(Boolean),We=z.getAttribute("camunda:assignee")||"";return We&&!We.includes("${")&&Ee.push(...We.split(",").filter(Boolean)),new Set(Ee).size<=1}function k($){var z;return((z=g.value.find(le=>re(le)===$))==null?void 0:z.isSingleAssignee)!==!1}function N($){return String($||"").trim().toLowerCase()}function U($){if(i.forceSingleAssignee)return!0;const z=N($.dealType);return z?["signle","single"].includes(z):j(re($))}function ie($){const z=g.value.find(le=>re(le)===$);return z?String(r[N(z.dealType)]||(z.isSingleAssignee?"单人单办":"多人办理")):""}function se($,z){const le=re(z),X=String(z.activityName||z.name||le);return $.map(be=>{const Ee=be||{},We=String(Ee.ntype||"").trim().toLowerCase();return{...Ee,id:String(Ee.id||""),caption:String(Ee.caption||Ee.name||Ee.id||""),ntype:We,hasChild:Ee.hasChild,activity:le,activityName:X,disabled:We!=="user",childs:Array.isArray(Ee.childs)?se(Ee.childs,z):void 0}})}async function p($,z="",le=""){m.value=!0;try{const X=await nr({processDefinitionId:String(i.processDefinitionId),activityId:re($),parentId:z,ntype:le,userId:T.value,extendParams:{...i.assignmentQueryParams}}),be=se(Array.isArray(X.data)?X.data:[],$);return z?be:P.value!==re($)?[]:(E.value=be.some(Ee=>Ee.ntype!=="user"),E.value?(B.value=be,I.value=[],await l.nextTick(),fe(be)):(B.value=[],I.value=be),be)}catch(X){throw o("error",X),X}finally{m.value=!1}}async function f($,z){if($.level===0){z(B.value);return}if($.data.hasChild===!1||!W.value){z([]);return}if(Array.isArray($.data.childs)&&$.data.childs.length){z($.data.childs),await l.nextTick(),fe($.data.childs);return}try{const le=await p(W.value,String($.data.id),String($.data.ntype||""));z(le),await l.nextTick(),fe(le)}catch{z([])}}async function u($=q()){const z=++S.value;d.value=!0,h.value=!1,K();try{const le=await yi({processDefinitionId:i.processDefinitionId,activityId:i.activity.activityId,processInstanceId:i.processInstanceId,workId:i.workId,variables:$});if(z!==S.value)return[];w.value=le.data||[],g.value=w.value.filter(J).map(be=>({...be,isSingleAssignee:U(be)})),h.value=!0,D.value=!1,o("nextNodesResolved",w.value);const X=g.value[0];if(X){P.value=re(X);try{await p(X)}catch{}}return w.value}catch(le){throw z===S.value&&(h.value=!1),o("error",le),le}finally{z===S.value&&(d.value=!1)}}async function b($){P.value=re($),I.value=[],B.value=[],E.value=!1;try{await p($)}catch{}}function A($){return C.value.some(z=>H(z)===H($))}function L($,z){if($.ntype!=="user")return;const le=H($);z?(k($.activity)&&(C.value=C.value.filter(X=>X.activity!==$.activity)),C.value.some(X=>H(X)===le)||C.value.push({...$})):C.value=C.value.filter(X=>H(X)!==le)}function ee($,z){$.ntype==="user"&&(z&&k($.activity)&&C.value.filter(X=>X.activity===$.activity).forEach(X=>{var be;return(be=_.value)==null?void 0:be.setChecked(X.id,!1,!1)}),L($,z))}function fe($){$.forEach(z=>{var le,X;z.ntype==="user"&&A(z)&&((le=_.value)==null||le.setChecked(z.id,!0,!1)),(X=z.childs)!=null&&X.length&&fe(z.childs)})}function me($){var z;C.value=C.value.filter(le=>H(le)!==H($)),E.value&&((z=_.value)==null||z.setChecked($.id,!1,!1))}function oe(){const $=C.value.reduce((z,le)=>{let X=z.get(le.activity);return X||(X={activityId:le.activity,assignees:[]},z.set(le.activity,X)),X.assignees.some(be=>be.userId===le.id)||X.assignees.push({name:String(le.caption||le.name||le.id),userId:le.id}),z},new Map);return{workId:i.workId,flowNodeAssignees:Array.from($.values()),variables:q(),opinion:v.value}}async function M($){const z=$||oe();o("beforeSend",z),c.value=!0;try{const le=await hi(z);return o("afterSend",le,z),le}catch(le){throw o("error",le),le}finally{c.value=!1}}async function G(){if(d.value){xe.ElMessage.warning("正在计算下一环节,请稍后再发送");return}if(D.value||!h.value){y.value="variables",xe.ElMessage.warning("流程变量已变化,请重新计算下一环节");return}const $=g.value.find(z=>!C.value.some(le=>le.activity===re(z)));if($){P.value=re($),y.value="nextNode",xe.ElMessage.warning(`请选择“${$.activityName||$.name||re($)}”的办理人`),await b($);return}try{await M(),V.value=!0,a.value=!1,xe.ElMessage.success("发送成功")}catch{}}async function Q(){s.value=rr(i.zIndex),a.value=!0,V.value=!1,v.value=i.defaultOpinion,y.value="nextNode",Z(),o("open");try{await u(q())}catch{}}function he(){a.value=!1}function ye(){o("close"),!(!i.deleteInstanceOnCancel||V.value)&&i.processInstanceId&&Zn({processInstanceId:i.processInstanceId}).catch($=>o("error",$))}function ve(){o("click"),Q()}return l.watch(()=>i.modelValue,$=>{$&&!a.value&&Q(),!$&&a.value&&(a.value=!1)}),l.watch(a,$=>o("update:modelValue",$)),l.onMounted(()=>{i.modelValue&&Q()}),t({visible:a,effectiveZIndex:s,loading:c,nodeLoading:d,nodeResolved:h,nextNodes:w,open:Q,close:he,getNextNode:u,assembleData:oe,send:M}),($,z)=>{const le=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",yf,[e.showTrigger?(l.openBlock(),l.createBlock(l.unref(xe.ElButton),{key:0,type:"primary",loading:c.value,onClick:ve},{default:l.withCtx(()=>[l.renderSlot($.$slots,"default",{},()=>[z[3]||(z[3]=l.createTextVNode("发送",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(l.unref(xe.ElDialog),{modelValue:a.value,"onUpdate:modelValue":z[2]||(z[2]=X=>a.value=X),"append-to-body":"",class:"ui-flow-send-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":s.value,onClosed:ye},{footer:l.withCtx(()=>[l.createElementVNode("div",Nf,[l.createVNode(l.unref(xe.ElButton),{type:"primary",loading:c.value,onClick:G},{default:l.withCtx(()=>[...z[10]||(z[10]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(l.unref(xe.ElButton),{disabled:c.value,onClick:he},{default:l.withCtx(()=>[...z[11]||(z[11]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createElementVNode("div",gf,[l.createElementVNode("div",vf,[z[4]||(z[4]=l.createTextVNode(" 当前环节:",-1)),l.createElementVNode("strong",null,l.toDisplayString(e.activity.activityName||e.activity.activityId),1)]),l.createElementVNode("aside",wf,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(g.value,X=>(l.openBlock(),l.createElementBlock("button",{key:re(X),class:l.normalizeClass(["node-group",{active:P.value===re(X)}]),type:"button",onClick:be=>b(X)},[z[5]||(z[5]=l.createElementVNode("span",{class:"group-avatar"},"♟",-1)),l.createElementVNode("span",Ef,l.toDisplayString(X.activityName||X.name||re(X)),1),l.createElementVNode("span",_f,l.toDisplayString(ie(re(X))),1)],10,bf))),128)),h.value&&!g.value.length?(l.openBlock(),l.createBlock(l.unref(xe.ElEmpty),{key:0,description:"没有下一用户任务","image-size":44})):l.createCommentVNode("",!0)]),l.createElementVNode("section",xf,[l.createElementVNode("div",Sf,[l.withDirectives((l.openBlock(),l.createElementBlock("div",Af,[E.value?(l.openBlock(),l.createBlock(l.unref(xe.ElTree),{key:0,ref_key:"assigneeTreeRef",ref:_,class:"assignee-tree",data:B.value,load:f,props:F,"check-on-click-node":"","check-strictly":"",lazy:"","node-key":"id","show-checkbox":"",onCheckChange:ee},{default:l.withCtx(({data:X})=>[l.createElementVNode("span",kf,[l.createElementVNode("span",null,l.toDisplayString(X.ntype==="user"?"●":"▣"),1),l.createElementVNode("span",null,l.toDisplayString(X.caption||X.id),1)])]),_:1},8,["data"])):(l.openBlock(),l.createElementBlock("div",Cf,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(I.value,X=>(l.openBlock(),l.createBlock(l.unref(xe.ElCheckbox),{key:H(X),disabled:X.disabled,"model-value":A(X),class:"candidate-item",onChange:be=>L(X,!!be)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(X.caption||X.name||X.id),1)]),_:2},1032,["disabled","model-value","onChange"]))),128)),!m.value&&!I.value.length?(l.openBlock(),l.createBlock(l.unref(xe.ElEmpty),{key:0,description:"暂无可选办理人","image-size":44})):l.createCommentVNode("",!0)]))])),[[le,m.value]]),z[7]||(z[7]=l.createElementVNode("div",{class:"transfer-arrows","aria-hidden":"true"},[l.createElementVNode("span",null,"→"),l.createElementVNode("span",null,"←")],-1)),l.createElementVNode("div",Rf,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.value,X=>(l.openBlock(),l.createElementBlock("div",{key:H(X),class:"selected-user"},[l.createElementVNode("span",null,l.toDisplayString(X.caption||X.name||X.id),1),l.createVNode(l.unref(xe.ElButton),{link:"",type:"danger",onClick:be=>me(X)},{default:l.withCtx(()=>[...z[6]||(z[6]=[l.createTextVNode("移除",-1)])]),_:1},8,["onClick"])]))),128)),C.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.unref(xe.ElEmpty),{key:0,description:"暂未选择办理人","image-size":44}))])]),l.createVNode(l.unref(xe.ElTabs),{modelValue:y.value,"onUpdate:modelValue":z[0]||(z[0]=X=>y.value=X),type:"card",class:"send-tabs"},{default:l.withCtx(()=>[l.createVNode(l.unref(xe.ElTabPane),{label:"下一环节",name:"nextNode"},{default:l.withCtx(()=>[d.value?(l.openBlock(),l.createElementBlock("div",Tf,"正在根据流程变量计算下一环节...")):(l.openBlock(),l.createBlock(l.unref(xe.ElTable),{key:1,data:C.value,"header-cell-style":{background:"#f5f7fa",color:"#45484B"},border:"",height:"190",size:"small"},{empty:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(g.value.length?"请选择办理人":"暂无数据"),1)]),default:l.withCtx(()=>[l.createVNode(l.unref(xe.ElTableColumn),{prop:"activityName",label:"办理环节","min-width":"150"}),l.createVNode(l.unref(xe.ElTableColumn),{prop:"caption",label:"办理人","min-width":"130"},{default:l.withCtx(X=>{var be,Ee,We;return[l.createTextVNode(l.toDisplayString(((be=X==null?void 0:X.row)==null?void 0:be.caption)||((Ee=X==null?void 0:X.row)==null?void 0:Ee.name)||((We=X==null?void 0:X.row)==null?void 0:We.id)||""),1)]}),_:1}),l.createVNode(l.unref(xe.ElTableColumn),{label:"办理方式",width:"120"},{default:l.withCtx(X=>[l.createTextVNode(l.toDisplayString(X!=null&&X.row?ie(X.row.activity):""),1)]),_:1}),l.createVNode(l.unref(xe.ElTableColumn),{label:"操作",width:"90",align:"center"},{default:l.withCtx(X=>[X!=null&&X.row?(l.openBlock(),l.createBlock(l.unref(xe.ElButton),{key:0,link:"",type:"danger",onClick:be=>me(X.row)},{default:l.withCtx(()=>[...z[8]||(z[8]=[l.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):l.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"]))]),_:1})]),_:1},8,["modelValue"])]),l.createElementVNode("aside",Pf,[z[9]||(z[9]=l.createElementVNode("label",null,"填写意见:",-1)),l.createVNode(l.unref(xe.ElInput),{modelValue:v.value,"onUpdate:modelValue":z[1]||(z[1]=X=>v.value=X),maxlength:"500",placeholder:"请输入意见",resize:"none","show-word-limit":"",type:"textarea"},null,8,["modelValue"])])])]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-481548c2"]]),Df={class:"button-group-wrapper"},If={key:0,class:"button-state"},Of={key:0,class:"line"},Bf={key:2,class:"button-group-append"},Mf={class:"sign-selector"},Lf={class:"selected-sign-user"},Ff={class:"sign-dialog-footer"},$f=gt(l.defineComponent({name:"UiFlowButtons",__name:"FlowButtons",props:{processInstanceId:{default:""},processDefinitionId:{default:""},activityId:{default:""},activityName:{default:""},workId:{default:""},taskId:{default:""},dealUserId:{default:""},dealUserName:{default:""},variables:{default:()=>({})},assignmentQueryParams:{default:()=>({})},autoResolveWork:{type:Boolean,default:!0},autoHandleDialogs:{type:Boolean,default:!0},forceSingleAssignee:{type:Boolean,default:!1},dialogZIndex:{},beforeAction:{},afterAction:{}},emits:["executeAction","afterAction","workResolved","error"],setup(e,{expose:t,emit:n}){let r=0;const i=e,o=n,a=l.ref([]),s=l.ref(!1),c=l.ref(),d=l.ref(!1),h=l.ref(!1),m=l.ref(),w=l.ref(),g={turnBefore:"turnBefore",taskTurnBefore:"turnBefore",turnAfter:"turnAfter",taskTurnAfter:"turnAfter"},I=l.ref(!1),B=l.ref("turnBefore"),C=l.ref("turnBefore"),E=l.ref(!1),P=l.ref(!1),y=l.ref([]),v=l.ref(),R=l.computed(()=>B.value==="turnBefore"?"前加签":"后加签"),D={children:"children",label:"caption",disabled:"disabled",isLeaf:"isLeaf"};function S(M,...G){for(const Q of G){const he=M==null?void 0:M[Q];if(he!=null&&String(he))return String(he)}return""}function _(M){if(Array.isArray(M))return M;if(!M||typeof M!="object")return[];const G=M;for(const Q of["records","list","content","rows"])if(Array.isArray(G[Q]))return G[Q];return[]}function V(M){const G=S(M,"name","operateName","code","value");if(!G)return;const Q=S(M,"label","operateLabel","caption","title")||G;return{...M,name:G,label:Q}}const F=l.computed(()=>i.workId||S(c.value,"workId","id")),T=l.computed(()=>i.processInstanceId||S(c.value,"processInstanceId")),W=l.computed(()=>i.processDefinitionId||S(c.value,"processDefinitionId")),re=l.computed(()=>i.taskId||S(c.value,"taskId","taskInstanceId")),J=l.computed(()=>i.activityId||S(c.value,"activityId")),H=l.computed(()=>i.activityName||S(c.value,"activityName")),Y=l.computed(()=>({id:i.dealUserId,userId:i.dealUserId,name:i.dealUserName||i.dealUserId}));function Z(M="",G=""){return{action:M,actionLabel:G,workId:F.value,processInstanceId:T.value||void 0,processDefinitionId:W.value||void 0,taskId:re.value||void 0,activityId:J.value||void 0,activityName:H.value||void 0,workData:c.value}}const q=l.computed(()=>{const M=m.value;if(!((M==null?void 0:M.action)!=="taskSend"||!M.workId||!M.processDefinitionId||!M.activityId))return{workId:M.workId,processDefinitionId:M.processDefinitionId,processInstanceId:M.processInstanceId||"",activity:{activityId:M.activityId,activityName:M.activityName}}}),K=l.computed(()=>{const M=m.value;if(!(!["jump","taskJump"].includes((M==null?void 0:M.action)||"")||!(M!=null&&M.workId)||!M.processDefinitionId))return{workId:M.workId,processDefinitionId:M.processDefinitionId,processInstanceId:M.processInstanceId||""}});async function O(){if(i.workId)return c.value=void 0,Z();if(!i.autoResolveWork)return Z();if(!i.processInstanceId||!i.dealUserId)throw new Error("FlowButtons 缺少 workId;自动解析待办时必须传入 processInstanceId 和 dealUserId");const M=await Qn({currentPage:1,pageSize:100,assignee:i.dealUserId,assigne:i.dealUserId,userId:i.dealUserId,processInstanceId:i.processInstanceId}),Q=_(M.data).find(ye=>S(ye,"processInstanceId")===i.processInstanceId);if(!Q)return c.value=void 0,Z();c.value=Q;const he=Z();return o("workResolved",he),he}function j(M){return M.map(G=>{const Q=G||{},he=String(Q.id||Q.userId||""),ye=String(Q.ntype||""),ve=Array.isArray(Q.childs)?Q.childs:Array.isArray(Q.children)?Q.children:void 0;return{...Q,id:he,caption:String(Q.caption||Q.name||he),ntype:ye,hasChild:!!(Q.hasChild||ve!=null&&ve.length),isLeaf:ye==="user"||!Q.hasChild&&!(ve!=null&&ve.length),disabled:ye!=="user",children:ve?j(ve):void 0}}).filter(G=>G.id)}async function k(M=""){const G=await mi(M);return j(Array.isArray(G.data)?G.data:[])}async function N(M,G){const Q=M.level===0?"":String(M.data.id||"");if(M.level>0&&(M.data.ntype==="user"||M.data.hasChild===!1)){G([]);return}E.value=!0;try{const he=await k(Q);M.level===0&&(y.value=he),G(he)}catch(he){o("error",he),G([])}finally{E.value=!1}}function U(M){M.ntype==="user"&&(v.value=M)}function ie(){v.value=void 0,y.value=[]}function se(M,G=M){if(!re.value){xe.ElMessage.error("当前待办缺少任务实例 ID,无法加签");return}B.value=M,C.value=G,w.value=rr(i.dialogZIndex),I.value=!0}async function p(){var Q;if(!((Q=v.value)!=null&&Q.id)){xe.ElMessage.warning("请选择一名机构人员");return}const M=B.value,G=C.value;P.value=!0;try{const ye=await(M==="turnBefore"?ci:ui)({workId:F.value,taskId:re.value,assignee:v.value.id});I.value=!1,u(G,ye,Z(G,R.value))}catch(he){o("error",he)}finally{P.value=!1}}async function f(){s.value=!0,a.value=[];try{if(await O(),!F.value)return a.value;const M=await ri({workId:F.value});return a.value=(Array.isArray(M.data)?M.data:[]).map(G=>V(G||{})).filter(G=>!!G),a.value}finally{s.value=!1}}function u(M,G,Q){var he;(he=i.afterAction)==null||he.call(i,M,G,Q),o("afterAction",M,G,Q)}function b(M,G){o("executeAction",M,G)}function A(M){return{processActivate:"restore",processTerminate:"terminate",processSuspend:"hang",processSupspend:"hang"}[M]||M}async function L(M,G,Q){var le;const he=rr(i.dialogZIndex),ye=`ui-flow-confirm-overlay-${++r}`,ve=xe.ElMessageBox.confirm(`是否${G}此任务?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",modalClass:ye});await l.nextTick(),(le=document.querySelector(`.${ye}`))==null||le.style.setProperty("z-index",String(he),"important"),await ve;const $={workId:Q.workId};let z;switch(A(M)){case"revocation":case"taskWithdraw":z=await oi($);break;case"taskRecyle":z=await si($);break;case"hang":z=await fi({processInstanceIds:[Q.processInstanceId||""]});break;case"restore":z=await di($);break;case"terminate":z=await pi($);break;case"taskComplete":z=await li({...$,variables:i.variables});break;case"taskRollback":z=await ai($);break;case"taskClaim":if(!i.dealUserId){b(M,Q);return}z=await ii({...$,assignee:i.dealUserId});break;default:b(M,Q);return}u(M,z,Q),A(M)==="taskClaim"&&await f()}async function ee(M){var G;try{const Q=M.name;F.value||await f();const he=Z(Q,M.label);if(!he.workId)throw new Error("当前待办缺少 workId,无法执行流程操作");if(await((G=i.beforeAction)==null?void 0:G.call(i,Q,he))===!1)return;const ye=g[Q];if(ye){se(ye,Q);return}if(Q==="taskSend"&&i.autoHandleDialogs){if(!he.processDefinitionId||!he.activityId)throw new Error("当前待办缺少 processDefinitionId 或 activityId,无法发送");m.value=he,d.value=!0;return}if(["jump","taskJump"].includes(Q)&&i.autoHandleDialogs){if(!he.processDefinitionId)throw new Error("当前待办缺少 processDefinitionId,无法跳转");m.value=he,h.value=!0;return}if(["save","start","taskSend","jump","taskJump"].includes(Q)){b(Q,he);return}await L(Q,M.label,he)}catch(Q){Q!=="cancel"&&Q!=="close"&&o("error",Q)}}function fe(M,G){const Q={...m.value||Z("taskSend","发送"),requestData:G};u("taskSend",M,Q),m.value=void 0}function me(M,G){const Q={...m.value||Z("taskJump","跳转"),requestData:G};u(Q.action,M,Q),m.value=void 0}function oe(M){o("error",M)}return l.watch(()=>[i.workId,i.processInstanceId,i.dealUserId],()=>{d.value=!1,h.value=!1,m.value=void 0,f().catch(M=>o("error",M))},{immediate:!0}),t({loading:s,optList:a,resolvedWorkData:c,getAvailableActions:f,resolveCurrentWork:O,executeAction:ee}),(M,G)=>{const Q=l.resolveComponent("ui-button"),he=l.resolveComponent("el-tree"),ye=l.resolveComponent("el-dialog"),ve=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",Df,[s.value?(l.openBlock(),l.createElementBlock("span",If,"正在加载流程操作...")):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(a.value,($,z)=>(l.openBlock(),l.createElementBlock("div",{key:$.name||z,class:"flex-start-r"},[l.renderSlot(M.$slots,"prefix",{action:$},void 0,!0),l.renderSlot(M.$slots,"default",{action:$},void 0,!0),l.createVNode(Q,{onClick:le=>ee($)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString($.label),1)]),_:2},1032,["onClick"]),z!==a.value.length-1?(l.openBlock(),l.createElementBlock("div",Of)):l.createCommentVNode("",!0),l.renderSlot(M.$slots,"suffix",{action:$},void 0,!0)]))),128)),M.$slots.append?(l.openBlock(),l.createElementBlock("div",Bf,[l.renderSlot(M.$slots,"append",{actions:a.value,loading:s.value},void 0,!0)])):l.createCommentVNode("",!0),l.createVNode(ye,{modelValue:I.value,"onUpdate:modelValue":G[1]||(G[1]=$=>I.value=$),"append-to-body":"",class:"ui-flow-sign-dialog","close-on-click-modal":!1,title:R.value,width:"760px","z-index":w.value,onClosed:ie},{footer:l.withCtx(()=>[l.createElementVNode("div",Ff,[l.createVNode(Q,{type:"primary",loading:P.value,onClick:p},{default:l.withCtx(()=>[...G[6]||(G[6]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(Q,{disabled:P.value,onClick:G[0]||(G[0]=$=>I.value=!1)},{default:l.withCtx(()=>[...G[7]||(G[7]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>{var $,z;return[l.withDirectives((l.openBlock(),l.createElementBlock("div",Mf,[G[5]||(G[5]=l.createElementVNode("p",{class:"sign-tip"},"仅可选择一名机构人员",-1)),l.createVNode(he,{data:y.value,load:N,props:D,"highlight-current":"",lazy:"","node-key":"id",onNodeClick:U},null,8,["data"]),l.createElementVNode("div",Lf,[G[4]||(G[4]=l.createTextVNode(" 已选择:",-1)),l.createElementVNode("strong",null,l.toDisplayString((($=v.value)==null?void 0:$.caption)||((z=v.value)==null?void 0:z.name)||"暂无"),1)])])),[[ve,E.value]])]}),_:1},8,["modelValue","title","z-index"]),q.value?(l.openBlock(),l.createBlock(wi,{key:3,modelValue:d.value,"onUpdate:modelValue":G[2]||(G[2]=$=>d.value=$),activity:q.value.activity,"assignment-query-params":e.assignmentQueryParams,"deal-user":Y.value,"force-single-assignee":e.forceSingleAssignee,"process-definition-id":q.value.processDefinitionId,"process-instance-id":q.value.processInstanceId,"show-trigger":!1,variables:e.variables,"work-id":q.value.workId,"z-index":e.dialogZIndex,onAfterSend:fe,onError:oe},null,8,["modelValue","activity","assignment-query-params","deal-user","force-single-assignee","process-definition-id","process-instance-id","variables","work-id","z-index"])):l.createCommentVNode("",!0),K.value?(l.openBlock(),l.createBlock(da,{key:4,modelValue:h.value,"onUpdate:modelValue":G[3]||(G[3]=$=>h.value=$),"assignment-query-params":e.assignmentQueryParams,"deal-user":Y.value,"process-definition-id":K.value.processDefinitionId,"process-instance-id":K.value.processInstanceId,"show-trigger":!1,"work-id":K.value.workId,"z-index":e.dialogZIndex,onAfterJump:me,onError:oe},null,8,["modelValue","assignment-query-params","deal-user","process-definition-id","process-instance-id","work-id","z-index"])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-8d163889"]]);function Vf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ir={exports:{}},jf=ir.exports,pa;function Uf(){return pa||(pa=1,(function(e,t){(function(n,r){e.exports=r()})(jf,(function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",c="hour",d="day",h="week",m="month",w="quarter",g="year",I="date",B="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(J){var H=["th","st","nd","rd"],Y=J%100;return"["+J+(H[(Y-20)%10]||H[Y]||H[0])+"]"}},y=function(J,H,Y){var Z=String(J);return!Z||Z.length>=H?J:""+Array(H+1-Z.length).join(Y)+J},v={s:y,z:function(J){var H=-J.utcOffset(),Y=Math.abs(H),Z=Math.floor(Y/60),q=Y%60;return(H<=0?"+":"-")+y(Z,2,"0")+":"+y(q,2,"0")},m:function J(H,Y){if(H.date()<Y.date())return-J(Y,H);var Z=12*(Y.year()-H.year())+(Y.month()-H.month()),q=H.clone().add(Z,m),K=Y-q<0,O=H.clone().add(Z+(K?-1:1),m);return+(-(Z+(Y-q)/(K?q-O:O-q))||0)},a:function(J){return J<0?Math.ceil(J)||0:Math.floor(J)},p:function(J){return{M:m,y:g,w:h,d,D:I,h:c,m:s,s:a,ms:o,Q:w}[J]||String(J||"").toLowerCase().replace(/s$/,"")},u:function(J){return J===void 0}},R="en",D={};D[R]=P;var S="$isDayjsObject",_=function(J){return J instanceof W||!(!J||!J[S])},V=function J(H,Y,Z){var q;if(!H)return R;if(typeof H=="string"){var K=H.toLowerCase();D[K]&&(q=K),Y&&(D[K]=Y,q=K);var O=H.split("-");if(!q&&O.length>1)return J(O[0])}else{var j=H.name;D[j]=H,q=j}return!Z&&q&&(R=q),q||!Z&&R},F=function(J,H){if(_(J))return J.clone();var Y=typeof H=="object"?H:{};return Y.date=J,Y.args=arguments,new W(Y)},T=v;T.l=V,T.i=_,T.w=function(J,H){return F(J,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var W=(function(){function J(Y){this.$L=V(Y.locale,null,!0),this.parse(Y),this.$x=this.$x||Y.x||{},this[S]=!0}var H=J.prototype;return H.parse=function(Y){this.$d=(function(Z){var q=Z.date,K=Z.utc;if(q===null)return new Date(NaN);if(T.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var O=q.match(C);if(O){var j=O[2]-1||0,k=(O[7]||"0").substring(0,3);return K?new Date(Date.UTC(O[1],j,O[3]||1,O[4]||0,O[5]||0,O[6]||0,k)):new Date(O[1],j,O[3]||1,O[4]||0,O[5]||0,O[6]||0,k)}}return new Date(q)})(Y),this.init()},H.init=function(){var Y=this.$d;this.$y=Y.getFullYear(),this.$M=Y.getMonth(),this.$D=Y.getDate(),this.$W=Y.getDay(),this.$H=Y.getHours(),this.$m=Y.getMinutes(),this.$s=Y.getSeconds(),this.$ms=Y.getMilliseconds()},H.$utils=function(){return T},H.isValid=function(){return this.$d.toString()!==B},H.isSame=function(Y,Z){var q=F(Y);return this.startOf(Z)<=q&&q<=this.endOf(Z)},H.isAfter=function(Y,Z){return F(Y)<this.startOf(Z)},H.isBefore=function(Y,Z){return this.endOf(Z)<F(Y)},H.$g=function(Y,Z,q){return T.u(Y)?this[Z]:this.set(q,Y)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(Y,Z){var q=this,K=!!T.u(Z)||Z,O=T.p(Y),j=function(u,b){var A=T.w(q.$u?Date.UTC(q.$y,b,u):new Date(q.$y,b,u),q);return K?A:A.endOf(d)},k=function(u,b){return T.w(q.toDate()[u].apply(q.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(b)),q)},N=this.$W,U=this.$M,ie=this.$D,se="set"+(this.$u?"UTC":"");switch(O){case g:return K?j(1,0):j(31,11);case m:return K?j(1,U):j(0,U+1);case h:var p=this.$locale().weekStart||0,f=(N<p?N+7:N)-p;return j(K?ie-f:ie+(6-f),U);case d:case I:return k(se+"Hours",0);case c:return k(se+"Minutes",1);case s:return k(se+"Seconds",2);case a:return k(se+"Milliseconds",3);default:return this.clone()}},H.endOf=function(Y){return this.startOf(Y,!1)},H.$set=function(Y,Z){var q,K=T.p(Y),O="set"+(this.$u?"UTC":""),j=(q={},q[d]=O+"Date",q[I]=O+"Date",q[m]=O+"Month",q[g]=O+"FullYear",q[c]=O+"Hours",q[s]=O+"Minutes",q[a]=O+"Seconds",q[o]=O+"Milliseconds",q)[K],k=K===d?this.$D+(Z-this.$W):Z;if(K===m||K===g){var N=this.clone().set(I,1);N.$d[j](k),N.init(),this.$d=N.set(I,Math.min(this.$D,N.daysInMonth())).$d}else j&&this.$d[j](k);return this.init(),this},H.set=function(Y,Z){return this.clone().$set(Y,Z)},H.get=function(Y){return this[T.p(Y)]()},H.add=function(Y,Z){var q,K=this;Y=Number(Y);var O=T.p(Z),j=function(U){var ie=F(K);return T.w(ie.date(ie.date()+Math.round(U*Y)),K)};if(O===m)return this.set(m,this.$M+Y);if(O===g)return this.set(g,this.$y+Y);if(O===d)return j(1);if(O===h)return j(7);var k=(q={},q[s]=r,q[c]=i,q[a]=n,q)[O]||1,N=this.$d.getTime()+Y*k;return T.w(N,this)},H.subtract=function(Y,Z){return this.add(-1*Y,Z)},H.format=function(Y){var Z=this,q=this.$locale();if(!this.isValid())return q.invalidDate||B;var K=Y||"YYYY-MM-DDTHH:mm:ssZ",O=T.z(this),j=this.$H,k=this.$m,N=this.$M,U=q.weekdays,ie=q.months,se=q.meridiem,p=function(b,A,L,ee){return b&&(b[A]||b(Z,K))||L[A].slice(0,ee)},f=function(b){return T.s(j%12||12,b,"0")},u=se||function(b,A,L){var ee=b<12?"AM":"PM";return L?ee.toLowerCase():ee};return K.replace(E,(function(b,A){return A||(function(L){switch(L){case"YY":return String(Z.$y).slice(-2);case"YYYY":return T.s(Z.$y,4,"0");case"M":return N+1;case"MM":return T.s(N+1,2,"0");case"MMM":return p(q.monthsShort,N,ie,3);case"MMMM":return p(ie,N);case"D":return Z.$D;case"DD":return T.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return p(q.weekdaysMin,Z.$W,U,2);case"ddd":return p(q.weekdaysShort,Z.$W,U,3);case"dddd":return U[Z.$W];case"H":return String(j);case"HH":return T.s(j,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return u(j,k,!0);case"A":return u(j,k,!1);case"m":return String(k);case"mm":return T.s(k,2,"0");case"s":return String(Z.$s);case"ss":return T.s(Z.$s,2,"0");case"SSS":return T.s(Z.$ms,3,"0");case"Z":return O}return null})(b)||O.replace(":","")}))},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(Y,Z,q){var K,O=this,j=T.p(Z),k=F(Y),N=(k.utcOffset()-this.utcOffset())*r,U=this-k,ie=function(){return T.m(O,k)};switch(j){case g:K=ie()/12;break;case m:K=ie();break;case w:K=ie()/3;break;case h:K=(U-N)/6048e5;break;case d:K=(U-N)/864e5;break;case c:K=U/i;break;case s:K=U/r;break;case a:K=U/n;break;default:K=U}return q?K:T.a(K)},H.daysInMonth=function(){return this.endOf(m).$D},H.$locale=function(){return D[this.$L]},H.locale=function(Y,Z){if(!Y)return this.$L;var q=this.clone(),K=V(Y,Z,!0);return K&&(q.$L=K),q},H.clone=function(){return T.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},J})(),re=W.prototype;return F.prototype=re,[["$ms",o],["$s",a],["$m",s],["$H",c],["$W",d],["$M",m],["$y",g],["$D",I]].forEach((function(J){re[J[1]]=function(H){return this.$g(H,J[0],J[1])}})),F.extend=function(J,H){return J.$i||(J(H,W,F),J.$i=!0),F},F.locale=V,F.isDayjs=_,F.unix=function(J){return F(1e3*J)},F.en=D[R],F.Ls=D,F.p={},F}))})(ir)),ir.exports}var zf=Uf();const or=Vf(zf),Hf={class:"colBtns"},Wf={key:0,class:"table-pagination"},qf={class:"left-pagination"},Yf={class:"right-pagination"},ha=gt(l.defineComponent({name:"UiFlowBaseGrid",inheritAttrs:!1,__name:"FlowGrid",props:{data:{default:()=>[]},tableLabel:{default:()=>[]},pageConfig:{default:()=>({currentPage:1,total:0,pageSize:20})},hidePage:{type:Boolean,default:!1},hideSelection:{type:Boolean,default:!1},hideNumber:{type:Boolean,default:!0},operation:{type:Boolean,default:!1},tableHeight:{default:"calc(100% - 45px)"},isFixed:{type:Boolean,default:!1},btnWidth:{default:0},size:{default:"small"}},emits:["page-change","size-change","row-click","row-dblclick"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.useSlots(),a=l.ref(),s=l.ref(),c=l.ref("100%"),d=l.ref(0),h=l.computed(()=>r.tableLabel.filter(S=>{var _;return!((_=S.hiddenCondition)!=null&&_.call(S,S))})),m=l.computed(()=>r.size==="medium"?"default":r.size);function w(S){return S<9?`0${S+1}`:S+1}function g(){var S;(S=s.value)==null||S.clearSelection()}function I(S,_){var V;(V=s.value)==null||V.toggleRowSelection(S,_)}function B(){var S;(S=s.value)==null||S.toggleAllSelection()}function C(S){var _;(_=s.value)==null||_.setCurrentRow(S)}function E(S){i("page-change",S)}function P(S){i("size-change",S)}function y(){c.value=r.hidePage?"100%":"calc(100% - 45px)"}async function v(){var V;if(!r.operation||r.btnWidth)return;await l.nextTick();const S=((V=a.value)==null?void 0:V.querySelectorAll(".colBtns"))||[];let _=o.operation?120:0;S.forEach(F=>{_=Math.max(_,F.scrollWidth+40)}),d.value=_}function R(S,_,V){var F;r.hideSelection||(F=s.value)==null||F.toggleRowSelection(S),i("row-click",S,_,V)}function D(S,_,V){i("row-dblclick",S,_,V)}return l.watch(()=>[r.hidePage,r.data.length],()=>{y(),v()}),l.onMounted(()=>{window.addEventListener("resize",y),y(),v()}),l.onBeforeUnmount(()=>window.removeEventListener("resize",y)),t({tableRef:s,clearSelection:g,toggleRowSelection:I,toggleAllSelection:B,setCurrentRow:C,computeHeight:y}),(S,_)=>{const V=l.resolveComponent("el-table-column"),F=l.resolveComponent("el-table"),T=l.resolveComponent("el-pagination");return l.openBlock(),l.createElementBlock("div",{ref_key:"rootRef",ref:a,class:l.normalizeClass({"no-fixed":!e.isFixed}),style:l.normalizeStyle({height:e.tableHeight||"100%"})},[l.createVNode(F,l.mergeProps({ref_key:"tableRef",ref:s},S.$attrs,{"cell-style":{height:"50px"},data:e.data,"header-cell-style":{background:"#f5f7fa",color:"#45484B",height:"50px"},height:c.value,size:m.value,border:"","cell-class-name":"c-table-cell","current-row-key":"id","header-row-class-name":"c-table-header",onRowClick:R,onRowDblclick:D}),{default:l.withCtx(()=>[e.hideSelection?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(V,{key:0,align:"center",type:"selection",width:"60"})),e.hideNumber?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(V,{key:1,index:w,align:"center",label:"序号",type:"index",width:"60"})),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,W=>(l.openBlock(),l.createBlock(V,{key:W.prop,formatter:W.formatter,label:W.label,"min-width":W.minWidth,prop:W.prop,"show-overflow-tooltip":W.showTooltip,sortable:W.sortable,width:W.width,align:"center"},null,8,["formatter","label","min-width","prop","show-overflow-tooltip","sortable","width"]))),128)),l.renderSlot(S.$slots,"default",{},void 0,!0),e.operation?(l.openBlock(),l.createBlock(V,{key:2,fixed:e.isFixed?"right":!1,width:e.btnWidth||d.value||void 0,align:"center",label:"操作"},{default:l.withCtx(W=>[l.createElementVNode("div",Hf,[l.renderSlot(S.$slots,"operation",{row:W.row},void 0,!0)])]),_:3},8,["fixed","width"])):l.createCommentVNode("",!0)]),_:3},16,["data","height","size"]),e.hidePage?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",Wf,[l.createElementVNode("div",qf,[l.renderSlot(S.$slots,"pagination-left",{},void 0,!0)]),l.createElementVNode("div",Yf,[l.createVNode(T,{"current-page":e.pageConfig.currentPage,"page-size":e.pageConfig.pageSize,"page-sizes":[10,20,30,40],total:e.pageConfig.total,background:"",layout:"total, sizes, prev, pager, next, jumper",onCurrentChange:E,onSizeChange:P},null,8,["current-page","page-size","total"])])]))],6)}}}),[["__scopeId","data-v-88684f01"]]),Kf={executing:"审批中",completed:"已完成",deleted:"已删除",canceled:"已取消",withdrawed:"已撤回",recyled:"已回收",rollbacked:"已退回",jumped:"已跳转"},Gf=[{label:"业务标题",prop:"businessName",minWidth:"180px"},{label:"当前环节",prop:"activityName",minWidth:"180px"},{label:"发送人",prop:"assigneesNames",minWidth:"150px"},{label:"发送时间",prop:"startTime",width:"180px",formatter:e=>e.startTime?or(e.startTime).format("YYYY-MM-DD HH:mm:ss"):""}],Xf=[{label:"业务标题",prop:"title",minWidth:"180px"},{label:"当前环节",prop:"currentActivity",minWidth:"180px",formatter:e=>e.currentActivity||"无"},{label:"创建人",prop:"createUserName",minWidth:"150px"},{label:"创建时间",prop:"createdTime",width:"180px"}];function Jf(e){return{...e,workId:e.workId||e.id,processDefinitionId:e.processDefinitionId,processInstanceId:e.processInstanceId,activityId:e.activityId,activityName:e.activityName}}const Zf=l.defineComponent({name:"UiFlowGrid",__name:"FlowList",props:{type:{},dealUserId:{default:""},appId:{default:""},appModuleId:{default:""}},emits:["onHandle","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.ref([]),s=l.ref(!1),c=l.reactive({currentPage:1,pageSize:20,total:0}),d=l.computed(()=>r.type==="draft"?Xf:Gf);function h(y){return Kf[y]||y||""}function m(y,v){i("onHandle",{action:y,workData:Jf(v)})}function w(y){i("onHandle",{action:"view",workData:{...y,processDefinitionId:y.processDefinitionId,workId:y.id,workName:y.title}})}function g(y){return`${y}_${or().format("YYYYMMDDHHmmss")}`}function I(y){const v=g(y.name);i("onHandle",{action:"create",workData:{processDefinitionId:y.processDefinitionId,flowName:y.name,title:v,workName:v}})}function B(y){r.type==="todo"&&m("view",y),r.type==="done"&&m("handle",y)}function C(y){c.currentPage=y,P()}function E(y){c.pageSize=y,c.currentPage=1,P()}async function P(){s.value=!0;try{if(r.type==="todo"||r.type==="done"){const v=await(r.type==="todo"?Qn:ni)({currentPage:c.currentPage,pageSize:c.pageSize,assignee:r.dealUserId});a.value=v.data||[],c.total=Number(v.count||0)}else{const v=(await ei(c,{appId:r.appId,appModuleId:r.appModuleId,createUserId:r.dealUserId})).data||{};a.value=v.records||[],c.total=Number(v.total||0)}}catch(y){throw i("error",y),y}finally{s.value=!1}}return l.watch(()=>[r.type,r.dealUserId,r.appId,r.appModuleId],()=>{c.currentPage=1,P()}),l.onMounted(P),t({data:a,loading:s,pageConfig:c,gridRef:o,loadTableData:P,onRowDblclick:B,create:I,buildDefaultBusinessTitle:g}),(y,v)=>{const R=l.resolveComponent("el-table-column"),D=l.resolveComponent("el-button");return l.openBlock(),l.createBlock(ha,{ref_key:"gridRef",ref:o,data:a.value,"hide-number":!1,"hide-selection":!0,"is-fixed":!0,"page-config":c,"table-label":d.value,operation:"","table-height":"100%",onPageChange:C,onRowDblclick:B,onSizeChange:E},{operation:l.withCtx(({row:S})=>[e.type==="todo"?(l.openBlock(),l.createBlock(D,{key:0,link:"",type:"primary",onClick:l.withModifiers(_=>m("view",S),["stop"])},{default:l.withCtx(()=>[...v[0]||(v[0]=[l.createTextVNode(" 办理 ",-1)])]),_:1},8,["onClick"])):e.type==="done"?(l.openBlock(),l.createBlock(D,{key:1,link:"",type:"primary",onClick:l.withModifiers(_=>m("handle",S),["stop"])},{default:l.withCtx(()=>[...v[1]||(v[1]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):e.type==="draft"&&S.state==="audit"?(l.openBlock(),l.createBlock(D,{key:2,link:"",type:"primary",onClick:l.withModifiers(_=>w(S),["stop"])},{default:l.withCtx(()=>[...v[2]||(v[2]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[e.type==="done"||e.type==="draft"?(l.openBlock(),l.createBlock(R,{key:0,align:"center",label:"状态",width:"120"},{default:l.withCtx(({row:S})=>[l.createTextVNode(l.toDisplayString(e.type==="done"?h(S.stateName):S.stateLabel),1)]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["data","page-config","table-label"])}}});function at(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const Sn=Object.prototype.toString,Qf=Object.prototype.hasOwnProperty;function bi(e){return e===void 0}function ln(e){return e!==void 0}function ma(e){return e==null}function tt(e){return Sn.call(e)==="[object Array]"}function At(e){return Sn.call(e)==="[object Object]"}function kt(e){return Sn.call(e)==="[object Number]"}function Ct(e){const t=Sn.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function st(e){return Sn.call(e)==="[object String]"}function cn(e,t){return!ma(e)&&Qf.call(e,t)}function ot(e,t){const n=Ei(t);let r;return ae(e,function(i,o){if(n(i,o))return r=i,!1}),r}function ed(e,t){const n=Ei(t);let r=tt(e)?-1:void 0;return ae(e,function(i,o){if(n(i,o))return r=o,!1}),r}function un(e,t){const n=Ei(t);let r=[];return ae(e,function(i,o){n(i,o)&&r.push(i)}),r}function ae(e,t){let n,r;if(bi(e))return;const i=tt(e)?id:rd;for(let o in e)if(cn(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function fn(e,t,n){return ae(e,function(r,i){n=t(n,r,i)}),n}function ya(e,t){return!!fn(e,function(n,r,i){return n&&t(r,i)},!0)}function ga(e,t){return!!ot(e,t)}function va(e,t){let n=[];return ae(e,function(r,i){n.push(t(r,i))}),n}function td(e,t){t=nd(t);let n=[];return ae(e,function(r,i){let o=t(r,i),a={d:o,v:r};for(var s=0;s<n.length;s++){let{d:c}=n[s];if(o<c){n.splice(s,0,a);return}}n.push(a)}),va(n,r=>r.v)}function wa(e){return function(t){return ya(e,function(n,r){return t[r]===n})}}function nd(e){return Ct(e)?e:t=>t[e]}function Ei(e){return Ct(e)?e:t=>t===e}function rd(e){return e}function id(e){return Number(e)}function ba(e,t){let n,r,i,o;function a(m){let w=Date.now(),g=m?0:o+t-w;if(g>0)return s(g);e.apply(i,r),c()}function s(m){n=setTimeout(a,m)}function c(){n&&clearTimeout(n),n=o=r=i=void 0}function d(){n&&a(!0),c()}function h(...m){o=Date.now(),r=m,i=this,n||s(t)}return h.flush=d,h.cancel=c,h}function Rt(e,t){return e.bind(t)}function ce(e,...t){return Object.assign(e,...t)}function od(e,t,n){let r=e;return ae(t,function(i,o){if(typeof i!="number"&&typeof i!="string")throw new Error("illegal key type: "+typeof i+". Key should be of type number or string.");if(i==="constructor")throw new Error("illegal key: constructor");if(i==="__proto__")throw new Error("illegal key: __proto__");let a=t[o+1],s=r[i];ln(a)&&ma(s)&&(s=r[i]=isNaN(+a)?{}:[]),bi(a)?bi(n)?delete r[i]:r[i]=n:r=s}),e}function ad(e,t){let n={},r=Object(e);return ae(t,function(i){i in r&&(n[i]=e[i])}),n}function sd(e,t){let n={},r=Object(e);return ae(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}var ld=1e3;function wt(e,t){var n=this;t=t||ld,e.on(["render.shape","render.connection"],t,function(r,i){var o=r.type,a=i.element,s=i.gfx,c=i.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,c):n.drawConnection(s,a,c)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(r,i){if(n.canRender(i))return r.type==="render.getShapePath"?n.getShapePath(i):n.getConnectionPath(i)})}wt.prototype.canRender=function(e){},wt.prototype.drawShape=function(e,t){},wt.prototype.drawConnection=function(e,t){},wt.prototype.getShapePath=function(e){},wt.prototype.getConnectionPath=function(e){};function ue(e,t){var n=Ce(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function cd(e,t){return ga(t,function(n){return ue(e,n)})}function Ce(e){return e&&e.businessObject||e}function Kt(e){return e&&e.di}function Gt(e,t){return ue(e,"bpmn:CallActivity")?!1:ue(e,"bpmn:SubProcess")?(t=t||Kt(e),t&&ue(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):ue(e,"bpmn:Participant")?!!Ce(e).processRef:!0}function Ea(e){if(!(!ue(e,"bpmn:Participant")&&!ue(e,"bpmn:Lane"))){var t=Kt(e).isHorizontal;return t===void 0?!0:t}}function ud(e){return e&&!!Ce(e).triggeredByEvent}function fd(e){return At(e)&&cn(e,"waypoints")}function dd(e){return At(e)&&cn(e,"labelTarget")}var An={width:90,height:20},_a=15;function pd(e){return ue(e,"bpmn:Event")||ue(e,"bpmn:Gateway")||ue(e,"bpmn:DataStoreReference")||ue(e,"bpmn:DataObjectReference")||ue(e,"bpmn:DataInput")||ue(e,"bpmn:DataOutput")||ue(e,"bpmn:SequenceFlow")||ue(e,"bpmn:MessageFlow")||ue(e,"bpmn:Group")}function hd(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=md(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),a=i.x,s=i.y;return Math.abs(o)<Math.PI/2?s-=_a:a+=_a,{x:a,y:s}}function md(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)];return{x:n.x+(r.x-n.x)/2,y:n.y+(r.y-n.y)/2}}function yd(e){return e.waypoints?hd(e.waypoints):ue(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+An.height/2}:{x:e.x+e.width/2,y:e.y+e.height+An.height/2}}function gd(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(An.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=yd(t),r=An),ce({x:n.x-r.width/2,y:n.y-r.height/2},r)}function vd(e){if(ue(e,"bpmn:FlowElement")||ue(e,"bpmn:Participant")||ue(e,"bpmn:Lane")||ue(e,"bpmn:SequenceFlow")||ue(e,"bpmn:MessageFlow")||ue(e,"bpmn:DataInput")||ue(e,"bpmn:DataOutput"))return"name";if(ue(e,"bpmn:TextAnnotation"))return"text";if(ue(e,"bpmn:Group"))return"categoryValueRef"}function wd(e){var t=e.categoryValueRef;return t&&t.value||""}function ar(e){var t=e.businessObject,n=vd(t);if(n)return n==="categoryValueRef"?wd(t):t[n]||""}function kn(e,t){t=!!t,tt(e)||(e=[e]);var n,r,i,o;return ae(e,function(a){var s=a;a.waypoints&&!t&&(s=kn(a.waypoints,!0));var c=s.x,d=s.y,h=s.height||0,m=s.width||0;(c<n||n===void 0)&&(n=c),(d<r||r===void 0)&&(r=d),(c+m>i||i===void 0)&&(i=c+m),(d+h>o||o===void 0)&&(o=d+h)}),{x:n,y:r,height:o-r,width:i-n}}function xa(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function Sa(e){return!!(e&&e.isFrame)}var Aa=7;function bd(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function Ed(e,t){return t.appendChild(bd(e,t))}function Be(e,t){return Ed(t,e),e}var _i=2,ka={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":_i,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":_i,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function _d(e,t){return ka[t]?e.style[t]:e.getAttributeNS(null,t)}function Ca(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=ka[r];i?(i===_i&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function xd(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)Ca(e,i,t[i])}function Te(e,t,n){if(typeof t=="string")if(n!==void 0)Ca(e,t,n);else return _d(e,t);else xd(e,t);return e}const Sd=Object.prototype.toString;function lt(e){return new Tt(e)}function Tt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Tt.prototype.add=function(e){return this.list.add(e),this},Tt.prototype.remove=function(e){return Sd.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},Tt.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Tt.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Tt.prototype.array=function(){return Array.from(this.list)},Tt.prototype.has=Tt.prototype.contains=function(e){return this.list.contains(e)};var xi={svg:"http://www.w3.org/2000/svg"},Ra='<svg xmlns="'+xi.svg+'"';function Ad(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(xi.svg)===-1&&(e=Ra+e.substring(4)):(e=Ra+">"+e+"</svg>",t=!0);var n=kd(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function kd(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function Re(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=Ad(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(xi.svg,e),t&&Te(n,t),n}var Si=null;function Ta(){return Si===null&&(Si=Re("svg")),Si}function Pa(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function Cd(e,t,n,r,i,o){var a=Ta().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return Pa(a,e);case 6:return Pa(a,{a:e,b:t,c:n,d:r,e:i,f:o})}}function Cn(e){return Ta().createSVGTransform()}var Na=/([&<>]{1})/g,Rd=/([&<>\n\r"]{1})/g,Td={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Ai(e,t){function n(r,i){return Td[i]||i}return e.replace(t,n)}function Da(e,t){var n,r,i,o,a;switch(e.nodeType){case 3:t.push(Ai(e.textContent,Na));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,n=0,r=i.length;n<r;++n)o=i.item(n),t.push(" ",o.name,'="',Ai(o.value,Rd),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,r=a.length;n<r;++n)Da(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",Ai(e.nodeValue,Na),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Pd(e){for(var t=e.firstChild,n=[];t;)Da(t,n),t=t.nextSibling;return n.join("")}function Ia(e,t){return Pd(e)}function sr(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Nd(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Dd(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(Nd(e,r))}function Rn(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),Dd(n,t)),n.consolidate()}function Xt(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function Id(e){return["M",e.x,e.y]}function ki(e){return["L",e.x,e.y]}function Od(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function Bd(e,t){const n=e.length,r=[Id(e[0])];for(let i=1;i<n;i++){const o=e[i-1],a=e[i],s=e[i+1];if(!s||!t){r.push(ki(a));continue}const c=Math.min(t,Ci(a.x-o.x,a.y-o.y),Ci(s.x-a.x,s.y-a.y));if(!c){r.push(ki(a));continue}const d=lr(a,o,c),h=lr(a,o,c*.5),m=lr(a,s,c),w=lr(a,s,c*.5);r.push(ki(d)),r.push(Od(h,w,m))}return r}function lr(e,t,n){const r=t.x-e.x,i=t.y-e.y,o=Ci(r,i),a=n/o;return{x:e.x+r*a,y:e.y+i*a}}function Ci(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function Ri(e,t,n){kt(t)&&(n=t,t=null),t||(t={});const r=Re("path",t);return kt(n)&&(r.dataset.cornerRadius=String(n)),Oa(r,e)}function Oa(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return Te(e,{d:Xt(Bd(t,n))}),e}var Ti="hsl(225, 10%, 15%)",Md="white";function ct(e,t){return ga(e.eventDefinitions,function(n){return n.$type===t})}function Ld(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function Fd(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function ge(e,t,n){var r=Kt(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||Md}function te(e,t,n){var r=Kt(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||Ti}function Tn(e,t,n,r){var i=Kt(e),o=i.get("label");return r||o&&o.get("color:color")||t||te(e,n)}function $d(e){var t=e.x+e.width/2,n=e.y+e.height/2,r=e.width/2,i=[["M",t,n],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]];return Xt(i)}function Ba(e,t){var n=e.x,r=e.y,i=e.width,o=e.height,a=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,o-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-o],["a",t,t,0,0,1,t,-t],["z"]];return Xt(a)}function Vd(e){var t=e.width,n=e.height,r=e.x,i=e.y,o=t/2,a=n/2,s=[["M",r+o,i],["l",o,a],["l",-o,a],["l",-o,-a],["z"]];return Xt(s)}function jd(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return Xt(o)}function Pn(e,t={}){return{width:nt(e,t),height:Ye(e,t)}}function nt(e,t={}){return cn(t,"width")?t.width:e.width}function Ye(e,t={}){return cn(t,"height")?t.height:e.height}const Ie={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};Ie.td=Ie.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Ie.option=Ie.optgroup=[1,'<select multiple="multiple">',"</select>"],Ie.thead=Ie.tbody=Ie.colgroup=Ie.caption=Ie.tfoot=[1,"<table>","</table>"],Ie.polyline=Ie.ellipse=Ie.polygon=Ie.circle=Ie.text=Ie.line=Ie.path=Ie.rect=Ie.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function ut(e,t=globalThis.document){var d;if(typeof e!="string")throw new TypeError("String expected");const n=/^<!--(.*?)-->$/s.exec(e);if(n)return t.createComment(n[1]);const r=(d=/<([\w:]+)/.exec(e))==null?void 0:d[1];if(!r)return t.createTextNode(e);if(e=e.trim(),r==="body"){const h=t.createElement("html");h.innerHTML=e;const{lastChild:m}=h;return m.remove(),m}let[i,o,a]=Object.hasOwn(Ie,r)?Ie[r]:Ie._default,s=t.createElement("div");for(s.innerHTML=o+e+a;i--;)s=s.lastChild;if(s.firstChild===s.lastChild){const{firstChild:h}=s;return h.remove(),h}const c=t.createDocumentFragment();return c.append(...s.childNodes),c}function Ud(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function Ge(e,...t){const n=e.style;return ae(t,function(r){r&&ae(r,function(i,o){n[o]=i})}),e}function Ma(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const zd=Object.prototype.toString;function Jt(e){return new Pt(e)}function Pt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Pt.prototype.add=function(e){return this.list.add(e),this},Pt.prototype.remove=function(e){return zd.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},Pt.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Pt.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Pt.prototype.array=function(){return Array.from(this.list)},Pt.prototype.has=Pt.prototype.contains=function(e){return this.list.contains(e)};function La(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Fa(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}function Hd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cr={},$a;function Wd(){if($a)return cr;$a=1;var e,t,n;function r(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n=e!=="addEventListener"?"on":""}return cr.bind=function(i,o,a,s){return e||r(),i[e](n+o,a,s||!1),a},cr.unbind=function(i,o,a,s){return t||r(),i[t](n+o,a,s||!1),a},cr}var Va=Wd(),qd=Hd(Va),Nt=Ud({__proto__:null,default:qd},[Va]),ja=["focus","blur"];function Yd(e,t,n,r,i){return ja.indexOf(n)!==-1&&(i=!0),Nt.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=Fa(a,t,!0),o.delegateTarget&&r.call(e,o)},i)}function Kd(e,t,n,r){return ja.indexOf(t)!==-1&&(r=!0),Nt.unbind(e,t,n,r)}var Pi={bind:Yd,unbind:Kd};function bt(e,t){return t=t||document,t.querySelector(e)}function Gd(e,t){return t=t||document,t.querySelectorAll(e)}function ur(e){e.parentNode&&e.parentNode.removeChild(e)}function Ni(e,t,n,r,i){var o=Cn();o.setTranslate(t,n);var a=Cn();a.setRotate(r||0,0,0);var s=Cn();s.setScale(1,1),Rn(e,[o,a,s])}function Ua(e,t,n){var r=Cn();r.setTranslate(t,n),Rn(e,r)}function Xd(e,t){var n=Cn();n.setRotate(t,0,0),Rn(e,n)}function Jd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Di={exports:{}},za;function Zd(){if(za)return Di.exports;za=1;var e=Di.exports=function(t,n){if(n||(n=16),t===void 0&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,t/i))/Math.log(n)*i;for(var o=r-Math.floor(r),a="",i=0;i<Math.floor(r);i++){var s=Math.floor(Math.random()*n).toString(n);a=s+a}if(o){var c=Math.pow(n,o),s=Math.floor(Math.random()*c).toString(n);a=s+a}var d=parseInt(a,n);return d!==1/0&&d>=Math.pow(2,t)?e(t,n):a};return e.rack=function(t,n,r){var i=function(a){var s=0;do{if(s++>10)if(r)t+=r;else throw new Error("too many ID collisions, use more bits");var c=e(t,n)}while(Object.hasOwnProperty.call(o,c));return o[c]=a,c},o=i.hats={};return i.get=function(a){return i.hats[a]},i.set=function(a,s){return i.hats[a]=s,i},i.bits=t||128,i.base=n||16,i},Di.exports}var Qd=Zd(),ep=Jd(Qd);function Et(e){if(!(this instanceof Et))return new Et(e);e=e||[128,36,1],this._seed=e.length?ep.rack(e[0],e[1],e[2]):e}Et.prototype.next=function(e){return this._seed(e||!0)},Et.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},Et.prototype.claim=function(e,t){this._seed.set(e,t||!0)},Et.prototype.assigned=function(e){return this._seed.get(e)||!1},Et.prototype.unclaim=function(e){delete this._seed.hats[e]},Et.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var tp=new Et,np=10,fr=3,rp=1.5,dr=10,ip=4,dn=.95,op=1,ap=.25;function Zt(e,t,n,r,i,o,a){wt.call(this,t,a);var s=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,d=e&&e.defaultLabelColor;function h(p){return n.computeStyle(p,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Ti,strokeWidth:2,fill:"white"})}function m(p){return n.computeStyle(p,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Ti,strokeWidth:2})}function w(p,f){var{ref:u={x:0,y:0},scale:b=1,element:A,parentGfx:L=i._svg}=f,ee=Re("marker",{id:p,viewBox:"0 0 20 20",refX:u.x,refY:u.y,markerWidth:20*b,markerHeight:20*b,orient:"auto"});Be(ee,A);var fe=bt(":scope > defs",L);fe||(fe=Re("defs"),Be(L,fe)),Be(fe,ee)}function g(p,f,u,b){var A=tp.nextPrefixed("marker-");return I(p,A,f,u,b),"url(#"+A+")"}function I(p,f,u,b,A){if(u==="sequenceflow-end"){var L=Re("path",{d:"M 1 5 L 11 10 L 1 15 Z",...h({fill:A,stroke:A,strokeWidth:1})});w(f,{element:L,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(u==="messageflow-start"){var ee=Re("circle",{cx:6,cy:6,r:3.5,...h({fill:b,stroke:A,strokeWidth:1,strokeDasharray:[1e4,1]})});w(f,{element:ee,ref:{x:6,y:6},parentGfx:p})}if(u==="messageflow-end"){var fe=Re("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...h({fill:b,stroke:A,strokeWidth:1,strokeDasharray:[1e4,1]})});w(f,{element:fe,ref:{x:8.5,y:5},parentGfx:p})}if(u==="association-start"){var me=Re("path",{d:"M 11 5 L 1 10 L 11 15",...m({fill:"none",stroke:A,strokeWidth:1.5,strokeDasharray:[1e4,1]})});w(f,{element:me,ref:{x:1,y:10},scale:.5,parentGfx:p})}if(u==="association-end"){var oe=Re("path",{d:"M 1 5 L 11 10 L 1 15",...m({fill:"none",stroke:A,strokeWidth:1.5,strokeDasharray:[1e4,1]})});w(f,{element:oe,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(u==="conditional-flow-marker"){var M=Re("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...h({fill:b,stroke:A})});w(f,{element:M,ref:{x:-1,y:10},scale:.5,parentGfx:p})}if(u==="conditional-default-flow-marker"){var G=Re("path",{d:"M 6 4 L 10 16",...h({stroke:A,fill:"none"})});w(f,{element:G,ref:{x:0,y:10},scale:.5,parentGfx:p})}}function B(p,f,u,b,A={}){At(b)&&(A=b,b=0),b=b||0,A=h(A);var L=f/2,ee=u/2,fe=Re("circle",{cx:L,cy:ee,r:Math.round((f+u)/4-b),...A});return Be(p,fe),fe}function C(p,f,u,b,A,L){At(A)&&(L=A,A=0),A=A||0,L=h(L);var ee=Re("rect",{x:A,y:A,width:f-A*2,height:u-A*2,rx:b,ry:b,...L});return Be(p,ee),ee}function E(p,f,u,b){var A=f/2,L=u/2,ee=[{x:A,y:0},{x:f,y:L},{x:A,y:u},{x:0,y:L}],fe=ee.map(function(oe){return oe.x+","+oe.y}).join(" ");b=h(b);var me=Re("polygon",{...b,points:fe});return Be(p,me),me}function P(p,f,u,b){u=m(u);var A=Ri(f,u,b);return Be(p,A),A}function y(p,f,u){return P(p,f,u,5)}function v(p,f,u){u=m(u);var b=Re("path",{...u,d:f});return Be(p,b),b}function R(p,f,u,b){return v(f,u,ce({"data-marker":p},b))}function D(p){return se[p]}function S(p){return function(f,u,b){return D(p)(f,u,b)}}var _={"bpmn:MessageEventDefinition":function(p,f,u={},b){var A=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.235,my:.315}}),L=b?te(f,c,u.stroke):ge(f,s,u.fill),ee=b?ge(f,s,u.fill):te(f,c,u.stroke),fe=v(p,A,{fill:L,stroke:ee,strokeWidth:1});return fe},"bpmn:TimerEventDefinition":function(p,f,u={}){var b=u.width||f.width,A=u.height||f.height,L=u.width?1:2,ee=B(p,b,A,.2*A,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:L}),fe=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:b,containerHeight:A,position:{mx:.5,my:.5}});v(p,fe,{stroke:te(f,c,u.stroke),strokeWidth:L});for(var me=0;me<12;me++){var oe=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:b,containerHeight:A,position:{mx:.5,my:.5}}),M=b/2,G=A/2;v(p,oe,{strokeWidth:1,stroke:te(f,c,u.stroke),transform:"rotate("+me*30+","+G+","+M+")"})}return ee},"bpmn:EscalationEventDefinition":function(p,f,u={},b){var A=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.5,my:.2}}),L=b?te(f,c,u.stroke):ge(f,s,u.fill);return v(p,A,{fill:L,stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(p,f,u={}){var b=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.5,my:.222}});return v(p,b,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(p,f,u={},b){var A=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:.57,my:.263}}),L=b?te(f,c,u.stroke):ge(f,s,u.fill);return v(p,A,{fill:L,stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(p,f,u={},b){var A=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.2,my:.722}}),L=b?te(f,c,u.stroke):ge(f,s,u.fill);return v(p,A,{fill:L,stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(p,f,u={},b){var A=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:.638,my:-.055}}),L=b?te(f,c,u.stroke):"none",ee=v(p,A,{fill:L,stroke:te(f,c,u.stroke),strokeWidth:1});return Xd(ee,45),ee},"bpmn:CompensateEventDefinition":function(p,f,u={},b){var A=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.22,my:.5}}),L=b?te(f,c,u.stroke):ge(f,s,u.fill);return v(p,A,{fill:L,stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(p,f,u={},b){var A=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.5,my:.2}}),L=b?te(f,c,u.stroke):ge(f,s,u.fill);return v(p,A,{strokeWidth:1,fill:L,stroke:te(f,c,u.stroke)})},"bpmn:MultipleEventDefinition":function(p,f,u={},b){var A=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.211,my:.36}}),L=b?te(f,c,u.stroke):ge(f,s,u.fill);return v(p,A,{fill:L,stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(p,f,u={}){var b=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.458,my:.194}});return v(p,b,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(p,f,u={}){var b=B(p,f.width,f.height,8,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:4});return b}};function V(p,f,u={},b){var A=Ce(p),L=Ld(A),ee=b||p;return A.get("eventDefinitions")&&A.get("eventDefinitions").length>1?A.get("parallelMultiple")?_["bpmn:ParallelMultipleEventDefinition"](f,ee,u,L):_["bpmn:MultipleEventDefinition"](f,ee,u,L):ct(A,"bpmn:MessageEventDefinition")?_["bpmn:MessageEventDefinition"](f,ee,u,L):ct(A,"bpmn:TimerEventDefinition")?_["bpmn:TimerEventDefinition"](f,ee,u,L):ct(A,"bpmn:ConditionalEventDefinition")?_["bpmn:ConditionalEventDefinition"](f,ee,u,L):ct(A,"bpmn:SignalEventDefinition")?_["bpmn:SignalEventDefinition"](f,ee,u,L):ct(A,"bpmn:EscalationEventDefinition")?_["bpmn:EscalationEventDefinition"](f,ee,u,L):ct(A,"bpmn:LinkEventDefinition")?_["bpmn:LinkEventDefinition"](f,ee,u,L):ct(A,"bpmn:ErrorEventDefinition")?_["bpmn:ErrorEventDefinition"](f,ee,u,L):ct(A,"bpmn:CancelEventDefinition")?_["bpmn:CancelEventDefinition"](f,ee,u,L):ct(A,"bpmn:CompensateEventDefinition")?_["bpmn:CompensateEventDefinition"](f,ee,u,L):ct(A,"bpmn:TerminateEventDefinition")?_["bpmn:TerminateEventDefinition"](f,ee,u,L):null}var F={ParticipantMultiplicityMarker:function(p,f,u={}){var b=nt(f,u),A=Ye(f,u),L=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:b,containerHeight:A,position:{mx:(b/2-6)/b,my:(A-15)/A}});R("participant-multiplicity",p,L,{strokeWidth:2,fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke)})},SubProcessMarker:function(p,f,u={}){var b=C(p,14,14,0,{strokeWidth:1,fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke)});Ua(b,f.width/2-7.5,f.height-20);var A=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:f.width,containerHeight:f.height,position:{mx:(f.width/2-7.5)/f.width,my:(f.height-20)/f.height}});R("sub-process",p,A,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke)})},ParallelMarker:function(p,f,u){var b=nt(f,u),A=Ye(f,u),L=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:b,containerHeight:A,position:{mx:(b/2+u.parallel)/b,my:(A-20)/A}});R("parallel",p,L,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke)})},SequentialMarker:function(p,f,u){var b=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:(f.width/2+u.seq)/f.width,my:(f.height-19)/f.height}});R("sequential",p,b,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke)})},CompensationMarker:function(p,f,u){var b=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:(f.width/2+u.compensation)/f.width,my:(f.height-13)/f.height}});R("compensation",p,b,{strokeWidth:1,fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke)})},LoopMarker:function(p,f,u){var b=nt(f,u),A=Ye(f,u),L=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:b,containerHeight:A,position:{mx:(b/2+u.loop)/b,my:(A-7)/A}});R("loop",p,L,{strokeWidth:1.5,fill:"none",stroke:te(f,c,u.stroke),strokeMiterlimit:.5})},AdhocMarker:function(p,f,u){var b=nt(f,u),A=Ye(f,u),L=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:b,containerHeight:A,position:{mx:(b/2+u.adhoc)/b,my:(A-15)/A}});R("adhoc",p,L,{strokeWidth:1,fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke)})}};function T(p,f,u,b){F[p](f,u,b)}function W(p,f,u=[],b={}){b={fill:b.fill,stroke:b.stroke,width:nt(f,b),height:Ye(f,b)};var A=Ce(f),L=u.includes("SubProcessMarker");L?b={...b,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:b={...b,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},A.get("isForCompensation")&&u.push("CompensationMarker"),ue(A,"bpmn:AdHocSubProcess")&&(u.push("AdhocMarker"),L||ce(b,{compensation:b.compensation-18}));var ee=A.get("loopCharacteristics"),fe=ee&&ee.get("isSequential");ee&&(ce(b,{compensation:b.compensation-18}),u.includes("AdhocMarker")&&ce(b,{seq:-23,loop:-18,parallel:-24}),fe===void 0&&u.push("LoopMarker"),fe===!1&&u.push("ParallelMarker"),fe===!0&&u.push("SequentialMarker")),u.includes("CompensationMarker")&&u.length===1&&ce(b,{compensation:-8}),ae(u,function(me){T(me,p,f,b)})}function re(p,f,u={}){u=ce({size:{width:100}},u);var b=o.createText(f||"",u);return lt(b).add("djs-label"),Be(p,b),b}function J(p,f,u,b={}){var A=Ce(f),L=Pn({x:f.x,y:f.y,width:f.width,height:f.height},b);return re(p,A.name,{align:u,box:L,padding:7,style:{fill:Tn(f,d,c,b.stroke)}})}function H(p,f,u={}){var b={width:f.width,height:f.height,x:f.width/2+f.x,y:f.height/2+f.y};return re(p,ar(f),{box:b,style:ce({},o.getExternalStyle(),{fill:Tn(f,d,c,u.stroke)})})}function Y(p,f,u,b={}){var A=Ea(u),L=re(p,f,{box:{height:30,width:A?Ye(u,b):nt(u,b)},align:"center-middle",style:{fill:Tn(u,d,c,b.stroke)}});if(A){var ee=-1*Ye(u,b);Ni(L,0,-ee,270)}}function Z(p,f,u={}){var{width:b,height:A}=Pn(f,u);return C(p,b,A,dr,{...u,fill:ge(f,s,u.fill),fillOpacity:dn,stroke:te(f,c,u.stroke)})}function q(p,f,u={}){var b=Ce(f),A=ge(f,s,u.fill),L=te(f,c,u.stroke);return(b.get("associationDirection")==="One"||b.get("associationDirection")==="Both")&&(u.markerEnd=g(p,"association-end",A,L)),b.get("associationDirection")==="Both"&&(u.markerStart=g(p,"association-start",A,L)),u=we(u,["markerStart","markerEnd"]),y(p,f.waypoints,{...u,stroke:L,strokeDasharray:"0, 5"})}function K(p,f,u={}){var b=ge(f,s,u.fill),A=te(f,c,u.stroke),L=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:.474,my:.296}}),ee=v(p,L,{fill:b,fillOpacity:dn,stroke:A}),fe=Ce(f);if(Fd(fe)){var me=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:.33,my:(f.height-18)/f.height}});v(p,me,{strokeWidth:2,fill:b,stroke:A})}return ee}function O(p,f,u={}){return B(p,f.width,f.height,{fillOpacity:dn,...u,fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke)})}function j(p,f,u={}){return E(p,f.width,f.height,{fill:ge(f,s,u.fill),fillOpacity:dn,stroke:te(f,c,u.stroke)})}function k(p,f,u={}){var b=C(p,nt(f,u),Ye(f,u),0,{fill:ge(f,s,u.fill),fillOpacity:u.fillOpacity||dn,stroke:te(f,c,u.stroke),strokeWidth:1.5}),A=Ce(f);if(ue(A,"bpmn:Lane")){var L=A.get("name");Y(p,L,f,u)}return b}function N(p,f,u={}){var b=Z(p,f,u),A=Gt(f);if(ud(f)&&(Te(b,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!A)){var L=Ce(f).flowElements||[],ee=L.filter(fe=>ue(fe,"bpmn:StartEvent"));ee.length===1&&U(ee[0],p,u,f)}return J(p,f,A?"center-top":"center-middle",u),A?W(p,f,void 0,u):W(p,f,["SubProcessMarker"],u),b}function U(p,f,u,b){var A=22,L={fill:ge(b,s,u.fill),stroke:te(b,c,u.stroke),width:A,height:A},ee=Ce(p).isInterrupting,fe=ee?0:3,me=ee?1:1.2,oe=20,M=(A-oe)/2,G="translate("+M+","+M+")";B(f,oe,oe,{fill:L.fill,stroke:L.stroke,strokeWidth:me,strokeDasharray:fe,transform:G}),V(p,f,L,b)}function ie(p,f,u={}){var b=Z(p,f,u);return J(p,f,"center-middle",u),W(p,f,void 0,u),b}var se=this.handlers={"bpmn:AdHocSubProcess":function(p,f,u={}){return Gt(f)?u=we(u,["fill","stroke","width","height"]):u=we(u,["fill","stroke"]),N(p,f,u)},"bpmn:Association":function(p,f,u={}){return u=we(u,["fill","stroke"]),q(p,f,u)},"bpmn:BoundaryEvent":function(p,f,u={}){var{renderIcon:b=!0}=u;u=we(u,["fill","stroke"]);var A=Ce(f),L=A.get("cancelActivity");u={strokeWidth:1.5,fill:ge(f,s,u.fill),fillOpacity:op,stroke:te(f,c,u.stroke)},L||(u.strokeDasharray="6");var ee=O(p,f,u);return B(p,f.width,f.height,fr,{...u,fill:"none"}),b&&V(f,p,u),ee},"bpmn:BusinessRuleTask":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=ie(p,f,u),A=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),L=v(p,A);Te(L,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1});var ee=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),fe=v(p,ee);return Te(fe,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:CallActivity":function(p,f,u={}){return u=we(u,["fill","stroke"]),N(p,f,{strokeWidth:5,...u})},"bpmn:ComplexGateway":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=j(p,f,u),A=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:f.width,containerHeight:f.height,position:{mx:.46,my:.26}});return v(p,A,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:DataInput":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=r.getRawPath("DATA_ARROW"),A=K(p,f,u);return v(p,b,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:1}),A},"bpmn:DataInputAssociation":function(p,f,u={}){return u=we(u,["fill","stroke"]),q(p,f,{...u,markerEnd:g(p,"association-end",ge(f,s,u.fill),te(f,c,u.stroke))})},"bpmn:DataObject":function(p,f,u={}){return u=we(u,["fill","stroke"]),K(p,f,u)},"bpmn:DataObjectReference":S("bpmn:DataObject"),"bpmn:DataOutput":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=r.getRawPath("DATA_ARROW"),A=K(p,f,u);return v(p,b,{strokeWidth:1,fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke)}),A},"bpmn:DataOutputAssociation":function(p,f,u={}){return u=we(u,["fill","stroke"]),q(p,f,{...u,markerEnd:g(p,"association-end",ge(f,s,u.fill),te(f,c,u.stroke))})},"bpmn:DataStoreReference":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:0,my:.133}});return v(p,b,{fill:ge(f,s,u.fill),fillOpacity:dn,stroke:te(f,c,u.stroke),strokeWidth:2})},"bpmn:EndEvent":function(p,f,u={}){var{renderIcon:b=!0}=u;u=we(u,["fill","stroke"]);var A=O(p,f,{...u,strokeWidth:4});return b&&V(f,p,u),A},"bpmn:EventBasedGateway":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=Ce(f),A=j(p,f,u);B(p,f.width,f.height,f.height*.2,{fill:ge(f,"none",u.fill),stroke:te(f,c,u.stroke),strokeWidth:1});var L=b.get("eventGatewayType"),ee=!!b.get("instantiate");function fe(){var oe=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:f.width,containerHeight:f.height,position:{mx:.36,my:.44}});v(p,oe,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:2})}if(L==="Parallel"){var me=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:f.width,containerHeight:f.height,position:{mx:.474,my:.296}});v(p,me,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:1})}else L==="Exclusive"&&(ee||B(p,f.width,f.height,f.height*.26,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:1}),fe());return A},"bpmn:ExclusiveGateway":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=j(p,f,u),A=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:f.width,containerHeight:f.height,position:{mx:.32,my:.3}}),L=Kt(f);return L.get("isMarkerVisible")&&v(p,A,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:Gateway":function(p,f,u={}){return u=we(u,["fill","stroke"]),j(p,f,u)},"bpmn:Group":function(p,f,u={}){return u=we(u,["fill","stroke","width","height"]),C(p,f.width,f.height,dr,{stroke:te(f,c,u.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:nt(f,u),height:Ye(f,u)})},"bpmn:InclusiveGateway":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=j(p,f,u);return B(p,f.width,f.height,f.height*.24,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:2.5}),b},"bpmn:IntermediateEvent":function(p,f,u={}){var{renderIcon:b=!0}=u;u=we(u,["fill","stroke"]);var A=O(p,f,{...u,strokeWidth:1.5});return B(p,f.width,f.height,fr,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:1.5}),b&&V(f,p,u),A},"bpmn:IntermediateCatchEvent":S("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":S("bpmn:IntermediateEvent"),"bpmn:Lane":function(p,f,u={}){return u=we(u,["fill","stroke","width","height"]),k(p,f,{...u,fillOpacity:ap})},"bpmn:ManualTask":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=ie(p,f,u),A=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return v(p,A,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:.5}),b},"bpmn:MessageFlow":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=Ce(f),A=Kt(f),L=ge(f,s,u.fill),ee=te(f,c,u.stroke),fe=y(p,f.waypoints,{markerEnd:g(p,"messageflow-end",L,ee),markerStart:g(p,"messageflow-start",L,ee),stroke:ee,strokeDasharray:"10, 11",strokeWidth:1.5});if(b.get("messageRef")){var me=fe.getPointAtLength(fe.getTotalLength()/2),oe=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:me.x,y:me.y}}),M={strokeWidth:1};A.get("messageVisibleKind")==="initiating"?(M.fill=L,M.stroke=ee):(M.fill=ee,M.stroke=L);var G=v(p,oe,M),Q=b.get("messageRef"),he=Q.get("name"),ye=re(p,he,{align:"center-top",fitBox:!0,style:{fill:ee}}),ve=G.getBBox(),$=ye.getBBox(),z=me.x-$.width/2,le=me.y+ve.height/2+np;Ni(ye,z,le,0)}return fe},"bpmn:ParallelGateway":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=j(p,f,u),A=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:f.width,containerHeight:f.height,position:{mx:.46,my:.2}});return v(p,A,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:Participant":function(p,f,u={}){u=we(u,["fill","stroke","width","height"]);var b=k(p,f,u),A=Gt(f),L=Ea(f),ee=Ce(f),fe=ee.get("name");if(A){var me=L?[{x:30,y:0},{x:30,y:Ye(f,u)}]:[{x:0,y:30},{x:nt(f,u),y:30}];P(p,me,{stroke:te(f,c,u.stroke),strokeWidth:rp}),Y(p,fe,f,u)}else{var oe=Pn(f,u);L||(oe.height=nt(f,u),oe.width=Ye(f,u));var M=re(p,fe,{box:oe,align:"center-middle",style:{fill:Tn(f,d,c,u.stroke)}});if(!L){var G=-1*Ye(f,u);Ni(M,0,-G,270)}}return ee.get("participantMultiplicity")&&T("ParticipantMultiplicityMarker",p,f,u),b},"bpmn:ReceiveTask":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=Ce(f),A=ie(p,f,u),L;return b.get("instantiate")?(B(p,28,28,20*.22,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1}),L=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):L=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),v(p,L,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1}),A},"bpmn:ScriptTask":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=ie(p,f,u),A=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return v(p,A,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:SendTask":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=ie(p,f,u),A=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return v(p,A,{fill:te(f,c,u.stroke),stroke:ge(f,s,u.fill),strokeWidth:1}),b},"bpmn:SequenceFlow":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=ge(f,s,u.fill),A=te(f,c,u.stroke),L=y(p,f.waypoints,{markerEnd:g(p,"sequenceflow-end",b,A),stroke:A}),ee=Ce(f),{source:fe}=f;if(fe){var me=Ce(fe);ee.get("conditionExpression")&&ue(me,"bpmn:Activity")&&Te(L,{markerStart:g(p,"conditional-flow-marker",b,A)}),me.get("default")&&(ue(me,"bpmn:Gateway")||ue(me,"bpmn:Activity"))&&me.get("default")===ee&&Te(L,{markerStart:g(p,"conditional-default-flow-marker",b,A)})}return L},"bpmn:ServiceTask":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=ie(p,f,u);B(p,10,10,{fill:ge(f,s,u.fill),stroke:"none",transform:"translate(6, 6)"});var A=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});v(p,A,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1}),B(p,10,10,{fill:ge(f,s,u.fill),stroke:"none",transform:"translate(11, 10)"});var L=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return v(p,L,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:StartEvent":function(p,f,u={}){var{renderIcon:b=!0}=u;u=we(u,["fill","stroke"]);var A=Ce(f);A.get("isInterrupting")||(u={...u,strokeDasharray:"6"});var L=O(p,f,u);return b&&V(f,p,u),L},"bpmn:SubProcess":function(p,f,u={}){return Gt(f)?u=we(u,["fill","stroke","width","height"]):u=we(u,["fill","stroke"]),N(p,f,u)},"bpmn:Task":function(p,f,u={}){return u=we(u,["fill","stroke"]),ie(p,f,u)},"bpmn:TextAnnotation":function(p,f,u={}){u=we(u,["fill","stroke"]);var{width:b,height:A}=Pn(f,u),L=C(p,b,A,0,0,{fill:"none",stroke:"none"}),ee=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:b,containerHeight:A,position:{mx:0,my:0}});v(p,ee,{stroke:te(f,c,u.stroke)});var fe=Ce(f),me=fe.get("text")||"";return re(p,me,{align:"left-top",box:Pn(f,u),padding:Aa,style:{fill:Tn(f,d,c,u.stroke)}}),L},"bpmn:Transaction":function(p,f,u={}){Gt(f)?u=we(u,["fill","stroke","width","height"]):u=we(u,["fill","stroke"]);var b=N(p,f,{strokeWidth:1.5,...u}),A=n.style(["no-fill","no-events"],{stroke:te(f,c,u.stroke),strokeWidth:1.5}),L=Gt(f);return L||(u={}),C(p,nt(f,u),Ye(f,u),dr-fr,fr,A),b},"bpmn:UserTask":function(p,f,u={}){u=we(u,["fill","stroke"]);var b=ie(p,f,u),A=15,L=12,ee=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:A,y:L}});v(p,ee,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:.5});var fe=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:A,y:L}});v(p,fe,{fill:ge(f,s,u.fill),stroke:te(f,c,u.stroke),strokeWidth:.5});var me=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:A,y:L}});return v(p,me,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:.5}),b},label:function(p,f,u={}){return H(p,f,u)}};this._drawPath=v,this._renderer=D}at(Zt,wt),Zt.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Zt.prototype.canRender=function(e){return ue(e,"bpmn:BaseElement")},Zt.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Zt.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Zt.prototype.getShapePath=function(e){return dd(e)?Ba(e,ip):ue(e,"bpmn:Event")?$d(e):ue(e,"bpmn:Activity")?Ba(e,dr):ue(e,"bpmn:Gateway")?Vd(e):jd(e)};function we(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}var sp=0,lp={width:150,height:50};function cp(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function up(e){return At(e)?ce({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var Ii=null;function fp(){return Ii||(Ii=document.createElement("canvas").getContext("2d")),Ii}function dp(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(Ha(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function Ha(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function pp(e,t){var n=fp();if(!n)return{width:0,height:0};n.font=dp(t),"letterSpacing"in n&&(n.letterSpacing=Ha(t.letterSpacing)||"0px");var r=e==="",i=r?"dummy":e.replace(/\s+$/,""),o=n.measureText(i);return{width:r?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function hp(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=pp(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return mp(e,i,r,o);i=gp(i,o.width,t)}}function mp(e,t,n,r){if(t.length<n.length){var i=n.slice(t.length).trim();e.unshift(i)}return{width:r.width,height:r.height,text:t}}var Wa="­";function yp(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],o=0;if(n.length>1)for(;r=n.shift();)if(r.length+o<t)i.push(r),o+=r.length;else{(r==="-"||r===Wa)&&i.pop();break}var a=i[i.length-1];return a&&a===Wa&&(i[i.length-1]="-"),i.join("")}function gp(e,t,n){var r=Math.max(e.length*(n/t),1),i=yp(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function pr(e){this._config=ce({},{size:lp,padding:sp,style:{},align:"center-top"},e||{})}pr.prototype.createText=function(e,t){return this.layoutText(e,t).element},pr.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},pr.prototype.layoutText=function(e,t){for(var n=ce({},this._config.size,t.box),r=ce({},this._config.style,t.style),i=cp(t.align||this._config.align),o=up(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=vp(r),c=e.split(/\u00AD?\r?\n/),d=[],h=n.width-o.left-o.right;c.length;)d.push(hp(c,h,r));i.vertical==="middle"&&(o.top=o.bottom=0);var m=fn(d,function(C,E,P){return C+(s||E.height)},0)+o.top+o.bottom,w=fn(d,function(C,E,P){return E.width>C?E.width:C},0),g=o.top;i.vertical==="middle"&&(g+=(n.height-m)/2),g-=(s||d[0].height)/4;var I=Re("text");Te(I,r),ae(d,function(C){var E;switch(g+=s||C.height,i.horizontal){case"left":E=o.left;break;case"right":E=(a?w:h)-o.right-C.width;break;default:E=Math.max(((a?w:h)-C.width)/2+o.left,0)}var P=Re("tspan");Te(P,{x:E,y:g}),P.textContent=C.text,Be(I,P)});var B={width:w,height:m};return{dimensions:B,element:I}};function vp(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var wp=12,bp=1.2,Ep=40;function qa(e){var t=ce({fontFamily:"Arial, sans-serif",fontSize:wp,fontWeight:"normal",lineHeight:bp},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=ce({},t,{fontSize:n},e&&e.externalStyle||{}),i=new pr({style:t});this.getExternalLabelBounds=function(a,s){var c={width:Math.max(a.width,An.width),height:30},d=o(s,c,{style:r});return{x:Math.round(a.x+a.width/2-d.width/2),y:a.y,width:Math.ceil(d.width),height:Math.ceil(d.height)}},this.getTextAnnotationBounds=function(a,s){var c=o(s,a,{style:t,align:"left-top",padding:Aa});return{x:a.x,y:a.y,width:a.width,height:Math.max(Ep,Math.round(c.height))}},this.getDimensions=function(a,s){return i.getDimensions(a,s||{})};function o(a,s,c){return i.getDimensions(a,ce({box:s},c))}this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}qa.$inject=["config.textRenderer"];function _p(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(t){return this.pathMap[t].d},this.getScaledPath=function(t,n){var r=this.pathMap[t],i,o;n.abspos?(i=n.abspos.x,o=n.abspos.y):(i=n.containerWidth*n.position.mx,o=n.containerHeight*n.position.my);var a={};if(n.position){for(var s=n.containerHeight/r.height*n.yScaleFactor,c=n.containerWidth/r.width*n.xScaleFactor,d=0;d<r.heightElements.length;d++)a["y"+d]=r.heightElements[d]*s;for(var h=0;h<r.widthElements.length;h++)a["x"+h]=r.widthElements[h]*c}var m=kp(r.d,{mx:i,my:o,e:a});return m}}var xp=/\{([^{}]+)\}/g,Sp=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function Ap(e,t,n){var r=n;return t.replace(Sp,function(i,o,a,s,c){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&c&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function kp(e,t){return String(e).replace(xp,function(n,r){return Ap(n,r,t)})}const Cp={__init__:["bpmnRenderer"],bpmnRenderer:["type",Zt],textRenderer:["type",qa],pathMap:["type",_p]};function Rp(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const Ya={translate:["value",Rp]};function Tp(e,t){return!e||!t?-1:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}var Pp=/,?([a-z]),?/gi,Ka=parseFloat,Pe=Math,Dt=Pe.PI,ft=Pe.min,dt=Pe.max,Ga=Pe.pow,It=Pe.abs,Np=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig,Dp=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig,Xa=Array.isArray||function(e){return e instanceof Array};function Ip(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Op(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function Bp(e){function t(){var n=Array.prototype.slice.call(arguments,0),r=n.join("␀"),i=t.cache=t.cache||{},o=t.count=t.count||[];return Ip(i,r)?(Op(o,r),i[r]):(o.length>=1e3&&delete i[o.shift()],o.push(r),i[r]=e(...arguments),i[r])}return t}function Mp(e){if(!e)return null;var t={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},n=[];return String(e).replace(Np,function(r,i,o){var a=[],s=i.toLowerCase();for(o.replace(Dp,function(c,d){d&&a.push(+d)}),s=="m"&&a.length>2&&(n.push([i,...a.splice(0,2)]),s="l",i=i=="m"?"l":"L");a.length>=t[s]&&(n.push([i,...a.splice(0,t[s])]),!!t[s]););}),n.toString=Bi,n}function Lp(e){for(var t=0,n=e.length;t<n;t++){var r=e[t][0];if(typeof r=="string"&&r!==r.toUpperCase())return!1}return!0}function Fp(e){for(var t=0,n=e.length;t<n;t++){var r=e[t][0];if(r!=="M"&&r!=="C")return!1}return!0}function Oi(e,t,n,r){return arguments.length===1&&(t=e.y,n=e.width,r=e.height,e=e.x),{x:e,y:t,width:n,height:r,x2:e+n,y2:t+r}}function Bi(){return this.join(",").replace(Pp,"$1")}function $p(e){for(var t=new Array(e.length),n=0,r=e.length;n<r;n++)for(var i=e[n],o=t[n]=new Array(i.length),a=0,s=i.length;a<s;a++)o[a]=i[a];return t.toString=Bi,t}function Ja(e,t,n,r,i,o,a,s,c){var d=1-c,h=Ga(d,3),m=Ga(d,2),w=c*c,g=w*c,I=h*e+m*3*c*n+d*3*c*c*i+g*a,B=h*t+m*3*c*r+d*3*c*c*o+g*s;return{x:hr(I),y:hr(B)}}function Za(e){var t=qp(...e);return Oi(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Ot(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Vp(e,t){return e=Oi(e),t=Oi(t),Ot(t,e.x,e.y)||Ot(t,e.x2,e.y)||Ot(t,e.x,e.y2)||Ot(t,e.x2,e.y2)||Ot(e,t.x,t.y)||Ot(e,t.x2,t.y)||Ot(e,t.x,t.y2)||Ot(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 Qa(e,t,n,r,i){var o=-3*t+9*n-9*r+3*i,a=e*o+6*t-12*n+6*r;return e*a-3*t+3*n}function es(e,t,n,r,i,o,a,s,c){c==null&&(c=1),c=c>1?1:c<0?0:c;for(var d=c/2,h=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],w=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],g=0,I=0;I<h;I++){var B=d*m[I]+d,C=Qa(B,e,n,i,a),E=Qa(B,t,r,o,s),P=C*C+E*E;g+=w[I]*Pe.sqrt(P)}return d*g}function jp(e,t,n,r,i,o,a,s){if(!(dt(e,n)<ft(i,a)||ft(e,n)>dt(i,a)||dt(t,r)<ft(o,s)||ft(t,r)>dt(o,s))){var c=(e*r-t*n)*(i-a)-(e-n)*(i*s-o*a),d=(e*r-t*n)*(o-s)-(t-r)*(i*s-o*a),h=(e-n)*(o-s)-(t-r)*(i-a);if(h){var m=hr(c/h),w=hr(d/h),g=+m.toFixed(2),I=+w.toFixed(2);if(!(g<+ft(e,n).toFixed(2)||g>+dt(e,n).toFixed(2)||g<+ft(i,a).toFixed(2)||g>+dt(i,a).toFixed(2)||I<+ft(t,r).toFixed(2)||I>+dt(t,r).toFixed(2)||I<+ft(o,s).toFixed(2)||I>+dt(o,s).toFixed(2)))return{x:m,y:w}}}}function hr(e){return Math.round(e*1e11)/1e11}function Up(e,t,n){var r=Za(e),i=Za(t);if(!Vp(r,i))return[];var o=es(...e),a=es(...t),s=ts(e)?1:~~(o/5)||1,c=ts(t)?1:~~(a/5)||1,d=new Array(s+1),h=new Array(c+1),m={},w=[],g,I;for(g=0;g<s+1;g++){var B=Ja(...e,g/s);d[g]={x:B.x,y:B.y,t:g/s}}for(g=0;g<c+1;g++)B=Ja(...t,g/c),h[g]={x:B.x,y:B.y,t:g/c};for(g=0;g<s;g++)for(I=0;I<c;I++){var C=d[g],E=d[g+1],P=h[I],y=h[I+1],v=It(E.x-C.x)<.01?"y":"x",R=It(y.x-P.x)<.01?"y":"x",D=jp(C.x,C.y,E.x,E.y,P.x,P.y,y.x,y.y),S;if(D){if(S=D.x.toFixed(9)+"#"+D.y.toFixed(9),m[S])continue;m[S]=!0;var _=C.t+It((D[v]-C[v])/(E[v]-C[v]))*(E.t-C.t),V=P.t+It((D[R]-P[R])/(y[R]-P[R]))*(y.t-P.t);_>=0&&_<=1&&V>=0&&V<=1&&w.push({x:D.x,y:D.y,t1:_,t2:V})}}return w}function zp(e,t,n){e=is(e),t=is(t);for(var r,i,o,a,s,c,d,h,m,w,g=[],I=0,B=e.length;I<B;I++){var C=e[I];if(C[0]=="M")r=s=C[1],i=c=C[2];else{C[0]=="C"?(m=[r,i,...C.slice(1)],r=m[6],i=m[7]):(m=[r,i,r,i,s,c,s,c],r=s,i=c);for(var E=0,P=t.length;E<P;E++){var y=t[E];if(y[0]=="M")o=d=y[1],a=h=y[2];else{y[0]=="C"?(w=[o,a,...y.slice(1)],o=w[6],a=w[7]):(w=[o,a,o,a,d,h,d,h],o=d,a=h);var v=Up(m,w);{for(var R=0,D=v.length;R<D;R++)v[R].segment1=I,v[R].segment2=E,v[R].bez1=m,v[R].bez2=w;g=g.concat(v)}}}}}return g}function Hp(e){return Xa(e)&&Xa(e[0])}function Wp(e){if(Lp(e))return e;var t=new Array(e.length),n=0,r=0,i=0,o=0,a=0,s;e[0][0]=="M"&&(n=+e[0][1],r=+e[0][2],i=n,o=r,a++,t[0]=["M",n,r]);for(var c,d,h=a,m=e.length;h<m;h++){if(d=e[h],s=d[0],t[h]=c=new Array(d.length),s!=s.toUpperCase())switch(c[0]=s.toUpperCase(),c[0]){case"A":c[1]=d[1],c[2]=d[2],c[3]=d[3],c[4]=d[4],c[5]=d[5],c[6]=+d[6]+n,c[7]=+d[7]+r;break;case"V":c[1]=+d[1]+r;break;case"H":c[1]=+d[1]+n;break;case"M":i=+d[1]+n,o=+d[2]+r;default:for(var w=1,g=d.length;w<g;w++)c[w]=+d[w]+(w%2?n:r)}else for(var I=0,B=d.length;I<B;I++)c[I]=d[I];switch(s=s.toUpperCase(),c[0]){case"Z":n=+i,r=+o;break;case"H":n=c[1];break;case"V":r=c[1];break;case"M":i=c[c.length-2],o=c[c.length-1];default:n=c[c.length-2],r=c[c.length-1]}}return t.toString=Bi,t}function ts(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function mr(e,t,n,r){return[e,t,n,r,n,r]}function ns(e,t,n,r,i,o){var a=.3333333333333333,s=2/3;return[a*e+s*n,a*t+s*r,a*i+s*n,a*o+s*r,i,o]}function rs(e,t,n,r,i,o,a,s,c,d){var h=Dt*120/180,m=Dt/180*(+i||0),w=[],g,I=Bp(function(p,f,u){var b=p*Pe.cos(u)-f*Pe.sin(u),A=p*Pe.sin(u)+f*Pe.cos(u);return{x:b,y:A}});if(d)S=d[0],_=d[1],R=d[2],D=d[3];else{g=I(e,t,-m),e=g.x,t=g.y,g=I(s,c,-m),s=g.x,c=g.y;var B=(e-s)/2,C=(t-c)/2,E=B*B/(n*n)+C*C/(r*r);E>1&&(E=Pe.sqrt(E),n=E*n,r=E*r);var P=n*n,y=r*r,v=(o==a?-1:1)*Pe.sqrt(It((P*y-P*C*C-y*B*B)/(P*C*C+y*B*B))),R=v*n*C/r+(e+s)/2,D=v*-r*B/n+(t+c)/2,S=Pe.asin(((t-D)/r).toFixed(9)),_=Pe.asin(((c-D)/r).toFixed(9));S=e<R?Dt-S:S,_=s<R?Dt-_:_,S<0&&(S=Dt*2+S),_<0&&(_=Dt*2+_),a&&S>_&&(S=S-Dt*2),!a&&_>S&&(_=_-Dt*2)}var V=_-S;if(It(V)>h){var F=_,T=s,W=c;_=S+h*(a&&_>S?1:-1),s=R+n*Pe.cos(_),c=D+r*Pe.sin(_),w=rs(s,c,n,r,i,0,a,T,W,[_,F,R,D])}V=_-S;var re=Pe.cos(S),J=Pe.sin(S),H=Pe.cos(_),Y=Pe.sin(_),Z=Pe.tan(V/4),q=4/3*n*Z,K=4/3*r*Z,O=[e,t],j=[e+q*J,t-K*re],k=[s+q*Y,c-K*H],N=[s,c];if(j[0]=2*O[0]-j[0],j[1]=2*O[1]-j[1],d)return[j,k,N].concat(w);w=[j,k,N].concat(w).join().split(",");for(var U=[],ie=0,se=w.length;ie<se;ie++)U[ie]=ie%2?I(w[ie-1],w[ie],m).y:I(w[ie],w[ie+1],m).x;return U}function qp(e,t,n,r,i,o,a,s){for(var c=[],d=[[],[]],h,m,w,g,I,B,C,E,P=0;P<2;++P){if(P==0?(m=6*e-12*n+6*i,h=-3*e+9*n-9*i+3*a,w=3*n-3*e):(m=6*t-12*r+6*o,h=-3*t+9*r-9*o+3*s,w=3*r-3*t),It(h)<1e-12){if(It(m)<1e-12)continue;g=-w/m,0<g&&g<1&&c.push(g);continue}C=m*m-4*w*h,E=Pe.sqrt(C),!(C<0)&&(I=(-m+E)/(2*h),0<I&&I<1&&c.push(I),B=(-m-E)/(2*h),0<B&&B<1&&c.push(B))}for(var y=c.length,v=y,R;y--;)g=c[y],R=1-g,d[0][y]=R*R*R*e+3*R*R*g*n+3*R*g*g*i+g*g*g*a,d[1][y]=R*R*R*t+3*R*R*g*r+3*R*g*g*o+g*g*g*s;return d[0][v]=e,d[1][v]=t,d[0][v+1]=a,d[1][v+1]=s,d[0].length=d[1].length=v+2,{x0:ft(...d[0]),y0:ft(...d[1]),x1:dt(...d[0]),y1:dt(...d[1])}}function is(e){if(Hp(e)||(e=Mp(e)),Fp(e))return e;for(var t=$p(Wp(e)),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(w,g,I){var B,C;if(!w)return["C",g.x,g.y,g.x,g.y,g.x,g.y];switch(!(w[0]in{T:1,Q:1})&&(g.qx=g.qy=null),w[0]){case"M":g.X=w[1],g.Y=w[2];break;case"A":w=["C",...rs(g.x,g.y,...w.slice(1))];break;case"S":I=="C"||I=="S"?(B=g.x*2-g.bx,C=g.y*2-g.by):(B=g.x,C=g.y),w=["C",B,C,...w.slice(1)];break;case"T":I=="Q"||I=="T"?(g.qx=g.x*2-g.qx,g.qy=g.y*2-g.qy):(g.qx=g.x,g.qy=g.y),w=["C",...ns(g.x,g.y,g.qx,g.qy,w[1],w[2])];break;case"Q":g.qx=w[1],g.qy=w[2],w=["C",...ns(g.x,g.y,w[1],w[2],w[3],w[4])];break;case"L":w=["C",...mr(g.x,g.y,w[1],w[2])];break;case"H":w=["C",...mr(g.x,g.y,w[1],g.y)];break;case"V":w=["C",...mr(g.x,g.y,g.x,w[1])];break;case"Z":w=["C",...mr(g.x,g.y,g.X,g.Y)];break}return w},i=function(w,g){if(w[g].length>7){w[g].shift();for(var I=w[g];I.length;)o[g]="A",w.splice(g++,0,["C",...I.splice(0,6)]);w.splice(g,1),d=t.length}},o=[],a="",s="",c=0,d=t.length;c<d;c++){t[c]&&(a=t[c][0]),a!="C"&&(o[c]=a,c&&(s=o[c-1])),t[c]=r(t[c],n,s),o[c]!="A"&&a=="C"&&(o[c]="C"),i(t,c);var h=t[c],m=h.length;n.x=h[m-2],n.y=h[m-1],n.bx=Ka(h[m-4])||n.x,n.by=Ka(h[m-3])||n.y}return t}function yr(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function Mi(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function Yp(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Kp(e){return yr({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function Gp(e){for(var t=e.waypoints,n=t.reduce(function(d,h,m){var w=t[m-1];if(w){var g=d[d.length-1],I=g&&g.endLength||0,B=Zp(w,h);d.push({start:w,end:h,startLength:I,endLength:I+B,length:B})}return d},[]),r=n.reduce(function(d,h){return d+h.length},0),i=r/2,o=0,a=n[o];a.endLength<i;)a=n[++o];var s=(i-a.startLength)/a.length,c={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return c}function Li(e){return fd(e)?Gp(e):Kp(e)}function Xp(e,t,n){var r=Jp(e,t);return r.length===1||r.length===2&&Tp(r[0],r[1])<1?yr(r[0]):r.length>1?(r=td(r,function(i){var o=Math.floor(i.t2*100)||1;return o=100-o,o=(o<10?"0":"")+o,i.segment2+"#"+o}),yr(r[n?0:r.length-1])):null}function Jp(e,t){return zp(e,t)}function Zp(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Le(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function gr(e,t,n){return ce({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Qp(e,t,n){var r=e.waypoint;return!r||r.length<2?[Li(t),Li(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function os(e,t,n){return new Error(`element ${Le(t)} referenced by ${Le(e)}#${n} not yet drawn`)}function _t(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}_t.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],_t.prototype.add=function(e,t,n){var r,i,o;if(ue(t,"bpmndi:BPMNPlane")){var a=ue(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(gr(e,t,a)),this._canvas.addRootElement(r)}else if(ue(t,"bpmndi:BPMNShape")){var s=!Gt(e,t),c=th(e);i=n&&(n.hidden||n.collapsed);var d=t.bounds;r=this._elementFactory.createShape(gr(e,t,{collapsed:s,hidden:i,x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),isFrame:c})),ue(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),ue(e,"bpmn:Lane")&&(o=0),ue(e,"bpmn:DataStoreReference")&&(eh(n,Li(d))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(ue(t,"bpmndi:BPMNEdge")){var h=this._getSource(e),m=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(gr(e,t,{hidden:i,source:h,target:m,waypoints:Qp(t,h,m)})),ue(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Le(t)} for element ${Le(e)}`);return pd(e)&&ar(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},_t.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Le(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw os(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)},_t.prototype.addLabel=function(e,t,n){var r,i,o;return r=gd(t,n),i=ar(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(gr(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!ar(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(o,n.parent)},_t.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;if(r=e[t+"Ref"],t==="source"&&i==="bpmn:DataInputAssociation"&&(r=r&&r[0]),(t==="source"&&i==="bpmn:DataOutputAssociation"||t==="target"&&i==="bpmn:DataInputAssociation")&&(r=e.$parent),n=r&&this._getElement(r),n)return n;throw r?os(e,r,t+"Ref"):new Error(`${Le(e)}#${t} Ref not specified`)},_t.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},_t.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},_t.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function eh(e,t){var n=t.x,r=t.y;return n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height}function th(e){return ue(e,"bpmn:Group")}const nh={__depends__:[Cp,{__depends__:[Ya],bpmnImporter:["type",_t]}]};function as(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}as.prototype.next=function(){return this._prefix+ ++this._counter};var rh=new as("ov"),ih=500;function Oe(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=rh,this._overlayDefaults=ce({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=oh(n.getContainer()),this._init()}Oe.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Oe.prototype.get=function(e){if(st(e)&&(e={id:e}),st(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?un(t.overlays,wa({type:e.type})):t.overlays.slice():[]}else return e.type?un(this._overlays,wa({type:e.type})):e.id?this._overlays[e.id]:null},Oe.prototype.add=function(e,t,n){if(At(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var r=this._ids.next();return n=ce({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},Oe.prototype.remove=function(e){var t=this.get(e)||[];tt(t)||(t=[t]);var n=this;ae(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(ur(r.html),ur(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var o=i.overlays.indexOf(r);o!==-1&&i.overlays.splice(o,1)}})},Oe.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"},Oe.prototype.show=function(){vr(this._overlayRoot)},Oe.prototype.hide=function(){vr(this._overlayRoot,!1)},Oe.prototype.clear=function(){this._overlays={},this._overlayContainers=[],La(this._overlayRoot)},Oe.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=kn(t);r=o.x,i=o.y}ss(n,r,i),Ma(e.html,"data-container-id",t.id)},Oe.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,o=t.top;if(t.right!==void 0){var a;r.waypoints?a=kn(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=kn(r).height:s=r.height,o=t.bottom*-1+s}ss(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Oe.prototype._createOverlayContainer=function(e){var t=ut('<div class="djs-overlays" />');Ge(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Oe.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";ls(this._overlayRoot,n)},Oe.prototype._getOverlayContainer=function(e,t){var n=ot(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n},Oe.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,o;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),st(r)&&(r=ut(r)),o=this._getOverlayContainer(n),i=ut('<div class="djs-overlay" data-overlay-id="'+t+'">'),Ge(i,{position:"absolute"}),i.appendChild(r),e.type&&Jt(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();vr(i,a===s),e.htmlContainer=i,o.overlays.push(e),o.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Oe.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=this._canvas.getRootElement(),c=!0;(r!==s||n&&(ln(i)&&i>t.scale||ln(o)&&o<t.scale))&&(c=!1),vr(a,c),this._updateOverlayScale(e,t)},Oe.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,o=e.htmlContainer,a,s="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),ln(r)&&t.scale<r&&(a=(1/t.scale||1)*r),ln(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),ln(a)&&(s="scale("+a+","+a+")"),ls(o,s)},Oe.prototype._updateOverlaysVisibilty=function(e){var t=this;ae(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},Oe.prototype._init=function(){var e=this._eventBus,t=this;function n(r){t._updateRoot(r),t._updateOverlaysVisibilty(r),t.show()}e.on("canvas.viewbox.changing",function(r){t.hide()}),e.on("canvas.viewbox.changed",function(r){n(r.viewbox)}),e.on(["shape.remove","connection.remove"],function(r){var i=r.element,o=t.get({element:i});ae(o,function(c){t.remove(c.id)});var a=t._getOverlayContainer(i);if(a){ur(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",ih,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(ae(o.overlays,function(a){t._updateOverlay(a)}),t._updateOverlayContainer(o))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&Jt(i.html)[r.add?"add":"remove"](r.marker)}),e.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox())}),e.on("diagram.clear",this.clear,this)};function oh(e){var t=ut('<div class="djs-overlay-container" />');return Ge(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function ss(e,t,n){Ge(e,{left:t+"px",top:n+"px"})}function vr(e,t){e.style.display=t===!1?"none":""}function ls(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const cs={__init__:["overlays"],overlays:["type",Oe]};function us(e,t,n,r){e.on("element.changed",function(i){var o=i.element;(o.parent||o===t.getRootElement())&&(i.gfx=n.getGraphics(o)),i.gfx&&e.fire(xa(o)+".changed",i)}),e.on("elements.changed",function(i){var o=i.elements;o.forEach(function(a){e.fire("element.changed",{element:a})}),r.updateContainments(o)}),e.on("shape.changed",function(i){r.update("shape",i.element,i.gfx)}),e.on("connection.changed",function(i){r.update("connection",i.element,i.gfx)})}us.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const ah={__init__:["changeSupport"],changeSupport:["type",us]};var sh=1e3;function ze(e){this._eventBus=e}ze.$inject=["eventBus"];function lh(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}ze.prototype.on=function(e,t,n,r,i,o){if((Ct(t)||kt(t))&&(o=i,i=r,r=n,n=t,t=null),Ct(n)&&(o=i,i=r,r=n,n=sh),At(i)&&(o=i,i=!1),!Ct(r))throw new Error("handlerFn must be a function");tt(e)||(e=[e]);var a=this._eventBus;ae(e,function(s){var c=["commandStack",s,t].filter(function(d){return d}).join(".");a.on(c,n,i?lh(r,o):r,o)})},ze.prototype.canExecute=xt("canExecute"),ze.prototype.preExecute=xt("preExecute"),ze.prototype.preExecuted=xt("preExecuted"),ze.prototype.execute=xt("execute"),ze.prototype.executed=xt("executed"),ze.prototype.postExecute=xt("postExecute"),ze.prototype.postExecuted=xt("postExecuted"),ze.prototype.revert=xt("revert"),ze.prototype.reverted=xt("reverted");function xt(e){return function(n,r,i,o,a){(Ct(n)||kt(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function Fi(e,t){t.invoke(ze,this),this.executed(function(n){var r=n.context;r.rootElement?e.setRootElement(r.rootElement):r.rootElement=e.getRootElement()}),this.revert(function(n){var r=n.context;r.rootElement&&e.setRootElement(r.rootElement)})}at(Fi,ze),Fi.$inject=["canvas","injector"];const ch={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Fi]};var uh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function fh(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return uh[t]})}var dh="_plane";function $i(e){var t=e.id;return ue(e,"bpmn:SubProcess")?ph(t):t}function ph(e){return e+dh}var hh="bjs-breadcrumbs-shown";function fs(e,t,n){var r=ut('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=Jt(i);i.appendChild(r);var a=[];e.on("element.changed",function(c){var d=c.element,h=Ce(d),m=ot(a,function(w){return w===h});m&&s()});function s(c){c&&(a=mh(c));var d=a.flatMap(function(m){var w=n.findRoot($i(m))||n.findRoot(m.id);if(!w&&ue(m,"bpmn:Process")){var g=t.find(function(C){var E=Ce(C);return E&&E.get("processRef")===m});w=g&&n.findRoot(g.id)}if(!w)return[];var I=fh(m.name||m.id),B=ut('<li><span class="bjs-crumb"><a title="'+I+'">'+I+"</a></span></li>");return B.addEventListener("click",function(){n.setRootElement(w)}),B});r.innerHTML="";var h=d.length>1;o.toggle(hh,h),d.forEach(function(m){r.appendChild(m)})}e.on("root.set",function(c){s(c.element)})}fs.$inject=["eventBus","elementRegistry","canvas"];function mh(e){for(var t=Ce(e),n=[],r=t;r;r=r.$parent)(ue(r,"bpmn:SubProcess")||ue(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function ds(e,t){var n=null,r=new yh;e.on("root.set",function(i){var o=i.element,a=t.viewbox(),s=r.get(o);if(r.set(n,{x:a.x,y:a.y,zoom:a.scale}),n=o,!(!ue(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var c=(a.x-s.x)*a.scale,d=(a.y-s.y)*a.scale;(c!==0||d!==0)&&t.scroll({dx:c,dy:d}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}ds.$inject=["eventBus","canvas"];function yh(){this._entries=[],this.set=function(e,t){var n=!1;for(var r in this._entries)if(this._entries[r][0]===e){this._entries[r][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}t!==-1&&this._entries.splice(t,1)}}var ps={x:180,y:160};function Qt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}Qt.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(r){!r.plane||!r.plane.bpmnElement||(t._processToDiagramMap[r.plane.bpmnElement.id]=r)});var n=e.diagrams.filter(r=>r.plane).flatMap(r=>t._createNewDiagrams(r.plane));n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}},Qt.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(o){var a=o.bpmnElement;if(a){var s=a.$parent;ue(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),vh(a,e)&&r.push({diElement:o,parent:s})}});var i=[];return n.forEach(function(o){if(!t._processToDiagramMap[o.id]){var a=t._createDiagram(o);t._processToDiagramMap[o.id]=a,i.push(a)}}),r.forEach(function(o){for(var a=o.diElement,s=o.parent;s&&n.indexOf(s)===-1;)s=s.$parent;if(s){var c=t._processToDiagramMap[s.id];t._moveToDiPlane(a,c.plane)}}),i},Qt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=gh(e),r={x:n.x-ps.x,y:n.y-ps.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(o){o.x=o.x-r.x,o.y=o.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})},Qt.prototype._moveToDiPlane=function(e,t){var n=hs(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)},Qt.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n},Qt.$inject=["eventBus","moddle"];function hs(e){return ue(e,"bpmndi:BPMNDiagram")?e:hs(e.$parent)}function gh(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach(function(n){if(n.bounds){var r=Mi(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),Yp(t)}function vh(e,t){var n=e.$parent;return!(!ue(n,"bpmn:SubProcess")||n===t.bpmnElement||cd(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var wr=250,wh='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>',bh="bjs-drilldown-empty";function Bt(e,t,n,r,i){ze.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r,this._translate=i;var o=this;this.executed("shape.toggleCollapse",wr,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",wr,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],wr,function(a){var s=a.oldParent,c=a.newParent||a.parent,d=a.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(c),o._updateDrilldownOverlay(d)},!0),this.reverted(["shape.create","shape.move","shape.delete"],wr,function(a){var s=a.oldParent,c=a.newParent||a.parent,d=a.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(c),o._updateDrilldownOverlay(d)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}at(Bt,ze),Bt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Bt.prototype._canDrillDown=function(e){var t=this._canvas;return ue(e,"bpmn:SubProcess")&&t.findRoot($i(e))},Bt.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=Ce(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;Jt(r.html).toggle(bh,!i)}},Bt.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=Ce(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=ut('<button type="button" class="bjs-drilldown">'+wh+"</button>"),a=r.get("name")||r.get("id"),s=this._translate("Open {element}",{element:a});o.setAttribute("title",s),o.addEventListener("click",function(){t.setRootElement(t.findRoot($i(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)},Bt.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})},Bt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const Eh={__depends__:[cs,ah,ch],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",fs],drilldownCentering:["type",ds],drilldownOverlayBehavior:["type",Bt],subprocessCompatibility:["type",Qt]};function ms(e){return e.originalEvent||e.srcEvent}function ys(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function _h(){return/mac/i.test(navigator.platform)}function gs(e,t){return(ms(e)||e).button===t}function br(e){return gs(e,0)}function xh(e){return gs(e,1)}function Sh(e){var t=ms(e)||e;return br(e)&&t.shiftKey}function Ah(e){return!0}function Er(e){return br(e)||xh(e)}var vs=500;function ws(e,t,n){var r=this;function i(_,V,F){if(!s(_,V)){var T,W,re;F?W=t.getGraphics(F):(T=V.delegateTarget||V.target,T&&(W=T,F=t.get(W))),!(!W||!F)&&(re=e.fire(_,{element:F,gfx:W,originalEvent:V}),re===!1&&(V.stopPropagation(),V.preventDefault()))}}var o={};function a(_){return o[_]}function s(_,V){var F=d[_]||br;return!F(V)}var c={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},d={"element.contextmenu":Ah,"element.mousedown":Er,"element.mouseup":Er,"element.click":Er,"element.dblclick":Er};function h(_,V,F){var T=c[_];if(!T)throw new Error("unmapped DOM event name <"+_+">");return i(T,V,F)}var m="svg, .djs-element";function w(_,V,F,T){var W=o[F]=function(re){i(F,re)};T&&(d[F]=T),W.$delegate=Pi.bind(_,m,V,W)}function g(_,V,F){var T=a(F);T&&Pi.unbind(_,V,T.$delegate)}function I(_){ae(c,function(V,F){w(_,F,V)})}function B(_){ae(c,function(V,F){g(_,F,V)})}e.on("canvas.destroy",function(_){B(_.svg)}),e.on("canvas.init",function(_){I(_.svg)}),e.on(["shape.added","connection.added"],function(_){var V=_.element,F=_.gfx;e.fire("interactionEvents.createHit",{element:V,gfx:F})}),e.on(["shape.changed","connection.changed"],vs,function(_){var V=_.element,F=_.gfx;e.fire("interactionEvents.updateHit",{element:V,gfx:F})}),e.on("interactionEvents.createHit",vs,function(_){var V=_.element,F=_.gfx;r.createDefaultHit(V,F)}),e.on("interactionEvents.updateHit",function(_){var V=_.element,F=_.gfx;r.updateDefaultHit(V,F)});var C=R("djs-hit djs-hit-stroke"),E=R("djs-hit djs-hit-click-stroke"),P=R("djs-hit djs-hit-all"),y=R("djs-hit djs-hit-no-move"),v={all:P,"click-stroke":E,stroke:C,"no-move":y};function R(_,V){return V=ce({stroke:"white",strokeWidth:15},V||{}),n.cls(_,["no-fill","no-border"],V)}function D(_,V){var F=v[V];if(!F)throw new Error("invalid hit type <"+V+">");return Te(_,F),_}function S(_,V){Be(_,V)}this.removeHits=function(_){var V=Gd(".djs-hit",_);ae(V,sr)},this.createDefaultHit=function(_,V){var F=_.waypoints,T=_.isFrame,W;return F?this.createWaypointsHit(V,F):(W=T?"stroke":"all",this.createBoxHit(V,W,{width:_.width,height:_.height}))},this.createWaypointsHit=function(_,V){var F=Ri(V);return D(F,"stroke"),S(_,F),F},this.createBoxHit=function(_,V,F){F=ce({x:0,y:0},F);var T=Re("rect");return D(T,V),Te(T,F),S(_,T),T},this.updateDefaultHit=function(_,V){var F=bt(".djs-hit",V);if(F)return _.waypoints?Oa(F,_.waypoints):Te(F,{width:_.width,height:_.height}),F},this.fire=i,this.triggerMouseEvent=h,this.mouseHandler=a,this.registerEvent=w,this.unregisterEvent=g}ws.$inject=["eventBus","elementRegistry","styles"];const kh={__init__:["interactionEvents"],interactionEvents:["type",ws]};function pn(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=new Set;var n=this;e.on(["shape.remove","connection.remove"],function(r){var i=r.element;n.deselect(i)}),e.on(["diagram.clear","root.set"],function(r){n.select(null)})}pn.$inject=["eventBus","canvas"],pn.prototype.deselect=function(e){if(this._selectedElements.has(e)){var t=this.get();this._selectedElements.delete(e),this._eventBus.fire("selection.changed",{oldSelection:t,newSelection:this.get()})}},pn.prototype.get=function(){return Array.from(this._selectedElements)},pn.prototype.isSelected=function(e){return this._selectedElements.has(e)},pn.prototype.select=function(e,t){var n=this.get();tt(e)||(e=e?[e]:[]);var r=this._canvas,i=r.getRootElement();e=e.filter(function(o){var a=r.findRoot(o);return i===a}),t?ae(e,o=>{this._selectedElements.add(o)}):this._selectedElements=new Set(e),this._eventBus.fire("selection.changed",{oldSelection:n,newSelection:this.get()})};var bs="hover",Es="selected";function _s(e,t){this._canvas=e;function n(i,o){e.addMarker(i,o)}function r(i,o){e.removeMarker(i,o)}t.on("element.hover",function(i){n(i.element,bs)}),t.on("element.out",function(i){r(i.element,bs)}),t.on("selection.changed",function(i){function o(d){r(d,Es)}function a(d){n(d,Es)}var s=new Set(i.oldSelection),c=new Set(i.newSelection);for(let d of s)c.has(d)||o(d);for(let d of c)s.has(d)||a(d)})}_s.$inject=["canvas","eventBus"];function xs(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,c=o.hints||{},d=c.autoSelect;if(a){if(d===!1)return;tt(d)?t.select(d):t.select(s.filter(Ch))}}),e.on("connect.end",500,function(i){var o=i.context,a=o.connection;a&&t.select(a)}),e.on("shape.move.end",500,function(i){var o=i.previousSelection||[],a=r.get(i.context.shape.id),s=ot(o,function(c){return a.id===c.id});s||t.select(a)}),e.on("element.click",function(i){if(br(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,c=Sh(i);if(a&&s)return c?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,c)}})}xs.$inject=["eventBus","selection","canvas","elementRegistry"];function Ch(e){return!e.hidden}const Rh={__init__:["selectionVisuals","selectionBehavior"],__depends__:[kh],selection:["type",pn],selectionVisuals:["type",_s],selectionBehavior:["type",xs]},Th=/^class[ {]/;function Ph(e){return Th.test(e.toString())}function Vi(e){return Array.isArray(e)}function ji(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _r(...e){e.length===1&&Vi(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const Nh=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Dh=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Ih=/\/\*([^*]*)\*\//m;function Oh(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(Ph(e)?Nh:Dh);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(Ih);return(i&&i[1]||r).trim()})||[]}function Ss(e,t){const n=t||{get:function(y,v){if(r.push(y),v===!1)return null;throw s(`No provider for "${y}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(y){const v=r.join(" -> ");return r.length=0,new Error(v?`${y} (Resolving: ${v})`:y)};function c(y,v){if(!i[y]&&y.includes(".")){const R=y.split(".");let D=c(R.shift());for(;R.length;)D=D[R.shift()];return D}if(ji(o,y))return o[y];if(ji(i,y)){if(r.indexOf(y)!==-1)throw r.push(y),s("Cannot resolve circular dependency!");return r.push(y),o[y]=i[y][0](i[y][1]),r.pop(),o[y]}return n.get(y,v)}function d(y,v){if(typeof v>"u"&&(v={}),typeof y!="function")if(Vi(y))y=_r(y.slice());else throw s(`Cannot invoke "${y}". Expected a function!`);const D=(y.$inject||Oh(y)).map(S=>ji(v,S)?v[S]:c(S));return{fn:y,dependencies:D}}function h(y){const{fn:v,dependencies:R}=d(y),D=Function.prototype.bind.call(v,null,...R);return new D}function m(y,v,R){const{fn:D,dependencies:S}=d(y,R);return D.apply(v,S)}function w(y){return _r(v=>y.get(v))}function g(y,v){if(v&&v.length){const R=Object.create(null),D=Object.create(null),S=[],_=[],V=[];let F,T,W,re;for(let J in i)F=i[J],v.indexOf(J)!==-1&&(F[2]==="private"?(T=S.indexOf(F[3]),T===-1?(W=F[3].createChild([],v),re=w(W),S.push(F[3]),_.push(W),V.push(re),R[J]=[re,J,"private",W]):R[J]=[V[T],J,"private",_[T]]):R[J]=[F[2],F[1]],D[J]=!0),(F[2]==="factory"||F[2]==="type")&&F[1].$scope&&v.forEach(H=>{F[1].$scope.indexOf(H)!==-1&&(R[J]=[F[2],F[1]],D[H]=!0)});v.forEach(J=>{if(!D[J])throw new Error('No provider for "'+J+'". Cannot use provider from the parent!')}),y.unshift(R)}return new Ss(y,a)}const I={factory:m,type:h,value:function(y){return y}};function B(y,v){const R=y.__init__||[];return function(){R.forEach(D=>{typeof D=="string"?v.get(D):v.invoke(D)})}}function C(y){const v=y.__exports__;if(v){const R=y.__modules__,D=Object.keys(y).reduce((T,W)=>(W!=="__exports__"&&W!=="__modules__"&&W!=="__init__"&&W!=="__depends__"&&(T[W]=y[W]),T),Object.create(null)),S=(R||[]).concat(D),_=g(S),V=_r(function(T){return _.get(T)});v.forEach(function(T){i[T]=[V,T,"private",_]});const F=(y.__init__||[]).slice();return F.unshift(function(){_.init()}),y=Object.assign({},y,{__init__:F}),B(y,_)}return Object.keys(y).forEach(function(R){if(R==="__init__"||R==="__depends__")return;const D=y[R];if(D[2]==="private"){i[R]=D;return}const S=D[0],_=D[1];i[R]=[I[S],Bh(S,_),S]}),B(y,a)}function E(y,v){return y.indexOf(v)!==-1||(y=(v.__depends__||[]).reduce(E,y),y.indexOf(v)!==-1)?y:y.concat(v)}function P(y){const v=y.reduce(E,[]).map(C);let R=!1;return function(){R||(R=!0,v.forEach(D=>D()))}}this.get=c,this.invoke=m,this.instantiate=h,this.createChild=g,this.init=P(e)}function Bh(e,t){return e!=="value"&&Vi(t)&&(t=_r(t.slice())),t}var Mh=1;function Mt(e,t){wt.call(this,e,Mh),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}at(Mt,wt),Mt.prototype.canRender=function(){return!0},Mt.prototype.drawShape=function(t,n,r){var i=Re("rect");return Te(i,{x:0,y:0,width:n.width||0,height:n.height||0}),Sa(n)?Te(i,ce({},this.FRAME_STYLE,r||{})):Te(i,ce({},this.SHAPE_STYLE,r||{})),Be(t,i),i},Mt.prototype.drawConnection=function(t,n,r){var i=Ri(n.waypoints,ce({},this.CONNECTION_STYLE,r||{}));return Be(t,i),i},Mt.prototype.getShapePath=function(t){var n=t.x,r=t.y,i=t.width,o=t.height,a=[["M",n,r],["l",i,0],["l",0,o],["l",-i,0],["z"]];return Xt(a)},Mt.prototype.getConnectionPath=function(t){var n=t.waypoints,r,i,o=[];for(r=0;i=n[r];r++)i=i.original||i,o.push([r===0?"M":"L",i.x,i.y]);return Xt(o)},Mt.$inject=["eventBus","styles"];function Lh(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,r,i){var o=this.style(r,i);return ce(o,{class:n})},this.style=function(n,r){!tt(n)&&!r&&(r=n,n=[]);var i=fn(n,function(o,a){return ce(o,e[a]||{})},{});return r?ce(i,r):i},this.computeStyle=function(n,r,i){return tt(r)||(i=r,r=[]),t.style(r||[],ce({},i,n||{}))}}const Fh={__init__:["defaultRenderer"],defaultRenderer:["type",Mt],styles:["type",Lh]};function $h(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function Vh(e,t,n){if(!(!e||!t)){typeof n!="number"&&(n=-1);var r=e.indexOf(t);if(r!==-1){if(r===n)return;if(n!==-1)e.splice(r,1);else return}n!==-1?e.splice(n,0,t):e.push(t)}}function xr(e,t){return Math.round(e*t)/t}function As(e){return kt(e)?e+"px":e}function jh(e){for(;e.parent;)e=e.parent;return e}function Uh(e){e=ce({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Ge(n,{position:"relative",overflow:"hidden",width:As(e.width),height:As(e.height)}),t.appendChild(n),n}function ks(e,t,n){const r=Re("g");lt(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const zh="base",Cs=0,Hh=1,Wh={shape:["x","y","width","height"],connection:["waypoints"]};function pe(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}pe.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],pe.prototype._init=function(e){const t=this._eventBus,n=this._container=Uh(e),r=this._svg=Re("svg");Te(r,{width:"100%",height:"100%"}),Ma(r,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,o=>{this.focus()}),r.addEventListener("focusin",()=>{this._setFocused(!0)}),r.addEventListener("focusout",()=>{this._setFocused(!1)}),r.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),r.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),Be(n,r);const i=this._viewport=ks(r,"viewport");e.deferUpdate&&(this._viewboxChanged=ba(this._viewboxChanged,300)),this._restoreFocus=ba(this._restoreFocus,0),t.on("diagram.init",()=>{t.fire("canvas.init",{svg:r,viewport:i})}),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],()=>{delete this._cachedViewbox}),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},pe.prototype._destroy=function(){this._restoreFocus.cancel(),this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport},pe.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},pe.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=xa(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},pe.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},pe.prototype.restoreFocus=function(){this._restoreFocus()},pe.prototype._restoreFocus=function(){document.activeElement===document.body&&this.focus()},pe.prototype.isFocused=function(){return this._focused},pe.prototype.getDefaultLayer=function(){return this.getLayer(zh,Cs)},pe.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");let n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),typeof t<"u"&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},pe.prototype._getChildIndex=function(e){return fn(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},pe.prototype._createLayer=function(e,t){typeof t>"u"&&(t=Hh);const n=this._getChildIndex(t);return{group:ks(this._viewport,"layer-"+e,n),index:t,visible:!0}},pe.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=this._viewport,r=t.group,i=t.index;if(t.visible)return r;const o=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[o]||null),t.visible=!0,r},pe.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=t.group;return t.visible&&(sr(n),t.visible=!1),n},pe.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],sr(t.group))},pe.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},pe.prototype.findRoot=function(e){const t=this._resolveElements(e);let n;for(const r of t){const i=this._findPlaneForRoot(jh(r));if(!i||n&&i.rootElement!==n)return;n=i.rootElement}return n},pe.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},pe.prototype._findPlaneForRoot=function(e){return ot(this._planes,function(t){return t.rootElement===e})},pe.prototype._resolveElement=function(e){return typeof e=="string"?this._elementRegistry.get(e):e},pe.prototype._resolveElements=function(e){return tt(e)||(e=[e]),e.map(t=>this._resolveElement(t)).filter(Boolean)},pe.prototype.getContainer=function(){return this._container},pe.prototype._updateMarker=function(e,t,n){let r;e=this._resolveElement(e),e.markers=e.markers||new Set,r=this._elementRegistry._elements[e.id],r&&(ae([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),lt(i).add(t)):(e.markers.delete(t),lt(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},pe.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},pe.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},pe.prototype.hasMarker=function(e,t){return e=this._resolveElement(e),e.markers?e.markers.has(t):!1},pe.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},pe.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},pe.prototype.addRootElement=function(e){const t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});const n=e.layer="root-"+t;this._ensureValid("root",e);const r=this.getLayer(n,Cs);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e},pe.prototype.removeRootElement=function(e){if(e=this._resolveElement(e),!!this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter(function(n){return n.rootElement!==e}),this._rootElement===e&&(this._rootElement=null),e},pe.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e},pe.prototype._removeRoot=function(e){const t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)},pe.prototype._addRoot=function(e,t){const n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})},pe.prototype._setRoot=function(e,t){const n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),this.hideLayer(n.layer)),e&&(t||(t=this._findPlaneForRoot(e).layer),this._elementRegistry.updateGraphics(e,this._svg,!0),this.showLayer(e.layer)),this._rootElement=e,this._eventBus.fire("root.set",{element:e})},pe.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 <"+t.id+"> already exists");const n=Wh[e];if(!ya(n,function(i){return typeof t[i]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},pe.prototype._setParent=function(e,t,n){Vh(t.children,e,n),e.parent=t},pe.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();const i=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);const a=o.create(e,t,r);return this._elementRegistry.add(t,a),o.update(e,t,a),i.fire(e+".added",{element:t,gfx:a}),t},pe.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},pe.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},pe.prototype._removeElement=function(e,t){const n=this._elementRegistry,r=this._graphicsFactory,i=this._eventBus;if(e=n.get(e.id||e),!!e)return i.fire(t+".remove",{element:e}),r.remove(e),$h(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e},pe.prototype.removeShape=function(e){return this._removeElement(e,"shape")},pe.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},pe.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},pe.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},pe.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},pe.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let r,i,o,a,s,c,d;if(e)this._changeViewbox(function(){s=Math.min(n.width/e.width,n.height/e.height);const h=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);Rn(t,h)});else return o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},a=Rn(t),i=a?a.matrix:Cd(),s=xr(i.a,1e3),c=xr(-i.e||0,1e3),d=xr(-i.f||0,1e3),e=this._cachedViewbox={x:c?c/s:0,y:d?d/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n},e;return e},pe.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=ce({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Rs(t,n)}),{x:n.e,y:n.f}},pe.prototype.scrollToElement=function(e,t){let n=100;const r=this._resolveElements(e);if(!r.length)return;const i=this.findRoot(r);if(!i)return;i!==this.getRootElement()&&this.setRootElement(i);const o=r.filter(I=>I!=i);if(!o.length)return;t||(t={}),typeof t=="number"&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const a=kn(o),s=Mi(a),c=this.viewbox(),d=this.zoom();let h,m;c.y+=t.top/d,c.x+=t.left/d,c.width-=(t.right+t.left)/d,c.height-=(t.bottom+t.top)/d;const w=Mi(c);if(!(a.width<c.width&&a.height<c.height))h=a.x-c.x,m=a.y-c.y;else{const I=Math.max(0,s.right-w.right),B=Math.min(0,s.left-w.left),C=Math.max(0,s.bottom-w.bottom),E=Math.min(0,s.top-w.top);h=I||B,m=C||E}this.scroll({dx:-h*d,dy:-m*d})},pe.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let n,r;return this._changeViewbox(function(){typeof t!="object"&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t)}),xr(r.a,1e3)};function Rs(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}pe.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,r=t.inner;let i,o;return r.x>=0&&r.y>=0&&r.x+r.width<=n.width&&r.y+r.height<=n.height&&!e?o={x:0,y:0,width:Math.max(r.width+r.x,n.width),height:Math.max(r.height+r.y,n.height)}:(i=Math.min(1,n.width/r.width,n.height/r.height),o={x:r.x+(e?r.width/2-n.width/i/2:0),y:r.y+(e?r.height/2-n.height/i/2:0),width:n.width/i,height:n.height/i}),this.viewbox(o),this.viewbox(!1).scale},pe.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,c,d,h;c=r.getCTM();const m=c.a;return t?(a=ce(o,t),s=a.matrixTransform(c.inverse()),d=i.translate(s.x,s.y).scale(1/m*e).translate(-s.x,-s.y),h=c.multiply(d)):h=i.scale(e),Rs(this._viewport,h),h},pe.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},pe.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;const r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale,o=n.width*t.scale,a=n.height*t.scale;return{x:r,y:i,width:o,height:a}},pe.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var hn="data-element-id";function Xe(e){this._elements={},this._eventBus=e}Xe.$inject=["eventBus"],Xe.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),Te(t,hn,r),n&&Te(n,hn,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},Xe.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(Te(r.gfx,hn,""),r.secondaryGfx&&Te(r.secondaryGfx,hn,""),delete t[n])},Xe.prototype.updateId=function(e,t){this._validateId(t),typeof e=="string"&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),r=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,r)},Xe.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&Te(t,hn,r),t},Xe.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&Te(e,hn);var n=this._elements[t];return n&&n.element},Xe.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t},Xe.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],o=t[i],a=o.element,s=o.gfx;if(e(a,s))return a}},Xe.prototype.getAll=function(){return this.filter(function(e){return e})},Xe.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var r=t[n],i=r.element,o=r.gfx;return e(i,o)})},Xe.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)},Xe.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")};function qh(e,t,n,r){var i=n.inverse;return Object.defineProperty(e,"remove",{value:function(o){var a=this.indexOf(o);return a!==-1&&(this.splice(a,1),t.unset(o,i,r)),o}}),Object.defineProperty(e,"contains",{value:function(o){return this.indexOf(o)!==-1}}),Object.defineProperty(e,"add",{value:function(o,a){var s=this.indexOf(o);if(typeof a>"u"){if(s!==-1)return;a=this.length}s!==-1&&this.splice(s,1),this.splice(a,0,o),s===-1&&t.set(o,i,r)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function Yh(e){return e.__refs_collection===!0}function Kh(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Ts(e,t,n){var r=qh(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach(function(i){e.set(i,t.inverse,n)})}function Gh(e,t,n){var r=t.inverse,i=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return i},set:function(o){if(o!==i){var a=i;i=null,a&&e.unset(a,r,n),i=o,e.set(i,r,n)}}})}function rt(e,t){if(!(this instanceof rt))return new rt(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}rt.prototype.bind=function(e,t){if(typeof t=="string"){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Ts(this,t,e):Gh(this,t,e)},rt.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return Yh(n)||Ts(this,t,e),n},rt.prototype.ensureBound=function(e,t){Kh(e,t)||this.bind(e,t)},rt.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},rt.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Ui=new rt({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Ps=new rt({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Ns=new rt({name:"attachers",collection:!0},{name:"host"}),Ds=new rt({name:"outgoing",collection:!0},{name:"source"}),Is=new rt({name:"incoming",collection:!0},{name:"target"});function Nn(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),Ui.bind(this,"parent"),Ps.bind(this,"labels"),Ds.bind(this,"outgoing"),Is.bind(this,"incoming")}function Dn(){Nn.call(this),Ui.bind(this,"children"),Ns.bind(this,"host"),Ns.bind(this,"attachers")}at(Dn,Nn);function Os(){Nn.call(this),Ui.bind(this,"children")}at(Os,Dn);function Bs(){Dn.call(this),Ps.bind(this,"labelTarget")}at(Bs,Dn);function Ms(){Nn.call(this),Ds.bind(this,"source"),Is.bind(this,"target")}at(Ms,Nn);var Xh={connection:Ms,shape:Dn,label:Bs,root:Os};function Jh(e,t){var n=Xh[e];if(!n)throw new Error("unknown type: <"+e+">");return ce(new n,t)}function mn(){this._uid=12}mn.prototype.createRoot=function(e){return this.create("root",e)},mn.prototype.createLabel=function(e){return this.create("label",e)},mn.prototype.createShape=function(e){return this.create("shape",e)},mn.prototype.createConnection=function(e){return this.create("connection",e)},mn.prototype.create=function(e,t){return t=ce({},t||{}),t.id||(t.id=e+"_"+this._uid++),Jh(e,t)};var Sr="__fn",Ls=1e3,Zh=Array.prototype.slice;function Ke(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}Ke.prototype.on=function(e,t,n,r){if(e=tt(e)?e:[e],Ct(t)&&(r=n,n=t,t=Ls),!kt(t))throw new Error("priority must be a number");var i=n;r&&(i=Rt(n,r),i[Sr]=n[Sr]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:i,next:null})})},Ke.prototype.once=function(e,t,n,r){var i=this;if(Ct(t)&&(r=n,n=t,t=Ls),!kt(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var a=n.apply(r,arguments);return i.off(e,o),a}o[Sr]=n,this.on(e,t,o)},Ke.prototype.off=function(e,t){e=tt(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})},Ke.prototype.createEvent=function(e){var t=new In;return t.init(e),t},Ke.prototype.fire=function(e,t){var n,r,i,o;if(o=Zh.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(r=this._listeners[e],!!r){t instanceof In?n=t:n=this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{i=this._invokeListeners(n,o,r)}finally{e!==a&&(n.type=a)}return i===void 0&&n.defaultPrevented&&(i=!1),i}},Ke.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},Ke.prototype._destroy=function(){this._listeners={}},Ke.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},Ke.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=Qh(n.callback,t),r!==void 0&&(e.returnValue=r,e.stopPropagation()),r===!1&&e.preventDefault()}catch(i){if(!this.handleError(i))throw console.error("unhandled error in event listener",i),i}return r},Ke.prototype._addListener=function(e,t){var n=this._getListeners(e),r;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority<t.priority){t.next=n,r?r.next=t:this._setListeners(e,t);return}r=n,n=n.next}r.next=t},Ke.prototype._getListeners=function(e){return this._listeners[e]},Ke.prototype._setListeners=function(e,t){this._listeners[e]=t},Ke.prototype._removeListener=function(e,t){var n=this._getListeners(e),r,i,o;if(!t){this._setListeners(e,null);return}for(;n;)r=n.next,o=n.callback,(o===t||o[Sr]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function In(){}In.prototype.stopPropagation=function(){this.cancelBubble=!0},In.prototype.preventDefault=function(){this.defaultPrevented=!0},In.prototype.init=function(e){ce(this,e||{})};function Qh(e,t){return e.apply(null,t)}function em(e){return e.childNodes[0]}function tm(e){return e.parentNode.childNodes[1]}function Je(e,t){this._eventBus=e,this._elementRegistry=t}Je.$inject=["eventBus","elementRegistry"],Je.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=tm(t),n||(n=Re("g"),lt(n).add("djs-children"),Be(t.parentNode,n))):n=t,n},Je.prototype._clear=function(e){var t=em(e);return La(t),t},Je.prototype._createContainer=function(e,t,n,r){var i=Re("g");lt(i).add("djs-group"),typeof n<"u"?nm(i,t,t.childNodes[n]):Be(t,i);var o=Re("g");lt(o).add("djs-element"),lt(o).add("djs-"+e),r&&lt(o).add("djs-frame"),Be(i,o);var a=Re("g");return lt(a).add("djs-visual"),Be(o,a),o},Je.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,Sa(t))},Je.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=fn(e,function(i,o){return o.parent&&(i[o.parent.id]=o.parent),i},{}),ae(r,function(i){var o=i.children;if(o){var a=t._getChildrenContainer(i),s=a.firstChild;ae(o,function(c){var d=n.getGraphics(c).parentNode;d===s?s=s.nextSibling:a.insertBefore(d,s)})}})},Je.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})},Je.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},Je.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})},Je.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},Je.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),Ua(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?Te(n,"display","none"):Te(n,"display","block")}},Je.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);sr(t.parentNode)};function nm(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const rm={__depends__:[Fh],__init__:["canvas"],canvas:["type",pe],elementRegistry:["type",Xe],elementFactory:["type",mn],eventBus:["type",Ke],graphicsFactory:["type",Je]};function im(e){var t=new Ss(e);return t.init(),t}function om(e){e=e||{};var t={config:["value",e]},n=[t,rm].concat(e.modules||[]);return im(n)}function Lt(e,t){this._injector=t||om(e),this.get("eventBus").fire("diagram.init")}Lt.prototype.get=function(e,t){return this._injector.get(e,t)},Lt.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Lt.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Lt.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function zi(){}zi.prototype.get=function(e){return this.$model.properties.get(this,e)},zi.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function Fs(e,t){this.model=e,this.properties=t}Fs.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(zi.prototype);ae(e.properties,function(a){!a.isMany&&a.default!==void 0&&(r[a.name]=a.default)}),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function o(a){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),ae(a,Rt(function(s,c){this.set(c,s)},this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var am=ce(Object.create(null),{String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0}),$s=ce(Object.create(null),{String:function(e){return e},Boolean:function(e){return e==="true"},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}});function Hi(e,t){var n=$s[e];return n?n(t):t}function Wi(e){return!!am[e]}function Vs(e){return!!$s[e]}function Fe(e,t){var n=e.split(/:/),r,i;if(n.length===1)r=e,i=t;else if(n.length===2)r=n[1],i=n[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(i?i+":":"")+r,{name:e,prefix:i,localName:r}}function Ze(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName=Object.create(null),this.properties=[],this.propertiesByName=Object.create(null)}Ze.prototype.build=function(){return ad(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},Ze.prototype.addProperty=function(e,t,n){typeof t=="boolean"&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var r=this.properties;t!==void 0?r.splice(t,0,e):r.push(e)},Ze.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=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=i.indexOf(e);if(s===-1)throw new Error("property <"+r.name+"> not found in property list");i.splice(s,1),this.addProperty(t,n?void 0:s,a),o[r.name]=o[r.localName]=t},Ze.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=Fe(i[0],r),a=Fe(i[1],o.prefix).name,s=this.propertiesByName[a];if(s)this.replaceProperty(s,e,n);else throw new Error("refined property <"+a+"> not found");delete e.redefines},Ze.prototype.addNamedProperty=function(e,t){var n=e.ns,r=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),r[n.name]=r[n.localName]=e},Ze.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},Ze.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},Ze.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},Ze.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},Ze.prototype.assertNotDefined=function(e,t){var n=e.name,r=this.propertiesByName[n];if(r)throw new Error("property <"+n+"> already defined; override of <"+r.definedBy.ns.name+"#"+r.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},Ze.prototype.hasProperty=function(e){return this.propertiesByName[e]},Ze.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(ae(e.properties,Rt(function(o){o=ce({},o,{name:o.ns.localName,inherited:t}),Object.defineProperty(o,"definedBy",{value:e});var a=o.replaces,s=o.redefines;a||s?this.redefineProperty(o,a||s,a):(o.isBody&&this.setBodyProperty(o),o.isId&&this.setIdProperty(o),this.addProperty(o))},this)),r.push(e),n[i]=e)};function Ft(e,t){this.packageMap=Object.create(null),this.typeMap=Object.create(null),this.packages=[],this.properties=t,ae(e,Rt(this.registerPackage,this))}Ft.prototype.getPackage=function(e){return this.packageMap[e]},Ft.prototype.getPackages=function(){return this.packages},Ft.prototype.registerPackage=function(e){e=ce({},e);var t=this.packageMap;js(t,e,"prefix"),js(t,e,"uri"),ae(e.types,Rt(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Ft.prototype.registerType=function(e,t){e=ce({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:ce({},e.meta||{})});var n=Fe(e.name,t.prefix),r=n.name,i=Object.create(null);ae(e.properties,Rt(function(o){var a=Fe(o.name,n.prefix),s=a.name;Wi(o.type)||(o.type=Fe(o.type,a.prefix).name),ce(o,{ns:a,name:s}),i[s]=o},this)),ce(e,{ns:n,name:r,propertiesByName:i}),ae(e.extends,Rt(function(o){var a=Fe(o,n.prefix),s=this.typeMap[a.name];s.traits=s.traits||[],s.traits.push(r)},this)),this.definePackage(e,t),this.typeMap[r]=e},Ft.prototype.mapTypes=function(e,t,n){var r=Wi(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(c,d){var h=Fe(c,Wi(c)?"":e.prefix);i.mapTypes(h,t,d)}function a(c){return o(c,!0)}function s(c){return o(c,!1)}if(!r)throw new Error("unknown type <"+e.name+">");ae(r.superClass,n?a:s),t(r,!n),ae(r.traits,a)},Ft.prototype.getEffectiveDescriptor=function(e){var t=Fe(e),n=new Ze(t);this.mapTypes(t,function(i,o){n.addTrait(i,o)});var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r},Ft.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function js(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function en(e){this.model=e}en.prototype.set=function(e,t,n){if(!st(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;sm(n)?r?delete e[i]:delete e.$attrs[qi(t)]:r?i in e?e[i]=n:Us(e,r,n):e.$attrs[qi(t)]=n},en.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[qi(t)];var r=n.name;return!e[r]&&n.isMany&&Us(e,n,[]),e[r]},en.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=ce({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)},en.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},en.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},en.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;const i=n.config.strict;if(typeof i<"u"){const o=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw o;typeof console<"u"&&console.warn(o)}return null};function sm(e){return typeof e>"u"}function Us(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function qi(e){return e.replace(/^:/,"")}function it(e,t={}){this.properties=new en(this),this.factory=new Fs(this,this.properties),this.registry=new Ft(e,this.properties),this.typeCache=Object.create(null),this.config=t}it.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},it.prototype.getType=function(e){var t=this.typeCache,n=st(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},it.prototype.createAny=function(e,t,n){var r=Fe(e),i={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){od(this,[a],s)}},o={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(i,o),this.properties.defineModel(i,this),this.properties.define(i,"get",{enumerable:!1,writable:!0}),this.properties.define(i,"set",{enumerable:!1,writable:!0}),this.properties.define(i,"$parent",{enumerable:!1,writable:!0}),this.properties.define(i,"$instanceOf",{enumerable:!1,writable:!0}),ae(n,function(a,s){At(a)&&a.value!==void 0?i[a.name]=a.value:i[s]=a}),i},it.prototype.getPackage=function(e){return this.registry.getPackage(e)},it.prototype.getPackages=function(){return this.registry.getPackages()},it.prototype.getElementDescriptor=function(e){return e.$descriptor},it.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},it.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},it.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var zs=String.fromCharCode,lm=Object.prototype.hasOwnProperty,cm=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,On={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(On).forEach(function(e){On[e.toUpperCase()]=On[e]});function um(e,t,n,r){return r?lm.call(On,r)?On[r]:"&"+r+";":zs(t||parseInt(n,16))}function tn(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(cm,um):e}var Hs="non-whitespace outside of root node";function $t(e){return new Error(e)}function fm(e){return"missing namespace for prefix <"+e+">"}function Ar(e){return{get:e,enumerable:!0}}function dm(e){var t=Object.create(null),n;for(n in e)t[n]=e[n];return t}var Ws=Symbol("nameCache");function Yi(e){return e+"$uri"}function pm(e){var t=Object.create(null),n,r;for(n in e)r=e[n],t[r]=r,t[Yi(r)]=n;return t}function kr(){return{line:0,column:0}}function hm(e){throw e}function qs(e){if(!this)return new qs(e);var t=e&&e.proxy,n,r,i,o,a=hm,s,c,d,h,m=kr,w=!1,g=!1,I="",B=!1,C=!1,E=null,P=!1,y,v,R,D;function S(T){T instanceof Error||(T=$t(T)),E=T,a(T,m)}function _(T){s&&(T instanceof Error||(T=$t(T)),s(T,m))}this.on=function(T,W){if(typeof W!="function")throw $t("required args <name, cb>");switch(T){case"openTag":r=W;break;case"text":n=W;break;case"closeTag":i=W;break;case"error":a=W;break;case"warn":s=W;break;case"cdata":o=W;break;case"attention":h=W;break;case"question":d=W;break;case"comment":c=W;break;default:throw $t("unsupported event: "+T)}return this},this.ns=function(T){if(typeof T>"u"&&(T={}),typeof T!="object")throw $t("required args <nsMap={}>");var W=Object.create(null),re;for(re in T)W[re]=T[re];return C=!0,D=W,this};function V(){y=C?[]:null,v=C?pm(D):null,R=[],m=kr,P=!1,E=null,g=!1,I=""}this.parse=function(T){if(typeof T!="string")throw $t("required args <xml=string>");if(w)throw $t("parse during stream; call end() first");return V(),F(T),m=kr,P=!1,E},this.write=function(T){if(typeof T!="string")throw $t("required args <xml=string>");return w||(V(),w=!0),E||(I=F(I+T,!0)||""),this},this.end=function(){return w||V(),w=!1,E||F(I),I="",m=kr,P=!1,E},this.stop=function(){P=!0};function F(T,W=!1){var re=null,J=null,H,Y=0,Z=!1,q=!1,K=0,O=0,j,k,N,U,ie,se,p,f,u,b="",A=0,L;function ee(M,G){var Q=M.indexOf(":");if(Q===-1)return M;var he=v[M.substring(0,Q)];return he?G===he?M.substr(Q+1):he+M.substr(Q):(_(fm(M.substring(0,Q))),null)}function fe(){if(L!==null)return L;var M,G,Q=C&&v.xmlns,he=C&&B?[]:null,ye=A,ve=b,$=ve.length,z,le,X,be,Ee,We={},Qe=new Set,Ue,Se,Ae;e:for(;ye<$;ye++)if(Ue=!1,Se=ve.charCodeAt(ye),!(Se===32||Se<14&&Se>8)){for((Se<65||Se>122||Se>90&&Se<97)&&Se!==95&&Se!==58&&(_("illegal first char attribute name"),Ue=!0),Ae=ye+1;Ae<$;Ae++)if(Se=ve.charCodeAt(Ae),!(Se>96&&Se<123||Se>64&&Se<91||Se>47&&Se<59||Se===46||Se===45||Se===95)){if(Se===32||Se<14&&Se>8){_("missing attribute value"),ye=Ae;continue e}if(Se===61)break;_("illegal attribute name char"),Ue=!0}if(Ee=ve.substring(ye,Ae),Ee==="xmlns:xmlns"&&(_("illegal declaration of xmlns"),Ue=!0),Se=ve.charCodeAt(Ae+1),Se===34)Ae=ve.indexOf('"',ye=Ae+2),Ae===-1&&(Ae=ve.indexOf("'",ye),Ae!==-1&&(_("attribute value quote missmatch"),Ue=!0));else if(Se===39)Ae=ve.indexOf("'",ye=Ae+2),Ae===-1&&(Ae=ve.indexOf('"',ye),Ae!==-1&&(_("attribute value quote missmatch"),Ue=!0));else for(_("missing attribute value quotes"),Ue=!0,Ae=Ae+1;Ae<$&&(Se=ve.charCodeAt(Ae+1),!(Se===32||Se<14&&Se>8));Ae++);for(Ae===-1&&(_("missing closing quotes"),Ae=$,Ue=!0),Ue||(X=ve.substring(ye,Ae)),ye=Ae;Ae+1<$&&(Se=ve.charCodeAt(Ae+1),!(Se===32||Se<14&&Se>8));Ae++)ye===Ae&&(_("illegal character after attribute end"),Ue=!0);if(ye=Ae+1,Ue)continue e;if(Qe.has(Ee)){_("attribute <"+Ee+"> already defined");continue}if(Qe.add(Ee),!C){We[Ee]=X;continue}if(B){if(le=Ee==="xmlns"?"xmlns":Ee.charCodeAt(0)===120&&Ee.substr(0,6)==="xmlns:"?Ee.substr(6):null,le!==null){if(M=tn(X),G=Yi(le),be=D[M],!be){if(le==="xmlns"||G in v&&v[G]!==M)do be="ns"+Y++;while(typeof v[be]<"u");else be=le;D[M]=be}v[le]!==be&&(z||(v=dm(v),z=!0),v[le]=be,le==="xmlns"&&(v[Yi(be)]=M,Q=be),v[G]=M),We[Ee]=X;continue}he.push(Ee,X);continue}Ee=ee(Ee,Q),Ee!==null&&(We[Ee]=X)}if(B)for(ye=0,$=he.length;ye<$;ye++)Ee=ee(he[ye++],Q),X=he[ye],Ee!==null&&(We[Ee]=X);return L=We}function me(){for(var M=/(\r\n|\r|\n)/g,G=0,Q=0,he=0,ye=O,ve,$;K>=he&&(ve=M.exec(T),!(!ve||(ye=ve[0].length+ve.index,ye>K)));)G+=1,he=ye;return K==-1?(Q=ye,$=T.substring(O)):O===0?$=T.substring(O,K):(Q=K-he,$=O==-1?T.substring(K):T.substring(K,O+1)),{data:$,line:G,column:Q}}for(m=me,t&&(u=Object.create({},{name:Ar(function(){return p}),originalName:Ar(function(){return f}),attrs:Ar(fe),ns:Ar(function(){return v})}));O!==-1;){if(T.charCodeAt(O)===60?K=O:K=T.indexOf("<",O),K===-1){if(W)return T.substring(O);if(R.length)return S("unexpected end of file");if(!g)return S("missing start tag");O<T.length&&T.substring(O).trim()&&_(Hs);return}if(g||(g=!0),O!==K){if(R.length){if(n&&(n(T.substring(O,K),tn,m),P))return}else if(T.substring(O,K).trim()&&(_(Hs),P))return}if(U=T.charCodeAt(K+1),U===33){if(N=T.charCodeAt(K+2),N===91&&T.substr(K+3,6)==="CDATA["){if(O=T.indexOf("]]>",K),O===-1)return W?T.substring(K):S("unclosed cdata");if(o&&(o(T.substring(K+9,O),m),P))return;O+=3;continue}if(N===45&&T.charCodeAt(K+3)===45){if(O=T.indexOf("-->",K),O===-1)return W?T.substring(K):S("unclosed comment");if(c&&(c(T.substring(K+4,O),tn,m),P))return;O+=3;continue}}if(U===63){if(O=T.indexOf("?>",K),O===-1)return W?T.substring(K):S("unclosed question");if(d&&(d(T.substring(K,O+2),m),P))return;O+=2;continue}for(j=K+1;;j++){if(ie=T.charCodeAt(j),isNaN(ie))return W?T.substring(K):(O=-1,S("unclosed tag"));if(ie===34)N=T.indexOf('"',j+1),j=N!==-1?N:j;else if(ie===39)N=T.indexOf("'",j+1),j=N!==-1?N:j;else if(ie===62){O=j;break}}if(U===33){if(h&&(h(T.substring(K,O+1),tn,m),P))return;O+=1;continue}if(L={},U===47){if(Z=!1,q=!0,!R.length)return S("missing open tag");if(j=p=R.pop(),N=K+2+j.length,T.substring(K+2,N)!==j)return S("closing tag mismatch");for(;N<O;N++)if(U=T.charCodeAt(N),!(U===32||U>8&&U<14))return S("close tag")}else{if(T.charCodeAt(O-1)===47?(j=p=T.substring(K+1,O-1),Z=!0,q=!0):(j=p=T.substring(K+1,O),Z=!0,q=!1),!(U>96&&U<123||U>64&&U<91||U===95||U===58))return S("illegal first char nodeName");for(N=1,k=j.length;N<k;N++)if(U=j.charCodeAt(N),!(U>96&&U<123||U>64&&U<91||U>47&&U<59||U===45||U===95||U==46)){if(U===32||U<14&&U>8){p=j.substring(0,N),L=null;break}return S("invalid nodeName")}q||R.push(p)}if(C){H=v,Z&&(q||y.push(H),L===null&&(B=j.indexOf("xmlns",N)!==-1)&&(A=N,b=j,fe(),B=!1)),f=p,J!==v&&(re=v[Ws],re===void 0&&(re=v[Ws]=Object.create(null)),J=v);var oe=re[p];if(oe!==void 0)p=oe;else{if(U=p.indexOf(":"),U!==-1){if(se=v[p.substring(0,U)],!se)return S("missing namespace on <"+f+">");p=p.substr(U+1)}else se=v.xmlns;se&&(p=se+":"+p),re[f]=p}}if(Z&&(A=N,b=j,r&&(t?r(u,tn,q,m):r(p,fe,tn,q,m),P)))return;if(q){if(i&&(i(t?u:p,tn,Z,m),P))return;C&&(Z?v=H:v=y.pop())}O+=1}}}function Ys(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Ki={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Ks="property";function Gs(e){return e.xml&&e.xml.serialize}function mm(e){const t=Gs(e);return t!==Ks&&(t||null)}function ym(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Xs(e,t){return Ys(t)?e.prefix+":"+ym(e.localName):e.name}function gm(e,t){var n=e.name,r=e.localName,i=t&&t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function vm(e,t,n){const r=Fe(e,t.xmlns),i=`${t[r.prefix]||r.prefix}:${r.localName}`,o=Fe(i);var a=n.getPackage(o.prefix);return gm(o,a)}function Vt(e){return new Error(e)}function St(e){return e.$descriptor}function wm(e){ce(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw Vt("expected element");var n=this.elementsById,r=St(t),i=r.idProperty,o;if(i&&(o=t.get(i.name),o)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(o))throw new Error("illegal ID <"+o+">");if(n[o])throw Vt("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function Bn(){}Bn.prototype.handleEnd=function(){},Bn.prototype.handleText=function(){},Bn.prototype.handleNode=function(){};function Gi(){}Gi.prototype=Object.create(Bn.prototype),Gi.prototype.handleNode=function(){return this};function yn(){}yn.prototype=Object.create(Bn.prototype),yn.prototype.handleText=function(e){this.body=(this.body||"")+e};function Mn(e,t){this.property=e,this.context=t}Mn.prototype=Object.create(yn.prototype),Mn.prototype.handleNode=function(e){if(this.element)throw Vt("expected no sub nodes");return this.element=this.createReference(e),this},Mn.prototype.handleEnd=function(){this.element.id=this.body},Mn.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function Xi(e,t){this.element=t,this.propertyDesc=e}Xi.prototype=Object.create(yn.prototype),Xi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Hi(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function Cr(){}Cr.prototype=Object.create(yn.prototype),Cr.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};function je(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}je.prototype=Object.create(Cr.prototype),je.prototype.addReference=function(e){this.context.addReference(e)},je.prototype.handleText=function(e){var t=this.element,n=St(t),r=n.bodyProperty;if(!r)throw Vt("unexpected body text <"+e+">");yn.prototype.handleText.call(this,e)},je.prototype.handleEnd=function(){var e=this.body,t=this.element,n=St(t),r=n.bodyProperty;r&&e!==void 0&&(e=Hi(r.type,e),t.set(r.name,e))},je.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=St(n),i=this.context,o=new n({}),a=this.model,s;return ae(t,function(c,d){var h=r.propertiesByName[d],m;h&&h.isReference?h.isMany?(m=c.split(" "),ae(m,function(w){i.addReference({element:o,property:h.ns.name,id:w})})):i.addReference({element:o,property:h.ns.name,id:c}):(h?c=Hi(h.type,c):d==="xmlns"?d=":"+d:(s=Fe(d,r.ns.prefix),a.getPackage(s.prefix)&&i.addWarning({message:"unknown attribute <"+d+">",element:o,property:d,value:c})),o.set(d,c))}),o},je.prototype.getPropertyForNode=function(e){var t=e.name,n=Fe(t),r=this.type,i=this.model,o=St(r),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){const d=mm(s);if(d){const h=e.attributes[d];if(h){const m=vm(h,e.ns,i),w=i.getType(m);return ce({},s,{effectiveType:St(w).name})}}return s}var c=i.getPackage(n.prefix);if(c){const d=Xs(n,c),h=i.getType(d);if(s=ot(o.properties,function(m){return!m.isVirtual&&!m.isReference&&!m.isAttribute&&h.hasType(m.type)}),s)return ce({},s,{effectiveType:St(h).name})}else if(s=ot(o.properties,function(d){return!d.isReference&&!d.isAttribute&&d.type==="Element"}),s)return s;throw Vt("unrecognized element <"+n.name+">")},je.prototype.toString=function(){return"ElementDescriptor["+St(this.type).name+"]"},je.prototype.valueHandler=function(e,t){return new Xi(e,t)},je.prototype.referenceHandler=function(e){return new Mn(e,this.context)},je.prototype.handler=function(e){return e==="Element"?new gn(this.model,e,this.context):new je(this.model,e,this.context)},je.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,Vs(n))return this.valueHandler(t,r);t.isReference?i=this.referenceHandler(t).handleNode(e):i=this.handler(n).handleNode(e);var o=i.element;return o!==void 0&&(t.isMany?r.get(t.name).push(o):r.set(t.name,o),t.isReference?(ce(o,{element:r}),this.context.addReference(o)):o.$parent=r),i};function Ji(e,t,n){je.call(this,e,t,n)}Ji.prototype=Object.create(je.prototype),Ji.prototype.createElement=function(e){var t=e.name,n=Fe(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),a=o&&Xs(n,o)||t;if(!i.hasType(a))throw Vt("unexpected element <"+e.originalName+">");return je.prototype.createElement.call(this,e)};function gn(e,t,n){this.model=e,this.context=n}gn.prototype=Object.create(Cr.prototype),gn.prototype.createElement=function(e){var t=e.name,n=Fe(t),r=n.prefix,i=e.ns[r+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)},gn.prototype.handleChild=function(e){var t=new gn(this.model,"Element",this.context).handleNode(e),n=this.element,r=t.element,i;return r!==void 0&&(i=n.$children=n.$children||[],i.push(r),r.$parent=n),t},gn.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Zi(e){e instanceof it&&(e={model:e}),ce(this,{lax:!1},e)}Zi.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof je?(r=t,t={}):typeof t=="string"?(r=this.handler(t),t={}):typeof r=="string"&&(r=this.handler(r));var i=this.model,o=this.lax,a=new wm(ce({},t,{rootHandler:r})),s=new qs({proxy:!0}),c=bm();r.context=a,c.push(r);function d(R,D,S){var _=D(),V=_.line,F=_.column,T=_.data;T.charAt(0)==="<"&&T.indexOf(" ")!==-1&&(T=T.slice(0,T.indexOf(" "))+">");var W="unparsable content "+(T?T+" ":"")+`detected
10
- line: `+V+`
11
- column: `+F+`
12
- nested error: `+R.message;if(S)return a.addWarning({message:W,error:R}),!0;throw Vt(W)}function h(R,D){return d(R,D,!0)}function m(){var R=a.elementsById,D=a.references,S,_;for(S=0;_=D[S];S++){var V=_.element,F=R[_.id],T=St(V).propertiesByName[_.property];if(F||a.addWarning({message:"unresolved reference <"+_.id+">",element:_.element,property:_.property,value:_.id}),T.isMany){var W=V.get(T.name),re=W.indexOf(_);re===-1&&(re=W.length),F?W[re]=F:W.splice(re,1)}else V.set(T.name,F)}}function w(){c.pop().handleEnd()}var g=/^<\?xml /i,I=/ encoding="([^"]+)"/i,B=/^utf-8$/i;function C(R){if(g.test(R)){var D=I.exec(R),S=D&&D[1];!S||B.test(S)||a.addWarning({message:"unsupported document encoding <"+S+">, falling back to UTF-8"})}}function E(R,D){var S=c.peek();try{c.push(S.handleNode(R))}catch(_){d(_,D,o)&&c.push(new Gi)}}function P(R,D){try{c.peek().handleText(R)}catch(S){h(S,D)}}function y(R,D){R.trim()&&P(R,D)}var v=i.getPackages().reduce(function(R,D){return R[D.uri]=D.prefix,R},Object.entries(Ki).reduce(function(R,[D,S]){return R[S]=D,R},i.config&&i.config.nsMap||{}));return s.ns(v).on("openTag",function(R,D,S,_){var V=R.attrs||{},F=Object.keys(V).reduce(function(W,re){var J=D(V[re]);return W[re]=J,W},{}),T={name:R.name,originalName:R.originalName,attributes:F,ns:R.ns};E(T,_)}).on("question",C).on("closeTag",w).on("cdata",P).on("text",function(R,D,S){y(D(R),S)}).on("error",d).on("warn",h),new Promise(function(R,D){var S;try{s.parse(e),m()}catch(W){S=W}var _=r.element;!S&&!_&&(S=Vt("failed to parse document as <"+r.type.$descriptor.name+">"));var V=a.warnings,F=a.references,T=a.elementsById;return S?(S.warnings=V,D(S)):R({rootElement:_,elementsById:T,references:F,warnings:V})})},Zi.prototype.handler=function(e){return new Ji(this.model,e)};function bm(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var Em=`<?xml version="1.0" encoding="UTF-8"?>
13
- `,_m=/<|>|'|"|&|\n\r|\n/g,Js=/<|>|&/g;function pt(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}pt.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},pt.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},pt.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},pt.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},pt.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},pt.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},pt.prototype.getNSKey=function(e){return e.prefix!==void 0?e.uri+"|"+e.prefix:e.uri},pt.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},pt.prototype.getUsed=function(e){var t=[].concat(this.wellknown,this.custom);return t.filter(n=>{var r=this.getNSKey(n);return this.used[r]})};function xm(e){return e.charAt(0).toLowerCase()+e.slice(1)}function Sm(e,t){return Ys(t)?xm(e):e}function Zs(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Qs(e){return st(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function Am(e){return e.getUsed().filter(function(t){return t.prefix!=="xml"}).map(function(t){var n="xmlns"+(t.prefix?":"+t.prefix:"");return{name:n,value:t.uri}})}function km(e,t){return t.isGeneric?ce({localName:t.ns.localName},e):ce({localName:Sm(t.ns.localName,t.$pkg)},e)}function Cm(e,t){return ce({localName:t.ns.localName},e)}function Rm(e){var t=e.$descriptor;return un(t.properties,function(n){var r=n.name;if(n.isVirtual||!cn(e,r))return!1;var i=e[r];return i===n.default||i===null?!1:n.isMany?i.length:!0})}var Tm={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Pm={"<":"lt",">":"gt","&":"amp"};function el(e,t,n){return e=st(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function Nm(e){return el(e,_m,Tm)}function Dm(e){return el(e,Js,Pm)}function Im(e){return un(e,function(t){return t.isAttr})}function Om(e){return un(e,function(t){return!t.isAttr})}function Qi(e){this.tagName=e}Qi.prototype.build=function(e){return this.element=e,this},Qi.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()};function nn(){}nn.prototype.serializeValue=nn.prototype.serializeTo=function(e){e.append(this.escape?Dm(this.value):this.value)},nn.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(Js)!==-1&&(this.escape=!0),this};function eo(e){this.tagName=e}Zs(eo,nn),eo.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()};function ke(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}ke.prototype.build=function(e){this.element=e;var t=e.$descriptor,n=this.propertyDescriptor,r,i,o=t.isGeneric;return o?r=this.parseGenericNsAttributes(e):r=this.parseNsAttributes(e),n?this.ns=this.nsPropertyTagName(n):this.ns=this.nsTagName(t),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(i=Rm(e),this.parseAttributes(Im(i)),this.parseContainments(Om(i))),this.parseGenericAttributes(e,r),this},ke.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return km(t,e)},ke.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Cm(t,e)},ke.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},ke.prototype.nsAttributeName=function(e){var t;if(st(e)?t=Fe(e):t=e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:ce({localName:t.localName},n)},ke.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter(([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n)).map(([t,n])=>({name:t,value:n}))},ke.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push(new nn().build({type:"String"},t));var n=e.$children;n&&ae(n,r=>{this.body.push(new ke(this).build(r))})},ke.prototype.parseNsAttribute=function(e,t,n){var r=e.$model,i=Fe(t),o;if(i.prefix==="xmlns"&&(o={prefix:i.localName,uri:n}),!i.prefix&&i.localName==="xmlns"&&(o={uri:n}),!o)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(o,!0,!0);else{var a=this.logNamespaceUsed(o,!0);this.getNamespaces().logUsed(a)}},ke.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,r=[];return ae(n,function(i,o){var a=t.parseNsAttribute(e,o,i);a&&r.push(a)}),r},ke.prototype.parseGenericAttributes=function(e,t){var n=this;ae(t,function(r){try{n.addAttribute(n.nsAttributeName(r.name),r.value)}catch(i){typeof console<"u"&&console.warn(`missing namespace information for <${r.name}=${r.value}> on`,e,i)}})},ke.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;ae(e,function(i){var o=r.get(i.name),a=i.isReference,s=i.isMany;if(s||(o=[o]),i.isBody)n.push(new nn().build(i,o[0]));else if(Vs(i.type))ae(o,function(d){n.push(new eo(t.addTagName(t.nsPropertyTagName(i))).build(i,d))});else if(a)ae(o,function(d){n.push(new Qi(t.addTagName(t.nsPropertyTagName(i))).build(d))});else{var c=Gs(i);ae(o,function(d){var h;c?c===Ks?h=new ke(t,i):h=new Rr(t,i,c):h=new ke(t),n.push(h.build(d))})}})},ke.prototype.getNamespaces=function(e){var t=this.namespaces,n=this.parent,r;return t||(r=n&&n.getNamespaces(),e||!r?this.namespaces=t=new pt(r):t=r),t},ke.prototype.logNamespace=function(e,t,n){var r=this.getNamespaces(n),i=e.uri,o=e.prefix,a=r.byUri(i);return(!a||n)&&r.add(e,t),r.mapPrefix(o,i),e},ke.prototype.logNamespaceUsed=function(e,t){var n=this.getNamespaces(t),r=e.prefix,i=e.uri,o,a,s;if(!r&&!i)return{localName:e.localName};if(s=n.defaultUriByPrefix(r),i=i||s||n.uriByPrefix(r),!i)throw new Error("no namespace uri given for prefix <"+r+">");if(e=n.byUri(i),!e&&!r&&(e=this.logNamespace({uri:i},s===i,!0)),!e){for(o=r,a=1;n.uriByPrefix(o);)o=r+"_"+a++;e=this.logNamespace({prefix:o,uri:i},s===i)}return r&&n.mapPrefix(r,i),e},ke.prototype.parseAttributes=function(e){var t=this,n=this.element;ae(e,function(r){var i=n.get(r.name);if(r.isReference)if(!r.isMany)i=i.id;else{var o=[];ae(i,function(a){o.push(a.id)}),i=o.join(" ")}t.addAttribute(t.nsAttributeName(r),i)})},ke.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),Qs(e)},ke.prototype.addAttribute=function(e,t){var n=this.attrs;st(t)&&(t=Nm(t));var r=ed(n,function(o){return o.name.localName===e.localName&&o.name.uri===e.uri&&o.name.prefix===e.prefix}),i={name:e,value:t};r!==-1?n.splice(r,1,i):n.push(i)},ke.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=Am(n).concat(t)),ae(t,function(r){e.append(" ").append(Qs(r.name)).append('="').append(r.value).append('"')})},ke.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==nn;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),ae(this.body,function(r){r.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()};function Rr(e,t,n){ke.call(this,e,t),this.serialization=n}Zs(Rr,ke),Rr.prototype.parseNsAttributes=function(e){var t=ke.prototype.parseNsAttributes.call(this,e).filter(a=>a.name!==this.serialization),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var r=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var i=e.$model.getPackage(r.uri),o=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(this.serialization),(r.prefix?r.prefix+":":"")+o+n.ns.localName),t},Rr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function Bm(){this.value="",this.write=function(e){this.value+=e}}function Mm(e,t){var n=[""];this.append=function(r){return e.write(r),this},this.appendNewLine=function(){return t&&e.write(`
14
- `),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 Lm(e){e=ce({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new Bm,o=new Mm(i,e.format);e.preamble&&o.append(Em);var a=new ke,s=n.$model;if(a.getNamespaces().mapDefaultPrefixes(Fm(s)),a.build(n).serializeTo(o),!r)return i.value}return{toXML:t}}function Fm(e){const t=e.config&&e.config.nsMap||{},n={};for(const r in Ki)n[r]=Ki[r];for(const r in t){const i=t[r];n[i]=r}for(const r of e.getPackages())n[r.prefix]=r.uri;return n}function Tr(e,t){it.call(this,e,t)}Tr.prototype=Object.create(it.prototype),Tr.prototype.fromXML=function(e,t,n){st(t)||(n=t,t="bpmn:Definitions");var r=new Zi(ce({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)},Tr.prototype.toXML=function(e,t){var n=new Lm(t);return new Promise(function(r,i){try{var o=n.toXML(e);return r({xml:o})}catch(a){return i(a)}})};var $m="BPMN20",Vm="http://www.omg.org/spec/BPMN/20100524/MODEL",jm="bpmn",Um=[],zm=[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],Hm=[{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"}]}],Wm={tagAlias:"lowerCase",typePrefix:"t"},qm={name:$m,uri:Vm,prefix:jm,associations:Um,types:zm,enumerations:Hm,xml:Wm},Ym="BPMNDI",Km="http://www.omg.org/spec/BPMN/20100524/DI",Gm="bpmndi",Xm=[{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"]}],Jm=[{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"}]}],Zm=[],Qm={name:Ym,uri:Km,prefix:Gm,types:Xm,enumerations:Jm,associations:Zm},ey="DC",ty="http://www.omg.org/spec/DD/20100524/DC",ny="dc",ry=[{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}]}],iy=[],oy={name:ey,uri:ty,prefix:ny,types:ry,associations:iy},ay="DI",sy="http://www.omg.org/spec/DD/20100524/DI",ly="di",cy=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],uy=[],fy={tagAlias:"lowerCase"},dy={name:ay,uri:sy,prefix:ly,types:cy,associations:uy,xml:fy},py="bpmn.io colors for BPMN",hy="http://bpmn.io/schema/bpmn/biocolor/1.0",my="bioc",yy=[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],gy=[],vy=[],wy={name:py,uri:hy,prefix:my,types:yy,enumerations:gy,associations:vy},by="BPMN in Color",Ey="http://www.omg.org/spec/BPMN/non-normative/color/1.0",_y="color",xy=[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],Sy=[],Ay=[],ky={name:by,uri:Ey,prefix:_y,types:xy,enumerations:Sy,associations:Ay};const Cy={bpmn:qm,bpmndi:Qm,dc:oy,di:dy,bioc:wy,color:ky};function Ry(e,t){const n=ce({},Cy,e);return new Tr(n,t)}function He(e,t){return e.$instanceOf(t)}function Ty(e){return ot(e.rootElements,function(t){return He(t,"bpmn:Process")||He(t,"bpmn:Collaboration")})}function Py(e){var t={},n=[],r={};function i(k,N){return function(U){k(U,N)}}function o(k){t[k.id]=k}function a(k){return t[k.id]}function s(k,N){var U=k.gfx;if(U)throw new Error(`already rendered ${Le(k)}`);return e.element(k,r[k.id],N)}function c(k,N){return e.root(k,r[k.id],N)}function d(k,N){try{var U=r[k.id]&&s(k,N);return o(k),U}catch(ie){h(ie.message,{element:k,error:ie}),console.error(`failed to import ${Le(k)}`,ie)}}function h(k,N){e.error(k,N)}var m=this.registerDi=function(N){var U=N.bpmnElement;U?r[U.id]?h(`multiple DI elements defined for ${Le(U)}`,{element:U}):r[U.id]=N:h(`no bpmnElement referenced in ${Le(N)}`,{element:N})};function w(k){g(k.plane)}function g(k){m(k),ae(k.planeElement,I)}function I(k){m(k)}this.handleDefinitions=function(N,U){var ie=N.diagrams;if(U&&ie.indexOf(U)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!U&&ie&&ie.length&&(U=ie[0]),!U)throw new Error("no diagram to display");r={},w(U);var se=U.plane;if(!se)throw new Error(`no plane for ${Le(U)}`);var p=se.bpmnElement;if(!p)if(p=Ty(N),p)h(`correcting missing bpmnElement on ${Le(se)} to ${Le(p)}`),se.bpmnElement=p,m(se);else throw new Error("no process or collaboration to display");var f=c(p,se);if(He(p,"bpmn:Process")||He(p,"bpmn:SubProcess"))C(p,f);else if(He(p,"bpmn:Collaboration"))O(p,f),E(N.rootElements,f);else throw new Error(`unsupported bpmnElement for ${Le(se)}: ${Le(p)}`);B(n)};var B=this.handleDeferred=function(){for(var N;n.length;)N=n.shift(),N()};function C(k,N){Z(k,N),V(k.ioSpecification,N),_(k.artifacts,N),o(k)}function E(k,N){var U=un(k,function(ie){return!a(ie)&&He(ie,"bpmn:Process")&&ie.laneSets});U.forEach(i(C,N))}function P(k,N){d(k,N)}function y(k,N){ae(k,i(P,N))}function v(k,N){d(k,N)}function R(k,N){d(k,N)}function D(k,N){d(k,N)}function S(k,N){d(k,N)}function _(k,N){ae(k,function(U){He(U,"bpmn:Association")?n.push(function(){S(U,N)}):S(U,N)})}function V(k,N){k&&(ae(k.dataInputs,i(R,N)),ae(k.dataOutputs,i(D,N)))}var F=this.handleSubProcess=function(N,U){Z(N,U),_(N.artifacts,U)};function T(k,N){var U=d(k,N);He(k,"bpmn:SubProcess")&&F(k,U||N),He(k,"bpmn:Activity")&&V(k.ioSpecification,N),n.push(function(){ae(k.dataInputAssociations,i(v,N)),ae(k.dataOutputAssociations,i(v,N))})}function W(k,N){d(k,N)}function re(k,N){d(k,N)}function J(k,N){n.push(function(){var U=d(k,N);k.childLaneSet&&H(k.childLaneSet,U||N),j(k)})}function H(k,N){ae(k.lanes,i(J,N))}function Y(k,N){ae(k,i(H,N))}function Z(k,N){q(k.flowElements,N),k.laneSets&&Y(k.laneSets,N)}function q(k,N){ae(k,function(U){He(U,"bpmn:SequenceFlow")?n.push(function(){W(U,N)}):He(U,"bpmn:BoundaryEvent")?n.unshift(function(){T(U,N)}):He(U,"bpmn:FlowNode")?T(U,N):He(U,"bpmn:DataObject")||(He(U,"bpmn:DataStoreReference")||He(U,"bpmn:DataObjectReference")?re(U,N):h(`unrecognized flowElement ${Le(U)} in context ${Le(N&&N.businessObject)}`,{element:U,context:N}))})}function K(k,N){var U=d(k,N),ie=k.processRef;ie&&C(ie,U||N)}function O(k,N){ae(k.participants,i(K,N)),n.push(function(){y(k.messageFlows,N)}),_(k.artifacts,N)}function j(k){ae(k.flowNodeRef,function(N){var U=N.get("lanes");U&&U.push(k)})}}function Ny(e,t,n){var r,i,o,a,s=[];function c(d,h){var m={root:function(B,C){return r.add(B,C)},element:function(B,C,E){return r.add(B,C,E)},error:function(B,C){s.push({message:B,context:C})}},w=new Py(m);h=h||d.diagrams&&d.diagrams[0];var g=Dy(d,h);if(!g)throw new Error("no diagram to display");ae(g,function(B){w.handleDefinitions(d,B)});var I=h.plane.bpmnElement.id;o.setRootElement(o.findRoot(I+"_plane")||o.findRoot(I))}return new Promise(function(d,h){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),c(t,n),i.fire("import.render.complete",{error:a,warnings:s}),d({warnings:s})}catch(m){return m.warnings=s,h(m)}})}function Dy(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!ue(n,"bpmn:Process")&&!ue(n,"bpmn:Collaboration")&&(r=Iy(n));var i;ue(r,"bpmn:Collaboration")?i=r:i=ot(e.rootElements,function(d){if(ue(d,"bpmn:Collaboration"))return ot(d.participants,function(h){return h.processRef===r})});var o=[r];i&&(o=va(i.participants,function(d){return d.processRef}),o.push(i));var a=tl(o),s=[t],c=[n];return ae(e.diagrams,function(d){if(d.plane){var h=d.plane.bpmnElement;a.indexOf(h)!==-1&&c.indexOf(h)===-1&&(s.push(d),c.push(h))}}),s}}function tl(e){var t=[];return ae(e,function(n){n&&(t.push(n),t=t.concat(tl(n.flowElements)))}),t}function Iy(e){for(var t=e;t;){if(ue(t,"bpmn:Process"))return t;t=t.$parent}}var Oy='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',nl=Oy,rl={verticalAlign:"middle"},il={color:"#404040"},By={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},My={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},Ly={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},Fy='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+nl+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',ht;function $y(){ht=ut(Fy),Ge(ht,By),Ge(bt("svg",ht),rl),Ge(bt(".backdrop",ht),My),Ge(bt(".notice",ht),Ly),Ge(bt(".link",ht),il,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function Vy(){ht||($y(),Pi.bind(ht,".backdrop","click",function(e){document.body.removeChild(ht)})),document.body.appendChild(ht)}const Pr=5,ol="djs-outline-hidden";function Ne(e){e=ce({},Uy,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),Hy(this._container)}at(Ne,Lt),Ne.prototype.importXML=async function(t,n){const r=this;function i(a){return r.get("eventBus").createEvent(a)}let o=[];try{t=this._emit("import.parse.start",{xml:t})||t;let a;try{a=await this._moddle.fromXML(t,"bpmn:Definitions")}catch(w){throw this._emit("import.parse.complete",{error:w}),w}let s=a.rootElement;const c=a.references,d=a.warnings,h=a.elementsById;o=o.concat(d),s=this._emit("import.parse.complete",i({error:null,definitions:s,elementsById:h,references:c,warnings:o}))||s;const m=await this.importDefinitions(s,n);return o=o.concat(m.warnings),this._emit("import.done",{error:null,warnings:o}),{warnings:o}}catch(a){let s=a;throw o=o.concat(s.warnings||[]),Nr(s,o),s=jy(s),this._emit("import.done",{error:s,warnings:s.warnings}),s}},Ne.prototype.importDefinitions=async function(t,n){return this._setDefinitions(t),{warnings:(await this.open(n)).warnings}},Ne.prototype.open=async function(t){const n=this._definitions;let r=t;if(!n){const o=new Error("no XML imported");throw Nr(o,[]),o}if(typeof t=="string"&&(r=zy(n,t),!r)){const o=new Error("BPMNDiagram <"+t+"> not found");throw Nr(o,[]),o}try{this.clear()}catch(o){throw Nr(o,[]),o}const{warnings:i}=await Ny(this,n,r);return{warnings:i}},Ne.prototype.saveXML=async function(t){t=t||{};let n=this._definitions,r,i;try{if(!n)throw new Error("no definitions loaded");n=this._emit("saveXML.start",{definitions:n})||n,i=(await this._moddle.toXML(n,t)).xml,i=this._emit("saveXML.serialized",{xml:i})||i}catch(a){r=a}const o=r?{error:r}:{xml:i};if(this._emit("saveXML.done",o),r)throw r;return o},Ne.prototype.saveSVG=async function(){this._emit("saveSVG.start");let t,n;try{const r=this.get("canvas"),i=r.getActiveLayer(),o=bt(":scope > defs",r._svg),a=Ia(i),s=o?"<defs>"+Ia(o)+"</defs>":"",c=r.getContainer();Jt(c).add(ol);let d;try{d=i.getBBox()}finally{Jt(c).remove(ol)}const h=d.x-Pr,m=d.y-Pr,w=d.width+Pr*2,g=d.height+Pr*2;t=`<?xml version="1.0" encoding="utf-8"?>
1
+ (function(pe,oe){typeof exports=="object"&&typeof module<"u"?oe(exports,require("element-plus"),require("vue")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue"],oe):(pe=typeof globalThis<"u"?globalThis:pe||self,oe(pe.FlowstreamUIPlus={},pe.ElementPlus,pe.Vue))})(this,(function(pe,oe,s){"use strict";/*! Element Plus Icons Vue v2.3.2 */var Xl=s.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),Jl=Xl,Zl=s.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),Ql=Zl,ec=s.defineComponent({name:"Back",__name:"back",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),s.createElementVNode("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),_a=ec,tc=s.defineComponent({name:"Check",__name:"check",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),xa=tc,nc=s.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),s.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),rc=nc,ic=s.defineComponent({name:"Delete",__name:"delete",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),ac=ic,oc=s.defineComponent({name:"Document",__name:"document",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),sc=oc,lc=s.defineComponent({name:"Promotion",__name:"promotion",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),cc=lc,uc=s.defineComponent({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),Yn=uc,fc=s.defineComponent({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),Kn=fc,dc=s.defineComponent({name:"Switch",__name:"switch",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344M64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"})]))}}),Sa=dc,pc=s.defineComponent({name:"VideoPause",__name:"video-pause",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),hc=pc,mc=s.defineComponent({name:"VideoPlay",__name:"video-play",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),Aa=mc;const yc={key:1,"aria-hidden":"true"},gc=["href"],vc=s.defineComponent({name:"SvgIcon",inheritAttrs:!1,__name:"SvgIcon",props:{iconClass:{},className:{}},setup(e){const t=e,n={back:_a,delete:ac,save:sc,enable:Aa,start:Aa,hang:hc,restore:Kn,revocation:Yn,taskWithdraw:Yn,taskRecyle:Kn,terminate:rc,jump:Sa,taskJump:Sa,taskComplete:xa,taskSend:cc,taskRollback:_a,taskClaim:xa,turnBefore:Yn,taskTurnBefore:Yn,turnAfter:Kn,taskTurnAfter:Kn},r=s.computed(()=>n[t.iconClass]);return(i,a)=>(s.openBlock(),s.createElementBlock("span",s.mergeProps({class:"workflow-svg-icon"},i.$attrs),[r.value?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(r.value),{key:0})):(s.openBlock(),s.createElementBlock("svg",yc,[s.createElementVNode("use",{href:`#icon-${e.iconClass}`},null,8,gc)]))],16))}}),xt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},wc=xt(vc,[["__scopeId","data-v-7aad397e"]]),bc={class:"ui-flow-btn"},Ec=xt(s.defineComponent({name:"UiFlowButton",__name:"FlowButton",props:{type:{},label:{}},emits:["click"],setup(e,{emit:t}){const n=e,r=t,i=[{label:"保存",value:"save",icon:"save"},{label:"启动",value:"start",icon:"enable"},{label:"撤回",value:"revocation",icon:"taskWithdraw"},{label:"撤回",value:"taskWithdraw",icon:"taskWithdraw"},{label:"收回",value:"taskRecyle",icon:"taskRecyle"},{label:"挂起",value:"hang",icon:"hang"},{label:"恢复",value:"restore",icon:"restore"},{label:"恢复",value:"processActivate",icon:"restore"},{label:"终止",value:"terminate",icon:"terminate"},{label:"终止",value:"processTerminate",icon:"terminate"},{label:"挂起",value:"processSuspend",icon:"hang"},{label:"挂起",value:"processSupspend",icon:"hang"},{label:"跳转",value:"jump",icon:"jump"},{label:"跳转",value:"taskJump",icon:"jump"},{label:"办毕",value:"taskComplete",icon:"taskComplete"},{label:"发送",value:"taskSend",icon:"taskSend"},{label:"退回",value:"taskRollback",icon:"taskRollback"},{label:"拾取",value:"taskClaim",icon:"taskClaim"},{label:"前加签",value:"turnBefore",icon:"turnBefore"},{label:"前加签",value:"taskTurnBefore",icon:"turnBefore"},{label:"后加签",value:"turnAfter",icon:"turnAfter"},{label:"后加签",value:"taskTurnAfter",icon:"turnAfter"}],a=s.computed(()=>i.find(l=>l.value===n.type));function o(){var l;r("click",((l=a.value)==null?void 0:l.value)||n.type)}return(l,c)=>{const d=s.resolveComponent("el-button");return s.openBlock(),s.createElementBlock("span",bc,[a.value?(s.openBlock(),s.createBlock(d,{key:0,link:"",type:"primary",onClick:o},{default:s.withCtx(()=>[s.createVNode(wc,{"icon-class":a.value.icon},null,8,["icon-class"]),s.createTextVNode(" "+s.toDisplayString(e.label||a.value.label),1)]),_:1})):(s.openBlock(),s.createBlock(d,{key:1,link:"",type:"primary",onClick:o},{default:s.withCtx(()=>[s.renderSlot(l.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(e.label||e.type),1)],!0)]),_:3}))])}}}),[["__scopeId","data-v-12932ad8"]]);function ka(e,t){return function(){return e.apply(t,arguments)}}const{toString:_c}=Object.prototype,{getPrototypeOf:fn}=Object,{iterator:An,toStringTag:Ca}=Symbol,Gn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),kn=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Gn(n,t))return!0;n=fn(n)}return!1},xc=(e,t)=>e!=null&&kn(e,t)?e[t]:void 0,Wr=(e=>t=>{const n=_c.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),rt=e=>(e=e.toLowerCase(),t=>Wr(t)===e),Xn=e=>t=>typeof t===e,{isArray:Gt}=Array,Xt=Xn("undefined");function dn(e){return e!==null&&!Xt(e)&&e.constructor!==null&&!Xt(e.constructor)&&Ge(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ra=rt("ArrayBuffer");function Sc(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ra(e.buffer),t}const Ac=Xn("string"),Ge=Xn("function"),Ta=Xn("number"),pn=e=>e!==null&&typeof e=="object",kc=e=>e===!0||e===!1,Jn=e=>{if(!pn(e))return!1;const t=fn(e);return(t===null||t===Object.prototype||fn(t)===null)&&!kn(e,Ca)&&!kn(e,An)},Cc=e=>{if(!pn(e)||dn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Rc=rt("Date"),Tc=rt("File"),Nc=e=>!!(e&&typeof e.uri<"u"),Ic=e=>e&&typeof e.getParts<"u",Dc=rt("Blob"),Pc=rt("FileList"),Bc=rt("Set"),Oc=e=>pn(e)&&Ge(e.pipe);function Mc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Na=Mc(),Ia=typeof Na.FormData<"u"?Na.FormData:void 0,Lc=e=>{if(!e)return!1;if(Ia&&e instanceof Ia)return!0;const t=fn(e);if(!t||t===Object.prototype||!Ge(e.append))return!1;const n=Wr(e);return n==="formdata"||n==="object"&&Ge(e.toString)&&e.toString()==="[object FormData]"},Vc=rt("URLSearchParams"),[Fc,$c,Uc,jc]=["ReadableStream","Request","Response","Headers"].map(rt),zc=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Cn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Gt(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(dn(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let l;for(r=0;r<o;r++)l=a[r],t.call(null,e[l],l,e)}}function Da(e,t){if(dn(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Jt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Pa=e=>!Xt(e)&&e!==Jt;function qr(...e){const{caseless:t,skipUndefined:n}=Pa(this)&&this||{},r={},i=(a,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const l=t&&typeof o=="string"&&Da(r,o)||o,c=Gn(r,l)?r[l]:void 0;Jn(c)&&Jn(a)?r[l]=qr(c,a):Jn(a)?r[l]=qr({},a):Gt(a)?r[l]=a.slice():(!n||!Xt(a))&&(r[l]=a)};for(let a=0,o=e.length;a<o;a++){const l=e[a];if(!l||dn(l)||(Cn(l,i),typeof l!="object"||Gt(l)))continue;const c=Object.getOwnPropertySymbols(l);for(let d=0;d<c.length;d++){const p=c[d];tu.call(l,p)&&i(l[p],p)}}return r}const Hc=(e,t,n,{allOwnKeys:r}={})=>(Cn(t,(i,a)=>{n&&Ge(i)?Object.defineProperty(e,a,{__proto__:null,value:ka(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Wc=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qc=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Yc=(e,t,n,r)=>{let i,a,o;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&fn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Kc=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Gc=e=>{if(!e)return null;if(Gt(e))return e;let t=e.length;if(!Ta(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Xc=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&fn(Uint8Array)),Jc=(e,t)=>{const r=(e&&e[An]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Zc=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Qc=rt("HTMLFormElement"),eu=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:tu}=Object.prototype,nu=rt("RegExp"),Ba=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Cn(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},ru=e=>{Ba(e,(t,n)=>{if(Ge(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ge(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},iu=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Gt(e)?r(e):r(String(e).split(t)),n},au=()=>{},ou=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function su(e){return!!(e&&Ge(e.append)&&e[Ca]==="FormData"&&e[An])}const lu=e=>{const t=new WeakSet,n=r=>{if(pn(r)){if(t.has(r))return;if(dn(r))return r;if(!("toJSON"in r)){t.add(r);let i;if(Bc(r)){i=[];for(const a of r){const o=n(a);!Xt(o)&&i.push(o)}}else i=Gt(r)?[]:{},Cn(r,(a,o)=>{const l=n(a);!Xt(l)&&(i[o]=l)});return t.delete(r),i}}return r};return n(e)},cu=rt("AsyncFunction"),uu=e=>e&&(pn(e)||Ge(e))&&Ge(e.then)&&Ge(e.catch),Oa=((e,t)=>e?setImmediate:t?((n,r)=>(Jt.addEventListener("message",({source:i,data:a})=>{i===Jt&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Jt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ge(Jt.postMessage)),fu=typeof queueMicrotask<"u"?queueMicrotask.bind(Jt):typeof process<"u"&&process.nextTick||Oa,Ma=e=>e!=null&&Ge(e[An]),S={isArray:Gt,isArrayBuffer:Ra,isBuffer:dn,isFormData:Lc,isArrayBufferView:Sc,isString:Ac,isNumber:Ta,isBoolean:kc,isObject:pn,isPlainObject:Jn,isEmptyObject:Cc,isReadableStream:Fc,isRequest:$c,isResponse:Uc,isHeaders:jc,isUndefined:Xt,isDate:Rc,isFile:Tc,isReactNativeBlob:Nc,isReactNative:Ic,isBlob:Dc,isRegExp:nu,isFunction:Ge,isStream:Oc,isURLSearchParams:Vc,isTypedArray:Xc,isFileList:Pc,forEach:Cn,merge:qr,extend:Hc,trim:zc,stripBOM:Wc,inherits:qc,toFlatObject:Yc,kindOf:Wr,kindOfTest:rt,endsWith:Kc,toArray:Gc,forEachEntry:Jc,matchAll:Zc,isHTMLForm:Qc,hasOwnProperty:Gn,hasOwnProp:Gn,hasOwnInPrototypeChain:kn,getSafeProp:xc,reduceDescriptors:Ba,freezeMethods:ru,toObjectSet:iu,toCamelCase:eu,noop:au,toFiniteNumber:ou,findKey:Da,global:Jt,isContextDefined:Pa,isSpecCompliantForm:su,toJSONObject:lu,isAsyncFn:cu,isThenable:uu,setImmediate:Oa,asap:fu,isIterable:Ma,isSafeIterable:e=>e!=null&&kn(e,An)&&Ma(e)},du=S.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pu=e=>{const t={};let n,r,i;return e&&e.split(`
2
+ `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim();const l=S.hasOwnProp(t,n);!n||l&&S.hasOwnProp(du,n)||(n==="set-cookie"?l?t[n].push(r):t[n]=[r]:t[n]=l?t[n]+", "+r:r)}),t};function hu(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const mu=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),yu=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Yr(e,t){return S.isArray(e)?e.map(n=>Yr(n,t)):hu(String(e).replace(t,""))}const gu=e=>Yr(e,mu),vu=e=>Yr(e,yu);function La(e){const t=Object.create(null);return S.forEach(e.toJSON(),(n,r)=>{t[r]=vu(n)}),t}const Va=Symbol("internals");function Rn(e){return e&&String(e).trim().toLowerCase()}function Zn(e){return e===!1||e==null?e:S.isArray(e)?e.map(Zn):gu(String(e))}function wu(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const bu=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Kr(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function Eu(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function _u(e){const t=Object.create(null),n=String(e);let r=0,i=!1,a=!1;function o(l){const c=Kr(n.slice(r,l)),d=c.indexOf("=");if(d<1)return;const p=Kr(c.slice(0,d));if(!bu.test(p))return;const m=p.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const w=Kr(c.slice(d+1));t[m]=Eu(w)}for(let l=0;l<n.length;l++){const c=n.charCodeAt(l);i?a?a=!1:c===92?a=!0:c===34&&(i=!1):c===34?i=!0:(c===44||c===59)&&(o(l),r=l+1)}return o(n.length),t}const xu=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Gr(e,t,n,r,i){if(S.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!S.isString(t)){if(S.isString(r))return t.indexOf(r)!==-1;if(S.isRegExp(r))return r.test(t)}}function Su(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Au(e,t){const n=S.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}let ze=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(l,c,d){const p=Rn(c);if(!p)return;const m=S.findKey(i,p);(!m||i[m]===void 0||d===!0||d===void 0&&i[m]!==!1)&&(i[m||c]=Zn(l))}const o=(l,c)=>S.forEach(l,(d,p)=>a(d,p,c));if(S.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(S.isString(t)&&(t=t.trim())&&!xu(t))o(pu(t),n);else if(S.isObject(t)&&S.isSafeIterable(t)){let l=Object.create(null),c,d;for(const p of t){if(!S.isArray(p))throw new TypeError("Object iterator must return a key-value pair");d=p[0],S.hasOwnProp(l,d)?(c=l[d],l[d]=S.isArray(c)?[...c,p[1]]:[c,p[1]]):l[d]=p[1]}o(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Rn(t),t){const r=S.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return wu(i);if(S.isFunction(n))return n.call(this,i,r);if(S.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Rn(t),t){const r=S.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Gr(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Rn(o),o){const l=S.findKey(r,o);l&&(!n||Gr(r,r[l],l,n))&&(delete r[l],i=!0)}}return S.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||Gr(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return S.forEach(this,(i,a)=>{const o=S.findKey(r,a);if(o){n[o]=Zn(i),delete n[a];return}const l=t?Su(a):String(a).trim();l!==a&&delete n[a],n[l]=Zn(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return S.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&S.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}getSetCookie(){const t=this.get("set-cookie");return S.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return _u(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Va]=this[Va]={accessors:{}}).accessors,i=this.prototype;function a(o){const l=Rn(o);r[l]||(Au(i,o),r[l]=!0)}return S.isArray(t)?t.forEach(a):a(t),this}};ze.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),S.reduceDescriptors(ze.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),S.freezeMethods(ze);const Qn="[REDACTED ****]";function ku(e){if(S.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(S.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Cu(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],i=a=>{if(a===null||typeof a!="object"||S.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof ze&&(a=a.toJSON()),r.push(a);let o;if(S.isArray(a))o=[],a.forEach((l,c)=>{const d=i(l);S.isUndefined(d)||(o[c]=d)});else{if(!S.isPlainObject(a)&&ku(a))return r.pop(),a;o=Object.create(null);for(const[l,c]of Object.entries(a)){const d=n.has(l.toLowerCase())?Qn:i(c);S.isUndefined(d)||(o[l]=d)}}return r.pop(),o};return i(e)}function Fa(e){try{return String(e)}catch{return""}}function Ru(e){return e.errors.map(n=>{try{return n&&n.message?Fa(n.message):Fa(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let re=class Kl extends Error{static from(t,n,r,i,a,o){let l=t.message;!l&&S.isArray(t.errors)&&t.errors.length&&(l=Ru(t));const c=new Kl(l,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(t,n,r,i,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&S.hasOwnProp(t,"redact")?t.redact:void 0,r=S.isArray(n)&&n.length>0?Cu(t,n):S.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",re.ERR_BAD_OPTION="ERR_BAD_OPTION",re.ECONNABORTED="ECONNABORTED",re.ETIMEDOUT="ETIMEDOUT",re.ECONNREFUSED="ECONNREFUSED",re.ERR_NETWORK="ERR_NETWORK",re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",re.ERR_DEPRECATED="ERR_DEPRECATED",re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",re.ERR_BAD_REQUEST="ERR_BAD_REQUEST",re.ERR_CANCELED="ERR_CANCELED",re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",re.ERR_INVALID_URL="ERR_INVALID_URL",re.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Tu=null,$a=100;function Xr(e){return S.isPlainObject(e)||S.isArray(e)}function Ua(e){return S.endsWith(e,"[]")?e.slice(0,-2):e}function Jr(e,t,n){return e?e.concat(t).map(function(i,a){return i=Ua(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function Nu(e){return S.isArray(e)&&!e.some(Xr)}const Iu=S.toFlatObject(S,{},null,function(t){return/^is[A-Z]/.test(t)});function er(e,t,n){if(!S.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=S.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(R,y){return!S.isUndefined(y[R])});const r=n.metaTokens,i=n.visitor||M,a=n.dots,o=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?$a:n.maxDepth,d=l&&S.isSpecCompliantForm(t),p=[];if(!S.isFunction(i))throw new TypeError("visitor must be a function");function m(E){if(E===null)return"";if(S.isDate(E))return E.toISOString();if(S.isBoolean(E))return E.toString();if(!d&&S.isBlob(E))throw new re("Blob is not supported. Use a Buffer instead.");if(S.isArrayBuffer(E)||S.isTypedArray(E)){if(d&&typeof l=="function")return new l([E]);throw new re("Blob is not supported. Use a Buffer instead.",re.ERR_NOT_SUPPORT)}return E}function w(E){if(E>c)throw new re("Object is too deeply nested ("+E+" levels). Max depth: "+c,re.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(E,R){if(c===1/0)return JSON.stringify(E);const y=[];return JSON.stringify(E,function(k,D){if(!S.isObject(D))return D;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(D),w(R+y.length-1),D})}function M(E,R,y){let v=E;if(S.isReactNative(t)&&S.isReactNativeBlob(E))return t.append(Jr(y,R,a),m(E)),!1;if(E&&!y&&typeof E=="object"){if(S.endsWith(R,"{}"))R=r?R:R.slice(0,-2),E=g(E,1);else if(S.isArray(E)&&Nu(E)||(S.isFileList(E)||S.endsWith(R,"[]"))&&(v=S.toArray(E)))return R=Ua(R),v.forEach(function(D,x){!(S.isUndefined(D)||D===null)&&t.append(o===!0?Jr([R],x,a):o===null?R:R+"[]",m(D))}),!1}return Xr(E)?!0:(t.append(Jr(y,R,a),m(E)),!1)}const O=Object.assign(Iu,{defaultVisitor:M,convertValue:m,isVisitable:Xr});function N(E,R,y=0){if(!S.isUndefined(E)){if(w(y),p.indexOf(E)!==-1)throw new Error("Circular reference detected in "+R.join("."));p.push(E),S.forEach(E,function(k,D){(!(S.isUndefined(k)||k===null)&&i.call(t,k,S.isString(D)?D.trim():D,R,O))===!0&&N(k,R?R.concat(D):[D],y+1)}),p.pop()}}if(!S.isObject(e))throw new TypeError("data must be an object");return N(e),t}function ja(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Zr(e,t){this._pairs=[],e&&er(e,this,t)}const za=Zr.prototype;za.append=function(t,n){this._pairs.push([t,n])},za.toString=function(t){const n=t?r=>t.call(this,r,ja):ja;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Du(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ha(e,t,n){if(!t)return e;e=e||"";const r=S.isFunction(n)?{serialize:n}:n,i=S.getSafeProp(r,"encode")||Du,a=S.getSafeProp(r,"serialize");let o;if(a?o=a(t,r):o=S.isURLSearchParams(t)?t.toString():new Zr(t,r).toString(i),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Wa{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){S.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Qr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Pu={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Zr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ei=typeof window<"u"&&typeof document<"u",ti=typeof navigator=="object"&&navigator||void 0,Bu=ei&&(!ti||["ReactNative","NativeScript","NS"].indexOf(ti.product)<0),Ou=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Mu=ei&&window.location.href||"http://localhost",Fe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ei,hasStandardBrowserEnv:Bu,hasStandardBrowserWebWorkerEnv:Ou,navigator:ti,origin:Mu},Symbol.toStringTag,{value:"Module"})),...Pu};function Lu(e,t){return er(e,new Fe.classes.URLSearchParams,{visitor:function(n,r,i,a){return Fe.isNode&&S.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}const qa=$a;function Ya(e){if(e>qa)throw new re("FormData field is too deeply nested ("+e+" levels). Max depth: "+qa,re.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Vu(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Ya(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Fu(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Ka(e){function t(n,r,i,a){Ya(a);let o=n[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=a>=n.length;return o=!o&&S.isArray(i)?i.length:o,c?(S.hasOwnProp(i,o)?i[o]=S.isArray(i[o])?i[o].concat(r):[i[o],r]:i[o]=r,!l):((!S.hasOwnProp(i,o)||!S.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&S.isArray(i[o])&&(i[o]=Fu(i[o])),!l)}if(S.isFormData(e)&&S.isFunction(e.entries)){const n={};return S.forEachEntry(e,(r,i)=>{t(Vu(r),i,n,0)}),n}return null}const hn=(e,t)=>e!=null&&S.hasOwnProp(e,t)?e[t]:void 0;function $u(e,t,n){if(S.isString(e))try{return(t||JSON.parse)(e),S.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Tn={transitional:Qr,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=S.isObject(t);if(a&&S.isHTMLForm(t)&&(t=new FormData(t)),S.isFormData(t))return i?JSON.stringify(Ka(t)):t;if(S.isArrayBuffer(t)||S.isBuffer(t)||S.isStream(t)||S.isFile(t)||S.isBlob(t)||S.isReadableStream(t))return t;if(S.isArrayBufferView(t))return t.buffer;if(S.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const c=hn(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Lu(t,c).toString();if((l=S.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=hn(this,"env"),p=d&&d.FormData;return er(l?{"files[]":t}:t,p&&new p,c)}}return a||i?(n.setContentType("application/json",!1),$u(t)):t}],transformResponse:[function(t){const n=hn(this,"transitional")||Tn.transitional,r=n&&n.forcedJSONParsing,i=hn(this,"responseType"),a=i==="json";if(S.isResponse(t)||S.isReadableStream(t))return t;if(t&&S.isString(t)&&(r&&!i||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,hn(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?re.from(c,re.ERR_BAD_RESPONSE,this,null,hn(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};S.forEach(["delete","get","head","post","put","patch","query"],e=>{Tn.headers[e]={}});function ni(e,t){const n=this||Tn,r=t||n,i=ze.from(r.headers);let a=r.data;return S.forEach(e,function(l){a=l.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Ga(e){return!!(e&&e.__CANCEL__)}let Nn=class extends re{constructor(t,n,r){super(t??"canceled",re.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Xa(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new re("Request failed with status code "+n.status,n.status>=400&&n.status<500?re.ERR_BAD_REQUEST:re.ERR_BAD_RESPONSE,n.config,n.request,n))}function Uu(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function ju(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),p=r[a];o||(o=d),n[i]=c,r[i]=d;let m=a,w=0;for(;m!==i;)w+=n[m++],m=m%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),d-o<t)return;const g=p&&d-p;return g?Math.round(w*1e3/g):void 0}}function zu(e,t){let n=0,r=1e3/t,i,a;const o=(d,p=Date.now())=>{n=p,i=null,a&&(clearTimeout(a),a=null),e(...d)};return[(...d)=>{const p=Date.now(),m=p-n;m>=r?o(d,p):(i=d,a||(a=setTimeout(()=>{a=null,o(i)},r-m)))},()=>i&&o(i)]}const tr=(e,t,n=3)=>{let r=0;const i=ju(50,250);return zu(a=>{if(!a||typeof a.loaded!="number")return;const o=a.loaded,l=a.lengthComputable?a.total:void 0,c=Math.max(0,l!=null?Math.min(o,l):o),d=Math.max(0,c-r),p=i(d);r=Math.max(r,c);const m={loaded:c,total:l,progress:l?c/l:void 0,bytes:d,rate:p||void 0,estimated:p&&l?(l-c)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Ja=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Za=(e,t=S.asap)=>(...n)=>t(()=>e(...n)),Hu=Fe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Fe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Fe.origin),Fe.navigator&&/(msie|trident)/i.test(Fe.navigator.userAgent)):()=>!0,Wu=Fe.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];S.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),S.isString(r)&&l.push(`path=${r}`),S.isString(i)&&l.push(`domain=${i}`),a===!0&&l.push("secure"),S.isString(o)&&l.push(`SameSite=${o}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function qu(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Yu(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const Ku=/^https?:(?!\/\/)/i,Gu=/[\t\n\r]/g;function Xu(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Ju(e){return Xu(e).replace(Gu,"")}function Zu(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${Qn}`)}function Qu(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Qn}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Qn}`);return n===-1?i:`${i}#${Zu(t.slice(n+1))}`}function Qa(e,t){if(typeof e=="string"){const n=Ju(e);if(Ku.test(n))throw new re(`Invalid URL ${JSON.stringify(Qu(n))}: missing "//" after protocol`,re.ERR_INVALID_URL,t)}}function eo(e,t,n,r){Qa(t,r);let i=!qu(t);return e&&(i||n===!1)?(Qa(e,r),Yu(e,t)):t}const to=e=>e instanceof ze?{...e}:e,ef=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Zt(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,w,g){return S.isPlainObject(p)&&S.isPlainObject(m)?S.merge.call({caseless:g},p,m):S.isPlainObject(m)?S.merge({},m):S.isArray(m)?m.slice():m}function i(p,m,w,g){if(S.isUndefined(m)){if(!S.isUndefined(p))return r(void 0,p,w,g)}else return r(p,m,w,g)}function a(p,m){if(!S.isUndefined(m))return r(void 0,m)}function o(p,m){if(S.isUndefined(m)){if(!S.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=S.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!S.isUndefined(m))if(S.isPlainObject(m)){if(S.hasOwnProp(m,p))return m[p]}else return;const w=S.hasOwnProp(e,"transitional")?e.transitional:void 0;if(S.isPlainObject(w)&&S.hasOwnProp(w,p))return w[p]}function c(p,m,w){if(S.hasOwnProp(t,w))return r(p,m);if(S.hasOwnProp(e,w))return r(void 0,p)}const d={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(p,m,w)=>i(to(p),to(m),w,!0)};return S.forEach(ef({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const w=S.hasOwnProp(d,m)?d[m]:i,g=S.hasOwnProp(e,m)?e[m]:void 0,M=S.hasOwnProp(t,m)?t[m]:void 0,O=w(g,M,m);S.isUndefined(O)&&w!==c||(n[m]=O)}),S.hasOwnProp(t,"validateStatus")&&S.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(S.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const tf=["content-type","content-length"];function nf(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{tf.includes(r.toLowerCase())&&e.set(r,i)})}const rf=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function no(e){const t=Zt({},e),n=w=>S.hasOwnProp(t,w)?t[w]:void 0,r=n("data");let i=n("withXSRFToken");const a=n("xsrfHeaderName"),o=n("xsrfCookieName");let l=n("headers");const c=n("auth"),d=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=ze.from(l),t.url=Ha(eo(d,m,p,t),n("params"),n("paramsSerializer")),c){const w=S.getSafeProp(c,"username")||"",g=S.getSafeProp(c,"password")||"";try{l.set("Authorization","Basic "+btoa(w+":"+(g?rf(g):"")))}catch(M){throw re.from(M,re.ERR_BAD_OPTION_VALUE,e)}}if(S.isFormData(r)&&(Fe.hasStandardBrowserEnv||Fe.hasStandardBrowserWebWorkerEnv||S.isReactNative(r)?l.setContentType(void 0):S.isFunction(r.getHeaders)&&nf(l,r.getHeaders(),n("formDataHeaderPolicy"))),Fe.hasStandardBrowserEnv&&(S.isFunction(i)&&(i=i(t)),i===!0||i==null&&Hu(t.url))){const g=a&&o&&Wu.read(o);g&&l.set(a,g)}return t}const af=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=no(e);let a=i.data;const o=ze.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=i,p,m,w,g,M;function O(){g&&g(),M&&M(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let N=new XMLHttpRequest;N.open(i.method.toUpperCase(),i.url,!0),N.timeout=i.timeout;function E(){if(!N)return;const y=ze.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),k={data:!l||l==="text"||l==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:y,config:e,request:N};Xa(function(x){n(x),O()},function(x){r(x),O()},k),N=null}"onloadend"in N?N.onloadend=E:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.startsWith("file:"))||setTimeout(E)},N.onabort=function(){N&&(r(new re("Request aborted",re.ECONNABORTED,e,N)),O(),N=null)},N.onerror=function(v){const k=v&&v.message?v.message:"Network Error",D=new re(k,re.ERR_NETWORK,e,N);D.event=v||null,r(D),O(),N=null},N.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const k=i.transitional||Qr;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new re(v,k.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,N)),O(),N=null},a===void 0&&o.setContentType(null),"setRequestHeader"in N&&S.forEach(La(o),function(v,k){N.setRequestHeader(k,v)}),S.isUndefined(i.withCredentials)||(N.withCredentials=!!i.withCredentials),l&&l!=="json"&&(N.responseType=i.responseType),d&&([w,M]=tr(d,!0),N.addEventListener("progress",w)),c&&N.upload&&([m,g]=tr(c),N.upload.addEventListener("progress",m),N.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(p=y=>{N&&(r(!y||y.type?new Nn(null,e,N):y),N.abort(),O(),N=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const R=Uu(i.url);if(R&&!Fe.protocols.includes(R)){r(new re("Unsupported protocol "+R+":",re.ERR_BAD_REQUEST,e)),O();return}N.send(a||null)})},of=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(c){if(!r){r=!0,o();const d=c instanceof Error?c:this.reason;n.abort(d instanceof re?d:new Nn(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,i(new re(`timeout of ${t}ms exceeded`,re.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>{if(!r){if(c.aborted){i.call(c);return}c.addEventListener("abort",i,{once:!0})}});const{signal:l}=n;return l.unsubscribe=()=>S.asap(o),l},sf=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},lf=async function*(e,t){for await(const n of cf(e))yield*sf(n,t)},cf=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ro=(e,t,n,r)=>{const i=lf(e,t);let a=0,o,l=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:p}=await i.next();if(d){l(),c.close();return}let m=p.byteLength;if(n){let w=a+=m;n(w)}c.enqueue(new Uint8Array(p))}catch(d){throw l(d),d}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},io=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,ao=(e,t,n)=>t+2<n&&io(e.charCodeAt(t+1))&&io(e.charCodeAt(t+2)),oo=e=>e<=57?e-48:(e&223)-55,uf=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,ff=e=>e===9||e===10||e===12||e===13||e===32,df=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},pf=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},hf=e=>{const t=e.length;let n=0,r=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);if(o===37&&ao(e,a,t)&&(o=oo(e.charCodeAt(a+1))*16+oo(e.charCodeAt(a+2)),a+=2),!ff(o)){if(o===61){r++;continue}if(!uf(o)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?pf(e):df(n)},mf=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let o=0;for(let l=0,c=i.length;l<c;l++){const d=i.charCodeAt(l);if(d===37&&ao(i,l,c))o+=1,l+=2;else if(d<128)o+=1;else if(d<2048)o+=2;else if(d>=55296&&d<=56319&&l+1<c){const p=i.charCodeAt(l+1);p>=56320&&p<=57343?(o+=4,l++):o+=3}else o+=3}return o};function yf(e){const t=typeof e=="string"?e.indexOf("#"):-1;return mf(t===-1?e:e.slice(0,t),hf)}const ri="1.19.0",so=64*1024,{isFunction:nr}=S,gf=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),lo=e=>{if(!S.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},co=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vf=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},wf=e=>{const t=S.global!==void 0&&S.global!==null?S.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=S.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:a,Response:o}=e,l=i?nr(i):typeof fetch=="function",c=nr(a),d=nr(o);if(!l)return!1;const p=l&&nr(n),m=l&&(typeof r=="function"?(E=>R=>E.encode(R))(new r):async E=>new Uint8Array(await new a(E).arrayBuffer())),w=c&&p&&co(()=>{let E=!1;const R=new a(Fe.origin,{body:new n,method:"POST",get duplex(){return E=!0,"half"}}),y=R.headers.has("Content-Type");return R.body!=null&&R.body.cancel(),E&&!y}),g=d&&p&&co(()=>S.isReadableStream(new o("").body)),M={stream:g&&(E=>E.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!M[E]&&(M[E]=(R,y)=>{let v=R&&R[E];if(v)return v.call(R);throw new re(`Response type '${E}' is not supported`,re.ERR_NOT_SUPPORT,y)})});const O=async E=>{if(E==null)return 0;if(S.isBlob(E))return E.size;if(S.isSpecCompliantForm(E))return(await new a(Fe.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(S.isArrayBufferView(E)||S.isArrayBuffer(E))return E.byteLength;if(S.isURLSearchParams(E)&&(E=E+""),S.isString(E))return(await m(E)).byteLength},N=async(E,R)=>{const y=S.toFiniteNumber(E.getContentLength());return y??O(R)};return async E=>{let{url:R,method:y,data:v,signal:k,cancelToken:D,timeout:x,onDownloadProgress:_,onUploadProgress:j,responseType:$,headers:T,withCredentials:q="same-origin",fetchOptions:de,maxContentLength:J,maxBodyLength:K}=no(E);const Y=S.isNumber(J)&&J>-1,Z=S.isNumber(K)&&K>-1,W=le=>S.hasOwnProp(E,le)?E[le]:void 0;let G=i||fetch;$=$?($+"").toLowerCase():"text";let P=of([k,D&&D.toAbortSignal()],x),z=null;const C=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let I,H=null;const ie=()=>new re("Request body larger than maxBodyLength limit",re.ERR_BAD_REQUEST,E,z);try{let le;const h=W("auth");if(h){const ae=S.getSafeProp(h,"username")||"",F=S.getSafeProp(h,"password")||"";le={username:ae,password:F}}if(vf(R)){const ae=new URL(R,Fe.origin);if(!le&&(ae.username||ae.password)){const F=lo(ae.username),X=lo(ae.password);le={username:F,password:X}}(ae.username||ae.password)&&(ae.username="",ae.password="",R=ae.href)}if(le&&(T.delete("authorization"),T.set("Authorization","Basic "+btoa(gf((le.username||"")+":"+(le.password||""))))),Y&&typeof R=="string"&&R.startsWith("data:")&&yf(R)>J)throw new re("maxContentLength size of "+J+" exceeded",re.ERR_BAD_RESPONSE,E,z);if(Z&&y!=="get"&&y!=="head"){const ae=await O(v);if(typeof ae=="number"&&isFinite(ae)&&(I=ae,ae>K))throw ie()}const f=Z&&(S.isReadableStream(v)||S.isStream(v)),u=(ae,F,X)=>ro(ae,so,Q=>{if(Z&&Q>K)throw H=ie();F&&F(Q)},X);if(w&&y!=="get"&&y!=="head"&&(j||f)){if(I=I??await N(T,v),I!==0||f){let ae=new a(R,{method:"POST",body:v,duplex:"half"}),F;if(S.isFormData(v)&&(F=ae.headers.get("content-type"))&&T.setContentType(F),ae.body){const[X,Q]=j&&Ja(I,tr(Za(j)))||[];v=u(ae.body,X,Q)}}}else if(f&&!c&&p&&y!=="get"&&y!=="head")v=u(v);else if(f&&c&&!w&&y!=="get"&&y!=="head")throw new re("Stream request bodies are not supported by the current fetch implementation",re.ERR_NOT_SUPPORT,E,z);S.isString(q)||(q=q?"include":"omit");const b=c&&"credentials"in a.prototype;if(S.isFormData(v)){const ae=T.getContentType();ae&&/^multipart\/form-data/i.test(ae)&&!/boundary=/i.test(ae)&&T.delete("content-type")}T.set("User-Agent","axios/"+ri,!1);const A={...de,signal:P,method:y.toUpperCase(),headers:La(T.normalize()),body:v,duplex:"half",credentials:b?q:void 0};z=c&&new a(R,A);let U=await(c?G(z,de):G(R,A));const ee=ze.from(U.headers);if(Y){const ae=S.toFiniteNumber(ee.getContentLength());if(ae!=null&&ae>J)throw new re("maxContentLength size of "+J+" exceeded",re.ERR_BAD_RESPONSE,E,z)}const ye=g&&($==="stream"||$==="response");if(g&&U.body&&(_||Y||ye&&C)){const ae={};["status","statusText","headers"].forEach(be=>{ae[be]=U[be]});const F=S.toFiniteNumber(ee.getContentLength()),[X,Q]=_&&Ja(F,tr(Za(_),!0))||[];let me=0;const ve=be=>{if(Y&&(me=be,me>J))throw new re("maxContentLength size of "+J+" exceeded",re.ERR_BAD_RESPONSE,E,z);X&&X(be)};U=new o(ro(U.body,so,ve,()=>{Q&&Q(),C&&C()}),ae)}$=$||"text";let ge=await M[S.findKey(M,$)||"text"](U,E);if(Y&&!g&&!ye){let ae;if(ge!=null&&(typeof ge.byteLength=="number"?ae=ge.byteLength:typeof ge.size=="number"?ae=ge.size:typeof ge=="string"&&(ae=typeof r=="function"?new r().encode(ge).byteLength:ge.length)),typeof ae=="number"&&ae>J)throw new re("maxContentLength size of "+J+" exceeded",re.ERR_BAD_RESPONSE,E,z)}return!ye&&C&&C(),await new Promise((ae,F)=>{Xa(ae,F,{data:ge,headers:ze.from(U.headers),status:U.status,statusText:U.statusText,config:E,request:z})})}catch(le){if(C&&C(),P&&P.aborted&&P.reason instanceof re){const h=P.reason;throw h.config=E,z&&(h.request=z),le!==h&&Object.defineProperty(h,"cause",{__proto__:null,value:le,writable:!0,enumerable:!1,configurable:!0}),h}if(H)throw z&&!H.request&&(H.request=z),H;if(le instanceof re)throw z&&!le.request&&(le.request=z),le;if(le&&le.name==="TypeError"&&/Load failed|fetch/i.test(le.message)){const h=new re("Network Error",re.ERR_NETWORK,E,z,le&&le.response);throw Object.defineProperty(h,"cause",{__proto__:null,value:le.cause||le,writable:!0,enumerable:!1,configurable:!0}),h}throw re.from(le,le&&le.code,E,z,le&&le.response)}}},bf=new Map,uo=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,a=[r,i,n];let o=a.length,l=o,c,d,p=bf;for(;l--;)c=a[l],d=p.get(c),d===void 0&&p.set(c,d=l?new Map:wf(t)),p=d;return d};uo();const ii={http:Tu,xhr:af,fetch:{get:uo}};S.forEach(ii,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const fo=e=>`- ${e}`,Ef=e=>S.isFunction(e)||e===null||e===!1;function _f(e,t){e=S.isArray(e)?e:[e];const{length:n}=e;let r,i;const a={};for(let o=0;o<n;o++){r=e[o];let l;if(i=r,!Ef(r)&&(i=ii[(l=String(r)).toLowerCase()],i===void 0))throw new re(`Unknown adapter '${l}'`);if(i&&(S.isFunction(i)||(i=i.get(t))))break;a[l||"#"+o]=i}if(!i){const o=Object.entries(a).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=n?o.length>1?`since :
4
+ `+o.map(fo).join(`
5
+ `):" "+fo(o[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+l,re.ERR_NOT_SUPPORT)}return i}const po={getAdapter:_f,adapters:ii};function ai(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Nn(null,e)}function oi(e){return ai(e),e.headers=ze.from(e.headers),e.data=ni.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),po.getAdapter(e.adapter||Tn.adapter,e)(e).then(function(r){ai(e),e.response=r;try{r.data=ni.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=ze.from(r.headers),r},function(r){if(!Ga(r)&&(ai(e),r&&r.response)){e.response=r.response;try{r.response.data=ni.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=ze.from(r.response.headers)}return Promise.reject(r)})}const rr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ho={};rr.transitional=function(t,n,r){function i(a,o){return"[Axios v"+ri+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,l)=>{if(t===!1)throw new re(i(o," has been removed"+(n?" in "+n:"")),re.ERR_DEPRECATED);return n&&!ho[o]&&(ho[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,l):!0}},rr.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function xf(e,t,n){if(typeof e!="object"||e===null)throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){const l=e[a],c=l===void 0||o(l,a,e);if(c!==!0)throw new re("option "+a+" must be "+c,re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new re("Unknown option "+a,re.ERR_BAD_OPTION)}}const ir={assertOptions:xf,validators:rr},He=ir.validators;let Qt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Wa,response:new Wa}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=(()=>{if(!i.stack)return"";const o=i.stack.indexOf(`
6
+ `);return o===-1?"":i.stack.slice(o+1)})();try{if(!r.stack)r.stack=a;else if(a){const o=a.indexOf(`
7
+ `),l=o===-1?-1:a.indexOf(`
8
+ `,o+1),c=l===-1?"":a.slice(l+1);String(r.stack).endsWith(c)||(r.stack+=`
9
+ `+a)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&ir.assertOptions(r,{silentJSONParsing:He.transitional(He.boolean),forcedJSONParsing:He.transitional(He.boolean),clarifyTimeoutError:He.transitional(He.boolean),legacyInterceptorReqResOrdering:He.transitional(He.boolean),advertiseZstdAcceptEncoding:He.transitional(He.boolean),validateStatusUndefinedResolves:He.transitional(He.boolean)},!1),i!=null&&(S.isFunction(i)?n.paramsSerializer={serialize:i}:ir.assertOptions(i,{encode:He.function,serialize:He.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ir.assertOptions(n,{baseUrl:He.spelling("baseURL"),withXsrfToken:He.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&S.merge(a.common,a[n.method]);a&&S.forEach(["delete","get","head","post","put","patch","query","common"],M=>{delete a[M]}),n.headers=ze.concat(o,a);const l=[];let c=!0;this.interceptors.request.forEach(function(O){if(typeof O.runWhen=="function"&&O.runWhen(n)===!1)return;c=c&&O.synchronous;const N=n.transitional||Qr;N&&N.legacyInterceptorReqResOrdering?l.unshift(O.fulfilled,O.rejected):l.push(O.fulfilled,O.rejected)});const d=[];this.interceptors.response.forEach(function(O){d.push(O.fulfilled,O.rejected)});let p,m=0,w;if(!c){const M=[oi.bind(this),void 0];for(M.unshift(...l),M.push(...d),w=M.length,p=Promise.resolve(n);m<w;)p=p.then(M[m++],M[m++]);return p}w=l.length;let g=n;for(;m<w;){const M=l[m++],O=l[m++];try{g=M?M(g):g}catch(N){if(!O){p=Promise.reject(N);break}try{const E=O.call(this,N);S.isThenable(E)&&(p=Promise.resolve(E).then(()=>oi.call(this,g)))}catch(E){p=Promise.reject(E)}break}}if(!p)try{p=oi.call(this,g)}catch(M){p=Promise.reject(M)}for(m=0,w=d.length;m<w;)p=p.then(d[m++],d[m++]);return p}getUri(t){t=Zt(this.defaults,t);const n=eo(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Ha(n,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){Qt.prototype[t]=function(n,r){return this.request(Zt(r||{},{method:t,url:n,data:r&&S.hasOwnProp(r,"data")?r.data:void 0}))}}),S.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,o,l){return this.request(Zt(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Qt.prototype[t]=n(),t!=="query"&&(Qt.prototype[t+"Form"]=n(!0))});let Sf=class Gl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(l=>{r.subscribe(l),a=l}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,l){r.reason||(r.reason=new Nn(a,o,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Gl(function(i){t=i}),cancel:t}}};function Af(e){return function(n){return e.apply(null,n)}}function kf(e){return S.isObject(e)&&e.isAxiosError===!0}const si={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(si).forEach(([e,t])=>{si[t]=e});function mo(e){const t=new Qt(e),n=ka(Qt.prototype.request,t);return S.extend(n,Qt.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return mo(Zt(e,i))},n}const Be=mo(Tn);Be.Axios=Qt,Be.CanceledError=Nn,Be.CancelToken=Sf,Be.isCancel=Ga,Be.VERSION=ri,Be.toFormData=er,Be.AxiosError=re,Be.Cancel=Be.CanceledError,Be.all=function(t){return Promise.all(t)},Be.spread=Af,Be.isAxiosError=kf,Be.mergeConfig=Zt,Be.AxiosHeaders=ze,Be.formToJSON=e=>Ka(S.isHTMLForm(e)?new FormData(e):e),Be.getAdapter=po.getAdapter,Be.HttpStatusCode=si,Be.default=Be;const{Axios:Gg,AxiosError:Xg,CanceledError:Jg,isCancel:Zg,CancelToken:Qg,VERSION:e0,all:t0,Cancel:n0,isAxiosError:r0,spread:i0,toFormData:a0,AxiosHeaders:o0,HttpStatusCode:s0,formToJSON:l0,getAdapter:c0,mergeConfig:u0,create:f0}=Be,St={baseURL:"",timeout:6e4,getToken:void 0};function yo(e={}){e.baseURL!==void 0&&(St.baseURL=e.baseURL),e.timeout!==void 0&&(St.timeout=e.timeout),e.getToken!==void 0&&(St.getToken=e.getToken)}const Cf="";function Rf(e){return(e||"").replace(/\/$/,"")||Cf}const ar=Be.create({timeout:St.timeout});ar.interceptors.request.use(e=>{var n;e.baseURL=Rf(St.baseURL||e.baseURL),e.timeout=St.timeout;const t=(n=St.getToken)==null?void 0:n.call(St);return t&&(e.headers.Authorization=t),e}),ar.interceptors.response.use(e=>{const t=e.config,n=e.data;return t.responseType==="blob"?e:t.noCode?n:n&&![0,200].includes(n.code)?Promise.reject(new Error(n.msg||n.message||"服务错误")):n},e=>Promise.reject(e));function xe(e){return ar.request(e)}const go=e=>xe({url:"/server/repository/flowdef/event/latest",method:"post",data:e}),li=e=>xe({url:"/server/app/event/list",method:"get",data:e}),ci=e=>xe({url:"/server/repository/flowdef/event/query",method:"post",data:e}),ui=(e,t)=>xe({url:`/console/plugin/simulate/event/page/draft/${e.currentPage}/${e.pageSize}`,method:"post",data:t}),vo=e=>xe({url:"/console/plugin/simulate/event/delete",method:"post",data:e}),wo=e=>xe({url:"/console/plugin/simulate",method:"post",data:e}),bo=e=>xe({url:"/server/runtime/event/start",method:"post",data:e}),fi=e=>xe({url:"/server/runtime/event/quickStart",method:"post",data:e}),or=e=>xe({url:"/server/runtime/event/delete",method:"post",data:e}),Eo=e=>xe({url:"/server/runtime/event/messageEventReceived",method:"post",data:e}),sr=e=>xe({url:"/server/work/event/query",method:"post",data:e}),di=e=>xe({url:"/server/history/workinst/event/query",method:"post",data:e}),pi=e=>xe({url:"/server/operate/def/event/get",method:"post",data:e}),hi=e=>xe({url:"/server/task/event/claim",method:"post",data:e}),mi=e=>xe({url:"/server/task/event/withdraw",method:"post",data:e}),yi=e=>xe({url:"/server/task/event/rollback",method:"post",data:e}),gi=e=>xe({url:"/server/task/event/recyle",method:"post",data:e}),vi=e=>xe({url:"/server/task/event/complete",method:"post",data:e}),wi=e=>xe({url:"/server/task/event/turnBefore",method:"post",data:e}),bi=e=>xe({url:"/server/task/event/turnAfter",method:"post",data:e}),Ei=e=>xe({url:"/server/runtime/event/suspend",method:"post",data:e}),_i=e=>xe({url:"/server/runtime/event/activate",method:"post",data:e}),xi=e=>xe({url:"/server/runtime/event/terminate",method:"post",data:e}),lr=e=>xe({url:`/console/flowdef/event/download/procdefId/${e.procdefId}/extname/bpmn`,method:"get",noCode:!0}),Si=e=>xe({url:"/server/task/event/send",method:"post",data:e}),Ai=e=>xe({url:"/server/task/event/checkSend",method:"post",data:e}),cr=e=>xe({url:"/server/model/event/get/firsthandle",method:"post",data:e}),_o=cr,ur=e=>xe({url:"/server/assignment/event/query",method:"post",data:e}),ki=(e="")=>xe({url:`/console/plugin/identify/usertree/organ/event/tree/${e}`,method:"get"}),Ci=e=>xe({url:"/server/model/event/get/succeding",method:"post",data:e}),Ri=e=>xe({url:"/server/task/event/jump",method:"post",data:e}),Ti=e=>xe({url:"/server/model/event/get/usertasks",method:"post",data:e}),Tf=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:_i,checkSend:Ai,claimTask:hi,completeTask:vi,deleteDraftTask:vo,deleteProcessInstance:or,doneTaskList:di,downloadBpmn:lr,draftFlowList:go,draftTaskList:ui,flowStartNodeList:_o,getAppList:li,getFirstHandleNodes:cr,getFlowList:ci,getOptList:pi,jumpTask:Ri,nextSendNode:Ci,nodeAssistant:ur,organUserTree:ki,quickStart:fi,receiveMessageEvent:Eo,recycleTask:gi,revocationTask:mi,rollbackTask:yi,saveDraft:wo,sendTask:Si,startDraft:bo,startNodes:Ti,suspendFlow:Ei,terminateFlow:xi,todoTaskList:sr,turnAfterTask:bi,turnBeforeTask:wi},Symbol.toStringTag,{value:"Module"})),xo=3e3;function In(e){if(e!==void 0)return e;if(typeof window>"u"||typeof document>"u")return xo;let t=xo-2;return document.querySelectorAll([".ui-overlay",".ui-overlay-message-box",".ui-modal",".el-overlay",".el-overlay-message-box"].join(",")).forEach(r=>{const i=Number.parseInt(window.getComputedStyle(r).zIndex,10);Number.isFinite(i)&&(t=Math.max(t,i))}),t+2}const Nf={class:"ui-flow-jump"},If={class:"dialog-footer"},So=xt(s.defineComponent({name:"UiFlowJump",__name:"FlowJump",props:{processDefinitionId:{},workId:{default:""},processInstanceId:{default:""},dealUser:{default:()=>({})},assignmentQueryParams:{default:()=>({})},modelValue:{type:Boolean,default:!1},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"跳转"},dialogWidth:{default:"960px"},zIndex:{}},emits:["update:modelValue","click","open","close","beforeJump","afterJump","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,a=s.ref(!1),o=s.ref(),l=s.ref(!1),c=s.ref(!1),d=s.ref(!1),p=s.ref([]),m=s.ref([]),w=s.ref(""),g=s.ref(""),M=new Map;let O=0;const N=s.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),E=s.computed(()=>String(r.dealUser.name||N.value)),R={children:"children",label:"label",value:"value",disabled:"disabled",isLeaf:P=>P.hasChild===!1};function y(P){return P?String(P.id||P.activityId||""):""}function v(P){return P?String(P.activityName||P.name||P.id||P.activityId||""):""}function k(P){return Array.isArray(P)?P.map(z=>{const C=z||{},I=y(C);return{...C,id:I,name:v(C)}}).filter(z=>z.id):[]}function D(P){return P.map(z=>{const C=z||{},I=String(C.id||C.userId||""),H=String(C.ntype||"").trim().toLowerCase(),ie=Array.isArray(C.childs)?C.childs:Array.isArray(C.children)?C.children:void 0,le=String(C.caption||C.name||C.id||C.userId||"");return I&&H==="user"&&M.set(I,le||I),{...C,id:I,value:I,label:le,caption:le,ntype:H,hasChild:!!(C.hasChild||ie!=null&&ie.length),disabled:H!=="user",children:ie?D(ie):void 0}}).filter(z=>z.id)}function x(){return N.value?(M.set(N.value,E.value),[{id:N.value,value:N.value,label:E.value,caption:E.value,name:E.value,ntype:"user",hasChild:!1,disabled:!1}]):[]}async function _(){const P=String(r.processDefinitionId||""),z=++O;if(!P)return p.value=[],p.value;c.value=!0;try{const C=await Ti({processDefinitionId:P}),I=k(C==null?void 0:C.data);return z!==O||P!==String(r.processDefinitionId||"")?I:(p.value=I,p.value)}catch(C){throw z===O&&(p.value=[]),i("error",C),C}finally{z===O&&(c.value=!1)}}async function j(P="",z){const C=await ur({processDefinitionId:String(r.processDefinitionId),processInstanceId:String(r.processInstanceId||""),activityId:w.value,ntype:z||"",parentId:P,userId:N.value,extendParams:{...r.assignmentQueryParams}});return D(Array.isArray(C.data)?C.data:[])}async function $(){if(m.value=[],g.value="",M.clear(),!w.value)return[];d.value=!0;try{const P=await j();m.value=P.length?P:x()}catch{m.value=x()}finally{d.value=!1}return m.value.length===1&&m.value[0].ntype==="user"&&(g.value=m.value[0].id),m.value}async function T(P,z){if(P.level===0){z(m.value);return}if(P.data.hasChild===!1||P.data.ntype==="user"){z([]);return}if(Array.isArray(P.data.children)&&P.data.children.length){z(P.data.children);return}try{const C=await j(String(P.data.id),String(P.data.ntype||""));z(C)}catch(C){i("error",C),z([])}}async function q(){await $()}function de(P,z){const C=P?y(P):w.value,I=String(z||g.value||N.value),H=M.get(I)||(I===N.value?E.value:I);return{workId:r.workId,flowNodeAssignee:{activityId:C,assignees:[{name:H,userId:I}]},variables:{}}}async function J(P){const z=P||de();i("beforeJump",z),l.value=!0;try{const C=await Ri(z);return i("afterJump",C,z),C}catch(C){throw i("error",C),C}finally{l.value=!1}}async function K(){if(!r.workId){oe.ElMessage.warning("当前任务缺少 workId,无法执行跳转");return}if(!w.value){oe.ElMessage.warning("请选择开始节点");return}if(!g.value){oe.ElMessage.warning("请选择办理人");return}try{await J(),a.value=!1,oe.ElMessage.success("跳转任务成功")}catch{}}async function Y(){o.value=In(r.zIndex),a.value=!0,w.value="",g.value="",m.value=[],i("open");try{await _()}catch{}}function Z(){a.value=!1}function W(){i("close")}function G(){i("click"),Y()}return s.watch(()=>r.modelValue,P=>{P&&!a.value&&Y(),!P&&a.value&&(a.value=!1)}),s.watch(a,P=>i("update:modelValue",P)),s.watch(()=>r.processDefinitionId,()=>{w.value="",g.value="",m.value=[],r.processDefinitionId?_().catch(()=>{}):p.value=[]}),s.watch(N,()=>{a.value&&w.value&&$()}),s.onMounted(()=>{r.modelValue?Y():r.processDefinitionId&&_().catch(()=>{})}),t({visible:a,effectiveZIndex:o,loading:l,nodeLoading:c,assigneeLoading:d,startNodeList:p,selectedActivityId:w,selectedAssigneeId:g,open:Y,close:Z,getStartNodes:_,assembleData:de,jump:J}),(P,z)=>{const C=s.resolveComponent("el-button"),I=s.resolveComponent("el-option"),H=s.resolveComponent("el-select"),ie=s.resolveComponent("el-form-item"),le=s.resolveComponent("el-tree-select"),h=s.resolveComponent("el-form"),f=s.resolveComponent("el-dialog");return s.openBlock(),s.createElementBlock("div",Nf,[e.showTrigger?(s.openBlock(),s.createBlock(C,{key:0,type:"primary",loading:l.value,onClick:G},{default:s.withCtx(()=>[s.renderSlot(P.$slots,"default",{},()=>[z[3]||(z[3]=s.createTextVNode("跳转",-1))],!0)]),_:3},8,["loading"])):s.createCommentVNode("",!0),s.createVNode(f,{modelValue:a.value,"onUpdate:modelValue":z[2]||(z[2]=u=>a.value=u),"append-to-body":"",class:"ui-flow-jump-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":o.value,onClosed:W},{footer:s.withCtx(()=>[s.createElementVNode("div",If,[s.createVNode(C,{type:"primary",loading:l.value,onClick:K},{default:s.withCtx(()=>[...z[4]||(z[4]=[s.createTextVNode("确认",-1)])]),_:1},8,["loading"]),s.createVNode(C,{disabled:l.value,onClick:Z},{default:s.withCtx(()=>[...z[5]||(z[5]=[s.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:s.withCtx(()=>[s.createVNode(h,{class:"jump-form","label-width":"108px"},{default:s.withCtx(()=>[s.createVNode(ie,{label:"开始节点",required:""},{default:s.withCtx(()=>[s.createVNode(H,{modelValue:w.value,"onUpdate:modelValue":z[0]||(z[0]=u=>w.value=u),clearable:"",filterable:"",loading:c.value,teleported:!1,placeholder:"请选择",style:{width:"100%"},onChange:q},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(p.value,u=>(s.openBlock(),s.createBlock(I,{key:y(u),label:v(u),value:y(u)},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),s.createVNode(ie,{label:"办理人",required:""},{default:s.withCtx(()=>[s.createVNode(le,{modelValue:g.value,"onUpdate:modelValue":z[1]||(z[1]=u=>g.value=u),"check-strictly":"",clearable:"",data:m.value,disabled:!w.value,load:T,loading:d.value,props:R,lazy:"","node-key":"id",teleported:!1,placeholder:"请选择","render-after-expand":!1,style:{width:"100%"}},null,8,["modelValue","data","disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-7e1ac0e2"]]),Df={class:"ui-flow-send"},Pf={class:"send-panel"},Bf={class:"current-activity"},Of={class:"node-groups"},Mf=["onClick"],Lf={class:"group-name"},Vf={class:"group-deal-type"},Ff={class:"send-center"},$f={class:"assignee-transfer"},Uf={class:"assignee-box"},jf={class:"tree-node"},zf={key:1,class:"candidate-list"},Hf={class:"assignee-box selected-list"},Wf={key:0,class:"node-state"},qf={class:"parameter-operation-header"},Yf={class:"variable-footer"},Kf={class:"parameter-operation-header"},Gf={class:"opinion-panel"},Xf={class:"dialog-footer"},Ni=xt(s.defineComponent({name:"UiFlowSend",__name:"FlowSend",props:{processDefinitionId:{},activity:{},workId:{},processInstanceId:{default:""},variables:{default:()=>({})},assignmentQueryParams:{default:()=>({})},dealUser:{default:()=>({})},bpmnXml:{default:""},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},zIndex:{},defaultOpinion:{default:""},modelValue:{type:Boolean,default:!1},forceSingleAssignee:{type:Boolean,default:!1},deleteInstanceOnCancel:{type:Boolean,default:!1}},emits:["update:modelValue","click","open","close","nextNodesResolved","beforeSend","afterSend","error"],setup(e,{expose:t,emit:n}){let r=0;const i={signle:"单人单办",single:"单人单办",candidategroups:"群组单办",candidateusers:"多人单办",multiparallel:"多人并行",multisequential:"多人顺序",auto:"自动触发"},a=e,o=n,l=s.ref(!1),c=s.ref(),d=s.ref(!1),p=s.ref(!1),m=s.ref(!1),w=s.ref(!1),g=s.ref(!1),M=s.ref([]),O=s.ref([]),N=s.ref([]),E=s.ref([]),R=s.ref([]),y=s.ref(!1),v=s.ref(""),k=s.ref("nextNode"),D=s.ref(""),x=s.ref([]),_=s.ref([]),j=s.ref({}),$=s.ref(!1),T=s.ref(0),q=s.ref(),de=s.ref(!1),J=[{label:"Boolean",value:"boolean"},{label:"Short",value:"short"},{label:"Integer",value:"integer"},{label:"Long",value:"long"},{label:"Double",value:"double"},{label:"String",value:"string"},{label:"Date",value:"date"}],K={children:"childs",label:"caption",isLeaf:L=>L.hasChild===!1},Y=s.computed(()=>String(a.dealUser.userId||a.dealUser.id||"")),Z=s.computed(()=>O.value.find(L=>W(L)===v.value));function W(L){return L?String(L.id||L.activityId||""):""}function G(L){return["userTask","USER_TASK"].includes(String(L.flowElementType||""))}function P(L){return`${L.activity}:${L.id}`}function z(L){return typeof L=="boolean"?"boolean":typeof L=="number"?Number.isInteger(L)?"integer":"double":L instanceof Date?"date":"string"}function C(){x.value=Object.entries(a.variables).map(([L,V])=>({variableName:L,variableType:z(V),variableValue:V})),$.value=!1}function I(L,V){return L==null?"":["boolean","short","integer","long","double"].includes(V)?String(L):typeof L=="string"?L:JSON.stringify(L)}function H(){j.value={...a.assignmentQueryParams},_.value=Object.entries(a.assignmentQueryParams).map(([L,V])=>{const ne=z(V);return{variableName:L,variableType:ne,variableValue:I(V,ne)}})}function ie(){return x.value.reduce((L,V)=>(V.variableName&&(L[V.variableName]=V.variableValue),L),{})}function le(L,V,ne){if(L===""||L===null||L===void 0)return null;if(V==="boolean")return L===!0||String(L).toLowerCase()==="true";if(["short","integer","long"].includes(V)){const B=Number.parseInt(String(L),10);if(Number.isNaN(B))throw new Error(`第 ${ne+1} 行请输入有效的整数`);return B}if(V==="double"){const B=Number.parseFloat(String(L));if(Number.isNaN(B))throw new Error(`第 ${ne+1} 行请输入有效的数字`);return B}return L}function h(){const L={},V=new Set;return _.value.forEach((ne,B)=>{const ce=String(ne.variableName||"").trim();if(!ce)throw new Error(`第 ${B+1} 行请输入参数名称`);if(!ne.variableType)throw new Error(`第 ${B+1} 行请选择参数类型`);if(V.has(ce))throw new Error(`参数名称 ${ce} 不能重复`);V.add(ce),L[ce]=le(ne.variableValue,ne.variableType,B)}),L}function f({refresh:L=!0}={}){let V;try{V=h()}catch(ne){return oe.ElMessage.warning(ne instanceof Error?ne.message:"扩展参数格式不正确"),s.nextTick(()=>{k.value="extendParams"}),{valid:!1,changed:!1}}return JSON.stringify(V)===JSON.stringify(j.value)?{valid:!0,changed:!1}:(j.value=V,R.value=[],L&&Z.value&&(N.value=[],E.value=[],y.value=!1,F(Z.value).catch(()=>{})),{valid:!0,changed:!0})}function u(){v.value="",M.value=[],O.value=[],N.value=[],E.value=[],R.value=[],y.value=!1}function b(L){if(!a.bpmnXml||!L||typeof DOMParser>"u")return;const V=new DOMParser().parseFromString(a.bpmnXml,"text/xml");return Array.from(V.getElementsByTagName("*")).find(ne=>ne.getAttribute("id")===L)}function A(L){if(a.forceSingleAssignee)return!0;const V=b(L);if(!V)return!0;if(Array.from(V.children||[]).some(_t=>_t.localName==="multiInstanceLoopCharacteristics"))return!1;const B=["assigneUser","candidateUser"],ce=Array.from(V.getElementsByTagName("*")).filter(_t=>_t.localName==="properties"&&B.includes(_t.getAttribute("type")||"")).flatMap(_t=>Array.from(_t.getElementsByTagName("*")).filter(Hr=>Hr.localName==="property"));if(ce.some(_t=>{const Hr=_t.getAttribute("assignType");return!!(Hr&&Hr!=="user")}))return!1;const ke=ce.map(_t=>_t.getAttribute("value")).filter(Boolean),ct=V.getAttribute("camunda:assignee")||"";return ct&&!ct.includes("${")&&ke.push(...ct.split(",").filter(Boolean)),new Set(ke).size<=1}function U(L){var V;return((V=O.value.find(ne=>W(ne)===L))==null?void 0:V.isSingleAssignee)!==!1}function ee(L){return String(L||"").trim().toLowerCase()}function ye(L){if(a.forceSingleAssignee)return!0;const V=ee(L.dealType);return V?["signle","single"].includes(V):A(W(L))}function ge(L){const V=O.value.find(ne=>W(ne)===L);return V?String(i[ee(V.dealType)]||(V.isSingleAssignee?"单人单办":"多人办理")):""}function ae(L,V){const ne=W(V),B=String(V.activityName||V.name||ne);return L.map(ce=>{const ke=ce||{},ct=String(ke.ntype||"").trim().toLowerCase();return{...ke,id:String(ke.id||""),caption:String(ke.caption||ke.name||ke.id||""),ntype:ct,hasChild:ke.hasChild,activity:ne,activityName:B,disabled:ct!=="user",childs:Array.isArray(ke.childs)?ae(ke.childs,V):void 0}})}async function F(L,V="",ne=""){g.value=!0;try{const B=await ur({processDefinitionId:String(a.processDefinitionId),processInstanceId:String(a.processInstanceId||""),activityId:W(L),parentId:V,ntype:ne,userId:Y.value,extendParams:{...j.value}}),ce=ae(Array.isArray(B.data)?B.data:[],L);return V?ce:v.value!==W(L)?[]:(y.value=ce.some(ke=>ke.ntype!=="user"),y.value?(E.value=ce,N.value=[],await s.nextTick(),Ne(ce)):(E.value=[],N.value=ce),ce)}catch(B){throw o("error",B),B}finally{g.value=!1}}async function X(L,V){if(L.level===0){V(E.value);return}if(L.data.hasChild===!1||!Z.value){V([]);return}if(Array.isArray(L.data.childs)&&L.data.childs.length){V(L.data.childs),await s.nextTick(),Ne(L.data.childs);return}try{const ne=await F(Z.value,String(L.data.id),String(L.data.ntype||""));V(ne),await s.nextTick(),Ne(ne)}catch{V([])}}async function Q(L=ie()){const V=++T.value;m.value=!0,w.value=!1,u();try{const ne=await Ci({processDefinitionId:a.processDefinitionId,activityId:a.activity.activityId,processInstanceId:a.processInstanceId,workId:a.workId,variables:L});if(V!==T.value)return[];M.value=ne.data||[],O.value=M.value.filter(G).map(ce=>({...ce,isSingleAssignee:ye(ce)})),w.value=!0,$.value=!1,o("nextNodesResolved",M.value);const B=O.value[0];if(B){v.value=W(B);try{await F(B)}catch{}}return M.value}catch(ne){throw V===T.value&&(w.value=!1),o("error",ne),ne}finally{V===T.value&&(m.value=!1)}}async function me(L){const V=f({refresh:!1});if(V.valid){V.changed&&oe.ElMessage.info("扩展参数已更新,办理人列表已重新加载"),v.value=W(L),N.value=[],E.value=[],y.value=!1;try{await F(L)}catch{}}}function ve(L){return R.value.some(V=>P(V)===P(L))}function be(L,V){if(L.ntype!=="user")return;const ne=P(L);V?(U(L.activity)&&(R.value=R.value.filter(B=>B.activity!==L.activity)),R.value.some(B=>P(B)===ne)||R.value.push({...L})):R.value=R.value.filter(B=>P(B)!==ne)}function Ee(L,V){L.ntype==="user"&&(V&&U(L.activity)&&R.value.filter(B=>B.activity===L.activity).forEach(B=>{var ce;return(ce=q.value)==null?void 0:ce.setChecked(B.id,!1,!1)}),be(L,V))}function Ne(L){L.forEach(V=>{var ne,B;V.ntype==="user"&&ve(V)&&((ne=q.value)==null||ne.setChecked(V.id,!0,!1)),(B=V.childs)!=null&&B.length&&Ne(V.childs)})}function je(L){var V;R.value=R.value.filter(ne=>P(ne)!==P(L)),y.value&&((V=q.value)==null||V.setChecked(L.id,!1,!1))}function qe(){$.value=!0}function lt(){x.value.push({variableName:"",variableType:"string",variableValue:""}),qe()}function Me(L){x.value.splice(L,1),qe()}function un(){_.value.push({variableName:"",variableType:"string",variableValue:""})}function jr(L){_.value.splice(L,1)}function nt(L){L.variableValue=""}function Se(L){L.variableValue="",qe()}function Ae(L,V){return L===""||L===null||L===void 0?null:V==="boolean"?String(L).toLowerCase()==="true":["short","integer","long"].includes(V)?Number.parseInt(String(L),10):V==="double"?Number.parseFloat(String(L)):L}function Mg(L){L.variableValue=Ae(L.variableValue,L.variableType),qe()}async function Lg(){k.value="nextNode";try{await Q(ie())}catch{}}function Hl(){const L=R.value.reduce((V,ne)=>{let B=V.get(ne.activity);return B||(B={activityId:ne.activity,assignees:[]},V.set(ne.activity,B)),B.assignees.some(ce=>ce.userId===ne.id)||B.assignees.push({name:String(ne.caption||ne.name||ne.id),userId:ne.id}),V},new Map);return{workId:a.workId,flowNodeAssignees:Array.from(L.values()),variables:ie(),opinion:D.value}}async function Ea(L){const V=L||Hl();o("beforeSend",V),d.value=!0;try{const ne=await Si(V);return o("afterSend",ne,V),ne}catch(ne){throw o("error",ne),ne}finally{d.value=!1}}async function Vg(){const L=f();if(!L.valid)return;if(L.changed){k.value="extendParams",oe.ElMessage.warning("扩展参数已更新,请重新选择办理人");return}if(m.value){oe.ElMessage.warning("正在计算下一环节,请稍后再发送");return}if($.value||!w.value){k.value="variables",oe.ElMessage.warning("流程变量已变化,请重新计算下一环节");return}const V=O.value.find(ne=>!R.value.some(B=>B.activity===W(ne)));if(V){v.value=W(V),k.value="nextNode",oe.ElMessage.warning(`请选择“${V.activityName||V.name||W(V)}”的办理人`),await me(V);return}try{await Ea(),de.value=!0,l.value=!1,oe.ElMessage.success("发送成功")}catch{}}function Fg(L){return{workId:a.workId,flowNodeAssignees:[{activityId:String(L.activityId),assignees:[{name:String(L.userName||L.userId),userId:String(L.userId)}]}],variables:ie(),opinion:D.value}}async function $g(L){var ct;const V=String(L.activityName||L.activityId),ne=String(L.userName||L.userId),B=In(a.zIndex),ce=`ui-flow-send-confirm-overlay-${++r}`,ke=oe.ElMessageBox.confirm(`下一节点是${V},办理人是${ne},确定发送吗?`,"发送确认",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",modalClass:ce});await s.nextTick(),typeof document<"u"&&((ct=document.querySelector(`.${ce}`))==null||ct.style.setProperty("z-index",String(B),"important")),await ke}function Wl(){o("update:modelValue",!1),Yl()}async function zr(){if(!(p.value||d.value)){c.value=In(a.zIndex),de.value=!1,D.value=a.defaultOpinion,k.value="nextNode",C(),H(),o("open"),p.value=!0;try{let L;try{L=await Ai({processDefinitionId:String(a.processDefinitionId),activityId:a.activity.activityId,processInstanceId:a.processInstanceId?String(a.processInstanceId):void 0,userId:Y.value,extendParams:{...j.value}})}catch(ne){throw o("update:modelValue",!1),o("error",ne),ne}const V=L.data||{matched:!1};if(V.matched!==!0){l.value=!0;try{await Q(ie())}catch{}return}if(!V.activityId||!V.userId){const ne=new Error("检查发送接口返回的办理人信息不完整");throw o("update:modelValue",!1),o("error",ne),ne}try{await $g(V)}catch(ne){if(ne==="cancel"||ne==="close"){Wl();return}throw o("update:modelValue",!1),o("error",ne),ne}try{await Ea(Fg(V))}catch(ne){throw o("update:modelValue",!1),ne}de.value=!0,oe.ElMessage.success("发送成功"),Wl()}finally{p.value=!1}}}function ql(){l.value=!1}function Yl(){o("close"),!(!a.deleteInstanceOnCancel||de.value)&&a.processInstanceId&&or({processInstanceId:a.processInstanceId}).catch(L=>o("error",L))}function Ug(){p.value||d.value||(o("click"),zr().catch(()=>{}))}return s.watch(()=>a.modelValue,L=>{L&&!l.value&&zr().catch(()=>{}),!L&&l.value&&(l.value=!1)}),s.watch(l,L=>o("update:modelValue",L)),s.watch(k,(L,V)=>{V==="extendParams"&&L!=="extendParams"&&f()}),s.onMounted(()=>{a.modelValue&&zr().catch(()=>{})}),t({visible:l,effectiveZIndex:c,loading:d,checkingSend:p,nodeLoading:m,nodeResolved:w,nextNodes:M,open:zr,close:ql,getNextNode:Q,assembleData:Hl,send:Ea}),(L,V)=>{const ne=s.resolveDirective("loading");return s.openBlock(),s.createElementBlock("div",Df,[e.showTrigger?(s.openBlock(),s.createBlock(s.unref(oe.ElButton),{key:0,type:"primary",loading:p.value||d.value,onClick:Ug},{default:s.withCtx(()=>[s.renderSlot(L.$slots,"default",{},()=>[V[3]||(V[3]=s.createTextVNode("发送",-1))],!0)]),_:3},8,["loading"])):s.createCommentVNode("",!0),s.createVNode(s.unref(oe.ElDialog),{modelValue:l.value,"onUpdate:modelValue":V[2]||(V[2]=B=>l.value=B),"append-to-body":"",class:"ui-flow-send-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":c.value,onClosed:Yl},{footer:s.withCtx(()=>[s.createElementVNode("div",Xf,[s.createVNode(s.unref(oe.ElButton),{type:"primary",loading:d.value,onClick:Vg},{default:s.withCtx(()=>[...V[18]||(V[18]=[s.createTextVNode("确认",-1)])]),_:1},8,["loading"]),s.createVNode(s.unref(oe.ElButton),{disabled:d.value,onClick:ql},{default:s.withCtx(()=>[...V[19]||(V[19]=[s.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:s.withCtx(()=>[s.createElementVNode("div",Pf,[s.createElementVNode("div",Bf,[V[4]||(V[4]=s.createTextVNode(" 当前环节:",-1)),s.createElementVNode("strong",null,s.toDisplayString(e.activity.activityName||e.activity.activityId),1)]),s.createElementVNode("aside",Of,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(O.value,B=>(s.openBlock(),s.createElementBlock("button",{key:W(B),class:s.normalizeClass(["node-group",{active:v.value===W(B)}]),type:"button",onClick:ce=>me(B)},[V[5]||(V[5]=s.createElementVNode("span",{class:"group-avatar"},"♟",-1)),s.createElementVNode("span",Lf,s.toDisplayString(B.activityName||B.name||W(B)),1),s.createElementVNode("span",Vf,s.toDisplayString(ge(W(B))),1)],10,Mf))),128)),w.value&&!O.value.length?(s.openBlock(),s.createBlock(s.unref(oe.ElEmpty),{key:0,description:"没有下一用户任务","image-size":44})):s.createCommentVNode("",!0)]),s.createElementVNode("section",Ff,[s.createElementVNode("div",$f,[s.withDirectives((s.openBlock(),s.createElementBlock("div",Uf,[y.value?(s.openBlock(),s.createBlock(s.unref(oe.ElTree),{key:0,ref_key:"assigneeTreeRef",ref:q,class:"assignee-tree",data:E.value,load:X,props:K,"check-on-click-node":"","check-strictly":"",lazy:"","node-key":"id","show-checkbox":"",onCheckChange:Ee},{default:s.withCtx(({data:B})=>[s.createElementVNode("span",jf,[s.createElementVNode("span",null,s.toDisplayString(B.ntype==="user"?"●":"▣"),1),s.createElementVNode("span",null,s.toDisplayString(B.caption||B.id),1)])]),_:1},8,["data"])):(s.openBlock(),s.createElementBlock("div",zf,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(N.value,B=>(s.openBlock(),s.createBlock(s.unref(oe.ElCheckbox),{key:P(B),disabled:B.disabled,"model-value":ve(B),class:"candidate-item",onChange:ce=>be(B,!!ce)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(B.caption||B.name||B.id),1)]),_:2},1032,["disabled","model-value","onChange"]))),128)),!g.value&&!N.value.length?(s.openBlock(),s.createBlock(s.unref(oe.ElEmpty),{key:0,description:"暂无可选办理人","image-size":44})):s.createCommentVNode("",!0)]))])),[[ne,g.value]]),V[7]||(V[7]=s.createElementVNode("div",{class:"transfer-arrows","aria-hidden":"true"},[s.createElementVNode("span",null,"→"),s.createElementVNode("span",null,"←")],-1)),s.createElementVNode("div",Hf,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(R.value,B=>(s.openBlock(),s.createElementBlock("div",{key:P(B),class:"selected-user"},[s.createElementVNode("span",null,s.toDisplayString(B.caption||B.name||B.id),1),s.createVNode(s.unref(oe.ElButton),{link:"",type:"danger",onClick:ce=>je(B)},{default:s.withCtx(()=>[...V[6]||(V[6]=[s.createTextVNode("移除",-1)])]),_:1},8,["onClick"])]))),128)),R.value.length?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(oe.ElEmpty),{key:0,description:"暂未选择办理人","image-size":44}))])]),s.createVNode(s.unref(oe.ElTabs),{modelValue:k.value,"onUpdate:modelValue":V[0]||(V[0]=B=>k.value=B),class:"send-tabs"},{default:s.withCtx(()=>[s.createVNode(s.unref(oe.ElTabPane),{label:"下一环节",name:"nextNode"},{default:s.withCtx(()=>[m.value?(s.openBlock(),s.createElementBlock("div",Wf,"正在根据流程变量计算下一环节...")):(s.openBlock(),s.createBlock(s.unref(oe.ElTable),{key:1,data:R.value,"header-cell-style":{background:"#f5f7fa",color:"#45484B"},border:"",height:"190",size:"small"},{empty:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(O.value.length?"请选择办理人":"暂无数据"),1)]),default:s.withCtx(()=>[s.createVNode(s.unref(oe.ElTableColumn),{prop:"activityName",label:"办理环节","min-width":"150"}),s.createVNode(s.unref(oe.ElTableColumn),{prop:"caption",label:"办理人","min-width":"130"},{default:s.withCtx(B=>{var ce,ke,ct;return[s.createTextVNode(s.toDisplayString(((ce=B==null?void 0:B.row)==null?void 0:ce.caption)||((ke=B==null?void 0:B.row)==null?void 0:ke.name)||((ct=B==null?void 0:B.row)==null?void 0:ct.id)||""),1)]}),_:1}),s.createVNode(s.unref(oe.ElTableColumn),{label:"办理方式",width:"120"},{default:s.withCtx(B=>[s.createTextVNode(s.toDisplayString(B!=null&&B.row?ge(B.row.activity):""),1)]),_:1}),s.createVNode(s.unref(oe.ElTableColumn),{label:"操作",width:"90",align:"center"},{default:s.withCtx(B=>[B!=null&&B.row?(s.openBlock(),s.createBlock(s.unref(oe.ElButton),{key:0,link:"",type:"danger",onClick:ce=>je(B.row)},{default:s.withCtx(()=>[...V[8]||(V[8]=[s.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):s.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"]))]),_:1}),s.createVNode(s.unref(oe.ElTabPane),{label:"输入变量",name:"variables"},{default:s.withCtx(()=>[s.createVNode(s.unref(oe.ElTable),{data:x.value,"header-cell-style":{background:"#f5f7fa",color:"#45484B"},border:"",height:"190",size:"small"},{default:s.withCtx(()=>[s.createVNode(s.unref(oe.ElTableColumn),{label:"变量名称","min-width":"150"},{default:s.withCtx(B=>[B!=null&&B.row?(s.openBlock(),s.createBlock(s.unref(oe.ElInput),{key:0,modelValue:B.row.variableName,"onUpdate:modelValue":ce=>B.row.variableName=ce,onInput:qe},null,8,["modelValue","onUpdate:modelValue"])):s.createCommentVNode("",!0)]),_:1}),s.createVNode(s.unref(oe.ElTableColumn),{label:"变量类型",width:"140"},{default:s.withCtx(B=>[B!=null&&B.row?(s.openBlock(),s.createBlock(s.unref(oe.ElSelect),{key:0,modelValue:B.row.variableType,"onUpdate:modelValue":ce=>B.row.variableType=ce,onChange:ce=>Se(B.row)},{default:s.withCtx(()=>[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(J,ce=>s.createVNode(s.unref(oe.ElOption),{key:ce.value,label:ce.label,value:ce.value},null,8,["label","value"])),64))]),_:1},8,["modelValue","onUpdate:modelValue","onChange"])):s.createCommentVNode("",!0)]),_:1}),s.createVNode(s.unref(oe.ElTableColumn),{label:"变量值","min-width":"180"},{default:s.withCtx(B=>{var ce;return[((ce=B==null?void 0:B.row)==null?void 0:ce.variableType)==="date"?(s.openBlock(),s.createBlock(s.unref(oe.ElDatePicker),{key:0,modelValue:B.row.variableValue,"onUpdate:modelValue":ke=>B.row.variableValue=ke,style:{width:"100%"},type:"datetime","value-format":"YYYY-MM-DD HH:mm:ss",onChange:qe},null,8,["modelValue","onUpdate:modelValue"])):B!=null&&B.row?(s.openBlock(),s.createBlock(s.unref(oe.ElInput),{key:1,modelValue:B.row.variableValue,"onUpdate:modelValue":ke=>B.row.variableValue=ke,onBlur:ke=>Mg(B.row),onInput:qe},null,8,["modelValue","onUpdate:modelValue","onBlur"])):s.createCommentVNode("",!0)]}),_:1}),s.createVNode(s.unref(oe.ElTableColumn),{width:"112",align:"center"},{header:s.withCtx(()=>[s.createElementVNode("div",qf,[V[10]||(V[10]=s.createElementVNode("span",null,"操作",-1)),s.createVNode(s.unref(oe.ElButton),{class:"parameter-add-button",title:"添加变量",onClick:s.withModifiers(lt,["stop"])},{default:s.withCtx(()=>[...V[9]||(V[9]=[s.createTextVNode("+",-1)])]),_:1})])]),default:s.withCtx(B=>[(B==null?void 0:B.$index)!==void 0?(s.openBlock(),s.createBlock(s.unref(oe.ElButton),{key:0,link:"",type:"danger",onClick:ce=>Me(B.$index)},{default:s.withCtx(()=>[...V[11]||(V[11]=[s.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):s.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"]),s.createElementVNode("div",Yf,[V[13]||(V[13]=s.createElementVNode("span",null,"修改变量后,需要重新计算下一环节",-1)),s.createVNode(s.unref(oe.ElButton),{loading:m.value,type:"primary",onClick:Lg},{default:s.withCtx(()=>[...V[12]||(V[12]=[s.createTextVNode(" 重新计算下一环节 ",-1)])]),_:1},8,["loading"])])]),_:1}),s.createVNode(s.unref(oe.ElTabPane),{label:"扩展参数",name:"extendParams"},{default:s.withCtx(()=>[s.createVNode(s.unref(oe.ElTable),{data:_.value,"header-cell-style":{background:"#f5f7fa",color:"#45484B"},border:"",height:"190",size:"small"},{default:s.withCtx(()=>[s.createVNode(s.unref(oe.ElTableColumn),{label:"参数名称","min-width":"150"},{default:s.withCtx(B=>[B!=null&&B.row?(s.openBlock(),s.createBlock(s.unref(oe.ElInput),{key:0,modelValue:B.row.variableName,"onUpdate:modelValue":ce=>B.row.variableName=ce,placeholder:"请输入参数名称"},null,8,["modelValue","onUpdate:modelValue"])):s.createCommentVNode("",!0)]),_:1}),s.createVNode(s.unref(oe.ElTableColumn),{label:"参数类型",width:"140"},{default:s.withCtx(B=>[B!=null&&B.row?(s.openBlock(),s.createBlock(s.unref(oe.ElSelect),{key:0,modelValue:B.row.variableType,"onUpdate:modelValue":ce=>B.row.variableType=ce,placeholder:"请选择参数类型",onChange:ce=>nt(B.row)},{default:s.withCtx(()=>[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(J,ce=>s.createVNode(s.unref(oe.ElOption),{key:ce.value,label:ce.label,value:ce.value},null,8,["label","value"])),64))]),_:1},8,["modelValue","onUpdate:modelValue","onChange"])):s.createCommentVNode("",!0)]),_:1}),s.createVNode(s.unref(oe.ElTableColumn),{label:"参数值","min-width":"180"},{default:s.withCtx(B=>{var ce;return[((ce=B==null?void 0:B.row)==null?void 0:ce.variableType)==="date"?(s.openBlock(),s.createBlock(s.unref(oe.ElDatePicker),{key:0,modelValue:B.row.variableValue,"onUpdate:modelValue":ke=>B.row.variableValue=ke,style:{width:"100%"},type:"datetime","value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue","onUpdate:modelValue"])):B!=null&&B.row?(s.openBlock(),s.createBlock(s.unref(oe.ElInput),{key:1,modelValue:B.row.variableValue,"onUpdate:modelValue":ke=>B.row.variableValue=ke,placeholder:"请输入参数值"},null,8,["modelValue","onUpdate:modelValue"])):s.createCommentVNode("",!0)]}),_:1}),s.createVNode(s.unref(oe.ElTableColumn),{width:"112",align:"center"},{header:s.withCtx(()=>[s.createElementVNode("div",Kf,[V[15]||(V[15]=s.createElementVNode("span",null,"操作",-1)),s.createVNode(s.unref(oe.ElButton),{class:"parameter-add-button",title:"添加参数",onClick:s.withModifiers(un,["stop"])},{default:s.withCtx(()=>[...V[14]||(V[14]=[s.createTextVNode("+",-1)])]),_:1})])]),default:s.withCtx(B=>[(B==null?void 0:B.$index)!==void 0?(s.openBlock(),s.createBlock(s.unref(oe.ElButton),{key:0,link:"",type:"danger",onClick:ce=>jr(B.$index)},{default:s.withCtx(()=>[...V[16]||(V[16]=[s.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):s.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])]),s.createElementVNode("aside",Gf,[V[17]||(V[17]=s.createElementVNode("label",null,"填写意见:",-1)),s.createVNode(s.unref(oe.ElInput),{modelValue:D.value,"onUpdate:modelValue":V[1]||(V[1]=B=>D.value=B),maxlength:"500",placeholder:"请输入意见",resize:"none","show-word-limit":"",type:"textarea"},null,8,["modelValue"])])])]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-6cf0c1dd"]]),Jf={class:"button-group-wrapper"},Zf={key:0,class:"button-state"},Qf={key:0,class:"line"},ed={key:2,class:"button-group-append"},td={class:"sign-selector"},nd={class:"selected-sign-user"},rd={class:"sign-dialog-footer"},id=xt(s.defineComponent({name:"UiFlowButtons",__name:"FlowButtons",props:{processInstanceId:{default:""},processDefinitionId:{default:""},activityId:{default:""},activityName:{default:""},workId:{default:""},taskId:{default:""},dealUserId:{default:""},dealUserName:{default:""},variables:{default:()=>({})},assignmentQueryParams:{default:()=>({})},autoResolveWork:{type:Boolean,default:!0},autoHandleDialogs:{type:Boolean,default:!0},forceSingleAssignee:{type:Boolean,default:!1},dialogZIndex:{},beforeAction:{},afterAction:{}},emits:["executeAction","afterAction","workResolved","error"],setup(e,{expose:t,emit:n}){let r=0;const i=e,a=n,o=s.ref([]),l=s.ref(!1),c=s.ref(),d=s.ref(!1),p=s.ref(!1),m=s.ref(),w=s.ref(),g={turnBefore:"turnBefore",taskTurnBefore:"turnBefore",turnAfter:"turnAfter",taskTurnAfter:"turnAfter"},M=s.ref(!1),O=s.ref("turnBefore"),N=s.ref("turnBefore"),E=s.ref(!1),R=s.ref(!1),y=s.ref([]),v=s.ref(),k=s.computed(()=>O.value==="turnBefore"?"前加签":"后加签"),D={children:"children",label:"caption",disabled:"disabled",isLeaf:"isLeaf"};function x(F,...X){for(const Q of X){const me=F==null?void 0:F[Q];if(me!=null&&String(me))return String(me)}return""}function _(F){if(Array.isArray(F))return F;if(!F||typeof F!="object")return[];const X=F;for(const Q of["records","list","content","rows"])if(Array.isArray(X[Q]))return X[Q];return[]}function j(F){const X=x(F,"name","operateName","code","value");if(!X)return;const Q=x(F,"label","operateLabel","caption","title")||X;return{...F,name:X,label:Q}}const $=s.computed(()=>i.workId||x(c.value,"workId","id")),T=s.computed(()=>i.processInstanceId||x(c.value,"processInstanceId")),q=s.computed(()=>i.processDefinitionId||x(c.value,"processDefinitionId")),de=s.computed(()=>i.taskId||x(c.value,"taskId","taskInstanceId")),J=s.computed(()=>i.activityId||x(c.value,"activityId")),K=s.computed(()=>i.activityName||x(c.value,"activityName")),Y=s.computed(()=>({id:i.dealUserId,userId:i.dealUserId,name:i.dealUserName||i.dealUserId}));function Z(F="",X=""){return{action:F,actionLabel:X,workId:$.value,processInstanceId:T.value||void 0,processDefinitionId:q.value||void 0,taskId:de.value||void 0,activityId:J.value||void 0,activityName:K.value||void 0,workData:c.value}}const W=s.computed(()=>{const F=m.value;if(!((F==null?void 0:F.action)!=="taskSend"||!F.workId||!F.processDefinitionId||!F.activityId))return{workId:F.workId,processDefinitionId:F.processDefinitionId,processInstanceId:F.processInstanceId||"",activity:{activityId:F.activityId,activityName:F.activityName}}}),G=s.computed(()=>{const F=m.value;if(!(!["jump","taskJump"].includes((F==null?void 0:F.action)||"")||!(F!=null&&F.workId)||!F.processDefinitionId))return{workId:F.workId,processDefinitionId:F.processDefinitionId,processInstanceId:F.processInstanceId||""}});async function P(){if(i.workId)return c.value=void 0,Z();if(!i.autoResolveWork)return Z();if(!i.processInstanceId||!i.dealUserId)throw new Error("FlowButtons 缺少 workId;自动解析待办时必须传入 processInstanceId 和 dealUserId");const F=await sr({currentPage:1,pageSize:100,assignee:i.dealUserId,assigne:i.dealUserId,userId:i.dealUserId,processInstanceId:i.processInstanceId}),Q=_(F.data).find(ve=>x(ve,"processInstanceId")===i.processInstanceId);if(!Q)return c.value=void 0,Z();c.value=Q;const me=Z();return a("workResolved",me),me}function z(F){return F.map(X=>{const Q=X||{},me=String(Q.id||Q.userId||""),ve=String(Q.ntype||""),be=Array.isArray(Q.childs)?Q.childs:Array.isArray(Q.children)?Q.children:void 0;return{...Q,id:me,caption:String(Q.caption||Q.name||me),ntype:ve,hasChild:!!(Q.hasChild||be!=null&&be.length),isLeaf:ve==="user"||!Q.hasChild&&!(be!=null&&be.length),disabled:ve!=="user",children:be?z(be):void 0}}).filter(X=>X.id)}async function C(F=""){const X=await ki(F);return z(Array.isArray(X.data)?X.data:[])}async function I(F,X){const Q=F.level===0?"":String(F.data.id||"");if(F.level>0&&(F.data.ntype==="user"||F.data.hasChild===!1)){X([]);return}E.value=!0;try{const me=await C(Q);F.level===0&&(y.value=me),X(me)}catch(me){a("error",me),X([])}finally{E.value=!1}}function H(F){F.ntype==="user"&&(v.value=F)}function ie(){v.value=void 0,y.value=[]}function le(F,X=F){if(!de.value){oe.ElMessage.error("当前待办缺少任务实例 ID,无法加签");return}O.value=F,N.value=X,w.value=In(i.dialogZIndex),M.value=!0}async function h(){var Q;if(!((Q=v.value)!=null&&Q.id)){oe.ElMessage.warning("请选择一名机构人员");return}const F=O.value,X=N.value;R.value=!0;try{const ve=await(F==="turnBefore"?wi:bi)({workId:$.value,taskId:de.value,assignee:v.value.id});M.value=!1,u(X,ve,Z(X,k.value))}catch(me){a("error",me)}finally{R.value=!1}}async function f(){l.value=!0,o.value=[];try{if(await P(),!$.value)return o.value;const F=await pi({workId:$.value});return o.value=(Array.isArray(F.data)?F.data:[]).map(X=>j(X||{})).filter(X=>!!X),o.value}finally{l.value=!1}}function u(F,X,Q){var me;(me=i.afterAction)==null||me.call(i,F,X,Q),a("afterAction",F,X,Q)}function b(F,X){a("executeAction",F,X)}function A(F){return{processActivate:"restore",processTerminate:"terminate",processSuspend:"hang",processSupspend:"hang"}[F]||F}async function U(F,X,Q){var je;const me=In(i.dialogZIndex),ve=`ui-flow-confirm-overlay-${++r}`,be=oe.ElMessageBox.confirm(`是否${X}此任务?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",modalClass:ve});await s.nextTick(),(je=document.querySelector(`.${ve}`))==null||je.style.setProperty("z-index",String(me),"important"),await be;const Ee={workId:Q.workId};let Ne;switch(A(F)){case"revocation":case"taskWithdraw":Ne=await mi(Ee);break;case"taskRecyle":Ne=await gi(Ee);break;case"hang":Ne=await Ei({processInstanceIds:[Q.processInstanceId||""]});break;case"restore":Ne=await _i(Ee);break;case"terminate":Ne=await xi(Ee);break;case"taskComplete":Ne=await vi({...Ee,variables:i.variables});break;case"taskRollback":Ne=await yi(Ee);break;case"taskClaim":if(!i.dealUserId){b(F,Q);return}Ne=await hi({...Ee,assignee:i.dealUserId});break;default:b(F,Q);return}u(F,Ne,Q),A(F)==="taskClaim"&&await f()}async function ee(F){var X;try{const Q=F.name;$.value||await f();const me=Z(Q,F.label);if(!me.workId)throw new Error("当前待办缺少 workId,无法执行流程操作");if(await((X=i.beforeAction)==null?void 0:X.call(i,Q,me))===!1)return;const ve=g[Q];if(ve){le(ve,Q);return}if(Q==="taskSend"&&i.autoHandleDialogs){if(!me.processDefinitionId||!me.activityId)throw new Error("当前待办缺少 processDefinitionId 或 activityId,无法发送");m.value=me,d.value=!0;return}if(["jump","taskJump"].includes(Q)&&i.autoHandleDialogs){if(!me.processDefinitionId)throw new Error("当前待办缺少 processDefinitionId,无法跳转");m.value=me,p.value=!0;return}if(["save","start","taskSend","jump","taskJump"].includes(Q)){b(Q,me);return}await U(Q,F.label,me)}catch(Q){Q!=="cancel"&&Q!=="close"&&a("error",Q)}}function ye(F,X){const Q={...m.value||Z("taskSend","发送"),requestData:X};u("taskSend",F,Q),m.value=void 0}function ge(F,X){const Q={...m.value||Z("taskJump","跳转"),requestData:X};u(Q.action,F,Q),m.value=void 0}function ae(F){a("error",F)}return s.watch(()=>[i.workId,i.processInstanceId,i.dealUserId],()=>{d.value=!1,p.value=!1,m.value=void 0,f().catch(F=>a("error",F))},{immediate:!0}),t({loading:l,optList:o,resolvedWorkData:c,getAvailableActions:f,resolveCurrentWork:P,executeAction:ee}),(F,X)=>{const Q=s.resolveComponent("ui-button"),me=s.resolveComponent("el-tree"),ve=s.resolveComponent("el-dialog"),be=s.resolveDirective("loading");return s.openBlock(),s.createElementBlock("div",Jf,[l.value?(s.openBlock(),s.createElementBlock("span",Zf,"正在加载流程操作...")):(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(o.value,(Ee,Ne)=>(s.openBlock(),s.createElementBlock("div",{key:Ee.name||Ne,class:"flex-start-r"},[s.renderSlot(F.$slots,"prefix",{action:Ee},void 0,!0),s.renderSlot(F.$slots,"default",{action:Ee},void 0,!0),s.createVNode(Q,{onClick:je=>ee(Ee)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(Ee.label),1)]),_:2},1032,["onClick"]),Ne!==o.value.length-1?(s.openBlock(),s.createElementBlock("div",Qf)):s.createCommentVNode("",!0),s.renderSlot(F.$slots,"suffix",{action:Ee},void 0,!0)]))),128)),F.$slots.append?(s.openBlock(),s.createElementBlock("div",ed,[s.renderSlot(F.$slots,"append",{actions:o.value,loading:l.value},void 0,!0)])):s.createCommentVNode("",!0),s.createVNode(ve,{modelValue:M.value,"onUpdate:modelValue":X[1]||(X[1]=Ee=>M.value=Ee),"append-to-body":"",class:"ui-flow-sign-dialog","close-on-click-modal":!1,title:k.value,width:"760px","z-index":w.value,onClosed:ie},{footer:s.withCtx(()=>[s.createElementVNode("div",rd,[s.createVNode(Q,{type:"primary",loading:R.value,onClick:h},{default:s.withCtx(()=>[...X[6]||(X[6]=[s.createTextVNode("确认",-1)])]),_:1},8,["loading"]),s.createVNode(Q,{disabled:R.value,onClick:X[0]||(X[0]=Ee=>M.value=!1)},{default:s.withCtx(()=>[...X[7]||(X[7]=[s.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:s.withCtx(()=>{var Ee,Ne;return[s.withDirectives((s.openBlock(),s.createElementBlock("div",td,[X[5]||(X[5]=s.createElementVNode("p",{class:"sign-tip"},"仅可选择一名机构人员",-1)),s.createVNode(me,{data:y.value,load:I,props:D,"highlight-current":"",lazy:"","node-key":"id",onNodeClick:H},null,8,["data"]),s.createElementVNode("div",nd,[X[4]||(X[4]=s.createTextVNode(" 已选择:",-1)),s.createElementVNode("strong",null,s.toDisplayString(((Ee=v.value)==null?void 0:Ee.caption)||((Ne=v.value)==null?void 0:Ne.name)||"暂无"),1)])])),[[be,E.value]])]}),_:1},8,["modelValue","title","z-index"]),W.value?(s.openBlock(),s.createBlock(Ni,{key:3,modelValue:d.value,"onUpdate:modelValue":X[2]||(X[2]=Ee=>d.value=Ee),activity:W.value.activity,"assignment-query-params":e.assignmentQueryParams,"deal-user":Y.value,"force-single-assignee":e.forceSingleAssignee,"process-definition-id":W.value.processDefinitionId,"process-instance-id":W.value.processInstanceId,"show-trigger":!1,variables:e.variables,"work-id":W.value.workId,"z-index":e.dialogZIndex,onAfterSend:ye,onError:ae},null,8,["modelValue","activity","assignment-query-params","deal-user","force-single-assignee","process-definition-id","process-instance-id","variables","work-id","z-index"])):s.createCommentVNode("",!0),G.value?(s.openBlock(),s.createBlock(So,{key:4,modelValue:p.value,"onUpdate:modelValue":X[3]||(X[3]=Ee=>p.value=Ee),"assignment-query-params":e.assignmentQueryParams,"deal-user":Y.value,"process-definition-id":G.value.processDefinitionId,"process-instance-id":G.value.processInstanceId,"show-trigger":!1,"work-id":G.value.workId,"z-index":e.dialogZIndex,onAfterJump:ge,onError:ae},null,8,["modelValue","assignment-query-params","deal-user","process-definition-id","process-instance-id","work-id","z-index"])):s.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-8d163889"]]);function ad(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fr={exports:{}},od=fr.exports,Ao;function sd(){return Ao||(Ao=1,(function(e,t){(function(n,r){e.exports=r()})(od,(function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",l="minute",c="hour",d="day",p="week",m="month",w="quarter",g="year",M="date",O="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,R={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(J){var K=["th","st","nd","rd"],Y=J%100;return"["+J+(K[(Y-20)%10]||K[Y]||K[0])+"]"}},y=function(J,K,Y){var Z=String(J);return!Z||Z.length>=K?J:""+Array(K+1-Z.length).join(Y)+J},v={s:y,z:function(J){var K=-J.utcOffset(),Y=Math.abs(K),Z=Math.floor(Y/60),W=Y%60;return(K<=0?"+":"-")+y(Z,2,"0")+":"+y(W,2,"0")},m:function J(K,Y){if(K.date()<Y.date())return-J(Y,K);var Z=12*(Y.year()-K.year())+(Y.month()-K.month()),W=K.clone().add(Z,m),G=Y-W<0,P=K.clone().add(Z+(G?-1:1),m);return+(-(Z+(Y-W)/(G?W-P:P-W))||0)},a:function(J){return J<0?Math.ceil(J)||0:Math.floor(J)},p:function(J){return{M:m,y:g,w:p,d,D:M,h:c,m:l,s:o,ms:a,Q:w}[J]||String(J||"").toLowerCase().replace(/s$/,"")},u:function(J){return J===void 0}},k="en",D={};D[k]=R;var x="$isDayjsObject",_=function(J){return J instanceof q||!(!J||!J[x])},j=function J(K,Y,Z){var W;if(!K)return k;if(typeof K=="string"){var G=K.toLowerCase();D[G]&&(W=G),Y&&(D[G]=Y,W=G);var P=K.split("-");if(!W&&P.length>1)return J(P[0])}else{var z=K.name;D[z]=K,W=z}return!Z&&W&&(k=W),W||!Z&&k},$=function(J,K){if(_(J))return J.clone();var Y=typeof K=="object"?K:{};return Y.date=J,Y.args=arguments,new q(Y)},T=v;T.l=j,T.i=_,T.w=function(J,K){return $(J,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var q=(function(){function J(Y){this.$L=j(Y.locale,null,!0),this.parse(Y),this.$x=this.$x||Y.x||{},this[x]=!0}var K=J.prototype;return K.parse=function(Y){this.$d=(function(Z){var W=Z.date,G=Z.utc;if(W===null)return new Date(NaN);if(T.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var P=W.match(N);if(P){var z=P[2]-1||0,C=(P[7]||"0").substring(0,3);return G?new Date(Date.UTC(P[1],z,P[3]||1,P[4]||0,P[5]||0,P[6]||0,C)):new Date(P[1],z,P[3]||1,P[4]||0,P[5]||0,P[6]||0,C)}}return new Date(W)})(Y),this.init()},K.init=function(){var Y=this.$d;this.$y=Y.getFullYear(),this.$M=Y.getMonth(),this.$D=Y.getDate(),this.$W=Y.getDay(),this.$H=Y.getHours(),this.$m=Y.getMinutes(),this.$s=Y.getSeconds(),this.$ms=Y.getMilliseconds()},K.$utils=function(){return T},K.isValid=function(){return this.$d.toString()!==O},K.isSame=function(Y,Z){var W=$(Y);return this.startOf(Z)<=W&&W<=this.endOf(Z)},K.isAfter=function(Y,Z){return $(Y)<this.startOf(Z)},K.isBefore=function(Y,Z){return this.endOf(Z)<$(Y)},K.$g=function(Y,Z,W){return T.u(Y)?this[Z]:this.set(W,Y)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(Y,Z){var W=this,G=!!T.u(Z)||Z,P=T.p(Y),z=function(u,b){var A=T.w(W.$u?Date.UTC(W.$y,b,u):new Date(W.$y,b,u),W);return G?A:A.endOf(d)},C=function(u,b){return T.w(W.toDate()[u].apply(W.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(b)),W)},I=this.$W,H=this.$M,ie=this.$D,le="set"+(this.$u?"UTC":"");switch(P){case g:return G?z(1,0):z(31,11);case m:return G?z(1,H):z(0,H+1);case p:var h=this.$locale().weekStart||0,f=(I<h?I+7:I)-h;return z(G?ie-f:ie+(6-f),H);case d:case M:return C(le+"Hours",0);case c:return C(le+"Minutes",1);case l:return C(le+"Seconds",2);case o:return C(le+"Milliseconds",3);default:return this.clone()}},K.endOf=function(Y){return this.startOf(Y,!1)},K.$set=function(Y,Z){var W,G=T.p(Y),P="set"+(this.$u?"UTC":""),z=(W={},W[d]=P+"Date",W[M]=P+"Date",W[m]=P+"Month",W[g]=P+"FullYear",W[c]=P+"Hours",W[l]=P+"Minutes",W[o]=P+"Seconds",W[a]=P+"Milliseconds",W)[G],C=G===d?this.$D+(Z-this.$W):Z;if(G===m||G===g){var I=this.clone().set(M,1);I.$d[z](C),I.init(),this.$d=I.set(M,Math.min(this.$D,I.daysInMonth())).$d}else z&&this.$d[z](C);return this.init(),this},K.set=function(Y,Z){return this.clone().$set(Y,Z)},K.get=function(Y){return this[T.p(Y)]()},K.add=function(Y,Z){var W,G=this;Y=Number(Y);var P=T.p(Z),z=function(H){var ie=$(G);return T.w(ie.date(ie.date()+Math.round(H*Y)),G)};if(P===m)return this.set(m,this.$M+Y);if(P===g)return this.set(g,this.$y+Y);if(P===d)return z(1);if(P===p)return z(7);var C=(W={},W[l]=r,W[c]=i,W[o]=n,W)[P]||1,I=this.$d.getTime()+Y*C;return T.w(I,this)},K.subtract=function(Y,Z){return this.add(-1*Y,Z)},K.format=function(Y){var Z=this,W=this.$locale();if(!this.isValid())return W.invalidDate||O;var G=Y||"YYYY-MM-DDTHH:mm:ssZ",P=T.z(this),z=this.$H,C=this.$m,I=this.$M,H=W.weekdays,ie=W.months,le=W.meridiem,h=function(b,A,U,ee){return b&&(b[A]||b(Z,G))||U[A].slice(0,ee)},f=function(b){return T.s(z%12||12,b,"0")},u=le||function(b,A,U){var ee=b<12?"AM":"PM";return U?ee.toLowerCase():ee};return G.replace(E,(function(b,A){return A||(function(U){switch(U){case"YY":return String(Z.$y).slice(-2);case"YYYY":return T.s(Z.$y,4,"0");case"M":return I+1;case"MM":return T.s(I+1,2,"0");case"MMM":return h(W.monthsShort,I,ie,3);case"MMMM":return h(ie,I);case"D":return Z.$D;case"DD":return T.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return h(W.weekdaysMin,Z.$W,H,2);case"ddd":return h(W.weekdaysShort,Z.$W,H,3);case"dddd":return H[Z.$W];case"H":return String(z);case"HH":return T.s(z,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return u(z,C,!0);case"A":return u(z,C,!1);case"m":return String(C);case"mm":return T.s(C,2,"0");case"s":return String(Z.$s);case"ss":return T.s(Z.$s,2,"0");case"SSS":return T.s(Z.$ms,3,"0");case"Z":return P}return null})(b)||P.replace(":","")}))},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(Y,Z,W){var G,P=this,z=T.p(Z),C=$(Y),I=(C.utcOffset()-this.utcOffset())*r,H=this-C,ie=function(){return T.m(P,C)};switch(z){case g:G=ie()/12;break;case m:G=ie();break;case w:G=ie()/3;break;case p:G=(H-I)/6048e5;break;case d:G=(H-I)/864e5;break;case c:G=H/i;break;case l:G=H/r;break;case o:G=H/n;break;default:G=H}return W?G:T.a(G)},K.daysInMonth=function(){return this.endOf(m).$D},K.$locale=function(){return D[this.$L]},K.locale=function(Y,Z){if(!Y)return this.$L;var W=this.clone(),G=j(Y,Z,!0);return G&&(W.$L=G),W},K.clone=function(){return T.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},J})(),de=q.prototype;return $.prototype=de,[["$ms",a],["$s",o],["$m",l],["$H",c],["$W",d],["$M",m],["$y",g],["$D",M]].forEach((function(J){de[J[1]]=function(K){return this.$g(K,J[0],J[1])}})),$.extend=function(J,K){return J.$i||(J(K,q,$),J.$i=!0),$},$.locale=j,$.isDayjs=_,$.unix=function(J){return $(1e3*J)},$.en=D[k],$.Ls=D,$.p={},$}))})(fr)),fr.exports}var ld=sd();const dr=ad(ld),cd={class:"colBtns"},ud={key:0,class:"table-pagination"},fd={class:"left-pagination"},dd={class:"right-pagination"},ko=xt(s.defineComponent({name:"UiFlowBaseGrid",inheritAttrs:!1,__name:"FlowGrid",props:{data:{default:()=>[]},tableLabel:{default:()=>[]},pageConfig:{default:()=>({currentPage:1,total:0,pageSize:20})},hidePage:{type:Boolean,default:!1},hideSelection:{type:Boolean,default:!1},hideNumber:{type:Boolean,default:!0},operation:{type:Boolean,default:!1},tableHeight:{default:"calc(100% - 45px)"},isFixed:{type:Boolean,default:!1},btnWidth:{default:0},size:{default:"small"}},emits:["page-change","size-change","row-click","row-dblclick"],setup(e,{expose:t,emit:n}){const r=e,i=n,a=s.useSlots(),o=s.ref(),l=s.ref(),c=s.ref("100%"),d=s.ref(0),p=s.computed(()=>r.tableLabel.filter(x=>{var _;return!((_=x.hiddenCondition)!=null&&_.call(x,x))})),m=s.computed(()=>r.size==="medium"?"default":r.size);function w(x){return x<9?`0${x+1}`:x+1}function g(){var x;(x=l.value)==null||x.clearSelection()}function M(x,_){var j;(j=l.value)==null||j.toggleRowSelection(x,_)}function O(){var x;(x=l.value)==null||x.toggleAllSelection()}function N(x){var _;(_=l.value)==null||_.setCurrentRow(x)}function E(x){i("page-change",x)}function R(x){i("size-change",x)}function y(){c.value=r.hidePage?"100%":"calc(100% - 45px)"}async function v(){var j;if(!r.operation||r.btnWidth)return;await s.nextTick();const x=((j=o.value)==null?void 0:j.querySelectorAll(".colBtns"))||[];let _=a.operation?120:0;x.forEach($=>{_=Math.max(_,$.scrollWidth+40)}),d.value=_}function k(x,_,j){var $;r.hideSelection||($=l.value)==null||$.toggleRowSelection(x),i("row-click",x,_,j)}function D(x,_,j){i("row-dblclick",x,_,j)}return s.watch(()=>[r.hidePage,r.data.length],()=>{y(),v()}),s.onMounted(()=>{window.addEventListener("resize",y),y(),v()}),s.onBeforeUnmount(()=>window.removeEventListener("resize",y)),t({tableRef:l,clearSelection:g,toggleRowSelection:M,toggleAllSelection:O,setCurrentRow:N,computeHeight:y}),(x,_)=>{const j=s.resolveComponent("el-table-column"),$=s.resolveComponent("el-table"),T=s.resolveComponent("el-pagination");return s.openBlock(),s.createElementBlock("div",{ref_key:"rootRef",ref:o,class:s.normalizeClass({"no-fixed":!e.isFixed}),style:s.normalizeStyle({height:e.tableHeight||"100%"})},[s.createVNode($,s.mergeProps({ref_key:"tableRef",ref:l},x.$attrs,{"cell-style":{height:"50px"},data:e.data,"header-cell-style":{background:"#f5f7fa",color:"#45484B",height:"50px"},height:c.value,size:m.value,border:"","cell-class-name":"c-table-cell","current-row-key":"id","header-row-class-name":"c-table-header",onRowClick:k,onRowDblclick:D}),{default:s.withCtx(()=>[e.hideSelection?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(j,{key:0,align:"center",type:"selection",width:"60"})),e.hideNumber?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(j,{key:1,index:w,align:"center",label:"序号",type:"index",width:"60"})),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(p.value,q=>(s.openBlock(),s.createBlock(j,{key:q.prop,formatter:q.formatter,label:q.label,"min-width":q.minWidth,prop:q.prop,"show-overflow-tooltip":q.showTooltip,sortable:q.sortable,width:q.width,align:"center"},null,8,["formatter","label","min-width","prop","show-overflow-tooltip","sortable","width"]))),128)),s.renderSlot(x.$slots,"default",{},void 0,!0),e.operation?(s.openBlock(),s.createBlock(j,{key:2,fixed:e.isFixed?"right":!1,width:e.btnWidth||d.value||void 0,align:"center",label:"操作"},{default:s.withCtx(q=>[s.createElementVNode("div",cd,[s.renderSlot(x.$slots,"operation",{row:q.row},void 0,!0)])]),_:3},8,["fixed","width"])):s.createCommentVNode("",!0)]),_:3},16,["data","height","size"]),e.hidePage?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",ud,[s.createElementVNode("div",fd,[s.renderSlot(x.$slots,"pagination-left",{},void 0,!0)]),s.createElementVNode("div",dd,[s.createVNode(T,{"current-page":e.pageConfig.currentPage,"page-size":e.pageConfig.pageSize,"page-sizes":[10,20,30,40],total:e.pageConfig.total,background:"",layout:"total, sizes, prev, pager, next, jumper",onCurrentChange:E,onSizeChange:R},null,8,["current-page","page-size","total"])])]))],6)}}}),[["__scopeId","data-v-88684f01"]]),pd={executing:"审批中",completed:"已完成",deleted:"已删除",canceled:"已取消",withdrawed:"已撤回",recyled:"已回收",rollbacked:"已退回",jumped:"已跳转"},hd=[{label:"业务标题",prop:"businessName",minWidth:"180px"},{label:"当前环节",prop:"activityName",minWidth:"180px"},{label:"发送人",prop:"assigneesNames",minWidth:"150px"},{label:"发送时间",prop:"startTime",width:"180px",formatter:e=>e.startTime?dr(e.startTime).format("YYYY-MM-DD HH:mm:ss"):""}],md=[{label:"业务标题",prop:"title",minWidth:"180px"},{label:"当前环节",prop:"currentActivity",minWidth:"180px",formatter:e=>e.currentActivity||"无"},{label:"创建人",prop:"createUserName",minWidth:"150px"},{label:"创建时间",prop:"createdTime",width:"180px"}];function yd(e){return{...e,workId:e.workId||e.id,processDefinitionId:e.processDefinitionId,processInstanceId:e.processInstanceId,activityId:e.activityId,activityName:e.activityName}}const gd=s.defineComponent({name:"UiFlowGrid",__name:"FlowList",props:{type:{},dealUserId:{default:""},appId:{default:""},appModuleId:{default:""}},emits:["onHandle","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,a=s.ref(),o=s.ref([]),l=s.ref(!1),c=s.reactive({currentPage:1,pageSize:20,total:0}),d=s.computed(()=>r.type==="draft"?md:hd);function p(y){return pd[y]||y||""}function m(y,v){i("onHandle",{action:y,workData:yd(v)})}function w(y){i("onHandle",{action:"view",workData:{...y,processDefinitionId:y.processDefinitionId,workId:y.id,workName:y.title}})}function g(y){return`${y}_${dr().format("YYYYMMDDHHmmss")}`}function M(y){const v=g(y.name);i("onHandle",{action:"create",workData:{processDefinitionId:y.processDefinitionId,flowName:y.name,title:v,workName:v}})}function O(y){r.type==="todo"&&m("view",y),r.type==="done"&&m("handle",y)}function N(y){c.currentPage=y,R()}function E(y){c.pageSize=y,c.currentPage=1,R()}async function R(){l.value=!0;try{if(r.type==="todo"||r.type==="done"){const v=await(r.type==="todo"?sr:di)({currentPage:c.currentPage,pageSize:c.pageSize,assignee:r.dealUserId});o.value=v.data||[],c.total=Number(v.count||0)}else{const v=(await ui(c,{appId:r.appId,appModuleId:r.appModuleId,createUserId:r.dealUserId})).data||{};o.value=v.records||[],c.total=Number(v.total||0)}}catch(y){throw i("error",y),y}finally{l.value=!1}}return s.watch(()=>[r.type,r.dealUserId,r.appId,r.appModuleId],()=>{c.currentPage=1,R()}),s.onMounted(R),t({data:o,loading:l,pageConfig:c,gridRef:a,loadTableData:R,onRowDblclick:O,create:M,buildDefaultBusinessTitle:g}),(y,v)=>{const k=s.resolveComponent("el-table-column"),D=s.resolveComponent("el-button");return s.openBlock(),s.createBlock(ko,{ref_key:"gridRef",ref:a,data:o.value,"hide-number":!1,"hide-selection":!0,"is-fixed":!0,"page-config":c,"table-label":d.value,operation:"","table-height":"100%",onPageChange:N,onRowDblclick:O,onSizeChange:E},{operation:s.withCtx(({row:x})=>[e.type==="todo"?(s.openBlock(),s.createBlock(D,{key:0,link:"",type:"primary",onClick:s.withModifiers(_=>m("view",x),["stop"])},{default:s.withCtx(()=>[...v[0]||(v[0]=[s.createTextVNode(" 办理 ",-1)])]),_:1},8,["onClick"])):e.type==="done"?(s.openBlock(),s.createBlock(D,{key:1,link:"",type:"primary",onClick:s.withModifiers(_=>m("handle",x),["stop"])},{default:s.withCtx(()=>[...v[1]||(v[1]=[s.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):e.type==="draft"&&x.state==="audit"?(s.openBlock(),s.createBlock(D,{key:2,link:"",type:"primary",onClick:s.withModifiers(_=>w(x),["stop"])},{default:s.withCtx(()=>[...v[2]||(v[2]=[s.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):s.createCommentVNode("",!0)]),default:s.withCtx(()=>[e.type==="done"||e.type==="draft"?(s.openBlock(),s.createBlock(k,{key:0,align:"center",label:"状态",width:"120"},{default:s.withCtx(({row:x})=>[s.createTextVNode(s.toDisplayString(e.type==="done"?p(x.stateName):x.stateLabel),1)]),_:1})):s.createCommentVNode("",!0)]),_:1},8,["data","page-config","table-label"])}}});function ft(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const Dn=Object.prototype.toString,vd=Object.prototype.hasOwnProperty;function Ii(e){return e===void 0}function mn(e){return e!==void 0}function Co(e){return e==null}function it(e){return Dn.call(e)==="[object Array]"}function It(e){return Dn.call(e)==="[object Object]"}function Dt(e){return Dn.call(e)==="[object Number]"}function Pt(e){const t=Dn.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function dt(e){return Dn.call(e)==="[object String]"}function yn(e,t){return!Co(e)&&vd.call(e,t)}function ut(e,t){const n=Di(t);let r;return se(e,function(i,a){if(n(i,a))return r=i,!1}),r}function wd(e,t){const n=Di(t);let r=it(e)?-1:void 0;return se(e,function(i,a){if(n(i,a))return r=a,!1}),r}function gn(e,t){const n=Di(t);let r=[];return se(e,function(i,a){n(i,a)&&r.push(i)}),r}function se(e,t){let n,r;if(Ii(e))return;const i=it(e)?xd:_d;for(let a in e)if(yn(e,a)&&(n=e[a],r=t(n,i(a)),r===!1))return n}function vn(e,t,n){return se(e,function(r,i){n=t(n,r,i)}),n}function Ro(e,t){return!!vn(e,function(n,r,i){return n&&t(r,i)},!0)}function To(e,t){return!!ut(e,t)}function No(e,t){let n=[];return se(e,function(r,i){n.push(t(r,i))}),n}function bd(e,t){t=Ed(t);let n=[];return se(e,function(r,i){let a=t(r,i),o={d:a,v:r};for(var l=0;l<n.length;l++){let{d:c}=n[l];if(a<c){n.splice(l,0,o);return}}n.push(o)}),No(n,r=>r.v)}function Io(e){return function(t){return Ro(e,function(n,r){return t[r]===n})}}function Ed(e){return Pt(e)?e:t=>t[e]}function Di(e){return Pt(e)?e:t=>t===e}function _d(e){return e}function xd(e){return Number(e)}function Do(e,t){let n,r,i,a;function o(m){let w=Date.now(),g=m?0:a+t-w;if(g>0)return l(g);e.apply(i,r),c()}function l(m){n=setTimeout(o,m)}function c(){n&&clearTimeout(n),n=a=r=i=void 0}function d(){n&&o(!0),c()}function p(...m){a=Date.now(),r=m,i=this,n||l(t)}return p.flush=d,p.cancel=c,p}function Bt(e,t){return e.bind(t)}function ue(e,...t){return Object.assign(e,...t)}function Sd(e,t,n){let r=e;return se(t,function(i,a){if(typeof i!="number"&&typeof i!="string")throw new Error("illegal key type: "+typeof i+". Key should be of type number or string.");if(i==="constructor")throw new Error("illegal key: constructor");if(i==="__proto__")throw new Error("illegal key: __proto__");let o=t[a+1],l=r[i];mn(o)&&Co(l)&&(l=r[i]=isNaN(+o)?{}:[]),Ii(o)?Ii(n)?delete r[i]:r[i]=n:r=l}),e}function Ad(e,t){let n={},r=Object(e);return se(t,function(i){i in r&&(n[i]=e[i])}),n}function kd(e,t){let n={},r=Object(e);return se(r,function(i,a){t.indexOf(a)===-1&&(n[a]=i)}),n}var Cd=1e3;function At(e,t){var n=this;t=t||Cd,e.on(["render.shape","render.connection"],t,function(r,i){var a=r.type,o=i.element,l=i.gfx,c=i.attrs;if(n.canRender(o))return a==="render.shape"?n.drawShape(l,o,c):n.drawConnection(l,o,c)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(r,i){if(n.canRender(i))return r.type==="render.getShapePath"?n.getShapePath(i):n.getConnectionPath(i)})}At.prototype.canRender=function(e){},At.prototype.drawShape=function(e,t){},At.prototype.drawConnection=function(e,t){},At.prototype.getShapePath=function(e){},At.prototype.getConnectionPath=function(e){};function fe(e,t){var n=Re(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function Rd(e,t){return To(t,function(n){return fe(e,n)})}function Re(e){return e&&e.businessObject||e}function en(e){return e&&e.di}function tn(e,t){return fe(e,"bpmn:CallActivity")?!1:fe(e,"bpmn:SubProcess")?(t=t||en(e),t&&fe(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):fe(e,"bpmn:Participant")?!!Re(e).processRef:!0}function Po(e){if(!(!fe(e,"bpmn:Participant")&&!fe(e,"bpmn:Lane"))){var t=en(e).isHorizontal;return t===void 0?!0:t}}function Td(e){return e&&!!Re(e).triggeredByEvent}function Nd(e){return It(e)&&yn(e,"waypoints")}function Id(e){return It(e)&&yn(e,"labelTarget")}var Pn={width:90,height:20},Bo=15;function Dd(e){return fe(e,"bpmn:Event")||fe(e,"bpmn:Gateway")||fe(e,"bpmn:DataStoreReference")||fe(e,"bpmn:DataObjectReference")||fe(e,"bpmn:DataInput")||fe(e,"bpmn:DataOutput")||fe(e,"bpmn:SequenceFlow")||fe(e,"bpmn:MessageFlow")||fe(e,"bpmn:Group")}function Pd(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=Bd(e),a=Math.atan((r.y-n.y)/(r.x-n.x)),o=i.x,l=i.y;return Math.abs(a)<Math.PI/2?l-=Bo:o+=Bo,{x:o,y:l}}function Bd(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)];return{x:n.x+(r.x-n.x)/2,y:n.y+(r.y-n.y)/2}}function Od(e){return e.waypoints?Pd(e.waypoints):fe(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+Pn.height/2}:{x:e.x+e.width/2,y:e.y+e.height+Pn.height/2}}function Md(e,t){var n,r,i,a=e.label;return a&&a.bounds?(i=a.bounds,r={width:Math.max(Pn.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=Od(t),r=Pn),ue({x:n.x-r.width/2,y:n.y-r.height/2},r)}function Ld(e){if(fe(e,"bpmn:FlowElement")||fe(e,"bpmn:Participant")||fe(e,"bpmn:Lane")||fe(e,"bpmn:SequenceFlow")||fe(e,"bpmn:MessageFlow")||fe(e,"bpmn:DataInput")||fe(e,"bpmn:DataOutput"))return"name";if(fe(e,"bpmn:TextAnnotation"))return"text";if(fe(e,"bpmn:Group"))return"categoryValueRef"}function Vd(e){var t=e.categoryValueRef;return t&&t.value||""}function pr(e){var t=e.businessObject,n=Ld(t);if(n)return n==="categoryValueRef"?Vd(t):t[n]||""}function Bn(e,t){t=!!t,it(e)||(e=[e]);var n,r,i,a;return se(e,function(o){var l=o;o.waypoints&&!t&&(l=Bn(o.waypoints,!0));var c=l.x,d=l.y,p=l.height||0,m=l.width||0;(c<n||n===void 0)&&(n=c),(d<r||r===void 0)&&(r=d),(c+m>i||i===void 0)&&(i=c+m),(d+p>a||a===void 0)&&(a=d+p)}),{x:n,y:r,height:a-r,width:i-n}}function Oo(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function Mo(e){return!!(e&&e.isFrame)}var Lo=7;function Fd(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function $d(e,t){return t.appendChild(Fd(e,t))}function Ve(e,t){return $d(t,e),e}var Pi=2,Vo={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":Pi,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":Pi,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Ud(e,t){return Vo[t]?e.style[t]:e.getAttributeNS(null,t)}function Fo(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Vo[r];i?(i===Pi&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function jd(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)Fo(e,i,t[i])}function Ie(e,t,n){if(typeof t=="string")if(n!==void 0)Fo(e,t,n);else return Ud(e,t);else jd(e,t);return e}const zd=Object.prototype.toString;function pt(e){return new Ot(e)}function Ot(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Ot.prototype.add=function(e){return this.list.add(e),this},Ot.prototype.remove=function(e){return zd.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},Ot.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Ot.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Ot.prototype.array=function(){return Array.from(this.list)},Ot.prototype.has=Ot.prototype.contains=function(e){return this.list.contains(e)};var Bi={svg:"http://www.w3.org/2000/svg"},$o='<svg xmlns="'+Bi.svg+'"';function Hd(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(Bi.svg)===-1&&(e=$o+e.substring(4)):(e=$o+">"+e+"</svg>",t=!0);var n=Wd(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function Wd(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function Te(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=Hd(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Bi.svg,e),t&&Ie(n,t),n}var Oi=null;function Uo(){return Oi===null&&(Oi=Te("svg")),Oi}function jo(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function qd(e,t,n,r,i,a){var o=Uo().createSVGMatrix();switch(arguments.length){case 0:return o;case 1:return jo(o,e);case 6:return jo(o,{a:e,b:t,c:n,d:r,e:i,f:a})}}function On(e){return Uo().createSVGTransform()}var zo=/([&<>]{1})/g,Yd=/([&<>\n\r"]{1})/g,Kd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Mi(e,t){function n(r,i){return Kd[i]||i}return e.replace(t,n)}function Ho(e,t){var n,r,i,a,o;switch(e.nodeType){case 3:t.push(Mi(e.textContent,zo));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,n=0,r=i.length;n<r;++n)a=i.item(n),t.push(" ",a.name,'="',Mi(a.value,Yd),'"');if(e.hasChildNodes()){for(t.push(">"),o=e.childNodes,n=0,r=o.length;n<r;++n)Ho(o.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",Mi(e.nodeValue,zo),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Gd(e){for(var t=e.firstChild,n=[];t;)Ho(t,n),t=t.nextSibling;return n.join("")}function Wo(e,t){return Gd(e)}function hr(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Xd(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Jd(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(Xd(e,r))}function Mn(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),Jd(n,t)),n.consolidate()}function nn(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function Zd(e){return["M",e.x,e.y]}function Li(e){return["L",e.x,e.y]}function Qd(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function ep(e,t){const n=e.length,r=[Zd(e[0])];for(let i=1;i<n;i++){const a=e[i-1],o=e[i],l=e[i+1];if(!l||!t){r.push(Li(o));continue}const c=Math.min(t,Vi(o.x-a.x,o.y-a.y),Vi(l.x-o.x,l.y-o.y));if(!c){r.push(Li(o));continue}const d=mr(o,a,c),p=mr(o,a,c*.5),m=mr(o,l,c),w=mr(o,l,c*.5);r.push(Li(d)),r.push(Qd(p,w,m))}return r}function mr(e,t,n){const r=t.x-e.x,i=t.y-e.y,a=Vi(r,i),o=n/a;return{x:e.x+r*o,y:e.y+i*o}}function Vi(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function Fi(e,t,n){Dt(t)&&(n=t,t=null),t||(t={});const r=Te("path",t);return Dt(n)&&(r.dataset.cornerRadius=String(n)),qo(r,e)}function qo(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return Ie(e,{d:nn(ep(t,n))}),e}var $i="hsl(225, 10%, 15%)",tp="white";function ht(e,t){return To(e.eventDefinitions,function(n){return n.$type===t})}function np(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function rp(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function we(e,t,n){var r=en(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||tp}function te(e,t,n){var r=en(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||$i}function Ln(e,t,n,r){var i=en(e),a=i.get("label");return r||a&&a.get("color:color")||t||te(e,n)}function ip(e){var t=e.x+e.width/2,n=e.y+e.height/2,r=e.width/2,i=[["M",t,n],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]];return nn(i)}function Yo(e,t){var n=e.x,r=e.y,i=e.width,a=e.height,o=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,a-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-a],["a",t,t,0,0,1,t,-t],["z"]];return nn(o)}function ap(e){var t=e.width,n=e.height,r=e.x,i=e.y,a=t/2,o=n/2,l=[["M",r+a,i],["l",a,o],["l",-a,o],["l",-a,-o],["z"]];return nn(l)}function op(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return nn(a)}function Vn(e,t={}){return{width:at(e,t),height:Xe(e,t)}}function at(e,t={}){return yn(t,"width")?t.width:e.width}function Xe(e,t={}){return yn(t,"height")?t.height:e.height}const Oe={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};Oe.td=Oe.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Oe.option=Oe.optgroup=[1,'<select multiple="multiple">',"</select>"],Oe.thead=Oe.tbody=Oe.colgroup=Oe.caption=Oe.tfoot=[1,"<table>","</table>"],Oe.polyline=Oe.ellipse=Oe.polygon=Oe.circle=Oe.text=Oe.line=Oe.path=Oe.rect=Oe.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function mt(e,t=globalThis.document){var d;if(typeof e!="string")throw new TypeError("String expected");const n=/^<!--(.*?)-->$/s.exec(e);if(n)return t.createComment(n[1]);const r=(d=/<([\w:]+)/.exec(e))==null?void 0:d[1];if(!r)return t.createTextNode(e);if(e=e.trim(),r==="body"){const p=t.createElement("html");p.innerHTML=e;const{lastChild:m}=p;return m.remove(),m}let[i,a,o]=Object.hasOwn(Oe,r)?Oe[r]:Oe._default,l=t.createElement("div");for(l.innerHTML=a+e+o;i--;)l=l.lastChild;if(l.firstChild===l.lastChild){const{firstChild:p}=l;return p.remove(),p}const c=t.createDocumentFragment();return c.append(...l.childNodes),c}function sp(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function Ze(e,...t){const n=e.style;return se(t,function(r){r&&se(r,function(i,a){n[a]=i})}),e}function Ko(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const lp=Object.prototype.toString;function rn(e){return new Mt(e)}function Mt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Mt.prototype.add=function(e){return this.list.add(e),this},Mt.prototype.remove=function(e){return lp.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},Mt.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Mt.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Mt.prototype.array=function(){return Array.from(this.list)},Mt.prototype.has=Mt.prototype.contains=function(e){return this.list.contains(e)};function Go(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Xo(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}function cp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yr={},Jo;function up(){if(Jo)return yr;Jo=1;var e,t,n;function r(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n=e!=="addEventListener"?"on":""}return yr.bind=function(i,a,o,l){return e||r(),i[e](n+a,o,l||!1),o},yr.unbind=function(i,a,o,l){return t||r(),i[t](n+a,o,l||!1),o},yr}var Zo=up(),fp=cp(Zo),Lt=sp({__proto__:null,default:fp},[Zo]),Qo=["focus","blur"];function dp(e,t,n,r,i){return Qo.indexOf(n)!==-1&&(i=!0),Lt.bind(e,n,function(a){var o=a.target||a.srcElement;a.delegateTarget=Xo(o,t,!0),a.delegateTarget&&r.call(e,a)},i)}function pp(e,t,n,r){return Qo.indexOf(t)!==-1&&(r=!0),Lt.unbind(e,t,n,r)}var Ui={bind:dp,unbind:pp};function kt(e,t){return t=t||document,t.querySelector(e)}function hp(e,t){return t=t||document,t.querySelectorAll(e)}function gr(e){e.parentNode&&e.parentNode.removeChild(e)}function ji(e,t,n,r,i){var a=On();a.setTranslate(t,n);var o=On();o.setRotate(r||0,0,0);var l=On();l.setScale(1,1),Mn(e,[a,o,l])}function es(e,t,n){var r=On();r.setTranslate(t,n),Mn(e,r)}function mp(e,t){var n=On();n.setRotate(t,0,0),Mn(e,n)}function yp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zi={exports:{}},ts;function gp(){if(ts)return zi.exports;ts=1;var e=zi.exports=function(t,n){if(n||(n=16),t===void 0&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,t/i))/Math.log(n)*i;for(var a=r-Math.floor(r),o="",i=0;i<Math.floor(r);i++){var l=Math.floor(Math.random()*n).toString(n);o=l+o}if(a){var c=Math.pow(n,a),l=Math.floor(Math.random()*c).toString(n);o=l+o}var d=parseInt(o,n);return d!==1/0&&d>=Math.pow(2,t)?e(t,n):o};return e.rack=function(t,n,r){var i=function(o){var l=0;do{if(l++>10)if(r)t+=r;else throw new Error("too many ID collisions, use more bits");var c=e(t,n)}while(Object.hasOwnProperty.call(a,c));return a[c]=o,c},a=i.hats={};return i.get=function(o){return i.hats[o]},i.set=function(o,l){return i.hats[o]=l,i},i.bits=t||128,i.base=n||16,i},zi.exports}var vp=gp(),wp=yp(vp);function Ct(e){if(!(this instanceof Ct))return new Ct(e);e=e||[128,36,1],this._seed=e.length?wp.rack(e[0],e[1],e[2]):e}Ct.prototype.next=function(e){return this._seed(e||!0)},Ct.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},Ct.prototype.claim=function(e,t){this._seed.set(e,t||!0)},Ct.prototype.assigned=function(e){return this._seed.get(e)||!1},Ct.prototype.unclaim=function(e){delete this._seed.hats[e]},Ct.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var bp=new Ct,Ep=10,vr=3,_p=1.5,wr=10,xp=4,wn=.95,Sp=1,Ap=.25;function an(e,t,n,r,i,a,o){At.call(this,t,o);var l=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,d=e&&e.defaultLabelColor;function p(h){return n.computeStyle(h,{strokeLinecap:"round",strokeLinejoin:"round",stroke:$i,strokeWidth:2,fill:"white"})}function m(h){return n.computeStyle(h,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:$i,strokeWidth:2})}function w(h,f){var{ref:u={x:0,y:0},scale:b=1,element:A,parentGfx:U=i._svg}=f,ee=Te("marker",{id:h,viewBox:"0 0 20 20",refX:u.x,refY:u.y,markerWidth:20*b,markerHeight:20*b,orient:"auto"});Ve(ee,A);var ye=kt(":scope > defs",U);ye||(ye=Te("defs"),Ve(U,ye)),Ve(ye,ee)}function g(h,f,u,b){var A=bp.nextPrefixed("marker-");return M(h,A,f,u,b),"url(#"+A+")"}function M(h,f,u,b,A){if(u==="sequenceflow-end"){var U=Te("path",{d:"M 1 5 L 11 10 L 1 15 Z",...p({fill:A,stroke:A,strokeWidth:1})});w(f,{element:U,ref:{x:11,y:10},scale:.5,parentGfx:h})}if(u==="messageflow-start"){var ee=Te("circle",{cx:6,cy:6,r:3.5,...p({fill:b,stroke:A,strokeWidth:1,strokeDasharray:[1e4,1]})});w(f,{element:ee,ref:{x:6,y:6},parentGfx:h})}if(u==="messageflow-end"){var ye=Te("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...p({fill:b,stroke:A,strokeWidth:1,strokeDasharray:[1e4,1]})});w(f,{element:ye,ref:{x:8.5,y:5},parentGfx:h})}if(u==="association-start"){var ge=Te("path",{d:"M 11 5 L 1 10 L 11 15",...m({fill:"none",stroke:A,strokeWidth:1.5,strokeDasharray:[1e4,1]})});w(f,{element:ge,ref:{x:1,y:10},scale:.5,parentGfx:h})}if(u==="association-end"){var ae=Te("path",{d:"M 1 5 L 11 10 L 1 15",...m({fill:"none",stroke:A,strokeWidth:1.5,strokeDasharray:[1e4,1]})});w(f,{element:ae,ref:{x:11,y:10},scale:.5,parentGfx:h})}if(u==="conditional-flow-marker"){var F=Te("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...p({fill:b,stroke:A})});w(f,{element:F,ref:{x:-1,y:10},scale:.5,parentGfx:h})}if(u==="conditional-default-flow-marker"){var X=Te("path",{d:"M 6 4 L 10 16",...p({stroke:A,fill:"none"})});w(f,{element:X,ref:{x:0,y:10},scale:.5,parentGfx:h})}}function O(h,f,u,b,A={}){It(b)&&(A=b,b=0),b=b||0,A=p(A);var U=f/2,ee=u/2,ye=Te("circle",{cx:U,cy:ee,r:Math.round((f+u)/4-b),...A});return Ve(h,ye),ye}function N(h,f,u,b,A,U){It(A)&&(U=A,A=0),A=A||0,U=p(U);var ee=Te("rect",{x:A,y:A,width:f-A*2,height:u-A*2,rx:b,ry:b,...U});return Ve(h,ee),ee}function E(h,f,u,b){var A=f/2,U=u/2,ee=[{x:A,y:0},{x:f,y:U},{x:A,y:u},{x:0,y:U}],ye=ee.map(function(ae){return ae.x+","+ae.y}).join(" ");b=p(b);var ge=Te("polygon",{...b,points:ye});return Ve(h,ge),ge}function R(h,f,u,b){u=m(u);var A=Fi(f,u,b);return Ve(h,A),A}function y(h,f,u){return R(h,f,u,5)}function v(h,f,u){u=m(u);var b=Te("path",{...u,d:f});return Ve(h,b),b}function k(h,f,u,b){return v(f,u,ue({"data-marker":h},b))}function D(h){return le[h]}function x(h){return function(f,u,b){return D(h)(f,u,b)}}var _={"bpmn:MessageEventDefinition":function(h,f,u={},b){var A=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.235,my:.315}}),U=b?te(f,c,u.stroke):we(f,l,u.fill),ee=b?we(f,l,u.fill):te(f,c,u.stroke),ye=v(h,A,{fill:U,stroke:ee,strokeWidth:1});return ye},"bpmn:TimerEventDefinition":function(h,f,u={}){var b=u.width||f.width,A=u.height||f.height,U=u.width?1:2,ee=O(h,b,A,.2*A,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:U}),ye=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:b,containerHeight:A,position:{mx:.5,my:.5}});v(h,ye,{stroke:te(f,c,u.stroke),strokeWidth:U});for(var ge=0;ge<12;ge++){var ae=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:b,containerHeight:A,position:{mx:.5,my:.5}}),F=b/2,X=A/2;v(h,ae,{strokeWidth:1,stroke:te(f,c,u.stroke),transform:"rotate("+ge*30+","+X+","+F+")"})}return ee},"bpmn:EscalationEventDefinition":function(h,f,u={},b){var A=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.5,my:.2}}),U=b?te(f,c,u.stroke):we(f,l,u.fill);return v(h,A,{fill:U,stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(h,f,u={}){var b=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.5,my:.222}});return v(h,b,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(h,f,u={},b){var A=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:.57,my:.263}}),U=b?te(f,c,u.stroke):we(f,l,u.fill);return v(h,A,{fill:U,stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(h,f,u={},b){var A=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.2,my:.722}}),U=b?te(f,c,u.stroke):we(f,l,u.fill);return v(h,A,{fill:U,stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(h,f,u={},b){var A=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:.638,my:-.055}}),U=b?te(f,c,u.stroke):"none",ee=v(h,A,{fill:U,stroke:te(f,c,u.stroke),strokeWidth:1});return mp(ee,45),ee},"bpmn:CompensateEventDefinition":function(h,f,u={},b){var A=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.22,my:.5}}),U=b?te(f,c,u.stroke):we(f,l,u.fill);return v(h,A,{fill:U,stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(h,f,u={},b){var A=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.5,my:.2}}),U=b?te(f,c,u.stroke):we(f,l,u.fill);return v(h,A,{strokeWidth:1,fill:U,stroke:te(f,c,u.stroke)})},"bpmn:MultipleEventDefinition":function(h,f,u={},b){var A=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.211,my:.36}}),U=b?te(f,c,u.stroke):we(f,l,u.fill);return v(h,A,{fill:U,stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(h,f,u={}){var b=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:u.width||f.width,containerHeight:u.height||f.height,position:{mx:.458,my:.194}});return v(h,b,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(h,f,u={}){var b=O(h,f.width,f.height,8,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:4});return b}};function j(h,f,u={},b){var A=Re(h),U=np(A),ee=b||h;return A.get("eventDefinitions")&&A.get("eventDefinitions").length>1?A.get("parallelMultiple")?_["bpmn:ParallelMultipleEventDefinition"](f,ee,u,U):_["bpmn:MultipleEventDefinition"](f,ee,u,U):ht(A,"bpmn:MessageEventDefinition")?_["bpmn:MessageEventDefinition"](f,ee,u,U):ht(A,"bpmn:TimerEventDefinition")?_["bpmn:TimerEventDefinition"](f,ee,u,U):ht(A,"bpmn:ConditionalEventDefinition")?_["bpmn:ConditionalEventDefinition"](f,ee,u,U):ht(A,"bpmn:SignalEventDefinition")?_["bpmn:SignalEventDefinition"](f,ee,u,U):ht(A,"bpmn:EscalationEventDefinition")?_["bpmn:EscalationEventDefinition"](f,ee,u,U):ht(A,"bpmn:LinkEventDefinition")?_["bpmn:LinkEventDefinition"](f,ee,u,U):ht(A,"bpmn:ErrorEventDefinition")?_["bpmn:ErrorEventDefinition"](f,ee,u,U):ht(A,"bpmn:CancelEventDefinition")?_["bpmn:CancelEventDefinition"](f,ee,u,U):ht(A,"bpmn:CompensateEventDefinition")?_["bpmn:CompensateEventDefinition"](f,ee,u,U):ht(A,"bpmn:TerminateEventDefinition")?_["bpmn:TerminateEventDefinition"](f,ee,u,U):null}var $={ParticipantMultiplicityMarker:function(h,f,u={}){var b=at(f,u),A=Xe(f,u),U=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:b,containerHeight:A,position:{mx:(b/2-6)/b,my:(A-15)/A}});k("participant-multiplicity",h,U,{strokeWidth:2,fill:we(f,l,u.fill),stroke:te(f,c,u.stroke)})},SubProcessMarker:function(h,f,u={}){var b=N(h,14,14,0,{strokeWidth:1,fill:we(f,l,u.fill),stroke:te(f,c,u.stroke)});es(b,f.width/2-7.5,f.height-20);var A=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:f.width,containerHeight:f.height,position:{mx:(f.width/2-7.5)/f.width,my:(f.height-20)/f.height}});k("sub-process",h,A,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke)})},ParallelMarker:function(h,f,u){var b=at(f,u),A=Xe(f,u),U=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:b,containerHeight:A,position:{mx:(b/2+u.parallel)/b,my:(A-20)/A}});k("parallel",h,U,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke)})},SequentialMarker:function(h,f,u){var b=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:(f.width/2+u.seq)/f.width,my:(f.height-19)/f.height}});k("sequential",h,b,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke)})},CompensationMarker:function(h,f,u){var b=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:(f.width/2+u.compensation)/f.width,my:(f.height-13)/f.height}});k("compensation",h,b,{strokeWidth:1,fill:we(f,l,u.fill),stroke:te(f,c,u.stroke)})},LoopMarker:function(h,f,u){var b=at(f,u),A=Xe(f,u),U=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:b,containerHeight:A,position:{mx:(b/2+u.loop)/b,my:(A-7)/A}});k("loop",h,U,{strokeWidth:1.5,fill:"none",stroke:te(f,c,u.stroke),strokeMiterlimit:.5})},AdhocMarker:function(h,f,u){var b=at(f,u),A=Xe(f,u),U=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:b,containerHeight:A,position:{mx:(b/2+u.adhoc)/b,my:(A-15)/A}});k("adhoc",h,U,{strokeWidth:1,fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke)})}};function T(h,f,u,b){$[h](f,u,b)}function q(h,f,u=[],b={}){b={fill:b.fill,stroke:b.stroke,width:at(f,b),height:Xe(f,b)};var A=Re(f),U=u.includes("SubProcessMarker");U?b={...b,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:b={...b,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},A.get("isForCompensation")&&u.push("CompensationMarker"),fe(A,"bpmn:AdHocSubProcess")&&(u.push("AdhocMarker"),U||ue(b,{compensation:b.compensation-18}));var ee=A.get("loopCharacteristics"),ye=ee&&ee.get("isSequential");ee&&(ue(b,{compensation:b.compensation-18}),u.includes("AdhocMarker")&&ue(b,{seq:-23,loop:-18,parallel:-24}),ye===void 0&&u.push("LoopMarker"),ye===!1&&u.push("ParallelMarker"),ye===!0&&u.push("SequentialMarker")),u.includes("CompensationMarker")&&u.length===1&&ue(b,{compensation:-8}),se(u,function(ge){T(ge,h,f,b)})}function de(h,f,u={}){u=ue({size:{width:100}},u);var b=a.createText(f||"",u);return pt(b).add("djs-label"),Ve(h,b),b}function J(h,f,u,b={}){var A=Re(f),U=Vn({x:f.x,y:f.y,width:f.width,height:f.height},b);return de(h,A.name,{align:u,box:U,padding:7,style:{fill:Ln(f,d,c,b.stroke)}})}function K(h,f,u={}){var b={width:f.width,height:f.height,x:f.width/2+f.x,y:f.height/2+f.y};return de(h,pr(f),{box:b,style:ue({},a.getExternalStyle(),{fill:Ln(f,d,c,u.stroke)})})}function Y(h,f,u,b={}){var A=Po(u),U=de(h,f,{box:{height:30,width:A?Xe(u,b):at(u,b)},align:"center-middle",style:{fill:Ln(u,d,c,b.stroke)}});if(A){var ee=-1*Xe(u,b);ji(U,0,-ee,270)}}function Z(h,f,u={}){var{width:b,height:A}=Vn(f,u);return N(h,b,A,wr,{...u,fill:we(f,l,u.fill),fillOpacity:wn,stroke:te(f,c,u.stroke)})}function W(h,f,u={}){var b=Re(f),A=we(f,l,u.fill),U=te(f,c,u.stroke);return(b.get("associationDirection")==="One"||b.get("associationDirection")==="Both")&&(u.markerEnd=g(h,"association-end",A,U)),b.get("associationDirection")==="Both"&&(u.markerStart=g(h,"association-start",A,U)),u=_e(u,["markerStart","markerEnd"]),y(h,f.waypoints,{...u,stroke:U,strokeDasharray:"0, 5"})}function G(h,f,u={}){var b=we(f,l,u.fill),A=te(f,c,u.stroke),U=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:.474,my:.296}}),ee=v(h,U,{fill:b,fillOpacity:wn,stroke:A}),ye=Re(f);if(rp(ye)){var ge=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:.33,my:(f.height-18)/f.height}});v(h,ge,{strokeWidth:2,fill:b,stroke:A})}return ee}function P(h,f,u={}){return O(h,f.width,f.height,{fillOpacity:wn,...u,fill:we(f,l,u.fill),stroke:te(f,c,u.stroke)})}function z(h,f,u={}){return E(h,f.width,f.height,{fill:we(f,l,u.fill),fillOpacity:wn,stroke:te(f,c,u.stroke)})}function C(h,f,u={}){var b=N(h,at(f,u),Xe(f,u),0,{fill:we(f,l,u.fill),fillOpacity:u.fillOpacity||wn,stroke:te(f,c,u.stroke),strokeWidth:1.5}),A=Re(f);if(fe(A,"bpmn:Lane")){var U=A.get("name");Y(h,U,f,u)}return b}function I(h,f,u={}){var b=Z(h,f,u),A=tn(f);if(Td(f)&&(Ie(b,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!A)){var U=Re(f).flowElements||[],ee=U.filter(ye=>fe(ye,"bpmn:StartEvent"));ee.length===1&&H(ee[0],h,u,f)}return J(h,f,A?"center-top":"center-middle",u),A?q(h,f,void 0,u):q(h,f,["SubProcessMarker"],u),b}function H(h,f,u,b){var A=22,U={fill:we(b,l,u.fill),stroke:te(b,c,u.stroke),width:A,height:A},ee=Re(h).isInterrupting,ye=ee?0:3,ge=ee?1:1.2,ae=20,F=(A-ae)/2,X="translate("+F+","+F+")";O(f,ae,ae,{fill:U.fill,stroke:U.stroke,strokeWidth:ge,strokeDasharray:ye,transform:X}),j(h,f,U,b)}function ie(h,f,u={}){var b=Z(h,f,u);return J(h,f,"center-middle",u),q(h,f,void 0,u),b}var le=this.handlers={"bpmn:AdHocSubProcess":function(h,f,u={}){return tn(f)?u=_e(u,["fill","stroke","width","height"]):u=_e(u,["fill","stroke"]),I(h,f,u)},"bpmn:Association":function(h,f,u={}){return u=_e(u,["fill","stroke"]),W(h,f,u)},"bpmn:BoundaryEvent":function(h,f,u={}){var{renderIcon:b=!0}=u;u=_e(u,["fill","stroke"]);var A=Re(f),U=A.get("cancelActivity");u={strokeWidth:1.5,fill:we(f,l,u.fill),fillOpacity:Sp,stroke:te(f,c,u.stroke)},U||(u.strokeDasharray="6");var ee=P(h,f,u);return O(h,f.width,f.height,vr,{...u,fill:"none"}),b&&j(f,h,u),ee},"bpmn:BusinessRuleTask":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=ie(h,f,u),A=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),U=v(h,A);Ie(U,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1});var ee=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),ye=v(h,ee);return Ie(ye,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:CallActivity":function(h,f,u={}){return u=_e(u,["fill","stroke"]),I(h,f,{strokeWidth:5,...u})},"bpmn:ComplexGateway":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=z(h,f,u),A=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:f.width,containerHeight:f.height,position:{mx:.46,my:.26}});return v(h,A,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:DataInput":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=r.getRawPath("DATA_ARROW"),A=G(h,f,u);return v(h,b,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:1}),A},"bpmn:DataInputAssociation":function(h,f,u={}){return u=_e(u,["fill","stroke"]),W(h,f,{...u,markerEnd:g(h,"association-end",we(f,l,u.fill),te(f,c,u.stroke))})},"bpmn:DataObject":function(h,f,u={}){return u=_e(u,["fill","stroke"]),G(h,f,u)},"bpmn:DataObjectReference":x("bpmn:DataObject"),"bpmn:DataOutput":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=r.getRawPath("DATA_ARROW"),A=G(h,f,u);return v(h,b,{strokeWidth:1,fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke)}),A},"bpmn:DataOutputAssociation":function(h,f,u={}){return u=_e(u,["fill","stroke"]),W(h,f,{...u,markerEnd:g(h,"association-end",we(f,l,u.fill),te(f,c,u.stroke))})},"bpmn:DataStoreReference":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:f.width,containerHeight:f.height,position:{mx:0,my:.133}});return v(h,b,{fill:we(f,l,u.fill),fillOpacity:wn,stroke:te(f,c,u.stroke),strokeWidth:2})},"bpmn:EndEvent":function(h,f,u={}){var{renderIcon:b=!0}=u;u=_e(u,["fill","stroke"]);var A=P(h,f,{...u,strokeWidth:4});return b&&j(f,h,u),A},"bpmn:EventBasedGateway":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=Re(f),A=z(h,f,u);O(h,f.width,f.height,f.height*.2,{fill:we(f,"none",u.fill),stroke:te(f,c,u.stroke),strokeWidth:1});var U=b.get("eventGatewayType"),ee=!!b.get("instantiate");function ye(){var ae=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:f.width,containerHeight:f.height,position:{mx:.36,my:.44}});v(h,ae,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:2})}if(U==="Parallel"){var ge=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:f.width,containerHeight:f.height,position:{mx:.474,my:.296}});v(h,ge,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:1})}else U==="Exclusive"&&(ee||O(h,f.width,f.height,f.height*.26,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:1}),ye());return A},"bpmn:ExclusiveGateway":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=z(h,f,u),A=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:f.width,containerHeight:f.height,position:{mx:.32,my:.3}}),U=en(f);return U.get("isMarkerVisible")&&v(h,A,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:Gateway":function(h,f,u={}){return u=_e(u,["fill","stroke"]),z(h,f,u)},"bpmn:Group":function(h,f,u={}){return u=_e(u,["fill","stroke","width","height"]),N(h,f.width,f.height,wr,{stroke:te(f,c,u.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:at(f,u),height:Xe(f,u)})},"bpmn:InclusiveGateway":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=z(h,f,u);return O(h,f.width,f.height,f.height*.24,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:2.5}),b},"bpmn:IntermediateEvent":function(h,f,u={}){var{renderIcon:b=!0}=u;u=_e(u,["fill","stroke"]);var A=P(h,f,{...u,strokeWidth:1.5});return O(h,f.width,f.height,vr,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:1.5}),b&&j(f,h,u),A},"bpmn:IntermediateCatchEvent":x("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":x("bpmn:IntermediateEvent"),"bpmn:Lane":function(h,f,u={}){return u=_e(u,["fill","stroke","width","height"]),C(h,f,{...u,fillOpacity:Ap})},"bpmn:ManualTask":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=ie(h,f,u),A=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return v(h,A,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:.5}),b},"bpmn:MessageFlow":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=Re(f),A=en(f),U=we(f,l,u.fill),ee=te(f,c,u.stroke),ye=y(h,f.waypoints,{markerEnd:g(h,"messageflow-end",U,ee),markerStart:g(h,"messageflow-start",U,ee),stroke:ee,strokeDasharray:"10, 11",strokeWidth:1.5});if(b.get("messageRef")){var ge=ye.getPointAtLength(ye.getTotalLength()/2),ae=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:ge.x,y:ge.y}}),F={strokeWidth:1};A.get("messageVisibleKind")==="initiating"?(F.fill=U,F.stroke=ee):(F.fill=ee,F.stroke=U);var X=v(h,ae,F),Q=b.get("messageRef"),me=Q.get("name"),ve=de(h,me,{align:"center-top",fitBox:!0,style:{fill:ee}}),be=X.getBBox(),Ee=ve.getBBox(),Ne=ge.x-Ee.width/2,je=ge.y+be.height/2+Ep;ji(ve,Ne,je,0)}return ye},"bpmn:ParallelGateway":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=z(h,f,u),A=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:f.width,containerHeight:f.height,position:{mx:.46,my:.2}});return v(h,A,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:Participant":function(h,f,u={}){u=_e(u,["fill","stroke","width","height"]);var b=C(h,f,u),A=tn(f),U=Po(f),ee=Re(f),ye=ee.get("name");if(A){var ge=U?[{x:30,y:0},{x:30,y:Xe(f,u)}]:[{x:0,y:30},{x:at(f,u),y:30}];R(h,ge,{stroke:te(f,c,u.stroke),strokeWidth:_p}),Y(h,ye,f,u)}else{var ae=Vn(f,u);U||(ae.height=at(f,u),ae.width=Xe(f,u));var F=de(h,ye,{box:ae,align:"center-middle",style:{fill:Ln(f,d,c,u.stroke)}});if(!U){var X=-1*Xe(f,u);ji(F,0,-X,270)}}return ee.get("participantMultiplicity")&&T("ParticipantMultiplicityMarker",h,f,u),b},"bpmn:ReceiveTask":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=Re(f),A=ie(h,f,u),U;return b.get("instantiate")?(O(h,28,28,20*.22,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1}),U=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):U=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),v(h,U,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1}),A},"bpmn:ScriptTask":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=ie(h,f,u),A=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return v(h,A,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:SendTask":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=ie(h,f,u),A=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return v(h,A,{fill:te(f,c,u.stroke),stroke:we(f,l,u.fill),strokeWidth:1}),b},"bpmn:SequenceFlow":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=we(f,l,u.fill),A=te(f,c,u.stroke),U=y(h,f.waypoints,{markerEnd:g(h,"sequenceflow-end",b,A),stroke:A}),ee=Re(f),{source:ye}=f;if(ye){var ge=Re(ye);ee.get("conditionExpression")&&fe(ge,"bpmn:Activity")&&Ie(U,{markerStart:g(h,"conditional-flow-marker",b,A)}),ge.get("default")&&(fe(ge,"bpmn:Gateway")||fe(ge,"bpmn:Activity"))&&ge.get("default")===ee&&Ie(U,{markerStart:g(h,"conditional-default-flow-marker",b,A)})}return U},"bpmn:ServiceTask":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=ie(h,f,u);O(h,10,10,{fill:we(f,l,u.fill),stroke:"none",transform:"translate(6, 6)"});var A=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});v(h,A,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1}),O(h,10,10,{fill:we(f,l,u.fill),stroke:"none",transform:"translate(11, 10)"});var U=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return v(h,U,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:1}),b},"bpmn:StartEvent":function(h,f,u={}){var{renderIcon:b=!0}=u;u=_e(u,["fill","stroke"]);var A=Re(f);A.get("isInterrupting")||(u={...u,strokeDasharray:"6"});var U=P(h,f,u);return b&&j(f,h,u),U},"bpmn:SubProcess":function(h,f,u={}){return tn(f)?u=_e(u,["fill","stroke","width","height"]):u=_e(u,["fill","stroke"]),I(h,f,u)},"bpmn:Task":function(h,f,u={}){return u=_e(u,["fill","stroke"]),ie(h,f,u)},"bpmn:TextAnnotation":function(h,f,u={}){u=_e(u,["fill","stroke"]);var{width:b,height:A}=Vn(f,u),U=N(h,b,A,0,0,{fill:"none",stroke:"none"}),ee=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:b,containerHeight:A,position:{mx:0,my:0}});v(h,ee,{stroke:te(f,c,u.stroke)});var ye=Re(f),ge=ye.get("text")||"";return de(h,ge,{align:"left-top",box:Vn(f,u),padding:Lo,style:{fill:Ln(f,d,c,u.stroke)}}),U},"bpmn:Transaction":function(h,f,u={}){tn(f)?u=_e(u,["fill","stroke","width","height"]):u=_e(u,["fill","stroke"]);var b=I(h,f,{strokeWidth:1.5,...u}),A=n.style(["no-fill","no-events"],{stroke:te(f,c,u.stroke),strokeWidth:1.5}),U=tn(f);return U||(u={}),N(h,at(f,u),Xe(f,u),wr-vr,vr,A),b},"bpmn:UserTask":function(h,f,u={}){u=_e(u,["fill","stroke"]);var b=ie(h,f,u),A=15,U=12,ee=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:A,y:U}});v(h,ee,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:.5});var ye=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:A,y:U}});v(h,ye,{fill:we(f,l,u.fill),stroke:te(f,c,u.stroke),strokeWidth:.5});var ge=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:A,y:U}});return v(h,ge,{fill:te(f,c,u.stroke),stroke:te(f,c,u.stroke),strokeWidth:.5}),b},label:function(h,f,u={}){return K(h,f,u)}};this._drawPath=v,this._renderer=D}ft(an,At),an.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],an.prototype.canRender=function(e){return fe(e,"bpmn:BaseElement")},an.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},an.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},an.prototype.getShapePath=function(e){return Id(e)?Yo(e,xp):fe(e,"bpmn:Event")?ip(e):fe(e,"bpmn:Activity")?Yo(e,wr):fe(e,"bpmn:Gateway")?ap(e):op(e)};function _e(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}var kp=0,Cp={width:150,height:50};function Rp(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function Tp(e){return It(e)?ue({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var Hi=null;function Np(){return Hi||(Hi=document.createElement("canvas").getContext("2d")),Hi}function Ip(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(ns(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function ns(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function Dp(e,t){var n=Np();if(!n)return{width:0,height:0};n.font=Ip(t),"letterSpacing"in n&&(n.letterSpacing=ns(t.letterSpacing)||"0px");var r=e==="",i=r?"dummy":e.replace(/\s+$/,""),a=n.measureText(i);return{width:r?0:a.width,height:"fontBoundingBoxAscent"in a?a.fontBoundingBoxAscent+a.fontBoundingBoxDescent:a.actualBoundingBoxAscent+a.actualBoundingBoxDescent}}function Pp(e,t,n){for(var r=e.shift(),i=r,a;;){if(a=Dp(i,n),a.width=i?a.width:0,i===" "||i===""||a.width<Math.round(t)||i.length<2)return Bp(e,i,r,a);i=Mp(i,a.width,t)}}function Bp(e,t,n,r){if(t.length<n.length){var i=n.slice(t.length).trim();e.unshift(i)}return{width:r.width,height:r.height,text:t}}var rs="­";function Op(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],a=0;if(n.length>1)for(;r=n.shift();)if(r.length+a<t)i.push(r),a+=r.length;else{(r==="-"||r===rs)&&i.pop();break}var o=i[i.length-1];return o&&o===rs&&(i[i.length-1]="-"),i.join("")}function Mp(e,t,n){var r=Math.max(e.length*(n/t),1),i=Op(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function br(e){this._config=ue({},{size:Cp,padding:kp,style:{},align:"center-top"},e||{})}br.prototype.createText=function(e,t){return this.layoutText(e,t).element},br.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},br.prototype.layoutText=function(e,t){for(var n=ue({},this._config.size,t.box),r=ue({},this._config.style,t.style),i=Rp(t.align||this._config.align),a=Tp(t.padding!==void 0?t.padding:this._config.padding),o=t.fitBox||!1,l=Lp(r),c=e.split(/\u00AD?\r?\n/),d=[],p=n.width-a.left-a.right;c.length;)d.push(Pp(c,p,r));i.vertical==="middle"&&(a.top=a.bottom=0);var m=vn(d,function(N,E,R){return N+(l||E.height)},0)+a.top+a.bottom,w=vn(d,function(N,E,R){return E.width>N?E.width:N},0),g=a.top;i.vertical==="middle"&&(g+=(n.height-m)/2),g-=(l||d[0].height)/4;var M=Te("text");Ie(M,r),se(d,function(N){var E;switch(g+=l||N.height,i.horizontal){case"left":E=a.left;break;case"right":E=(o?w:p)-a.right-N.width;break;default:E=Math.max(((o?w:p)-N.width)/2+a.left,0)}var R=Te("tspan");Ie(R,{x:E,y:g}),R.textContent=N.text,Ve(M,R)});var O={width:w,height:m};return{dimensions:O,element:M}};function Lp(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Vp=12,Fp=1.2,$p=40;function is(e){var t=ue({fontFamily:"Arial, sans-serif",fontSize:Vp,fontWeight:"normal",lineHeight:Fp},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=ue({},t,{fontSize:n},e&&e.externalStyle||{}),i=new br({style:t});this.getExternalLabelBounds=function(o,l){var c={width:Math.max(o.width,Pn.width),height:30},d=a(l,c,{style:r});return{x:Math.round(o.x+o.width/2-d.width/2),y:o.y,width:Math.ceil(d.width),height:Math.ceil(d.height)}},this.getTextAnnotationBounds=function(o,l){var c=a(l,o,{style:t,align:"left-top",padding:Lo});return{x:o.x,y:o.y,width:o.width,height:Math.max($p,Math.round(c.height))}},this.getDimensions=function(o,l){return i.getDimensions(o,l||{})};function a(o,l,c){return i.getDimensions(o,ue({box:l},c))}this.createText=function(o,l){return i.createText(o,l||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}is.$inject=["config.textRenderer"];function Up(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(t){return this.pathMap[t].d},this.getScaledPath=function(t,n){var r=this.pathMap[t],i,a;n.abspos?(i=n.abspos.x,a=n.abspos.y):(i=n.containerWidth*n.position.mx,a=n.containerHeight*n.position.my);var o={};if(n.position){for(var l=n.containerHeight/r.height*n.yScaleFactor,c=n.containerWidth/r.width*n.xScaleFactor,d=0;d<r.heightElements.length;d++)o["y"+d]=r.heightElements[d]*l;for(var p=0;p<r.widthElements.length;p++)o["x"+p]=r.widthElements[p]*c}var m=Wp(r.d,{mx:i,my:a,e:o});return m}}var jp=/\{([^{}]+)\}/g,zp=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function Hp(e,t,n){var r=n;return t.replace(zp,function(i,a,o,l,c){a=a||l,r&&(a in r&&(r=r[a]),typeof r=="function"&&c&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function Wp(e,t){return String(e).replace(jp,function(n,r){return Hp(n,r,t)})}const qp={__init__:["bpmnRenderer"],bpmnRenderer:["type",an],textRenderer:["type",is],pathMap:["type",Up]};function Yp(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const as={translate:["value",Yp]};function Kp(e,t){return!e||!t?-1:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}var Gp=/,?([a-z]),?/gi,os=parseFloat,De=Math,Vt=De.PI,yt=De.min,gt=De.max,ss=De.pow,Ft=De.abs,Xp=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig,Jp=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig,ls=Array.isArray||function(e){return e instanceof Array};function Zp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qp(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function eh(e){function t(){var n=Array.prototype.slice.call(arguments,0),r=n.join("␀"),i=t.cache=t.cache||{},a=t.count=t.count||[];return Zp(i,r)?(Qp(a,r),i[r]):(a.length>=1e3&&delete i[a.shift()],a.push(r),i[r]=e(...arguments),i[r])}return t}function th(e){if(!e)return null;var t={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},n=[];return String(e).replace(Xp,function(r,i,a){var o=[],l=i.toLowerCase();for(a.replace(Jp,function(c,d){d&&o.push(+d)}),l=="m"&&o.length>2&&(n.push([i,...o.splice(0,2)]),l="l",i=i=="m"?"l":"L");o.length>=t[l]&&(n.push([i,...o.splice(0,t[l])]),!!t[l]););}),n.toString=qi,n}function nh(e){for(var t=0,n=e.length;t<n;t++){var r=e[t][0];if(typeof r=="string"&&r!==r.toUpperCase())return!1}return!0}function rh(e){for(var t=0,n=e.length;t<n;t++){var r=e[t][0];if(r!=="M"&&r!=="C")return!1}return!0}function Wi(e,t,n,r){return arguments.length===1&&(t=e.y,n=e.width,r=e.height,e=e.x),{x:e,y:t,width:n,height:r,x2:e+n,y2:t+r}}function qi(){return this.join(",").replace(Gp,"$1")}function ih(e){for(var t=new Array(e.length),n=0,r=e.length;n<r;n++)for(var i=e[n],a=t[n]=new Array(i.length),o=0,l=i.length;o<l;o++)a[o]=i[o];return t.toString=qi,t}function cs(e,t,n,r,i,a,o,l,c){var d=1-c,p=ss(d,3),m=ss(d,2),w=c*c,g=w*c,M=p*e+m*3*c*n+d*3*c*c*i+g*o,O=p*t+m*3*c*r+d*3*c*c*a+g*l;return{x:Er(M),y:Er(O)}}function us(e){var t=fh(...e);return Wi(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function $t(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function ah(e,t){return e=Wi(e),t=Wi(t),$t(t,e.x,e.y)||$t(t,e.x2,e.y)||$t(t,e.x,e.y2)||$t(t,e.x2,e.y2)||$t(e,t.x,t.y)||$t(e,t.x2,t.y)||$t(e,t.x,t.y2)||$t(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 fs(e,t,n,r,i){var a=-3*t+9*n-9*r+3*i,o=e*a+6*t-12*n+6*r;return e*o-3*t+3*n}function ds(e,t,n,r,i,a,o,l,c){c==null&&(c=1),c=c>1?1:c<0?0:c;for(var d=c/2,p=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],w=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],g=0,M=0;M<p;M++){var O=d*m[M]+d,N=fs(O,e,n,i,o),E=fs(O,t,r,a,l),R=N*N+E*E;g+=w[M]*De.sqrt(R)}return d*g}function oh(e,t,n,r,i,a,o,l){if(!(gt(e,n)<yt(i,o)||yt(e,n)>gt(i,o)||gt(t,r)<yt(a,l)||yt(t,r)>gt(a,l))){var c=(e*r-t*n)*(i-o)-(e-n)*(i*l-a*o),d=(e*r-t*n)*(a-l)-(t-r)*(i*l-a*o),p=(e-n)*(a-l)-(t-r)*(i-o);if(p){var m=Er(c/p),w=Er(d/p),g=+m.toFixed(2),M=+w.toFixed(2);if(!(g<+yt(e,n).toFixed(2)||g>+gt(e,n).toFixed(2)||g<+yt(i,o).toFixed(2)||g>+gt(i,o).toFixed(2)||M<+yt(t,r).toFixed(2)||M>+gt(t,r).toFixed(2)||M<+yt(a,l).toFixed(2)||M>+gt(a,l).toFixed(2)))return{x:m,y:w}}}}function Er(e){return Math.round(e*1e11)/1e11}function sh(e,t,n){var r=us(e),i=us(t);if(!ah(r,i))return[];var a=ds(...e),o=ds(...t),l=ps(e)?1:~~(a/5)||1,c=ps(t)?1:~~(o/5)||1,d=new Array(l+1),p=new Array(c+1),m={},w=[],g,M;for(g=0;g<l+1;g++){var O=cs(...e,g/l);d[g]={x:O.x,y:O.y,t:g/l}}for(g=0;g<c+1;g++)O=cs(...t,g/c),p[g]={x:O.x,y:O.y,t:g/c};for(g=0;g<l;g++)for(M=0;M<c;M++){var N=d[g],E=d[g+1],R=p[M],y=p[M+1],v=Ft(E.x-N.x)<.01?"y":"x",k=Ft(y.x-R.x)<.01?"y":"x",D=oh(N.x,N.y,E.x,E.y,R.x,R.y,y.x,y.y),x;if(D){if(x=D.x.toFixed(9)+"#"+D.y.toFixed(9),m[x])continue;m[x]=!0;var _=N.t+Ft((D[v]-N[v])/(E[v]-N[v]))*(E.t-N.t),j=R.t+Ft((D[k]-R[k])/(y[k]-R[k]))*(y.t-R.t);_>=0&&_<=1&&j>=0&&j<=1&&w.push({x:D.x,y:D.y,t1:_,t2:j})}}return w}function lh(e,t,n){e=ys(e),t=ys(t);for(var r,i,a,o,l,c,d,p,m,w,g=[],M=0,O=e.length;M<O;M++){var N=e[M];if(N[0]=="M")r=l=N[1],i=c=N[2];else{N[0]=="C"?(m=[r,i,...N.slice(1)],r=m[6],i=m[7]):(m=[r,i,r,i,l,c,l,c],r=l,i=c);for(var E=0,R=t.length;E<R;E++){var y=t[E];if(y[0]=="M")a=d=y[1],o=p=y[2];else{y[0]=="C"?(w=[a,o,...y.slice(1)],a=w[6],o=w[7]):(w=[a,o,a,o,d,p,d,p],a=d,o=p);var v=sh(m,w);{for(var k=0,D=v.length;k<D;k++)v[k].segment1=M,v[k].segment2=E,v[k].bez1=m,v[k].bez2=w;g=g.concat(v)}}}}}return g}function ch(e){return ls(e)&&ls(e[0])}function uh(e){if(nh(e))return e;var t=new Array(e.length),n=0,r=0,i=0,a=0,o=0,l;e[0][0]=="M"&&(n=+e[0][1],r=+e[0][2],i=n,a=r,o++,t[0]=["M",n,r]);for(var c,d,p=o,m=e.length;p<m;p++){if(d=e[p],l=d[0],t[p]=c=new Array(d.length),l!=l.toUpperCase())switch(c[0]=l.toUpperCase(),c[0]){case"A":c[1]=d[1],c[2]=d[2],c[3]=d[3],c[4]=d[4],c[5]=d[5],c[6]=+d[6]+n,c[7]=+d[7]+r;break;case"V":c[1]=+d[1]+r;break;case"H":c[1]=+d[1]+n;break;case"M":i=+d[1]+n,a=+d[2]+r;default:for(var w=1,g=d.length;w<g;w++)c[w]=+d[w]+(w%2?n:r)}else for(var M=0,O=d.length;M<O;M++)c[M]=d[M];switch(l=l.toUpperCase(),c[0]){case"Z":n=+i,r=+a;break;case"H":n=c[1];break;case"V":r=c[1];break;case"M":i=c[c.length-2],a=c[c.length-1];default:n=c[c.length-2],r=c[c.length-1]}}return t.toString=qi,t}function ps(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function _r(e,t,n,r){return[e,t,n,r,n,r]}function hs(e,t,n,r,i,a){var o=.3333333333333333,l=2/3;return[o*e+l*n,o*t+l*r,o*i+l*n,o*a+l*r,i,a]}function ms(e,t,n,r,i,a,o,l,c,d){var p=Vt*120/180,m=Vt/180*(+i||0),w=[],g,M=eh(function(h,f,u){var b=h*De.cos(u)-f*De.sin(u),A=h*De.sin(u)+f*De.cos(u);return{x:b,y:A}});if(d)x=d[0],_=d[1],k=d[2],D=d[3];else{g=M(e,t,-m),e=g.x,t=g.y,g=M(l,c,-m),l=g.x,c=g.y;var O=(e-l)/2,N=(t-c)/2,E=O*O/(n*n)+N*N/(r*r);E>1&&(E=De.sqrt(E),n=E*n,r=E*r);var R=n*n,y=r*r,v=(a==o?-1:1)*De.sqrt(Ft((R*y-R*N*N-y*O*O)/(R*N*N+y*O*O))),k=v*n*N/r+(e+l)/2,D=v*-r*O/n+(t+c)/2,x=De.asin(((t-D)/r).toFixed(9)),_=De.asin(((c-D)/r).toFixed(9));x=e<k?Vt-x:x,_=l<k?Vt-_:_,x<0&&(x=Vt*2+x),_<0&&(_=Vt*2+_),o&&x>_&&(x=x-Vt*2),!o&&_>x&&(_=_-Vt*2)}var j=_-x;if(Ft(j)>p){var $=_,T=l,q=c;_=x+p*(o&&_>x?1:-1),l=k+n*De.cos(_),c=D+r*De.sin(_),w=ms(l,c,n,r,i,0,o,T,q,[_,$,k,D])}j=_-x;var de=De.cos(x),J=De.sin(x),K=De.cos(_),Y=De.sin(_),Z=De.tan(j/4),W=4/3*n*Z,G=4/3*r*Z,P=[e,t],z=[e+W*J,t-G*de],C=[l+W*Y,c-G*K],I=[l,c];if(z[0]=2*P[0]-z[0],z[1]=2*P[1]-z[1],d)return[z,C,I].concat(w);w=[z,C,I].concat(w).join().split(",");for(var H=[],ie=0,le=w.length;ie<le;ie++)H[ie]=ie%2?M(w[ie-1],w[ie],m).y:M(w[ie],w[ie+1],m).x;return H}function fh(e,t,n,r,i,a,o,l){for(var c=[],d=[[],[]],p,m,w,g,M,O,N,E,R=0;R<2;++R){if(R==0?(m=6*e-12*n+6*i,p=-3*e+9*n-9*i+3*o,w=3*n-3*e):(m=6*t-12*r+6*a,p=-3*t+9*r-9*a+3*l,w=3*r-3*t),Ft(p)<1e-12){if(Ft(m)<1e-12)continue;g=-w/m,0<g&&g<1&&c.push(g);continue}N=m*m-4*w*p,E=De.sqrt(N),!(N<0)&&(M=(-m+E)/(2*p),0<M&&M<1&&c.push(M),O=(-m-E)/(2*p),0<O&&O<1&&c.push(O))}for(var y=c.length,v=y,k;y--;)g=c[y],k=1-g,d[0][y]=k*k*k*e+3*k*k*g*n+3*k*g*g*i+g*g*g*o,d[1][y]=k*k*k*t+3*k*k*g*r+3*k*g*g*a+g*g*g*l;return d[0][v]=e,d[1][v]=t,d[0][v+1]=o,d[1][v+1]=l,d[0].length=d[1].length=v+2,{x0:yt(...d[0]),y0:yt(...d[1]),x1:gt(...d[0]),y1:gt(...d[1])}}function ys(e){if(ch(e)||(e=th(e)),rh(e))return e;for(var t=ih(uh(e)),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(w,g,M){var O,N;if(!w)return["C",g.x,g.y,g.x,g.y,g.x,g.y];switch(!(w[0]in{T:1,Q:1})&&(g.qx=g.qy=null),w[0]){case"M":g.X=w[1],g.Y=w[2];break;case"A":w=["C",...ms(g.x,g.y,...w.slice(1))];break;case"S":M=="C"||M=="S"?(O=g.x*2-g.bx,N=g.y*2-g.by):(O=g.x,N=g.y),w=["C",O,N,...w.slice(1)];break;case"T":M=="Q"||M=="T"?(g.qx=g.x*2-g.qx,g.qy=g.y*2-g.qy):(g.qx=g.x,g.qy=g.y),w=["C",...hs(g.x,g.y,g.qx,g.qy,w[1],w[2])];break;case"Q":g.qx=w[1],g.qy=w[2],w=["C",...hs(g.x,g.y,w[1],w[2],w[3],w[4])];break;case"L":w=["C",..._r(g.x,g.y,w[1],w[2])];break;case"H":w=["C",..._r(g.x,g.y,w[1],g.y)];break;case"V":w=["C",..._r(g.x,g.y,g.x,w[1])];break;case"Z":w=["C",..._r(g.x,g.y,g.X,g.Y)];break}return w},i=function(w,g){if(w[g].length>7){w[g].shift();for(var M=w[g];M.length;)a[g]="A",w.splice(g++,0,["C",...M.splice(0,6)]);w.splice(g,1),d=t.length}},a=[],o="",l="",c=0,d=t.length;c<d;c++){t[c]&&(o=t[c][0]),o!="C"&&(a[c]=o,c&&(l=a[c-1])),t[c]=r(t[c],n,l),a[c]!="A"&&o=="C"&&(a[c]="C"),i(t,c);var p=t[c],m=p.length;n.x=p[m-2],n.y=p[m-1],n.bx=os(p[m-4])||n.x,n.by=os(p[m-3])||n.y}return t}function xr(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function Yi(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function dh(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function ph(e){return xr({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function hh(e){for(var t=e.waypoints,n=t.reduce(function(d,p,m){var w=t[m-1];if(w){var g=d[d.length-1],M=g&&g.endLength||0,O=gh(w,p);d.push({start:w,end:p,startLength:M,endLength:M+O,length:O})}return d},[]),r=n.reduce(function(d,p){return d+p.length},0),i=r/2,a=0,o=n[a];o.endLength<i;)o=n[++a];var l=(i-o.startLength)/o.length,c={x:o.start.x+(o.end.x-o.start.x)*l,y:o.start.y+(o.end.y-o.start.y)*l};return c}function Ki(e){return Nd(e)?hh(e):ph(e)}function mh(e,t,n){var r=yh(e,t);return r.length===1||r.length===2&&Kp(r[0],r[1])<1?xr(r[0]):r.length>1?(r=bd(r,function(i){var a=Math.floor(i.t2*100)||1;return a=100-a,a=(a<10?"0":"")+a,i.segment2+"#"+a}),xr(r[n?0:r.length-1])):null}function yh(e,t){return lh(e,t)}function gh(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function $e(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function Sr(e,t,n){return ue({id:e.id,type:e.$type,businessObject:e,di:t},n)}function vh(e,t,n){var r=e.waypoint;return!r||r.length<2?[Ki(t),Ki(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function gs(e,t,n){return new Error(`element ${$e(t)} referenced by ${$e(e)}#${n} not yet drawn`)}function Rt(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}Rt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],Rt.prototype.add=function(e,t,n){var r,i,a;if(fe(t,"bpmndi:BPMNPlane")){var o=fe(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(Sr(e,t,o)),this._canvas.addRootElement(r)}else if(fe(t,"bpmndi:BPMNShape")){var l=!tn(e,t),c=bh(e);i=n&&(n.hidden||n.collapsed);var d=t.bounds;r=this._elementFactory.createShape(Sr(e,t,{collapsed:l,hidden:i,x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),isFrame:c})),fe(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),fe(e,"bpmn:Lane")&&(a=0),fe(e,"bpmn:DataStoreReference")&&(wh(n,Ki(d))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,a)}else if(fe(t,"bpmndi:BPMNEdge")){var p=this._getSource(e),m=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(Sr(e,t,{hidden:i,source:p,target:m,waypoints:vh(t,p,m)})),fe(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,a)}else throw new Error(`unknown di ${$e(t)} for element ${$e(e)}`);return Dd(e)&&pr(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},Rt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${$e(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw gs(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)},Rt.prototype.addLabel=function(e,t,n){var r,i,a;return r=Md(t,n),i=pr(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),a=this._elementFactory.createLabel(Sr(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!pr(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(a,n.parent)},Rt.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;if(r=e[t+"Ref"],t==="source"&&i==="bpmn:DataInputAssociation"&&(r=r&&r[0]),(t==="source"&&i==="bpmn:DataOutputAssociation"||t==="target"&&i==="bpmn:DataInputAssociation")&&(r=e.$parent),n=r&&this._getElement(r),n)return n;throw r?gs(e,r,t+"Ref"):new Error(`${$e(e)}#${t} Ref not specified`)},Rt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},Rt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},Rt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function wh(e,t){var n=t.x,r=t.y;return n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height}function bh(e){return fe(e,"bpmn:Group")}const Eh={__depends__:[qp,{__depends__:[as],bpmnImporter:["type",Rt]}]};function vs(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}vs.prototype.next=function(){return this._prefix+ ++this._counter};var _h=new vs("ov"),xh=500;function Le(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=_h,this._overlayDefaults=ue({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=Sh(n.getContainer()),this._init()}Le.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Le.prototype.get=function(e){if(dt(e)&&(e={id:e}),dt(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?gn(t.overlays,Io({type:e.type})):t.overlays.slice():[]}else return e.type?gn(this._overlays,Io({type:e.type})):e.id?this._overlays[e.id]:null},Le.prototype.add=function(e,t,n){if(It(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var r=this._ids.next();return n=ue({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},Le.prototype.remove=function(e){var t=this.get(e)||[];it(t)||(t=[t]);var n=this;se(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(gr(r.html),gr(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var a=i.overlays.indexOf(r);a!==-1&&i.overlays.splice(a,1)}})},Le.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"},Le.prototype.show=function(){Ar(this._overlayRoot)},Le.prototype.hide=function(){Ar(this._overlayRoot,!1)},Le.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Go(this._overlayRoot)},Le.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var a=Bn(t);r=a.x,i=a.y}ws(n,r,i),Ko(e.html,"data-container-id",t.id)},Le.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,a=t.top;if(t.right!==void 0){var o;r.waypoints?o=Bn(r).width:o=r.width,i=t.right*-1+o}if(t.bottom!==void 0){var l;r.waypoints?l=Bn(r).height:l=r.height,a=t.bottom*-1+l}ws(n,i||0,a||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Le.prototype._createOverlayContainer=function(e){var t=mt('<div class="djs-overlays" />');Ze(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Le.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";bs(this._overlayRoot,n)},Le.prototype._getOverlayContainer=function(e,t){var n=ut(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n},Le.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,a;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),dt(r)&&(r=mt(r)),a=this._getOverlayContainer(n),i=mt('<div class="djs-overlay" data-overlay-id="'+t+'">'),Ze(i,{position:"absolute"}),i.appendChild(r),e.type&&rn(i).add("djs-overlay-"+e.type);var o=this._canvas.findRoot(n),l=this._canvas.getRootElement();Ar(i,o===l),e.htmlContainer=i,a.overlays.push(e),a.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Le.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,a=n&&n.maxZoom,o=e.htmlContainer,l=this._canvas.getRootElement(),c=!0;(r!==l||n&&(mn(i)&&i>t.scale||mn(a)&&a<t.scale))&&(c=!1),Ar(o,c),this._updateOverlayScale(e,t)},Le.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,a=e.htmlContainer,o,l="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),mn(r)&&t.scale<r&&(o=(1/t.scale||1)*r),mn(i)&&t.scale>i&&(o=(1/t.scale||1)*i)),mn(o)&&(l="scale("+o+","+o+")"),bs(a,l)},Le.prototype._updateOverlaysVisibilty=function(e){var t=this;se(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},Le.prototype._init=function(){var e=this._eventBus,t=this;function n(r){t._updateRoot(r),t._updateOverlaysVisibilty(r),t.show()}e.on("canvas.viewbox.changing",function(r){t.hide()}),e.on("canvas.viewbox.changed",function(r){n(r.viewbox)}),e.on(["shape.remove","connection.remove"],function(r){var i=r.element,a=t.get({element:i});se(a,function(c){t.remove(c.id)});var o=t._getOverlayContainer(i);if(o){gr(o.html);var l=t._overlayContainers.indexOf(o);l!==-1&&t._overlayContainers.splice(l,1)}}),e.on("element.changed",xh,function(r){var i=r.element,a=t._getOverlayContainer(i,!0);a&&(se(a.overlays,function(o){t._updateOverlay(o)}),t._updateOverlayContainer(a))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&rn(i.html)[r.add?"add":"remove"](r.marker)}),e.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox())}),e.on("diagram.clear",this.clear,this)};function Sh(e){var t=mt('<div class="djs-overlay-container" />');return Ze(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function ws(e,t,n){Ze(e,{left:t+"px",top:n+"px"})}function Ar(e,t){e.style.display=t===!1?"none":""}function bs(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const Es={__init__:["overlays"],overlays:["type",Le]};function _s(e,t,n,r){e.on("element.changed",function(i){var a=i.element;(a.parent||a===t.getRootElement())&&(i.gfx=n.getGraphics(a)),i.gfx&&e.fire(Oo(a)+".changed",i)}),e.on("elements.changed",function(i){var a=i.elements;a.forEach(function(o){e.fire("element.changed",{element:o})}),r.updateContainments(a)}),e.on("shape.changed",function(i){r.update("shape",i.element,i.gfx)}),e.on("connection.changed",function(i){r.update("connection",i.element,i.gfx)})}_s.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const Ah={__init__:["changeSupport"],changeSupport:["type",_s]};var kh=1e3;function Ye(e){this._eventBus=e}Ye.$inject=["eventBus"];function Ch(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}Ye.prototype.on=function(e,t,n,r,i,a){if((Pt(t)||Dt(t))&&(a=i,i=r,r=n,n=t,t=null),Pt(n)&&(a=i,i=r,r=n,n=kh),It(i)&&(a=i,i=!1),!Pt(r))throw new Error("handlerFn must be a function");it(e)||(e=[e]);var o=this._eventBus;se(e,function(l){var c=["commandStack",l,t].filter(function(d){return d}).join(".");o.on(c,n,i?Ch(r,a):r,a)})},Ye.prototype.canExecute=Tt("canExecute"),Ye.prototype.preExecute=Tt("preExecute"),Ye.prototype.preExecuted=Tt("preExecuted"),Ye.prototype.execute=Tt("execute"),Ye.prototype.executed=Tt("executed"),Ye.prototype.postExecute=Tt("postExecute"),Ye.prototype.postExecuted=Tt("postExecuted"),Ye.prototype.revert=Tt("revert"),Ye.prototype.reverted=Tt("reverted");function Tt(e){return function(n,r,i,a,o){(Pt(n)||Dt(n))&&(o=a,a=i,i=r,r=n,n=null),this.on(n,e,r,i,a,o)}}function Gi(e,t){t.invoke(Ye,this),this.executed(function(n){var r=n.context;r.rootElement?e.setRootElement(r.rootElement):r.rootElement=e.getRootElement()}),this.revert(function(n){var r=n.context;r.rootElement&&e.setRootElement(r.rootElement)})}ft(Gi,Ye),Gi.$inject=["canvas","injector"];const Rh={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Gi]};var Th={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Nh(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return Th[t]})}var Ih="_plane";function Xi(e){var t=e.id;return fe(e,"bpmn:SubProcess")?Dh(t):t}function Dh(e){return e+Ih}var Ph="bjs-breadcrumbs-shown";function xs(e,t,n){var r=mt('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),a=rn(i);i.appendChild(r);var o=[];e.on("element.changed",function(c){var d=c.element,p=Re(d),m=ut(o,function(w){return w===p});m&&l()});function l(c){c&&(o=Bh(c));var d=o.flatMap(function(m){var w=n.findRoot(Xi(m))||n.findRoot(m.id);if(!w&&fe(m,"bpmn:Process")){var g=t.find(function(N){var E=Re(N);return E&&E.get("processRef")===m});w=g&&n.findRoot(g.id)}if(!w)return[];var M=Nh(m.name||m.id),O=mt('<li><span class="bjs-crumb"><a title="'+M+'">'+M+"</a></span></li>");return O.addEventListener("click",function(){n.setRootElement(w)}),O});r.innerHTML="";var p=d.length>1;a.toggle(Ph,p),d.forEach(function(m){r.appendChild(m)})}e.on("root.set",function(c){l(c.element)})}xs.$inject=["eventBus","elementRegistry","canvas"];function Bh(e){for(var t=Re(e),n=[],r=t;r;r=r.$parent)(fe(r,"bpmn:SubProcess")||fe(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function Ss(e,t){var n=null,r=new Oh;e.on("root.set",function(i){var a=i.element,o=t.viewbox(),l=r.get(a);if(r.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=a,!(!fe(a,"bpmn:SubProcess")&&!l)){l=l||{x:0,y:0,zoom:1};var c=(o.x-l.x)*o.scale,d=(o.y-l.y)*o.scale;(c!==0||d!==0)&&t.scroll({dx:c,dy:d}),l.zoom!==o.scale&&t.zoom(l.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}Ss.$inject=["eventBus","canvas"];function Oh(){this._entries=[],this.set=function(e,t){var n=!1;for(var r in this._entries)if(this._entries[r][0]===e){this._entries[r][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}t!==-1&&this._entries.splice(t,1)}}var As={x:180,y:160};function on(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}on.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(r){!r.plane||!r.plane.bpmnElement||(t._processToDiagramMap[r.plane.bpmnElement.id]=r)});var n=e.diagrams.filter(r=>r.plane).flatMap(r=>t._createNewDiagrams(r.plane));n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}},on.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(a){var o=a.bpmnElement;if(o){var l=o.$parent;fe(o,"bpmn:SubProcess")&&!a.isExpanded&&n.push(o),Lh(o,e)&&r.push({diElement:a,parent:l})}});var i=[];return n.forEach(function(a){if(!t._processToDiagramMap[a.id]){var o=t._createDiagram(a);t._processToDiagramMap[a.id]=o,i.push(o)}}),r.forEach(function(a){for(var o=a.diElement,l=a.parent;l&&n.indexOf(l)===-1;)l=l.$parent;if(l){var c=t._processToDiagramMap[l.id];t._moveToDiPlane(o,c.plane)}}),i},on.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=Mh(e),r={x:n.x-As.x,y:n.y-As.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(a){a.x=a.x-r.x,a.y=a.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})},on.prototype._moveToDiPlane=function(e,t){var n=ks(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)},on.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n},on.$inject=["eventBus","moddle"];function ks(e){return fe(e,"bpmndi:BPMNDiagram")?e:ks(e.$parent)}function Mh(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach(function(n){if(n.bounds){var r=Yi(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),dh(t)}function Lh(e,t){var n=e.$parent;return!(!fe(n,"bpmn:SubProcess")||n===t.bpmnElement||Rd(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var kr=250,Vh='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>',Fh="bjs-drilldown-empty";function Ut(e,t,n,r,i){Ye.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r,this._translate=i;var a=this;this.executed("shape.toggleCollapse",kr,function(o){var l=o.shape;a._canDrillDown(l)?a._addOverlay(l):a._removeOverlay(l)},!0),this.reverted("shape.toggleCollapse",kr,function(o){var l=o.shape;a._canDrillDown(l)?a._addOverlay(l):a._removeOverlay(l)},!0),this.executed(["shape.create","shape.move","shape.delete"],kr,function(o){var l=o.oldParent,c=o.newParent||o.parent,d=o.shape;a._canDrillDown(d)&&a._addOverlay(d),a._updateDrilldownOverlay(l),a._updateDrilldownOverlay(c),a._updateDrilldownOverlay(d)},!0),this.reverted(["shape.create","shape.move","shape.delete"],kr,function(o){var l=o.oldParent,c=o.newParent||o.parent,d=o.shape;a._canDrillDown(d)&&a._addOverlay(d),a._updateDrilldownOverlay(l),a._updateDrilldownOverlay(c),a._updateDrilldownOverlay(d)},!0),t.on("import.render.complete",function(){n.filter(function(o){return a._canDrillDown(o)}).map(function(o){a._addOverlay(o)})})}ft(Ut,Ye),Ut.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Ut.prototype._canDrillDown=function(e){var t=this._canvas;return fe(e,"bpmn:SubProcess")&&t.findRoot(Xi(e))},Ut.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=Re(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;rn(r.html).toggle(Fh,!i)}},Ut.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=Re(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var a=mt('<button type="button" class="bjs-drilldown">'+Vh+"</button>"),o=r.get("name")||r.get("id"),l=this._translate("Open {element}",{element:o});a.setAttribute("title",l),a.addEventListener("click",function(){t.setRootElement(t.findRoot(Xi(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:a}),this._updateOverlayVisibility(e)},Ut.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})},Ut.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const $h={__depends__:[Es,Ah,Rh],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",xs],drilldownCentering:["type",Ss],drilldownOverlayBehavior:["type",Ut],subprocessCompatibility:["type",on]};function Cs(e){return e.originalEvent||e.srcEvent}function Rs(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function Uh(){return/mac/i.test(navigator.platform)}function Ts(e,t){return(Cs(e)||e).button===t}function Cr(e){return Ts(e,0)}function jh(e){return Ts(e,1)}function zh(e){var t=Cs(e)||e;return Cr(e)&&t.shiftKey}function Hh(e){return!0}function Rr(e){return Cr(e)||jh(e)}var Ns=500;function Is(e,t,n){var r=this;function i(_,j,$){if(!l(_,j)){var T,q,de;$?q=t.getGraphics($):(T=j.delegateTarget||j.target,T&&(q=T,$=t.get(q))),!(!q||!$)&&(de=e.fire(_,{element:$,gfx:q,originalEvent:j}),de===!1&&(j.stopPropagation(),j.preventDefault()))}}var a={};function o(_){return a[_]}function l(_,j){var $=d[_]||Cr;return!$(j)}var c={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},d={"element.contextmenu":Hh,"element.mousedown":Rr,"element.mouseup":Rr,"element.click":Rr,"element.dblclick":Rr};function p(_,j,$){var T=c[_];if(!T)throw new Error("unmapped DOM event name <"+_+">");return i(T,j,$)}var m="svg, .djs-element";function w(_,j,$,T){var q=a[$]=function(de){i($,de)};T&&(d[$]=T),q.$delegate=Ui.bind(_,m,j,q)}function g(_,j,$){var T=o($);T&&Ui.unbind(_,j,T.$delegate)}function M(_){se(c,function(j,$){w(_,$,j)})}function O(_){se(c,function(j,$){g(_,$,j)})}e.on("canvas.destroy",function(_){O(_.svg)}),e.on("canvas.init",function(_){M(_.svg)}),e.on(["shape.added","connection.added"],function(_){var j=_.element,$=_.gfx;e.fire("interactionEvents.createHit",{element:j,gfx:$})}),e.on(["shape.changed","connection.changed"],Ns,function(_){var j=_.element,$=_.gfx;e.fire("interactionEvents.updateHit",{element:j,gfx:$})}),e.on("interactionEvents.createHit",Ns,function(_){var j=_.element,$=_.gfx;r.createDefaultHit(j,$)}),e.on("interactionEvents.updateHit",function(_){var j=_.element,$=_.gfx;r.updateDefaultHit(j,$)});var N=k("djs-hit djs-hit-stroke"),E=k("djs-hit djs-hit-click-stroke"),R=k("djs-hit djs-hit-all"),y=k("djs-hit djs-hit-no-move"),v={all:R,"click-stroke":E,stroke:N,"no-move":y};function k(_,j){return j=ue({stroke:"white",strokeWidth:15},j||{}),n.cls(_,["no-fill","no-border"],j)}function D(_,j){var $=v[j];if(!$)throw new Error("invalid hit type <"+j+">");return Ie(_,$),_}function x(_,j){Ve(_,j)}this.removeHits=function(_){var j=hp(".djs-hit",_);se(j,hr)},this.createDefaultHit=function(_,j){var $=_.waypoints,T=_.isFrame,q;return $?this.createWaypointsHit(j,$):(q=T?"stroke":"all",this.createBoxHit(j,q,{width:_.width,height:_.height}))},this.createWaypointsHit=function(_,j){var $=Fi(j);return D($,"stroke"),x(_,$),$},this.createBoxHit=function(_,j,$){$=ue({x:0,y:0},$);var T=Te("rect");return D(T,j),Ie(T,$),x(_,T),T},this.updateDefaultHit=function(_,j){var $=kt(".djs-hit",j);if($)return _.waypoints?qo($,_.waypoints):Ie($,{width:_.width,height:_.height}),$},this.fire=i,this.triggerMouseEvent=p,this.mouseHandler=o,this.registerEvent=w,this.unregisterEvent=g}Is.$inject=["eventBus","elementRegistry","styles"];const Wh={__init__:["interactionEvents"],interactionEvents:["type",Is]};function bn(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=new Set;var n=this;e.on(["shape.remove","connection.remove"],function(r){var i=r.element;n.deselect(i)}),e.on(["diagram.clear","root.set"],function(r){n.select(null)})}bn.$inject=["eventBus","canvas"],bn.prototype.deselect=function(e){if(this._selectedElements.has(e)){var t=this.get();this._selectedElements.delete(e),this._eventBus.fire("selection.changed",{oldSelection:t,newSelection:this.get()})}},bn.prototype.get=function(){return Array.from(this._selectedElements)},bn.prototype.isSelected=function(e){return this._selectedElements.has(e)},bn.prototype.select=function(e,t){var n=this.get();it(e)||(e=e?[e]:[]);var r=this._canvas,i=r.getRootElement();e=e.filter(function(a){var o=r.findRoot(a);return i===o}),t?se(e,a=>{this._selectedElements.add(a)}):this._selectedElements=new Set(e),this._eventBus.fire("selection.changed",{oldSelection:n,newSelection:this.get()})};var Ds="hover",Ps="selected";function Bs(e,t){this._canvas=e;function n(i,a){e.addMarker(i,a)}function r(i,a){e.removeMarker(i,a)}t.on("element.hover",function(i){n(i.element,Ds)}),t.on("element.out",function(i){r(i.element,Ds)}),t.on("selection.changed",function(i){function a(d){r(d,Ps)}function o(d){n(d,Ps)}var l=new Set(i.oldSelection),c=new Set(i.newSelection);for(let d of l)c.has(d)||a(d);for(let d of c)l.has(d)||o(d)})}Bs.$inject=["canvas","eventBus"];function Os(e,t,n,r){e.on("create.end",500,function(i){var a=i.context,o=a.canExecute,l=a.elements,c=a.hints||{},d=c.autoSelect;if(o){if(d===!1)return;it(d)?t.select(d):t.select(l.filter(qh))}}),e.on("connect.end",500,function(i){var a=i.context,o=a.connection;o&&t.select(o)}),e.on("shape.move.end",500,function(i){var a=i.previousSelection||[],o=r.get(i.context.shape.id),l=ut(a,function(c){return o.id===c.id});l||t.select(o)}),e.on("element.click",function(i){if(Cr(i)){var a=i.element;a===n.getRootElement()&&(a=null);var o=t.isSelected(a),l=t.get().length>1,c=zh(i);if(o&&l)return c?t.deselect(a):t.select(a);o?t.deselect(a):t.select(a,c)}})}Os.$inject=["eventBus","selection","canvas","elementRegistry"];function qh(e){return!e.hidden}const Yh={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Wh],selection:["type",bn],selectionVisuals:["type",Bs],selectionBehavior:["type",Os]},Kh=/^class[ {]/;function Gh(e){return Kh.test(e.toString())}function Ji(e){return Array.isArray(e)}function Zi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Tr(...e){e.length===1&&Ji(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const Xh=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Jh=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Zh=/\/\*([^*]*)\*\//m;function Qh(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(Gh(e)?Xh:Jh);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(Zh);return(i&&i[1]||r).trim()})||[]}function Ms(e,t){const n=t||{get:function(y,v){if(r.push(y),v===!1)return null;throw l(`No provider for "${y}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),a=this._instances=Object.create(null),o=a.injector=this,l=function(y){const v=r.join(" -> ");return r.length=0,new Error(v?`${y} (Resolving: ${v})`:y)};function c(y,v){if(!i[y]&&y.includes(".")){const k=y.split(".");let D=c(k.shift());for(;k.length;)D=D[k.shift()];return D}if(Zi(a,y))return a[y];if(Zi(i,y)){if(r.indexOf(y)!==-1)throw r.push(y),l("Cannot resolve circular dependency!");return r.push(y),a[y]=i[y][0](i[y][1]),r.pop(),a[y]}return n.get(y,v)}function d(y,v){if(typeof v>"u"&&(v={}),typeof y!="function")if(Ji(y))y=Tr(y.slice());else throw l(`Cannot invoke "${y}". Expected a function!`);const D=(y.$inject||Qh(y)).map(x=>Zi(v,x)?v[x]:c(x));return{fn:y,dependencies:D}}function p(y){const{fn:v,dependencies:k}=d(y),D=Function.prototype.bind.call(v,null,...k);return new D}function m(y,v,k){const{fn:D,dependencies:x}=d(y,k);return D.apply(v,x)}function w(y){return Tr(v=>y.get(v))}function g(y,v){if(v&&v.length){const k=Object.create(null),D=Object.create(null),x=[],_=[],j=[];let $,T,q,de;for(let J in i)$=i[J],v.indexOf(J)!==-1&&($[2]==="private"?(T=x.indexOf($[3]),T===-1?(q=$[3].createChild([],v),de=w(q),x.push($[3]),_.push(q),j.push(de),k[J]=[de,J,"private",q]):k[J]=[j[T],J,"private",_[T]]):k[J]=[$[2],$[1]],D[J]=!0),($[2]==="factory"||$[2]==="type")&&$[1].$scope&&v.forEach(K=>{$[1].$scope.indexOf(K)!==-1&&(k[J]=[$[2],$[1]],D[K]=!0)});v.forEach(J=>{if(!D[J])throw new Error('No provider for "'+J+'". Cannot use provider from the parent!')}),y.unshift(k)}return new Ms(y,o)}const M={factory:m,type:p,value:function(y){return y}};function O(y,v){const k=y.__init__||[];return function(){k.forEach(D=>{typeof D=="string"?v.get(D):v.invoke(D)})}}function N(y){const v=y.__exports__;if(v){const k=y.__modules__,D=Object.keys(y).reduce((T,q)=>(q!=="__exports__"&&q!=="__modules__"&&q!=="__init__"&&q!=="__depends__"&&(T[q]=y[q]),T),Object.create(null)),x=(k||[]).concat(D),_=g(x),j=Tr(function(T){return _.get(T)});v.forEach(function(T){i[T]=[j,T,"private",_]});const $=(y.__init__||[]).slice();return $.unshift(function(){_.init()}),y=Object.assign({},y,{__init__:$}),O(y,_)}return Object.keys(y).forEach(function(k){if(k==="__init__"||k==="__depends__")return;const D=y[k];if(D[2]==="private"){i[k]=D;return}const x=D[0],_=D[1];i[k]=[M[x],em(x,_),x]}),O(y,o)}function E(y,v){return y.indexOf(v)!==-1||(y=(v.__depends__||[]).reduce(E,y),y.indexOf(v)!==-1)?y:y.concat(v)}function R(y){const v=y.reduce(E,[]).map(N);let k=!1;return function(){k||(k=!0,v.forEach(D=>D()))}}this.get=c,this.invoke=m,this.instantiate=p,this.createChild=g,this.init=R(e)}function em(e,t){return e!=="value"&&Ji(t)&&(t=Tr(t.slice())),t}var tm=1;function jt(e,t){At.call(this,e,tm),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}ft(jt,At),jt.prototype.canRender=function(){return!0},jt.prototype.drawShape=function(t,n,r){var i=Te("rect");return Ie(i,{x:0,y:0,width:n.width||0,height:n.height||0}),Mo(n)?Ie(i,ue({},this.FRAME_STYLE,r||{})):Ie(i,ue({},this.SHAPE_STYLE,r||{})),Ve(t,i),i},jt.prototype.drawConnection=function(t,n,r){var i=Fi(n.waypoints,ue({},this.CONNECTION_STYLE,r||{}));return Ve(t,i),i},jt.prototype.getShapePath=function(t){var n=t.x,r=t.y,i=t.width,a=t.height,o=[["M",n,r],["l",i,0],["l",0,a],["l",-i,0],["z"]];return nn(o)},jt.prototype.getConnectionPath=function(t){var n=t.waypoints,r,i,a=[];for(r=0;i=n[r];r++)i=i.original||i,a.push([r===0?"M":"L",i.x,i.y]);return nn(a)},jt.$inject=["eventBus","styles"];function nm(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,r,i){var a=this.style(r,i);return ue(a,{class:n})},this.style=function(n,r){!it(n)&&!r&&(r=n,n=[]);var i=vn(n,function(a,o){return ue(a,e[o]||{})},{});return r?ue(i,r):i},this.computeStyle=function(n,r,i){return it(r)||(i=r,r=[]),t.style(r||[],ue({},i,n||{}))}}const rm={__init__:["defaultRenderer"],defaultRenderer:["type",jt],styles:["type",nm]};function im(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function am(e,t,n){if(!(!e||!t)){typeof n!="number"&&(n=-1);var r=e.indexOf(t);if(r!==-1){if(r===n)return;if(n!==-1)e.splice(r,1);else return}n!==-1?e.splice(n,0,t):e.push(t)}}function Nr(e,t){return Math.round(e*t)/t}function Ls(e){return Dt(e)?e+"px":e}function om(e){for(;e.parent;)e=e.parent;return e}function sm(e){e=ue({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Ze(n,{position:"relative",overflow:"hidden",width:Ls(e.width),height:Ls(e.height)}),t.appendChild(n),n}function Vs(e,t,n){const r=Te("g");pt(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const lm="base",Fs=0,cm=1,um={shape:["x","y","width","height"],connection:["waypoints"]};function he(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}he.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],he.prototype._init=function(e){const t=this._eventBus,n=this._container=sm(e),r=this._svg=Te("svg");Ie(r,{width:"100%",height:"100%"}),Ko(r,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,a=>{this.focus()}),r.addEventListener("focusin",()=>{this._setFocused(!0)}),r.addEventListener("focusout",()=>{this._setFocused(!1)}),r.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),r.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),Ve(n,r);const i=this._viewport=Vs(r,"viewport");e.deferUpdate&&(this._viewboxChanged=Do(this._viewboxChanged,300)),this._restoreFocus=Do(this._restoreFocus,0),t.on("diagram.init",()=>{t.fire("canvas.init",{svg:r,viewport:i})}),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],()=>{delete this._cachedViewbox}),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},he.prototype._destroy=function(){this._restoreFocus.cancel(),this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport},he.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},he.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=Oo(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},he.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},he.prototype.restoreFocus=function(){this._restoreFocus()},he.prototype._restoreFocus=function(){document.activeElement===document.body&&this.focus()},he.prototype.isFocused=function(){return this._focused},he.prototype.getDefaultLayer=function(){return this.getLayer(lm,Fs)},he.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");let n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),typeof t<"u"&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},he.prototype._getChildIndex=function(e){return vn(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},he.prototype._createLayer=function(e,t){typeof t>"u"&&(t=cm);const n=this._getChildIndex(t);return{group:Vs(this._viewport,"layer-"+e,n),index:t,visible:!0}},he.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=this._viewport,r=t.group,i=t.index;if(t.visible)return r;const a=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[a]||null),t.visible=!0,r},he.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=t.group;return t.visible&&(hr(n),t.visible=!1),n},he.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],hr(t.group))},he.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},he.prototype.findRoot=function(e){const t=this._resolveElements(e);let n;for(const r of t){const i=this._findPlaneForRoot(om(r));if(!i||n&&i.rootElement!==n)return;n=i.rootElement}return n},he.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},he.prototype._findPlaneForRoot=function(e){return ut(this._planes,function(t){return t.rootElement===e})},he.prototype._resolveElement=function(e){return typeof e=="string"?this._elementRegistry.get(e):e},he.prototype._resolveElements=function(e){return it(e)||(e=[e]),e.map(t=>this._resolveElement(t)).filter(Boolean)},he.prototype.getContainer=function(){return this._container},he.prototype._updateMarker=function(e,t,n){let r;e=this._resolveElement(e),e.markers=e.markers||new Set,r=this._elementRegistry._elements[e.id],r&&(se([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),pt(i).add(t)):(e.markers.delete(t),pt(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},he.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},he.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},he.prototype.hasMarker=function(e,t){return e=this._resolveElement(e),e.markers?e.markers.has(t):!1},he.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},he.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},he.prototype.addRootElement=function(e){const t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});const n=e.layer="root-"+t;this._ensureValid("root",e);const r=this.getLayer(n,Fs);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e},he.prototype.removeRootElement=function(e){if(e=this._resolveElement(e),!!this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter(function(n){return n.rootElement!==e}),this._rootElement===e&&(this._rootElement=null),e},he.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e},he.prototype._removeRoot=function(e){const t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)},he.prototype._addRoot=function(e,t){const n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})},he.prototype._setRoot=function(e,t){const n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),this.hideLayer(n.layer)),e&&(t||(t=this._findPlaneForRoot(e).layer),this._elementRegistry.updateGraphics(e,this._svg,!0),this.showLayer(e.layer)),this._rootElement=e,this._eventBus.fire("root.set",{element:e})},he.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 <"+t.id+"> already exists");const n=um[e];if(!Ro(n,function(i){return typeof t[i]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},he.prototype._setParent=function(e,t,n){am(t.children,e,n),e.parent=t},he.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();const i=this._eventBus,a=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);const o=a.create(e,t,r);return this._elementRegistry.add(t,o),a.update(e,t,o),i.fire(e+".added",{element:t,gfx:o}),t},he.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},he.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},he.prototype._removeElement=function(e,t){const n=this._elementRegistry,r=this._graphicsFactory,i=this._eventBus;if(e=n.get(e.id||e),!!e)return i.fire(t+".remove",{element:e}),r.remove(e),im(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e},he.prototype.removeShape=function(e){return this._removeElement(e,"shape")},he.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},he.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},he.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},he.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},he.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let r,i,a,o,l,c,d;if(e)this._changeViewbox(function(){l=Math.min(n.width/e.width,n.height/e.height);const p=this._svg.createSVGMatrix().scale(l).translate(-e.x,-e.y);Mn(t,p)});else return a=this._rootElement?this.getActiveLayer():null,r=a&&a.getBBox()||{},o=Mn(t),i=o?o.matrix:qd(),l=Nr(i.a,1e3),c=Nr(-i.e||0,1e3),d=Nr(-i.f||0,1e3),e=this._cachedViewbox={x:c?c/l:0,y:d?d/l:0,width:n.width/l,height:n.height/l,scale:l,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n},e;return e},he.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=ue({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),$s(t,n)}),{x:n.e,y:n.f}},he.prototype.scrollToElement=function(e,t){let n=100;const r=this._resolveElements(e);if(!r.length)return;const i=this.findRoot(r);if(!i)return;i!==this.getRootElement()&&this.setRootElement(i);const a=r.filter(M=>M!=i);if(!a.length)return;t||(t={}),typeof t=="number"&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const o=Bn(a),l=Yi(o),c=this.viewbox(),d=this.zoom();let p,m;c.y+=t.top/d,c.x+=t.left/d,c.width-=(t.right+t.left)/d,c.height-=(t.bottom+t.top)/d;const w=Yi(c);if(!(o.width<c.width&&o.height<c.height))p=o.x-c.x,m=o.y-c.y;else{const M=Math.max(0,l.right-w.right),O=Math.min(0,l.left-w.left),N=Math.max(0,l.bottom-w.bottom),E=Math.min(0,l.top-w.top);p=M||O,m=N||E}this.scroll({dx:-p*d,dy:-m*d})},he.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let n,r;return this._changeViewbox(function(){typeof t!="object"&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t)}),Nr(r.a,1e3)};function $s(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}he.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,r=t.inner;let i,a;return r.x>=0&&r.y>=0&&r.x+r.width<=n.width&&r.y+r.height<=n.height&&!e?a={x:0,y:0,width:Math.max(r.width+r.x,n.width),height:Math.max(r.height+r.y,n.height)}:(i=Math.min(1,n.width/r.width,n.height/r.height),a={x:r.x+(e?r.width/2-n.width/i/2:0),y:r.y+(e?r.height/2-n.height/i/2:0),width:n.width/i,height:n.height/i}),this.viewbox(a),this.viewbox(!1).scale},he.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),a=n.createSVGPoint();let o,l,c,d,p;c=r.getCTM();const m=c.a;return t?(o=ue(a,t),l=o.matrixTransform(c.inverse()),d=i.translate(l.x,l.y).scale(1/m*e).translate(-l.x,-l.y),p=c.multiply(d)):p=i.scale(e),$s(this._viewport,p),p},he.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},he.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;const r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale,a=n.width*t.scale,o=n.height*t.scale;return{x:r,y:i,width:a,height:o}},he.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var En="data-element-id";function Qe(e){this._elements={},this._eventBus=e}Qe.$inject=["eventBus"],Qe.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),Ie(t,En,r),n&&Ie(n,En,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},Qe.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(Ie(r.gfx,En,""),r.secondaryGfx&&Ie(r.secondaryGfx,En,""),delete t[n])},Qe.prototype.updateId=function(e,t){this._validateId(t),typeof e=="string"&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),r=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,r)},Qe.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&Ie(t,En,r),t},Qe.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&Ie(e,En);var n=this._elements[t];return n&&n.element},Qe.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t},Qe.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],a=t[i],o=a.element,l=a.gfx;if(e(o,l))return o}},Qe.prototype.getAll=function(){return this.filter(function(e){return e})},Qe.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var r=t[n],i=r.element,a=r.gfx;return e(i,a)})},Qe.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)},Qe.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")};function fm(e,t,n,r){var i=n.inverse;return Object.defineProperty(e,"remove",{value:function(a){var o=this.indexOf(a);return o!==-1&&(this.splice(o,1),t.unset(a,i,r)),a}}),Object.defineProperty(e,"contains",{value:function(a){return this.indexOf(a)!==-1}}),Object.defineProperty(e,"add",{value:function(a,o){var l=this.indexOf(a);if(typeof o>"u"){if(l!==-1)return;o=this.length}l!==-1&&this.splice(l,1),this.splice(o,0,a),l===-1&&t.set(a,i,r)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function dm(e){return e.__refs_collection===!0}function pm(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Us(e,t,n){var r=fm(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach(function(i){e.set(i,t.inverse,n)})}function hm(e,t,n){var r=t.inverse,i=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return i},set:function(a){if(a!==i){var o=i;i=null,o&&e.unset(o,r,n),i=a,e.set(i,r,n)}}})}function ot(e,t){if(!(this instanceof ot))return new ot(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}ot.prototype.bind=function(e,t){if(typeof t=="string"){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Us(this,t,e):hm(this,t,e)},ot.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return dm(n)||Us(this,t,e),n},ot.prototype.ensureBound=function(e,t){pm(e,t)||this.bind(e,t)},ot.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},ot.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Qi=new ot({name:"children",enumerable:!0,collection:!0},{name:"parent"}),js=new ot({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),zs=new ot({name:"attachers",collection:!0},{name:"host"}),Hs=new ot({name:"outgoing",collection:!0},{name:"source"}),Ws=new ot({name:"incoming",collection:!0},{name:"target"});function Fn(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),Qi.bind(this,"parent"),js.bind(this,"labels"),Hs.bind(this,"outgoing"),Ws.bind(this,"incoming")}function $n(){Fn.call(this),Qi.bind(this,"children"),zs.bind(this,"host"),zs.bind(this,"attachers")}ft($n,Fn);function qs(){Fn.call(this),Qi.bind(this,"children")}ft(qs,$n);function Ys(){$n.call(this),js.bind(this,"labelTarget")}ft(Ys,$n);function Ks(){Fn.call(this),Hs.bind(this,"source"),Ws.bind(this,"target")}ft(Ks,Fn);var mm={connection:Ks,shape:$n,label:Ys,root:qs};function ym(e,t){var n=mm[e];if(!n)throw new Error("unknown type: <"+e+">");return ue(new n,t)}function _n(){this._uid=12}_n.prototype.createRoot=function(e){return this.create("root",e)},_n.prototype.createLabel=function(e){return this.create("label",e)},_n.prototype.createShape=function(e){return this.create("shape",e)},_n.prototype.createConnection=function(e){return this.create("connection",e)},_n.prototype.create=function(e,t){return t=ue({},t||{}),t.id||(t.id=e+"_"+this._uid++),ym(e,t)};var Ir="__fn",Gs=1e3,gm=Array.prototype.slice;function Je(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}Je.prototype.on=function(e,t,n,r){if(e=it(e)?e:[e],Pt(t)&&(r=n,n=t,t=Gs),!Dt(t))throw new Error("priority must be a number");var i=n;r&&(i=Bt(n,r),i[Ir]=n[Ir]||n);var a=this;e.forEach(function(o){a._addListener(o,{priority:t,callback:i,next:null})})},Je.prototype.once=function(e,t,n,r){var i=this;if(Pt(t)&&(r=n,n=t,t=Gs),!Dt(t))throw new Error("priority must be a number");function a(){a.__isTomb=!0;var o=n.apply(r,arguments);return i.off(e,a),o}a[Ir]=n,this.on(e,t,a)},Je.prototype.off=function(e,t){e=it(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})},Je.prototype.createEvent=function(e){var t=new Un;return t.init(e),t},Je.prototype.fire=function(e,t){var n,r,i,a;if(a=gm.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(r=this._listeners[e],!!r){t instanceof Un?n=t:n=this.createEvent(t),a[0]=n;var o=n.type;e!==o&&(n.type=e);try{i=this._invokeListeners(n,a,r)}finally{e!==o&&(n.type=o)}return i===void 0&&n.defaultPrevented&&(i=!1),i}},Je.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},Je.prototype._destroy=function(){this._listeners={}},Je.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},Je.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=vm(n.callback,t),r!==void 0&&(e.returnValue=r,e.stopPropagation()),r===!1&&e.preventDefault()}catch(i){if(!this.handleError(i))throw console.error("unhandled error in event listener",i),i}return r},Je.prototype._addListener=function(e,t){var n=this._getListeners(e),r;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority<t.priority){t.next=n,r?r.next=t:this._setListeners(e,t);return}r=n,n=n.next}r.next=t},Je.prototype._getListeners=function(e){return this._listeners[e]},Je.prototype._setListeners=function(e,t){this._listeners[e]=t},Je.prototype._removeListener=function(e,t){var n=this._getListeners(e),r,i,a;if(!t){this._setListeners(e,null);return}for(;n;)r=n.next,a=n.callback,(a===t||a[Ir]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function Un(){}Un.prototype.stopPropagation=function(){this.cancelBubble=!0},Un.prototype.preventDefault=function(){this.defaultPrevented=!0},Un.prototype.init=function(e){ue(this,e||{})};function vm(e,t){return e.apply(null,t)}function wm(e){return e.childNodes[0]}function bm(e){return e.parentNode.childNodes[1]}function et(e,t){this._eventBus=e,this._elementRegistry=t}et.$inject=["eventBus","elementRegistry"],et.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=bm(t),n||(n=Te("g"),pt(n).add("djs-children"),Ve(t.parentNode,n))):n=t,n},et.prototype._clear=function(e){var t=wm(e);return Go(t),t},et.prototype._createContainer=function(e,t,n,r){var i=Te("g");pt(i).add("djs-group"),typeof n<"u"?Em(i,t,t.childNodes[n]):Ve(t,i);var a=Te("g");pt(a).add("djs-element"),pt(a).add("djs-"+e),r&&pt(a).add("djs-frame"),Ve(i,a);var o=Te("g");return pt(o).add("djs-visual"),Ve(a,o),a},et.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,Mo(t))},et.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=vn(e,function(i,a){return a.parent&&(i[a.parent.id]=a.parent),i},{}),se(r,function(i){var a=i.children;if(a){var o=t._getChildrenContainer(i),l=o.firstChild;se(a,function(c){var d=n.getGraphics(c).parentNode;d===l?l=l.nextSibling:o.insertBefore(d,l)})}})},et.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})},et.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},et.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})},et.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},et.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),es(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?Ie(n,"display","none"):Ie(n,"display","block")}},et.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);hr(t.parentNode)};function Em(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const _m={__depends__:[rm],__init__:["canvas"],canvas:["type",he],elementRegistry:["type",Qe],elementFactory:["type",_n],eventBus:["type",Je],graphicsFactory:["type",et]};function xm(e){var t=new Ms(e);return t.init(),t}function Sm(e){e=e||{};var t={config:["value",e]},n=[t,_m].concat(e.modules||[]);return xm(n)}function zt(e,t){this._injector=t||Sm(e),this.get("eventBus").fire("diagram.init")}zt.prototype.get=function(e,t){return this._injector.get(e,t)},zt.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},zt.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},zt.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function ea(){}ea.prototype.get=function(e){return this.$model.properties.get(this,e)},ea.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function Xs(e,t){this.model=e,this.properties=t}Xs.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(ea.prototype);se(e.properties,function(o){!o.isMany&&o.default!==void 0&&(r[o.name]=o.default)}),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function a(o){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),se(o,Bt(function(l,c){this.set(c,l)},this))}return a.prototype=r,a.hasType=r.$instanceOf=this.model.hasType,n.defineModel(a,t),n.defineDescriptor(a,e),a};var Am=ue(Object.create(null),{String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0}),Js=ue(Object.create(null),{String:function(e){return e},Boolean:function(e){return e==="true"},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}});function ta(e,t){var n=Js[e];return n?n(t):t}function na(e){return!!Am[e]}function Zs(e){return!!Js[e]}function Ue(e,t){var n=e.split(/:/),r,i;if(n.length===1)r=e,i=t;else if(n.length===2)r=n[1],i=n[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(i?i+":":"")+r,{name:e,prefix:i,localName:r}}function tt(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName=Object.create(null),this.properties=[],this.propertiesByName=Object.create(null)}tt.prototype.build=function(){return Ad(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},tt.prototype.addProperty=function(e,t,n){typeof t=="boolean"&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var r=this.properties;t!==void 0?r.splice(t,0,e):r.push(e)},tt.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=this.properties,a=this.propertiesByName,o=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 l=i.indexOf(e);if(l===-1)throw new Error("property <"+r.name+"> not found in property list");i.splice(l,1),this.addProperty(t,n?void 0:l,o),a[r.name]=a[r.localName]=t},tt.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),a=Ue(i[0],r),o=Ue(i[1],a.prefix).name,l=this.propertiesByName[o];if(l)this.replaceProperty(l,e,n);else throw new Error("refined property <"+o+"> not found");delete e.redefines},tt.prototype.addNamedProperty=function(e,t){var n=e.ns,r=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),r[n.name]=r[n.localName]=e},tt.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},tt.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},tt.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},tt.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},tt.prototype.assertNotDefined=function(e,t){var n=e.name,r=this.propertiesByName[n];if(r)throw new Error("property <"+n+"> already defined; override of <"+r.definedBy.ns.name+"#"+r.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},tt.prototype.hasProperty=function(e){return this.propertiesByName[e]},tt.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(se(e.properties,Bt(function(a){a=ue({},a,{name:a.ns.localName,inherited:t}),Object.defineProperty(a,"definedBy",{value:e});var o=a.replaces,l=a.redefines;o||l?this.redefineProperty(a,o||l,o):(a.isBody&&this.setBodyProperty(a),a.isId&&this.setIdProperty(a),this.addProperty(a))},this)),r.push(e),n[i]=e)};function Ht(e,t){this.packageMap=Object.create(null),this.typeMap=Object.create(null),this.packages=[],this.properties=t,se(e,Bt(this.registerPackage,this))}Ht.prototype.getPackage=function(e){return this.packageMap[e]},Ht.prototype.getPackages=function(){return this.packages},Ht.prototype.registerPackage=function(e){e=ue({},e);var t=this.packageMap;Qs(t,e,"prefix"),Qs(t,e,"uri"),se(e.types,Bt(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Ht.prototype.registerType=function(e,t){e=ue({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:ue({},e.meta||{})});var n=Ue(e.name,t.prefix),r=n.name,i=Object.create(null);se(e.properties,Bt(function(a){var o=Ue(a.name,n.prefix),l=o.name;na(a.type)||(a.type=Ue(a.type,o.prefix).name),ue(a,{ns:o,name:l}),i[l]=a},this)),ue(e,{ns:n,name:r,propertiesByName:i}),se(e.extends,Bt(function(a){var o=Ue(a,n.prefix),l=this.typeMap[o.name];l.traits=l.traits||[],l.traits.push(r)},this)),this.definePackage(e,t),this.typeMap[r]=e},Ht.prototype.mapTypes=function(e,t,n){var r=na(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function a(c,d){var p=Ue(c,na(c)?"":e.prefix);i.mapTypes(p,t,d)}function o(c){return a(c,!0)}function l(c){return a(c,!1)}if(!r)throw new Error("unknown type <"+e.name+">");se(r.superClass,n?o:l),t(r,!n),se(r.traits,o)},Ht.prototype.getEffectiveDescriptor=function(e){var t=Ue(e),n=new tt(t);this.mapTypes(t,function(i,a){n.addTrait(i,a)});var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r},Ht.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function Qs(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function sn(e){this.model=e}sn.prototype.set=function(e,t,n){if(!dt(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;km(n)?r?delete e[i]:delete e.$attrs[ra(t)]:r?i in e?e[i]=n:el(e,r,n):e.$attrs[ra(t)]=n},sn.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[ra(t)];var r=n.name;return!e[r]&&n.isMany&&el(e,n,[]),e[r]},sn.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=ue({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)},sn.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},sn.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},sn.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;const i=n.config.strict;if(typeof i<"u"){const a=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw a;typeof console<"u"&&console.warn(a)}return null};function km(e){return typeof e>"u"}function el(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function ra(e){return e.replace(/^:/,"")}function st(e,t={}){this.properties=new sn(this),this.factory=new Xs(this,this.properties),this.registry=new Ht(e,this.properties),this.typeCache=Object.create(null),this.config=t}st.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},st.prototype.getType=function(e){var t=this.typeCache,n=dt(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},st.prototype.createAny=function(e,t,n){var r=Ue(e),i={$type:e,$instanceOf:function(o){return o===this.$type},get:function(o){return this[o]},set:function(o,l){Sd(this,[o],l)}},a={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(i,a),this.properties.defineModel(i,this),this.properties.define(i,"get",{enumerable:!1,writable:!0}),this.properties.define(i,"set",{enumerable:!1,writable:!0}),this.properties.define(i,"$parent",{enumerable:!1,writable:!0}),this.properties.define(i,"$instanceOf",{enumerable:!1,writable:!0}),se(n,function(o,l){It(o)&&o.value!==void 0?i[o.name]=o.value:i[l]=o}),i},st.prototype.getPackage=function(e){return this.registry.getPackage(e)},st.prototype.getPackages=function(){return this.registry.getPackages()},st.prototype.getElementDescriptor=function(e){return e.$descriptor},st.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},st.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},st.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var tl=String.fromCharCode,Cm=Object.prototype.hasOwnProperty,Rm=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,jn={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(jn).forEach(function(e){jn[e.toUpperCase()]=jn[e]});function Tm(e,t,n,r){return r?Cm.call(jn,r)?jn[r]:"&"+r+";":tl(t||parseInt(n,16))}function ln(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(Rm,Tm):e}var nl="non-whitespace outside of root node";function Wt(e){return new Error(e)}function Nm(e){return"missing namespace for prefix <"+e+">"}function Dr(e){return{get:e,enumerable:!0}}function Im(e){var t=Object.create(null),n;for(n in e)t[n]=e[n];return t}var rl=Symbol("nameCache");function ia(e){return e+"$uri"}function Dm(e){var t=Object.create(null),n,r;for(n in e)r=e[n],t[r]=r,t[ia(r)]=n;return t}function Pr(){return{line:0,column:0}}function Pm(e){throw e}function il(e){if(!this)return new il(e);var t=e&&e.proxy,n,r,i,a,o=Pm,l,c,d,p,m=Pr,w=!1,g=!1,M="",O=!1,N=!1,E=null,R=!1,y,v,k,D;function x(T){T instanceof Error||(T=Wt(T)),E=T,o(T,m)}function _(T){l&&(T instanceof Error||(T=Wt(T)),l(T,m))}this.on=function(T,q){if(typeof q!="function")throw Wt("required args <name, cb>");switch(T){case"openTag":r=q;break;case"text":n=q;break;case"closeTag":i=q;break;case"error":o=q;break;case"warn":l=q;break;case"cdata":a=q;break;case"attention":p=q;break;case"question":d=q;break;case"comment":c=q;break;default:throw Wt("unsupported event: "+T)}return this},this.ns=function(T){if(typeof T>"u"&&(T={}),typeof T!="object")throw Wt("required args <nsMap={}>");var q=Object.create(null),de;for(de in T)q[de]=T[de];return N=!0,D=q,this};function j(){y=N?[]:null,v=N?Dm(D):null,k=[],m=Pr,R=!1,E=null,g=!1,M=""}this.parse=function(T){if(typeof T!="string")throw Wt("required args <xml=string>");if(w)throw Wt("parse during stream; call end() first");return j(),$(T),m=Pr,R=!1,E},this.write=function(T){if(typeof T!="string")throw Wt("required args <xml=string>");return w||(j(),w=!0),E||(M=$(M+T,!0)||""),this},this.end=function(){return w||j(),w=!1,E||$(M),M="",m=Pr,R=!1,E},this.stop=function(){R=!0};function $(T,q=!1){var de=null,J=null,K,Y=0,Z=!1,W=!1,G=0,P=0,z,C,I,H,ie,le,h,f,u,b="",A=0,U;function ee(F,X){var Q=F.indexOf(":");if(Q===-1)return F;var me=v[F.substring(0,Q)];return me?X===me?F.substr(Q+1):me+F.substr(Q):(_(Nm(F.substring(0,Q))),null)}function ye(){if(U!==null)return U;var F,X,Q=N&&v.xmlns,me=N&&O?[]:null,ve=A,be=b,Ee=be.length,Ne,je,qe,lt,Me,un={},jr=new Set,nt,Se,Ae;e:for(;ve<Ee;ve++)if(nt=!1,Se=be.charCodeAt(ve),!(Se===32||Se<14&&Se>8)){for((Se<65||Se>122||Se>90&&Se<97)&&Se!==95&&Se!==58&&(_("illegal first char attribute name"),nt=!0),Ae=ve+1;Ae<Ee;Ae++)if(Se=be.charCodeAt(Ae),!(Se>96&&Se<123||Se>64&&Se<91||Se>47&&Se<59||Se===46||Se===45||Se===95)){if(Se===32||Se<14&&Se>8){_("missing attribute value"),ve=Ae;continue e}if(Se===61)break;_("illegal attribute name char"),nt=!0}if(Me=be.substring(ve,Ae),Me==="xmlns:xmlns"&&(_("illegal declaration of xmlns"),nt=!0),Se=be.charCodeAt(Ae+1),Se===34)Ae=be.indexOf('"',ve=Ae+2),Ae===-1&&(Ae=be.indexOf("'",ve),Ae!==-1&&(_("attribute value quote missmatch"),nt=!0));else if(Se===39)Ae=be.indexOf("'",ve=Ae+2),Ae===-1&&(Ae=be.indexOf('"',ve),Ae!==-1&&(_("attribute value quote missmatch"),nt=!0));else for(_("missing attribute value quotes"),nt=!0,Ae=Ae+1;Ae<Ee&&(Se=be.charCodeAt(Ae+1),!(Se===32||Se<14&&Se>8));Ae++);for(Ae===-1&&(_("missing closing quotes"),Ae=Ee,nt=!0),nt||(qe=be.substring(ve,Ae)),ve=Ae;Ae+1<Ee&&(Se=be.charCodeAt(Ae+1),!(Se===32||Se<14&&Se>8));Ae++)ve===Ae&&(_("illegal character after attribute end"),nt=!0);if(ve=Ae+1,nt)continue e;if(jr.has(Me)){_("attribute <"+Me+"> already defined");continue}if(jr.add(Me),!N){un[Me]=qe;continue}if(O){if(je=Me==="xmlns"?"xmlns":Me.charCodeAt(0)===120&&Me.substr(0,6)==="xmlns:"?Me.substr(6):null,je!==null){if(F=ln(qe),X=ia(je),lt=D[F],!lt){if(je==="xmlns"||X in v&&v[X]!==F)do lt="ns"+Y++;while(typeof v[lt]<"u");else lt=je;D[F]=lt}v[je]!==lt&&(Ne||(v=Im(v),Ne=!0),v[je]=lt,je==="xmlns"&&(v[ia(lt)]=F,Q=lt),v[X]=F),un[Me]=qe;continue}me.push(Me,qe);continue}Me=ee(Me,Q),Me!==null&&(un[Me]=qe)}if(O)for(ve=0,Ee=me.length;ve<Ee;ve++)Me=ee(me[ve++],Q),qe=me[ve],Me!==null&&(un[Me]=qe);return U=un}function ge(){for(var F=/(\r\n|\r|\n)/g,X=0,Q=0,me=0,ve=P,be,Ee;G>=me&&(be=F.exec(T),!(!be||(ve=be[0].length+be.index,ve>G)));)X+=1,me=ve;return G==-1?(Q=ve,Ee=T.substring(P)):P===0?Ee=T.substring(P,G):(Q=G-me,Ee=P==-1?T.substring(G):T.substring(G,P+1)),{data:Ee,line:X,column:Q}}for(m=ge,t&&(u=Object.create({},{name:Dr(function(){return h}),originalName:Dr(function(){return f}),attrs:Dr(ye),ns:Dr(function(){return v})}));P!==-1;){if(T.charCodeAt(P)===60?G=P:G=T.indexOf("<",P),G===-1){if(q)return T.substring(P);if(k.length)return x("unexpected end of file");if(!g)return x("missing start tag");P<T.length&&T.substring(P).trim()&&_(nl);return}if(g||(g=!0),P!==G){if(k.length){if(n&&(n(T.substring(P,G),ln,m),R))return}else if(T.substring(P,G).trim()&&(_(nl),R))return}if(H=T.charCodeAt(G+1),H===33){if(I=T.charCodeAt(G+2),I===91&&T.substr(G+3,6)==="CDATA["){if(P=T.indexOf("]]>",G),P===-1)return q?T.substring(G):x("unclosed cdata");if(a&&(a(T.substring(G+9,P),m),R))return;P+=3;continue}if(I===45&&T.charCodeAt(G+3)===45){if(P=T.indexOf("-->",G),P===-1)return q?T.substring(G):x("unclosed comment");if(c&&(c(T.substring(G+4,P),ln,m),R))return;P+=3;continue}}if(H===63){if(P=T.indexOf("?>",G),P===-1)return q?T.substring(G):x("unclosed question");if(d&&(d(T.substring(G,P+2),m),R))return;P+=2;continue}for(z=G+1;;z++){if(ie=T.charCodeAt(z),isNaN(ie))return q?T.substring(G):(P=-1,x("unclosed tag"));if(ie===34)I=T.indexOf('"',z+1),z=I!==-1?I:z;else if(ie===39)I=T.indexOf("'",z+1),z=I!==-1?I:z;else if(ie===62){P=z;break}}if(H===33){if(p&&(p(T.substring(G,P+1),ln,m),R))return;P+=1;continue}if(U={},H===47){if(Z=!1,W=!0,!k.length)return x("missing open tag");if(z=h=k.pop(),I=G+2+z.length,T.substring(G+2,I)!==z)return x("closing tag mismatch");for(;I<P;I++)if(H=T.charCodeAt(I),!(H===32||H>8&&H<14))return x("close tag")}else{if(T.charCodeAt(P-1)===47?(z=h=T.substring(G+1,P-1),Z=!0,W=!0):(z=h=T.substring(G+1,P),Z=!0,W=!1),!(H>96&&H<123||H>64&&H<91||H===95||H===58))return x("illegal first char nodeName");for(I=1,C=z.length;I<C;I++)if(H=z.charCodeAt(I),!(H>96&&H<123||H>64&&H<91||H>47&&H<59||H===45||H===95||H==46)){if(H===32||H<14&&H>8){h=z.substring(0,I),U=null;break}return x("invalid nodeName")}W||k.push(h)}if(N){K=v,Z&&(W||y.push(K),U===null&&(O=z.indexOf("xmlns",I)!==-1)&&(A=I,b=z,ye(),O=!1)),f=h,J!==v&&(de=v[rl],de===void 0&&(de=v[rl]=Object.create(null)),J=v);var ae=de[h];if(ae!==void 0)h=ae;else{if(H=h.indexOf(":"),H!==-1){if(le=v[h.substring(0,H)],!le)return x("missing namespace on <"+f+">");h=h.substr(H+1)}else le=v.xmlns;le&&(h=le+":"+h),de[f]=h}}if(Z&&(A=I,b=z,r&&(t?r(u,ln,W,m):r(h,ye,ln,W,m),R)))return;if(W){if(i&&(i(t?u:h,ln,Z,m),R))return;N&&(Z?v=K:v=y.pop())}P+=1}}}function al(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var aa={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},ol="property";function sl(e){return e.xml&&e.xml.serialize}function Bm(e){const t=sl(e);return t!==ol&&(t||null)}function Om(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ll(e,t){return al(t)?e.prefix+":"+Om(e.localName):e.name}function Mm(e,t){var n=e.name,r=e.localName,i=t&&t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function Lm(e,t,n){const r=Ue(e,t.xmlns),i=`${t[r.prefix]||r.prefix}:${r.localName}`,a=Ue(i);var o=n.getPackage(a.prefix);return Mm(a,o)}function qt(e){return new Error(e)}function Nt(e){return e.$descriptor}function Vm(e){ue(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw qt("expected element");var n=this.elementsById,r=Nt(t),i=r.idProperty,a;if(i&&(a=t.get(i.name),a)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(a))throw new Error("illegal ID <"+a+">");if(n[a])throw qt("duplicate ID <"+a+">");n[a]=t}},this.addWarning=function(t){this.warnings.push(t)}}function zn(){}zn.prototype.handleEnd=function(){},zn.prototype.handleText=function(){},zn.prototype.handleNode=function(){};function oa(){}oa.prototype=Object.create(zn.prototype),oa.prototype.handleNode=function(){return this};function xn(){}xn.prototype=Object.create(zn.prototype),xn.prototype.handleText=function(e){this.body=(this.body||"")+e};function Hn(e,t){this.property=e,this.context=t}Hn.prototype=Object.create(xn.prototype),Hn.prototype.handleNode=function(e){if(this.element)throw qt("expected no sub nodes");return this.element=this.createReference(e),this},Hn.prototype.handleEnd=function(){this.element.id=this.body},Hn.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function sa(e,t){this.element=t,this.propertyDesc=e}sa.prototype=Object.create(xn.prototype),sa.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=ta(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function Br(){}Br.prototype=Object.create(xn.prototype),Br.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};function We(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}We.prototype=Object.create(Br.prototype),We.prototype.addReference=function(e){this.context.addReference(e)},We.prototype.handleText=function(e){var t=this.element,n=Nt(t),r=n.bodyProperty;if(!r)throw qt("unexpected body text <"+e+">");xn.prototype.handleText.call(this,e)},We.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Nt(t),r=n.bodyProperty;r&&e!==void 0&&(e=ta(r.type,e),t.set(r.name,e))},We.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=Nt(n),i=this.context,a=new n({}),o=this.model,l;return se(t,function(c,d){var p=r.propertiesByName[d],m;p&&p.isReference?p.isMany?(m=c.split(" "),se(m,function(w){i.addReference({element:a,property:p.ns.name,id:w})})):i.addReference({element:a,property:p.ns.name,id:c}):(p?c=ta(p.type,c):d==="xmlns"?d=":"+d:(l=Ue(d,r.ns.prefix),o.getPackage(l.prefix)&&i.addWarning({message:"unknown attribute <"+d+">",element:a,property:d,value:c})),a.set(d,c))}),a},We.prototype.getPropertyForNode=function(e){var t=e.name,n=Ue(t),r=this.type,i=this.model,a=Nt(r),o=n.name,l=a.propertiesByName[o];if(l&&!l.isAttr){const d=Bm(l);if(d){const p=e.attributes[d];if(p){const m=Lm(p,e.ns,i),w=i.getType(m);return ue({},l,{effectiveType:Nt(w).name})}}return l}var c=i.getPackage(n.prefix);if(c){const d=ll(n,c),p=i.getType(d);if(l=ut(a.properties,function(m){return!m.isVirtual&&!m.isReference&&!m.isAttribute&&p.hasType(m.type)}),l)return ue({},l,{effectiveType:Nt(p).name})}else if(l=ut(a.properties,function(d){return!d.isReference&&!d.isAttribute&&d.type==="Element"}),l)return l;throw qt("unrecognized element <"+n.name+">")},We.prototype.toString=function(){return"ElementDescriptor["+Nt(this.type).name+"]"},We.prototype.valueHandler=function(e,t){return new sa(e,t)},We.prototype.referenceHandler=function(e){return new Hn(e,this.context)},We.prototype.handler=function(e){return e==="Element"?new Sn(this.model,e,this.context):new We(this.model,e,this.context)},We.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,Zs(n))return this.valueHandler(t,r);t.isReference?i=this.referenceHandler(t).handleNode(e):i=this.handler(n).handleNode(e);var a=i.element;return a!==void 0&&(t.isMany?r.get(t.name).push(a):r.set(t.name,a),t.isReference?(ue(a,{element:r}),this.context.addReference(a)):a.$parent=r),i};function la(e,t,n){We.call(this,e,t,n)}la.prototype=Object.create(We.prototype),la.prototype.createElement=function(e){var t=e.name,n=Ue(t),r=this.model,i=this.type,a=r.getPackage(n.prefix),o=a&&ll(n,a)||t;if(!i.hasType(o))throw qt("unexpected element <"+e.originalName+">");return We.prototype.createElement.call(this,e)};function Sn(e,t,n){this.model=e,this.context=n}Sn.prototype=Object.create(Br.prototype),Sn.prototype.createElement=function(e){var t=e.name,n=Ue(t),r=n.prefix,i=e.ns[r+"$uri"],a=e.attributes;return this.model.createAny(t,i,a)},Sn.prototype.handleChild=function(e){var t=new Sn(this.model,"Element",this.context).handleNode(e),n=this.element,r=t.element,i;return r!==void 0&&(i=n.$children=n.$children||[],i.push(r),r.$parent=n),t},Sn.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function ca(e){e instanceof st&&(e={model:e}),ue(this,{lax:!1},e)}ca.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof We?(r=t,t={}):typeof t=="string"?(r=this.handler(t),t={}):typeof r=="string"&&(r=this.handler(r));var i=this.model,a=this.lax,o=new Vm(ue({},t,{rootHandler:r})),l=new il({proxy:!0}),c=Fm();r.context=o,c.push(r);function d(k,D,x){var _=D(),j=_.line,$=_.column,T=_.data;T.charAt(0)==="<"&&T.indexOf(" ")!==-1&&(T=T.slice(0,T.indexOf(" "))+">");var q="unparsable content "+(T?T+" ":"")+`detected
10
+ line: `+j+`
11
+ column: `+$+`
12
+ nested error: `+k.message;if(x)return o.addWarning({message:q,error:k}),!0;throw qt(q)}function p(k,D){return d(k,D,!0)}function m(){var k=o.elementsById,D=o.references,x,_;for(x=0;_=D[x];x++){var j=_.element,$=k[_.id],T=Nt(j).propertiesByName[_.property];if($||o.addWarning({message:"unresolved reference <"+_.id+">",element:_.element,property:_.property,value:_.id}),T.isMany){var q=j.get(T.name),de=q.indexOf(_);de===-1&&(de=q.length),$?q[de]=$:q.splice(de,1)}else j.set(T.name,$)}}function w(){c.pop().handleEnd()}var g=/^<\?xml /i,M=/ encoding="([^"]+)"/i,O=/^utf-8$/i;function N(k){if(g.test(k)){var D=M.exec(k),x=D&&D[1];!x||O.test(x)||o.addWarning({message:"unsupported document encoding <"+x+">, falling back to UTF-8"})}}function E(k,D){var x=c.peek();try{c.push(x.handleNode(k))}catch(_){d(_,D,a)&&c.push(new oa)}}function R(k,D){try{c.peek().handleText(k)}catch(x){p(x,D)}}function y(k,D){k.trim()&&R(k,D)}var v=i.getPackages().reduce(function(k,D){return k[D.uri]=D.prefix,k},Object.entries(aa).reduce(function(k,[D,x]){return k[x]=D,k},i.config&&i.config.nsMap||{}));return l.ns(v).on("openTag",function(k,D,x,_){var j=k.attrs||{},$=Object.keys(j).reduce(function(q,de){var J=D(j[de]);return q[de]=J,q},{}),T={name:k.name,originalName:k.originalName,attributes:$,ns:k.ns};E(T,_)}).on("question",N).on("closeTag",w).on("cdata",R).on("text",function(k,D,x){y(D(k),x)}).on("error",d).on("warn",p),new Promise(function(k,D){var x;try{l.parse(e),m()}catch(q){x=q}var _=r.element;!x&&!_&&(x=qt("failed to parse document as <"+r.type.$descriptor.name+">"));var j=o.warnings,$=o.references,T=o.elementsById;return x?(x.warnings=j,D(x)):k({rootElement:_,elementsById:T,references:$,warnings:j})})},ca.prototype.handler=function(e){return new la(this.model,e)};function Fm(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var $m=`<?xml version="1.0" encoding="UTF-8"?>
13
+ `,Um=/<|>|'|"|&|\n\r|\n/g,cl=/<|>|&/g;function vt(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}vt.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},vt.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},vt.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},vt.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},vt.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},vt.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},vt.prototype.getNSKey=function(e){return e.prefix!==void 0?e.uri+"|"+e.prefix:e.uri},vt.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},vt.prototype.getUsed=function(e){var t=[].concat(this.wellknown,this.custom);return t.filter(n=>{var r=this.getNSKey(n);return this.used[r]})};function jm(e){return e.charAt(0).toLowerCase()+e.slice(1)}function zm(e,t){return al(t)?jm(e):e}function ul(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function fl(e){return dt(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function Hm(e){return e.getUsed().filter(function(t){return t.prefix!=="xml"}).map(function(t){var n="xmlns"+(t.prefix?":"+t.prefix:"");return{name:n,value:t.uri}})}function Wm(e,t){return t.isGeneric?ue({localName:t.ns.localName},e):ue({localName:zm(t.ns.localName,t.$pkg)},e)}function qm(e,t){return ue({localName:t.ns.localName},e)}function Ym(e){var t=e.$descriptor;return gn(t.properties,function(n){var r=n.name;if(n.isVirtual||!yn(e,r))return!1;var i=e[r];return i===n.default||i===null?!1:n.isMany?i.length:!0})}var Km={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Gm={"<":"lt",">":"gt","&":"amp"};function dl(e,t,n){return e=dt(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function Xm(e){return dl(e,Um,Km)}function Jm(e){return dl(e,cl,Gm)}function Zm(e){return gn(e,function(t){return t.isAttr})}function Qm(e){return gn(e,function(t){return!t.isAttr})}function ua(e){this.tagName=e}ua.prototype.build=function(e){return this.element=e,this},ua.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()};function cn(){}cn.prototype.serializeValue=cn.prototype.serializeTo=function(e){e.append(this.escape?Jm(this.value):this.value)},cn.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(cl)!==-1&&(this.escape=!0),this};function fa(e){this.tagName=e}ul(fa,cn),fa.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()};function Ce(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}Ce.prototype.build=function(e){this.element=e;var t=e.$descriptor,n=this.propertyDescriptor,r,i,a=t.isGeneric;return a?r=this.parseGenericNsAttributes(e):r=this.parseNsAttributes(e),n?this.ns=this.nsPropertyTagName(n):this.ns=this.nsTagName(t),this.tagName=this.addTagName(this.ns),a?this.parseGenericContainments(e):(i=Ym(e),this.parseAttributes(Zm(i)),this.parseContainments(Qm(i))),this.parseGenericAttributes(e,r),this},Ce.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Wm(t,e)},Ce.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return qm(t,e)},Ce.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},Ce.prototype.nsAttributeName=function(e){var t;if(dt(e)?t=Ue(e):t=e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:ue({localName:t.localName},n)},Ce.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter(([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n)).map(([t,n])=>({name:t,value:n}))},Ce.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push(new cn().build({type:"String"},t));var n=e.$children;n&&se(n,r=>{this.body.push(new Ce(this).build(r))})},Ce.prototype.parseNsAttribute=function(e,t,n){var r=e.$model,i=Ue(t),a;if(i.prefix==="xmlns"&&(a={prefix:i.localName,uri:n}),!i.prefix&&i.localName==="xmlns"&&(a={uri:n}),!a)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(a,!0,!0);else{var o=this.logNamespaceUsed(a,!0);this.getNamespaces().logUsed(o)}},Ce.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,r=[];return se(n,function(i,a){var o=t.parseNsAttribute(e,a,i);o&&r.push(o)}),r},Ce.prototype.parseGenericAttributes=function(e,t){var n=this;se(t,function(r){try{n.addAttribute(n.nsAttributeName(r.name),r.value)}catch(i){typeof console<"u"&&console.warn(`missing namespace information for <${r.name}=${r.value}> on`,e,i)}})},Ce.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;se(e,function(i){var a=r.get(i.name),o=i.isReference,l=i.isMany;if(l||(a=[a]),i.isBody)n.push(new cn().build(i,a[0]));else if(Zs(i.type))se(a,function(d){n.push(new fa(t.addTagName(t.nsPropertyTagName(i))).build(i,d))});else if(o)se(a,function(d){n.push(new ua(t.addTagName(t.nsPropertyTagName(i))).build(d))});else{var c=sl(i);se(a,function(d){var p;c?c===ol?p=new Ce(t,i):p=new Or(t,i,c):p=new Ce(t),n.push(p.build(d))})}})},Ce.prototype.getNamespaces=function(e){var t=this.namespaces,n=this.parent,r;return t||(r=n&&n.getNamespaces(),e||!r?this.namespaces=t=new vt(r):t=r),t},Ce.prototype.logNamespace=function(e,t,n){var r=this.getNamespaces(n),i=e.uri,a=e.prefix,o=r.byUri(i);return(!o||n)&&r.add(e,t),r.mapPrefix(a,i),e},Ce.prototype.logNamespaceUsed=function(e,t){var n=this.getNamespaces(t),r=e.prefix,i=e.uri,a,o,l;if(!r&&!i)return{localName:e.localName};if(l=n.defaultUriByPrefix(r),i=i||l||n.uriByPrefix(r),!i)throw new Error("no namespace uri given for prefix <"+r+">");if(e=n.byUri(i),!e&&!r&&(e=this.logNamespace({uri:i},l===i,!0)),!e){for(a=r,o=1;n.uriByPrefix(a);)a=r+"_"+o++;e=this.logNamespace({prefix:a,uri:i},l===i)}return r&&n.mapPrefix(r,i),e},Ce.prototype.parseAttributes=function(e){var t=this,n=this.element;se(e,function(r){var i=n.get(r.name);if(r.isReference)if(!r.isMany)i=i.id;else{var a=[];se(i,function(o){a.push(o.id)}),i=a.join(" ")}t.addAttribute(t.nsAttributeName(r),i)})},Ce.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),fl(e)},Ce.prototype.addAttribute=function(e,t){var n=this.attrs;dt(t)&&(t=Xm(t));var r=wd(n,function(a){return a.name.localName===e.localName&&a.name.uri===e.uri&&a.name.prefix===e.prefix}),i={name:e,value:t};r!==-1?n.splice(r,1,i):n.push(i)},Ce.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=Hm(n).concat(t)),se(t,function(r){e.append(" ").append(fl(r.name)).append('="').append(r.value).append('"')})},Ce.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==cn;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),se(this.body,function(r){r.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()};function Or(e,t,n){Ce.call(this,e,t),this.serialization=n}ul(Or,Ce),Or.prototype.parseNsAttributes=function(e){var t=Ce.prototype.parseNsAttributes.call(this,e).filter(o=>o.name!==this.serialization),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var r=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var i=e.$model.getPackage(r.uri),a=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(this.serialization),(r.prefix?r.prefix+":":"")+a+n.ns.localName),t},Or.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function ey(){this.value="",this.write=function(e){this.value+=e}}function ty(e,t){var n=[""];this.append=function(r){return e.write(r),this},this.appendNewLine=function(){return t&&e.write(`
14
+ `),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 ny(e){e=ue({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new ey,a=new ty(i,e.format);e.preamble&&a.append($m);var o=new Ce,l=n.$model;if(o.getNamespaces().mapDefaultPrefixes(ry(l)),o.build(n).serializeTo(a),!r)return i.value}return{toXML:t}}function ry(e){const t=e.config&&e.config.nsMap||{},n={};for(const r in aa)n[r]=aa[r];for(const r in t){const i=t[r];n[i]=r}for(const r of e.getPackages())n[r.prefix]=r.uri;return n}function Mr(e,t){st.call(this,e,t)}Mr.prototype=Object.create(st.prototype),Mr.prototype.fromXML=function(e,t,n){dt(t)||(n=t,t="bpmn:Definitions");var r=new ca(ue({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)},Mr.prototype.toXML=function(e,t){var n=new ny(t);return new Promise(function(r,i){try{var a=n.toXML(e);return r({xml:a})}catch(o){return i(o)}})};var iy="BPMN20",ay="http://www.omg.org/spec/BPMN/20100524/MODEL",oy="bpmn",sy=[],ly=[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],cy=[{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"}]}],uy={tagAlias:"lowerCase",typePrefix:"t"},fy={name:iy,uri:ay,prefix:oy,associations:sy,types:ly,enumerations:cy,xml:uy},dy="BPMNDI",py="http://www.omg.org/spec/BPMN/20100524/DI",hy="bpmndi",my=[{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"]}],yy=[{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"}]}],gy=[],vy={name:dy,uri:py,prefix:hy,types:my,enumerations:yy,associations:gy},wy="DC",by="http://www.omg.org/spec/DD/20100524/DC",Ey="dc",_y=[{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}]}],xy=[],Sy={name:wy,uri:by,prefix:Ey,types:_y,associations:xy},Ay="DI",ky="http://www.omg.org/spec/DD/20100524/DI",Cy="di",Ry=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],Ty=[],Ny={tagAlias:"lowerCase"},Iy={name:Ay,uri:ky,prefix:Cy,types:Ry,associations:Ty,xml:Ny},Dy="bpmn.io colors for BPMN",Py="http://bpmn.io/schema/bpmn/biocolor/1.0",By="bioc",Oy=[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],My=[],Ly=[],Vy={name:Dy,uri:Py,prefix:By,types:Oy,enumerations:My,associations:Ly},Fy="BPMN in Color",$y="http://www.omg.org/spec/BPMN/non-normative/color/1.0",Uy="color",jy=[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],zy=[],Hy=[],Wy={name:Fy,uri:$y,prefix:Uy,types:jy,enumerations:zy,associations:Hy};const qy={bpmn:fy,bpmndi:vy,dc:Sy,di:Iy,bioc:Vy,color:Wy};function Yy(e,t){const n=ue({},qy,e);return new Mr(n,t)}function Ke(e,t){return e.$instanceOf(t)}function Ky(e){return ut(e.rootElements,function(t){return Ke(t,"bpmn:Process")||Ke(t,"bpmn:Collaboration")})}function Gy(e){var t={},n=[],r={};function i(C,I){return function(H){C(H,I)}}function a(C){t[C.id]=C}function o(C){return t[C.id]}function l(C,I){var H=C.gfx;if(H)throw new Error(`already rendered ${$e(C)}`);return e.element(C,r[C.id],I)}function c(C,I){return e.root(C,r[C.id],I)}function d(C,I){try{var H=r[C.id]&&l(C,I);return a(C),H}catch(ie){p(ie.message,{element:C,error:ie}),console.error(`failed to import ${$e(C)}`,ie)}}function p(C,I){e.error(C,I)}var m=this.registerDi=function(I){var H=I.bpmnElement;H?r[H.id]?p(`multiple DI elements defined for ${$e(H)}`,{element:H}):r[H.id]=I:p(`no bpmnElement referenced in ${$e(I)}`,{element:I})};function w(C){g(C.plane)}function g(C){m(C),se(C.planeElement,M)}function M(C){m(C)}this.handleDefinitions=function(I,H){var ie=I.diagrams;if(H&&ie.indexOf(H)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!H&&ie&&ie.length&&(H=ie[0]),!H)throw new Error("no diagram to display");r={},w(H);var le=H.plane;if(!le)throw new Error(`no plane for ${$e(H)}`);var h=le.bpmnElement;if(!h)if(h=Ky(I),h)p(`correcting missing bpmnElement on ${$e(le)} to ${$e(h)}`),le.bpmnElement=h,m(le);else throw new Error("no process or collaboration to display");var f=c(h,le);if(Ke(h,"bpmn:Process")||Ke(h,"bpmn:SubProcess"))N(h,f);else if(Ke(h,"bpmn:Collaboration"))P(h,f),E(I.rootElements,f);else throw new Error(`unsupported bpmnElement for ${$e(le)}: ${$e(h)}`);O(n)};var O=this.handleDeferred=function(){for(var I;n.length;)I=n.shift(),I()};function N(C,I){Z(C,I),j(C.ioSpecification,I),_(C.artifacts,I),a(C)}function E(C,I){var H=gn(C,function(ie){return!o(ie)&&Ke(ie,"bpmn:Process")&&ie.laneSets});H.forEach(i(N,I))}function R(C,I){d(C,I)}function y(C,I){se(C,i(R,I))}function v(C,I){d(C,I)}function k(C,I){d(C,I)}function D(C,I){d(C,I)}function x(C,I){d(C,I)}function _(C,I){se(C,function(H){Ke(H,"bpmn:Association")?n.push(function(){x(H,I)}):x(H,I)})}function j(C,I){C&&(se(C.dataInputs,i(k,I)),se(C.dataOutputs,i(D,I)))}var $=this.handleSubProcess=function(I,H){Z(I,H),_(I.artifacts,H)};function T(C,I){var H=d(C,I);Ke(C,"bpmn:SubProcess")&&$(C,H||I),Ke(C,"bpmn:Activity")&&j(C.ioSpecification,I),n.push(function(){se(C.dataInputAssociations,i(v,I)),se(C.dataOutputAssociations,i(v,I))})}function q(C,I){d(C,I)}function de(C,I){d(C,I)}function J(C,I){n.push(function(){var H=d(C,I);C.childLaneSet&&K(C.childLaneSet,H||I),z(C)})}function K(C,I){se(C.lanes,i(J,I))}function Y(C,I){se(C,i(K,I))}function Z(C,I){W(C.flowElements,I),C.laneSets&&Y(C.laneSets,I)}function W(C,I){se(C,function(H){Ke(H,"bpmn:SequenceFlow")?n.push(function(){q(H,I)}):Ke(H,"bpmn:BoundaryEvent")?n.unshift(function(){T(H,I)}):Ke(H,"bpmn:FlowNode")?T(H,I):Ke(H,"bpmn:DataObject")||(Ke(H,"bpmn:DataStoreReference")||Ke(H,"bpmn:DataObjectReference")?de(H,I):p(`unrecognized flowElement ${$e(H)} in context ${$e(I&&I.businessObject)}`,{element:H,context:I}))})}function G(C,I){var H=d(C,I),ie=C.processRef;ie&&N(ie,H||I)}function P(C,I){se(C.participants,i(G,I)),n.push(function(){y(C.messageFlows,I)}),_(C.artifacts,I)}function z(C){se(C.flowNodeRef,function(I){var H=I.get("lanes");H&&H.push(C)})}}function Xy(e,t,n){var r,i,a,o,l=[];function c(d,p){var m={root:function(O,N){return r.add(O,N)},element:function(O,N,E){return r.add(O,N,E)},error:function(O,N){l.push({message:O,context:N})}},w=new Gy(m);p=p||d.diagrams&&d.diagrams[0];var g=Jy(d,p);if(!g)throw new Error("no diagram to display");se(g,function(O){w.handleDefinitions(d,O)});var M=p.plane.bpmnElement.id;a.setRootElement(a.findRoot(M+"_plane")||a.findRoot(M))}return new Promise(function(d,p){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),a=e.get("canvas"),i.fire("import.render.start",{definitions:t}),c(t,n),i.fire("import.render.complete",{error:o,warnings:l}),d({warnings:l})}catch(m){return m.warnings=l,p(m)}})}function Jy(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!fe(n,"bpmn:Process")&&!fe(n,"bpmn:Collaboration")&&(r=Zy(n));var i;fe(r,"bpmn:Collaboration")?i=r:i=ut(e.rootElements,function(d){if(fe(d,"bpmn:Collaboration"))return ut(d.participants,function(p){return p.processRef===r})});var a=[r];i&&(a=No(i.participants,function(d){return d.processRef}),a.push(i));var o=pl(a),l=[t],c=[n];return se(e.diagrams,function(d){if(d.plane){var p=d.plane.bpmnElement;o.indexOf(p)!==-1&&c.indexOf(p)===-1&&(l.push(d),c.push(p))}}),l}}function pl(e){var t=[];return se(e,function(n){n&&(t.push(n),t=t.concat(pl(n.flowElements)))}),t}function Zy(e){for(var t=e;t;){if(fe(t,"bpmn:Process"))return t;t=t.$parent}}var Qy='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',hl=Qy,ml={verticalAlign:"middle"},yl={color:"#404040"},eg={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},tg={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},ng={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},rg='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+hl+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',wt;function ig(){wt=mt(rg),Ze(wt,eg),Ze(kt("svg",wt),ml),Ze(kt(".backdrop",wt),tg),Ze(kt(".notice",wt),ng),Ze(kt(".link",wt),yl,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function ag(){wt||(ig(),Ui.bind(wt,".backdrop","click",function(e){document.body.removeChild(wt)})),document.body.appendChild(wt)}const Lr=5,gl="djs-outline-hidden";function Pe(e){e=ue({},sg,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),cg(this._container)}ft(Pe,zt),Pe.prototype.importXML=async function(t,n){const r=this;function i(o){return r.get("eventBus").createEvent(o)}let a=[];try{t=this._emit("import.parse.start",{xml:t})||t;let o;try{o=await this._moddle.fromXML(t,"bpmn:Definitions")}catch(w){throw this._emit("import.parse.complete",{error:w}),w}let l=o.rootElement;const c=o.references,d=o.warnings,p=o.elementsById;a=a.concat(d),l=this._emit("import.parse.complete",i({error:null,definitions:l,elementsById:p,references:c,warnings:a}))||l;const m=await this.importDefinitions(l,n);return a=a.concat(m.warnings),this._emit("import.done",{error:null,warnings:a}),{warnings:a}}catch(o){let l=o;throw a=a.concat(l.warnings||[]),Vr(l,a),l=og(l),this._emit("import.done",{error:l,warnings:l.warnings}),l}},Pe.prototype.importDefinitions=async function(t,n){return this._setDefinitions(t),{warnings:(await this.open(n)).warnings}},Pe.prototype.open=async function(t){const n=this._definitions;let r=t;if(!n){const a=new Error("no XML imported");throw Vr(a,[]),a}if(typeof t=="string"&&(r=lg(n,t),!r)){const a=new Error("BPMNDiagram <"+t+"> not found");throw Vr(a,[]),a}try{this.clear()}catch(a){throw Vr(a,[]),a}const{warnings:i}=await Xy(this,n,r);return{warnings:i}},Pe.prototype.saveXML=async function(t){t=t||{};let n=this._definitions,r,i;try{if(!n)throw new Error("no definitions loaded");n=this._emit("saveXML.start",{definitions:n})||n,i=(await this._moddle.toXML(n,t)).xml,i=this._emit("saveXML.serialized",{xml:i})||i}catch(o){r=o}const a=r?{error:r}:{xml:i};if(this._emit("saveXML.done",a),r)throw r;return a},Pe.prototype.saveSVG=async function(){this._emit("saveSVG.start");let t,n;try{const r=this.get("canvas"),i=r.getActiveLayer(),a=kt(":scope > defs",r._svg),o=Wo(i),l=a?"<defs>"+Wo(a)+"</defs>":"",c=r.getContainer();rn(c).add(gl);let d;try{d=i.getBBox()}finally{rn(c).remove(gl)}const p=d.x-Lr,m=d.y-Lr,w=d.width+Lr*2,g=d.height+Lr*2;t=`<?xml version="1.0" encoding="utf-8"?>
15
15
  <!-- created with bpmn-js / http://bpmn.io -->
16
16
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
17
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+w+'" height="'+g+'" viewBox="'+h+" "+m+" "+w+" "+g+'" version="1.1">'+s+a+"</svg>"}catch(r){n=r}if(this._emit("saveSVG.done",{error:n,svg:t}),n)throw n;return{svg:t}},Ne.prototype._setDefinitions=function(e){this._definitions=e},Ne.prototype.getModules=function(){return this._modules},Ne.prototype.clear=function(){this.getDefinitions()&&Lt.prototype.clear.call(this)},Ne.prototype.destroy=function(){Lt.prototype.destroy.call(this),ur(this._container)},Ne.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)},Ne.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Ne.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=bt(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Ne.prototype.getDefinitions=function(){return this._definitions},Ne.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Ne.prototype._init=function(e,t,n){const r=n.modules||this.getModules(n),i=n.additionalModules||[],o=[{bpmnjs:["value",this],moddle:["value",t]}],a=[].concat(o,r,i),s=ce(sd(n,["additionalModules"]),{canvas:ce({},n.canvas,{container:e}),modules:a});Lt.call(this,s),n&&n.container&&this.attachTo(n.container)},Ne.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Ne.prototype._createContainer=function(e){const t=ut('<div class="bjs-container"></div>');return Ge(t,{width:al(e.width),height:al(e.height),position:e.position}),t},Ne.prototype._createModdle=function(e){const t=ce({},this._moddleExtensions,e.moddleExtensions);return new Ry(t)},Ne.prototype._modules=[];function Nr(e,t){return e.warnings=t,e}function jy(e){const n=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}const Uy={width:"100%",height:"100%",position:"relative"};function al(e){return e+(kt(e)?"px":"")}function zy(e,t){return t&&ot(e.diagrams,function(n){return n.id===t})||null}function Hy(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+nl+"</a>",r=ut(n);Ge(bt("svg",r),rl),Ge(r,il,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),Nt.bind(r,"click",function(i){Vy(),i.preventDefault()})}function Ln(e){Ne.call(this,e)}at(Ln,Ne),Ln.prototype._modules=[nh,Eh,cs,Rh,Ya],Ln.prototype._moddleExtensions={};function sl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function to(e){return Math.log(e)/Math.log(10)}function ll(e,t){var n=to(e.min),r=to(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function Wy(e,t){return Math.max(e.min,Math.min(e.max,t))}var qy=Math.sign||function(e){return e>=0?1:-1},no={min:.2,max:4},cl=10,Yy=.1,Ky=.75;function mt(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=Rt(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||Ky;var r=this;t.on("canvas.mouseover",function(){r._init(e.enabled!==!1)}),t.on("canvas.mouseout",function(){r._init(!1)})}mt.$inject=["config.zoomScroll","eventBus","canvas"],mt.prototype.scroll=function(t){this._canvas.scroll(t)},mt.prototype.reset=function(){this._canvas.zoom("fit-viewport")},mt.prototype.zoom=function(t,n){var r=ll(no,cl*2);this._totalDelta+=t,Math.abs(this._totalDelta)>Yy&&(this._zoom(t,n,r),this._totalDelta=0)},mt.prototype._handleWheel=function(t){if(this._enabled){var n=this._container;t.preventDefault();var r=t.ctrlKey||_h()&&t.metaKey,i=t.shiftKey,o=-1*this._scale,a;if(r?o*=t.deltaMode===0?.02:.32:o*=t.deltaMode===0?1:16,r){var s=n.getBoundingClientRect(),c={x:t.clientX-s.left,y:t.clientY-s.top};a=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*qy(t.deltaY)*o,this.zoom(a,c)}else i?a={dx:o*t.deltaY,dy:0}:a={dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(a)}},mt.prototype.stepZoom=function(t,n){var r=ll(no,cl);this._zoom(t,n,r)},mt.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=to(r.zoom()),a=Math.round(o/n)*n;a+=n*i;var s=Math.pow(10,a);r.zoom(Wy(no,s),t)},mt.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t>"u"&&(t=!i),i!==t&&Nt[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t},mt.prototype._init=function(e){this.toggle(e)};const ul={__init__:["zoomScroll"],zoomScroll:["type",mt]};var Gy=/^djs-cursor-.*$/;function fl(e){var t=Jt(document.body);t.removeMatching(Gy),e&&t.add("djs-cursor-"+e)}function Xy(){fl(null)}var Jy=5e3;function Zy(e,t){t=t||"element.click";function n(){return!1}return e.once(t,Jy,n),function(){e.off(t,n)}}var Qy=15;function dl(e,t){var n;function r(s){return a(s.originalEvent)}e.on("canvas.focus.changed",function(s){s.focused?e.on("element.mousedown",500,r):e.off("element.mousedown",r)});function i(s){var c=n.start,d=n.button,h=ys(s),m=sl(h,c);if(!n.dragging&&eg(m)>Qy&&(n.dragging=!0,d===0&&Zy(e),fl("grab")),n.dragging){var w=n.last||n.start;m=sl(h,w),t.scroll({dx:m.x,dy:m.y}),n.last=h}s.preventDefault()}function o(s){Nt.unbind(document,"mousemove",i),Nt.unbind(document,"mouseup",o),n=null,Xy()}function a(s){if(!Fa(s.target,".djs-draggable")){var c=s.button;if(!(c>=2||s.ctrlKey||s.shiftKey||s.altKey))return n={button:c,start:ys(s)},Nt.bind(document,"mousemove",i),Nt.bind(document,"mouseup",o),!0}}this.isActive=function(){return!!n}}dl.$inject=["eventBus","canvas"];function eg(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const pl={__init__:["moveCanvas"],moveCanvas:["type",dl]},hl={name:"Camunda",uri:"http://camunda.org/schema/1.0/bpmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:JSON.parse('[{"name":"Definitions","isAbstract":true,"extends":["bpmn:Definitions"],"properties":[{"name":"diagramRelationId","isAttr":true,"type":"String"}]},{"name":"InOutBinding","superClass":["Element"],"isAbstract":true,"properties":[{"name":"source","isAttr":true,"type":"String"},{"name":"sourceExpression","isAttr":true,"type":"String"},{"name":"target","isAttr":true,"type":"String"},{"name":"businessKey","isAttr":true,"type":"String"},{"name":"local","isAttr":true,"type":"Boolean","default":false},{"name":"variables","isAttr":true,"type":"String"}]},{"name":"In","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity","bpmn:SignalEventDefinition"]}},{"name":"Out","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity"]}},{"name":"AsyncCapable","isAbstract":true,"extends":["bpmn:Activity","bpmn:Gateway","bpmn:Event"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false},{"name":"asyncBefore","isAttr":true,"type":"Boolean","default":false},{"name":"asyncAfter","isAttr":true,"type":"Boolean","default":false},{"name":"exclusive","isAttr":true,"type":"Boolean","default":true}]},{"name":"JobPriorized","isAbstract":true,"extends":["bpmn:Process","camunda:AsyncCapable"],"properties":[{"name":"jobPriority","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinitionExtension","isAbstract":true,"extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false}]},{"name":"ErrorEventDefinitionExtension","isAbstract":true,"extends":["bpmn:ErrorEventDefinition"],"properties":[{"name":"errorCodeVariable","isAttr":true,"type":"String"},{"name":"errorMessageVariable","isAttr":true,"type":"String"}]},{"name":"ErrorEventDefinition","superClass":["bpmn:ErrorEventDefinition","Element"],"properties":[{"name":"expression","isAttr":true,"type":"String"}],"meta":{"allowedIn":["bpmn:ServiceTask"]}},{"name":"Error","isAbstract":true,"extends":["bpmn:Error"],"properties":[{"name":"camunda:errorMessage","isAttr":true,"type":"String"}]},{"name":"PotentialStarter","superClass":["Element"],"properties":[{"name":"resourceAssignmentExpression","type":"bpmn:ResourceAssignmentExpression"}]},{"name":"FormSupported","isAbstract":true,"extends":["bpmn:StartEvent","bpmn:UserTask"],"properties":[{"name":"formHandlerClass","isAttr":true,"type":"String"},{"name":"formKey","isAttr":true,"type":"String"},{"name":"formRef","isAttr":true,"type":"String"},{"name":"formRefBinding","isAttr":true,"type":"String"},{"name":"formRefVersion","isAttr":true,"type":"String"}]},{"name":"TemplateSupported","isAbstract":true,"extends":["bpmn:Collaboration","bpmn:Process","bpmn:FlowElement"],"properties":[{"name":"modelerTemplate","isAttr":true,"type":"String"},{"name":"modelerTemplateVersion","isAttr":true,"type":"Integer"}]},{"name":"Initiator","isAbstract":true,"extends":["bpmn:StartEvent"],"properties":[{"name":"initiator","isAttr":true,"type":"String"}]},{"name":"ScriptTask","isAbstract":true,"extends":["bpmn:ScriptTask"],"properties":[{"name":"resultVariable","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Process","isAbstract":true,"extends":["bpmn:Process"],"properties":[{"name":"candidateStarterGroups","isAttr":true,"type":"String"},{"name":"candidateStarterUsers","isAttr":true,"type":"String"},{"name":"versionTag","isAttr":true,"type":"String"},{"name":"historyTimeToLive","isAttr":true,"type":"String"},{"name":"isStartableInTasklist","isAttr":true,"type":"Boolean","default":true}]},{"name":"EscalationEventDefinitionExtension","isAbstract":true,"extends":["bpmn:EscalationEventDefinition"],"properties":[{"name":"escalationCodeVariable","isAttr":true,"type":"String"}]},{"name":"FormalExpression","isAbstract":true,"extends":["bpmn:FormalExpression"],"properties":[{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Assignable","extends":["bpmn:UserTask"],"properties":[{"name":"assignee","isAttr":true,"type":"String"},{"name":"candidateUsers","isAttr":true,"type":"String"},{"name":"candidateGroups","isAttr":true,"type":"String"},{"name":"dueDate","isAttr":true,"type":"String"},{"name":"followUpDate","isAttr":true,"type":"String"},{"name":"priority","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"calledElementBinding","isAttr":true,"type":"String","default":"latest"},{"name":"calledElementVersion","isAttr":true,"type":"String"},{"name":"calledElementVersionTag","isAttr":true,"type":"String"},{"name":"calledElementTenantId","isAttr":true,"type":"String"},{"name":"caseRef","isAttr":true,"type":"String"},{"name":"caseBinding","isAttr":true,"type":"String","default":"latest"},{"name":"caseVersion","isAttr":true,"type":"String"},{"name":"caseTenantId","isAttr":true,"type":"String"},{"name":"variableMappingClass","isAttr":true,"type":"String"},{"name":"variableMappingDelegateExpression","isAttr":true,"type":"String"}]},{"name":"ServiceTaskLike","extends":["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"resultVariable","isAttr":true,"type":"String"}]},{"name":"DmnCapable","extends":["bpmn:BusinessRuleTask"],"properties":[{"name":"decisionRef","isAttr":true,"type":"String"},{"name":"decisionRefBinding","isAttr":true,"type":"String","default":"latest"},{"name":"decisionRefVersion","isAttr":true,"type":"String"},{"name":"mapDecisionResult","isAttr":true,"type":"String","default":"resultList"},{"name":"decisionRefTenantId","isAttr":true,"type":"String"}]},{"name":"ExternalCapable","extends":["camunda:ServiceTaskLike"],"properties":[{"name":"type","isAttr":true,"type":"String"},{"name":"topic","isAttr":true,"type":"String"}]},{"name":"TaskPriorized","extends":["bpmn:Process","camunda:ExternalCapable"],"properties":[{"name":"taskPriority","isAttr":true,"type":"String"}]},{"name":"Properties","superClass":["Element"],"meta":{"allowedIn":["*"]},"properties":[{"name":"values","type":"Property","isMany":true}]},{"name":"Property","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"value","type":"String","isAttr":true}]},{"name":"Connector","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"}]},{"name":"InputOutput","superClass":["Element"],"meta":{"allowedIn":["bpmn:FlowNode","camunda:Connector"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"},{"name":"inputParameters","isMany":true,"type":"InputParameter"},{"name":"outputParameters","isMany":true,"type":"OutputParameter"}]},{"name":"InputOutputParameter","properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"InputOutputParameterDefinition","isAbstract":true},{"name":"List","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"items","isMany":true,"type":"InputOutputParameterDefinition"}]},{"name":"Map","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"entries","isMany":true,"type":"Entry"}]},{"name":"Entry","properties":[{"name":"key","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"Value","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"id","isAttr":true,"type":"String"},{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Script","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"scriptFormat","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Field","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike","camunda:ExecutionListener","camunda:TaskListener"]},"properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"expression","type":"String"},{"name":"stringValue","isAttr":true,"type":"String"},{"name":"string","type":"String"}]},{"name":"InputParameter","superClass":["InputOutputParameter"]},{"name":"OutputParameter","superClass":["InputOutputParameter"]},{"name":"Collectable","isAbstract":true,"extends":["bpmn:MultiInstanceLoopCharacteristics"],"superClass":["camunda:AsyncCapable"],"properties":[{"name":"collection","isAttr":true,"type":"String"},{"name":"elementVariable","isAttr":true,"type":"String"}]},{"name":"FailedJobRetryTimeCycle","superClass":["Element"],"meta":{"allowedIn":["camunda:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},"properties":[{"name":"body","isBody":true,"type":"String"}]},{"name":"ExecutionListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true}]},{"name":"TaskListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:UserTask"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true},{"name":"id","type":"String","isAttr":true},{"name":"eventDefinitions","type":"bpmn:TimerEventDefinition","isMany":true}]},{"name":"FormProperty","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"required","type":"String","isAttr":true},{"name":"readable","type":"String","isAttr":true},{"name":"writable","type":"String","isAttr":true},{"name":"variable","type":"String","isAttr":true},{"name":"expression","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"default","type":"String","isAttr":true},{"name":"values","type":"Value","isMany":true}]},{"name":"FormData","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"fields","type":"FormField","isMany":true},{"name":"businessKey","type":"String","isAttr":true}]},{"name":"FormField","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"label","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"defaultValue","type":"String","isAttr":true},{"name":"properties","type":"Properties"},{"name":"validation","type":"Validation"},{"name":"values","type":"Value","isMany":true}]},{"name":"Validation","superClass":["Element"],"properties":[{"name":"constraints","type":"Constraint","isMany":true}]},{"name":"Constraint","superClass":["Element"],"properties":[{"name":"name","type":"String","isAttr":true},{"name":"config","type":"String","isAttr":true}]},{"name":"ConditionalEventDefinitionExtension","isAbstract":true,"extends":["bpmn:ConditionalEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"},{"name":"variableEvents","isAttr":true,"type":"String"}]}]'),emumerations:[]},tg={class:"task-track"},ng={class:"subject-container"},rg={class:"track-table"},ig=gt(l.defineComponent({name:"UiFlowTaskTrack",__name:"TaskTrack",props:l.mergeModels({data:{default:()=>[]}},{isHide:{type:Boolean,default:!1},isHideModifiers:{}}),emits:["update:isHide"],setup(e){const t=l.useModel(e,"isHide"),n={currentPage:1,pageSize:20,total:0},r=[{label:"办理环节",prop:"activityName",minWidth:"200px"},{label:"办理人",prop:"assigneesNames",minWidth:"200px"},{label:"办理方式",prop:"dealTypeLabel",width:"180px"},{label:"开始时间",prop:"startTime",width:"180px",formatter:i=>i.startTime?or(i.startTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"结束时间",prop:"endTime",width:"180px",formatter:i=>i.endTime?or(i.endTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"滞留时长",prop:"duration",width:"140px",formatter:i=>typeof i.duration=="string"?i.duration.split(",").join(""):i.duration||""},{label:"处理状态",prop:"stateLabel",width:"100px"}];return(i,o)=>{const a=l.resolveComponent("el-icon");return l.openBlock(),l.createElementBlock("div",tg,[l.createElementVNode("div",ng,[o[1]||(o[1]=l.createElementVNode("div",{class:"subject-heading"},[l.createElementVNode("div",{class:"subject-line"}),l.createElementVNode("div",{class:"subject-title"},"办理轨迹")],-1)),l.createElementVNode("button",{class:"hide-btn",type:"button",onClick:o[0]||(o[0]=s=>t.value=!t.value)},[l.createVNode(a,null,{default:l.withCtx(()=>[t.value?(l.openBlock(),l.createBlock(l.unref(Ll),{key:0})):(l.openBlock(),l.createBlock(l.unref(Bl),{key:1}))]),_:1}),l.createElementVNode("span",null,l.toDisplayString(t.value?"显示":"隐藏"),1)])]),l.withDirectives(l.createElementVNode("div",rg,[l.createVNode(ha,{data:e.data,"hide-number":!1,"hide-page":!0,"hide-selection":!0,"page-config":n,"table-label":r,"table-height":"100%"},null,8,["data"])],512),[[l.vShow,!t.value]])])}}}),[["__scopeId","data-v-744e5443"]]),ro=e=>_e({url:"/server/runtime/event/get",method:"post",data:e}),io=e=>_e({url:"/server/history/trackinst/event/query",method:"post",data:e}),og=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:e=>_e({url:"/server/runtime/event/activate",method:"post",data:e}),flowMonitorLine:ro,flowTrack:io,suspendFlow:e=>_e({url:"/server/runtime/event/suspend",method:"post",data:e}),terminateFlow:e=>_e({url:"/server/runtime/event/terminate",method:"post",data:e})},Symbol.toStringTag,{value:"Module"}));function ml(e){return ce({original:e.point.original||e.point},e.actual)}function jt(e,t){this._elementRegistry=e,this._graphicsFactory=t}jt.$inject=["elementRegistry","graphicsFactory"],jt.prototype.getCroppedWaypoints=function(e,t,n){t=t||e.source,n=n||e.target;var r=this.getDockingPoint(e,t,!0),i=this.getDockingPoint(e,n),o=e.waypoints.slice(r.idx+1,i.idx);return o.unshift(ml(r)),o.push(ml(i)),o},jt.prototype.getDockingPoint=function(e,t,n){var r=e.waypoints,i,o,a;return i=n?0:r.length-1,o=r[i],a=this._getIntersection(t,e,n),{point:o,actual:a||o,idx:i}},jt.prototype._getIntersection=function(e,t,n){var r=this._getShapePath(e),i=this._getConnectionPath(t);return Xp(r,i,n)},jt.prototype._getConnectionPath=function(e){return this._graphicsFactory.getConnectionPath(e)},jt.prototype._getShapePath=function(e){return this._graphicsFactory.getShapePath(e)},jt.prototype._getGfx=function(e){return this._elementRegistry.getGraphics(e)};const Dr=105,Ir=60,oo=2;function ao(e){var t,n;return!!((n=(t=e==null?void 0:e.businessObject)==null?void 0:t.$instanceOf)!=null&&n.call(t,"bpmn:Task"))}function yl(e,t){e.on("shape.add",1500,({element:n})=>{var s;const r=n;if(r.type==="label"||r.labelTarget||!ao(r)||r.width===Dr&&r.height===Ir)return;const i=(r.width-Dr)/2,o=(r.height-Ir)/2;r.x+=i,r.y+=o,r.width=Dr,r.height=Ir;const a=(s=r.di)==null?void 0:s.bounds;a&&(a.x=r.x,a.y=r.y,a.width=Dr,a.height=Ir)}),e.on("connection.add",1500,({element:n})=>{var a;const r=n;if(!ao(r.source)&&!ao(r.target)||!r.waypoints||r.waypoints.length<2)return;const i=t.getCroppedWaypoints(r);r.waypoints=i;const o=(a=r.di)==null?void 0:a.waypoint;Array.isArray(o)&&o.length===i.length&&o.forEach((s,c)=>{s.x=i[c].x,s.y=i[c].y})})}yl.$inject=["eventBus","connectionDocking"];const gl={__init__:["compactTaskSize"],connectionDocking:["type",jt],compactTaskSize:["type",yl]};function vl(e){e.on("connection.add",1400,({element:t})=>{const n=t;if(n.type!=="bpmn:SequenceFlow"||n.waypoints.length<2)return;const r=n.waypoints,i=r[r.length-2],o=r[r.length-1],a=o.x-i.x,s=o.y-i.y,c=Math.hypot(a,s);c<=oo||(n.waypoints=[...r.slice(0,-1),{...o,x:o.x-a/c*oo,y:o.y-s/c*oo}])})}vl.$inject=["eventBus"];const wl={__init__:["sequenceFlowTargetGap"],sequenceFlowTargetGap:["type",vl]},ag={class:"flow-diagram"},sg=gt(l.defineComponent({name:"UiFlowDiagram",__name:"FlowDiagram",props:{processDefinitionId:{},processInstanceId:{}},emits:["loaded","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.shallowRef(),s=l.ref(),c=l.ref([]),d=l.ref(!1);let h=0;function m(){var y;o.value&&((y=a.value)==null||y.destroy(),a.value=l.markRaw(new Ln({container:o.value,additionalModules:[ul,pl,gl,wl],moddleExtensions:{camunda:hl}})))}function w(y,v,R=!1){if(!y||!a.value)return;const S=a.value.get("canvas").getGraphics(y);if(!S)return;let _=".djs-visual rect, .djs-visual path";R&&(_+=", .djs-visual circle"),S.querySelectorAll(_).forEach(V=>{V.style.fill=v,V.style.stroke="#333"}),S.querySelectorAll(".djs-visual text").forEach(V=>{V.style.fill="#333"})}function g(y,v,R){var J;const D=y.style.getPropertyValue(v)||y.getAttribute(v),S=(J=D==null?void 0:D.match(/#([^)'"\s]+)/))==null?void 0:J[1],_=y.ownerSVGElement;if(!S||!_)return;const V=Array.from(_.querySelectorAll("marker")).find(H=>H.id===S);if(!(V!=null&&V.parentElement))return;const F=R.replace(/[^a-zA-Z0-9]/g,""),T=`${S}-flowstream-${F}`;let W=Array.from(_.querySelectorAll("marker")).find(H=>H.id===T);W||(W=V.cloneNode(!0),W.id=T,W.querySelectorAll("path, polygon, polyline").forEach(H=>{H.style.fill=R,H.style.stroke=R}),V.parentElement.appendChild(W));const re=`url(#${T})`;y.style.setProperty(v,re),y.setAttribute(v,re)}function I(y,v){if(!y||!a.value)return;const D=a.value.get("canvas").getGraphics(y);D&&D.querySelectorAll(".djs-visual > path").forEach(S=>{S.style.fill="none",S.style.stroke=v,g(S,"marker-start",v),g(S,"marker-end",v)})}function B(y){const v=y.filter(_=>_.type==="bpmn:StartEvent");if(v.length!==1)return[];const R=[],D=new Set;let S=v[0];for(;S&&!D.has(S.id);){D.add(S.id);const _=(S.outgoing||[]).filter(W=>W.type==="bpmn:SequenceFlow");if(!_.length)return R;if(_.length!==1)return[];const V=_[0],F=V.target,T=((F==null?void 0:F.incoming)||[]).filter(W=>W.type==="bpmn:SequenceFlow");if(!F||T.length!==1)return[];R.push(V),S=F}return[]}function C(y){var D;const v=((D=s.value)==null?void 0:D.sequenceFlowStates)||[];if(!v.length)return;const R=v.map(S=>y.get(S.sequenceFlowId||S.id)).filter(S=>(S==null?void 0:S.type)==="bpmn:SequenceFlow");if(R.length){R.forEach(S=>I(S,"#98e5b5"));return}B(y).slice(0,v.length).forEach(S=>I(S,"#98e5b5"))}function E(){var R;if(!a.value)return;const y=a.value.get("elementRegistry"),v=new Set;(((R=s.value)==null?void 0:R.flowNodeStates)||[]).forEach(D=>{v.add(D.id),w(y.get(D.id),D.state==="executing"?"#ffd37e":"#98e5b5")}),y.filter(D=>D.type==="bpmn:StartEvent").forEach(D=>{v.add(D.id),w(D,"#98e5b5",!0)}),y.filter(D=>D.type==="bpmn:EndEvent").forEach(D=>{v.add(D.id),w(D,"#f14b12",!0)}),y.forEach(D=>{var S;!v.has(D.id)&&((S=D.type)!=null&&S.includes("Task"))&&w(D,"#eee")}),C(y)}async function P(){const y=++h;try{await l.nextTick(),m();const[v,R,D]=await Promise.all([er({procdefId:r.processDefinitionId}),ro({processInstanceId:r.processInstanceId,fetchFlowNodeState:!0,fetchSequenceFlowState:!0}),io({processInstanceId:r.processInstanceId})]);if(y!==h||!a.value)return;s.value=R.data||{},c.value=D.data||[],await a.value.importXML(v),a.value.get("canvas").zoom("fit-viewport",!0),E(),i("loaded")}catch(v){i("error",v)}}return l.watch(()=>[r.processDefinitionId,r.processInstanceId],P),l.onMounted(P),l.onBeforeUnmount(()=>{var y;h++,(y=a.value)==null||y.destroy(),a.value=void 0}),t({refresh:P,viewer:a,trackData:c,isTrackHidden:d}),(y,v)=>(l.openBlock(),l.createElementBlock("div",ag,[l.createElementVNode("div",{ref_key:"canvasRef",ref:o,class:"canvas"},null,512),v[1]||(v[1]=l.createStaticVNode('<div class="legend" data-v-8965faa4><div class="legend-item undo" data-v-8965faa4><div class="legend-circle" data-v-8965faa4></div><span data-v-8965faa4>未办理环节</span></div><div class="legend-item doing" data-v-8965faa4><div class="legend-circle" data-v-8965faa4></div><span data-v-8965faa4>当前环节</span></div><div class="legend-item done" data-v-8965faa4><div class="legend-circle" data-v-8965faa4></div><span data-v-8965faa4>已办理环节</span></div></div>',1)),l.createVNode(ig,{"is-hide":d.value,"onUpdate:isHide":v[0]||(v[0]=R=>d.value=R),class:l.normalizeClass(["bottom-container",{"is-collapsed":d.value}]),data:c.value},null,8,["is-hide","class","data"])]))}}),[["__scopeId","data-v-8965faa4"]]),lg=gt(l.defineComponent({name:"UiFlowDefinitionPreview",__name:"FlowDefinitionPreview",props:{processDefinitionId:{default:""},bpmnXml:{default:""},fitViewport:{type:Boolean,default:!0}},emits:["loaded","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.shallowRef();let s=0,c=!1,d,h;function m(){var E;o.value&&((E=a.value)==null||E.destroy(),c=!1,a.value=l.markRaw(new Ln({container:o.value,additionalModules:[ul,pl,gl,wl],moddleExtensions:{camunda:hl}})))}async function w(){if(r.bpmnXml.trim())return r.bpmnXml;const E=r.processDefinitionId.trim();if(!E)throw new Error("流程定义预览需要传入 processDefinitionId 或 bpmnXml");return er({procdefId:E})}function g(E=r.fitViewport){var y;if(!a.value||!c)return;const P=a.value.get("canvas");(y=P.resized)==null||y.call(P),E&&P.zoom("fit-viewport",!0)}function I(){g(!0)}function B(){h!==void 0&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{h=void 0,g()})}async function C(){const E=++s;try{await l.nextTick(),m();const P=a.value;if(!P)throw new Error("流程定义预览容器尚未就绪");const y=await w();if(E!==s||a.value!==P||(await P.importXML(y),E!==s||a.value!==P))return;c=!0,g(),i("loaded")}catch(P){E===s&&i("error",P)}}return l.watch(()=>[r.processDefinitionId,r.bpmnXml],C),l.watch(()=>r.fitViewport,E=>{E&&I()}),l.onMounted(()=>{o.value&&typeof ResizeObserver<"u"&&(d=new ResizeObserver(B),d.observe(o.value)),C()}),l.onBeforeUnmount(()=>{var E;s++,d==null||d.disconnect(),h!==void 0&&cancelAnimationFrame(h),(E=a.value)==null||E.destroy(),a.value=void 0}),t({refresh:C,fitViewport:I,viewer:a}),(E,P)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"canvasRef",ref:o,class:"flow-definition-preview"},null,512))}}),[["__scopeId","data-v-a8c7db17"]]),bl=l.defineComponent({name:"UiFlowStart",__name:"FlowStart",props:{dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},defaultOpinion:{default:""},bpmnXml:{default:""},singleAssignee:{type:Boolean,default:!1},assignmentQueryParams:{default:()=>({})},beforeSend:{}},emits:["started","afterSend","close","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.ref(!1),s=l.ref(!1),c=l.ref(!1),d=l.ref(),h=l.ref();async function m(P){if(s.value)throw new Error("流程正在启动,请勿重复提交");s.value=!0;let y;try{const R=(await tr({processDefinitionId:P.processDefinitionId})).data||[];if(R.length!==1)throw new Error(R.length?`流程存在 ${R.length} 个首办节点,无法自动启动`:"流程未找到首办节点,无法启动");if(y=(await ti(P)).data,!(y!=null&&y.processInstanceId)||!y.processDefinitionId||!y.workId)throw new Error("流程引擎未返回流程实例 ID、流程定义 ID 或起草人待办 ID");const S=R[0];if(a.value=!1,d.value={startArgs:P,startResult:y,activity:{activityId:S.id,activityName:S.name||S.activityName},variables:P.variables||{},dealUser:{id:P.draftUserId,userId:P.draftUserId,name:P.draftUserName}},c.value=!1,h.value=void 0,await l.nextTick(),!o.value)throw new Error("发送组件尚未就绪")}catch(v){throw s.value=!1,i("error",{phase:"start",error:v}),v}try{return i("started",y),await w(),y}finally{s.value=!1}}async function w(){if(!d.value)throw new Error("没有可继续发送的流程上下文");try{if(r.beforeSend&&await r.beforeSend(d.value)===!1)return a.value=!1,!1;if(await l.nextTick(),!o.value)throw new Error("发送组件尚未就绪");return await o.value.open(),!0}catch(P){throw i("error",{phase:"beforeSend",error:P}),P}}function g(){var y,v;if(a.value){(y=o.value)==null||y.close();return}const P=(v=d.value)==null?void 0:v.startResult;P&&(!c.value&&P.processInstanceId&&Zn({processInstanceId:P.processInstanceId}).catch(R=>i("error",{phase:"send",error:R})),d.value=void 0,i("close",P))}function I(P){h.value=P}function B(P){!d.value||!h.value||(c.value=!0,i("afterSend",{startResult:d.value.startResult,sendData:h.value,sendResult:P}))}function C(P){i("error",{phase:"send",error:P})}function E(){var y;const P=(y=d.value)==null?void 0:y.startResult;i("close",P),c.value&&(d.value=void 0,c.value=!1)}return t({start:m,open:w,close:g,starting:s,sendVisible:a,context:d,sendRef:o}),(P,y)=>d.value?(l.openBlock(),l.createBlock(wi,{key:0,ref_key:"sendRef",ref:o,modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=v=>a.value=v),"process-definition-id":d.value.startResult.processDefinitionId,"process-instance-id":d.value.startResult.processInstanceId,activity:d.value.activity,"assignment-query-params":e.assignmentQueryParams,"work-id":d.value.startResult.workId,variables:d.value.variables,"deal-user":d.value.dealUser,"bpmn-xml":e.bpmnXml,"force-single-assignee":e.singleAssignee,"delete-instance-on-cancel":"","show-trigger":!1,"dialog-title":e.dialogTitle,"dialog-width":e.dialogWidth,"default-opinion":e.defaultOpinion,onBeforeSend:I,onAfterSend:B,onClose:E,onError:C},null,8,["modelValue","process-definition-id","process-instance-id","activity","assignment-query-params","work-id","variables","deal-user","bpmn-xml","force-single-assignee","dialog-title","dialog-width","default-opinion"])):l.createCommentVNode("",!0)}});let so,yt,lo=!1;function cg(e){so=e}function ug(e){return e instanceof Error?e.message:typeof e=="string"?e:"流程操作失败"}function El(e){return{...e,message:ug(e.error)}}async function fg(e,t){return e?await e(t)!==!1:!0}function Fn(e,t){if(e)try{Promise.resolve(e(t)).catch(n=>{console.error("[FlowStream] runtimeService 回调执行失败",n)})}catch(n){console.error("[FlowStream] runtimeService 回调执行失败",n)}}function _l(e){e.disposed||(e.disposed=!0,l.render(null,e.container),e.container.remove(),yt===e&&(yt=void 0))}function dg(e){var t;return(t=e.component)==null?void 0:t.exposed}function xl(){if(!(yt!=null&&yt.exposed)||yt.disposed)throw new Error("当前没有已启动且可继续发送的流程");return yt}const co={start:(async e=>{if(typeof document>"u")throw new Error("flowstream.runtimeService.start() 只能在浏览器环境中调用");if(!so)throw new Error("调用 runtimeService.start() 前必须先执行 app.use(flowstream)");if(lo||yt&&!yt.disposed)throw new Error("当前已有已启动但尚未发送完成的流程,请调用 runtimeService.open() 继续办理");const{dialogTitle:t="发送",dialogWidth:n="1200px",defaultOpinion:r="",bpmnXml:i="",singleAssignee:o=!1,assignmentQueryParams:a={},onBeforeStart:s,onBeforeSend:c,onStarted:d,onAfterSend:h,onClose:m,onError:w,...g}=e;lo=!0;try{if(!await fg(s,g))return!1}catch(E){throw w&&Fn(w,El({phase:"beforeStart",error:E})),E}finally{lo=!1}const I=document.createElement("div");I.className="ui-flow-runtime-service-host",document.body.appendChild(I);const B={container:I,vnode:void 0,sendCompleted:!1,disposed:!1},C=l.createVNode(bl,{dialogTitle:t,dialogWidth:n,defaultOpinion:r,bpmnXml:i,singleAssignee:o,assignmentQueryParams:a,beforeSend:c,onStarted:E=>{B.startResult=E,Fn(d,E)},onAfterSend:E=>{B.sendCompleted=!0,Fn(h,E)},onClose:E=>{m&&Fn(m,E),l.nextTick(()=>_l(B))},onError:E=>{w&&Fn(w,El(E))}});C.appContext=so,B.vnode=C,yt=B;try{if(l.render(C,I),await l.nextTick(),B.exposed=dg(C),!B.exposed)throw new Error("流程启动服务挂载失败");return await B.exposed.start(g)}catch(E){throw B.startResult||_l(B),E}}),async open(){return xl().exposed.open()},close(){xl().exposed.close()},async getApps(e){return(await Zr(e)).data||[]},async getFlows(e){return(await Qr(e)).data||[]}};function Ut(e){const t=e;return t.install=n=>{e.name&&!n.component(e.name)&&n.component(e.name,e)},t}const pg={...og,...pf},Sl=Ut(oc),Al=Ut($f),kl=Ut(Zf),Cl=Ut(da),Rl=Ut(wi),Tl=Ut(sg),Pl=Ut(lg),Nl=Ut(bl),hg={FlowButton:Sl,FlowButtons:Al,FlowGrid:kl,FlowJump:Cl,FlowSend:Rl,FlowDiagram:Tl,FlowDefinitionPreview:Pl,FlowStart:Nl},Or={runtimeService:co,getRuntimeService(){return co},install(e,t={}){ia(t),cg(e._context),e.use(xe),Object.values(hg).forEach(n=>{e.component(n.name)||e.component(n.name,n)})}},mg=Or,yg=Or;de.FlowButton=Sl,de.FlowButtons=Al,de.FlowDefinitionPreview=Pl,de.FlowDiagram=Tl,de.FlowGrid=kl,de.FlowJump=Cl,de.FlowSend=Rl,de.FlowStart=Nl,de.FlowstreamUIPlus=Or,de.LeadalFlowVue3=mg,de.WorkflowComponentsVue3=yg,de.activateFlow=di,de.claimTask=ii,de.completeTask=li,de.configureWorkflow=ia,de.default=Or,de.deleteDraftTask=aa,de.deleteProcessInstance=Zn,de.doneTaskList=ni,de.downloadBpmn=er,de.draftFlowList=oa,de.draftTaskList=ei,de.flowApi=pg,de.flowMonitorLine=ro,de.flowStartNodeList=ua,de.flowTrack=io,de.getAppList=Zr,de.getFirstHandleNodes=tr,de.getFlowList=Qr,de.getOptList=ri,de.jumpTask=gi,de.nextSendNode=yi,de.nodeAssistant=nr,de.organUserTree=mi,de.quickStart=ti,de.receiveMessageEvent=ca,de.recycleTask=si,de.revocationTask=oi,de.rollbackTask=ai,de.runtimeService=co,de.saveDraft=sa,de.sendTask=hi,de.startDraft=la,de.startNodes=vi,de.suspendFlow=fi,de.terminateFlow=pi,de.todoTaskList=Qn,de.turnAfterTask=ui,de.turnBeforeTask=ci,de.workflowHttp=Jn,Object.defineProperties(de,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
17
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+w+'" height="'+g+'" viewBox="'+p+" "+m+" "+w+" "+g+'" version="1.1">'+l+o+"</svg>"}catch(r){n=r}if(this._emit("saveSVG.done",{error:n,svg:t}),n)throw n;return{svg:t}},Pe.prototype._setDefinitions=function(e){this._definitions=e},Pe.prototype.getModules=function(){return this._modules},Pe.prototype.clear=function(){this.getDefinitions()&&zt.prototype.clear.call(this)},Pe.prototype.destroy=function(){zt.prototype.destroy.call(this),gr(this._container)},Pe.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)},Pe.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Pe.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=kt(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Pe.prototype.getDefinitions=function(){return this._definitions},Pe.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Pe.prototype._init=function(e,t,n){const r=n.modules||this.getModules(n),i=n.additionalModules||[],a=[{bpmnjs:["value",this],moddle:["value",t]}],o=[].concat(a,r,i),l=ue(kd(n,["additionalModules"]),{canvas:ue({},n.canvas,{container:e}),modules:o});zt.call(this,l),n&&n.container&&this.attachTo(n.container)},Pe.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Pe.prototype._createContainer=function(e){const t=mt('<div class="bjs-container"></div>');return Ze(t,{width:vl(e.width),height:vl(e.height),position:e.position}),t},Pe.prototype._createModdle=function(e){const t=ue({},this._moddleExtensions,e.moddleExtensions);return new Yy(t)},Pe.prototype._modules=[];function Vr(e,t){return e.warnings=t,e}function og(e){const n=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}const sg={width:"100%",height:"100%",position:"relative"};function vl(e){return e+(Dt(e)?"px":"")}function lg(e,t){return t&&ut(e.diagrams,function(n){return n.id===t})||null}function cg(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+hl+"</a>",r=mt(n);Ze(kt("svg",r),ml),Ze(r,yl,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),Lt.bind(r,"click",function(i){ag(),i.preventDefault()})}function Wn(e){Pe.call(this,e)}ft(Wn,Pe),Wn.prototype._modules=[Eh,$h,Es,Yh,as],Wn.prototype._moddleExtensions={};function wl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function da(e){return Math.log(e)/Math.log(10)}function bl(e,t){var n=da(e.min),r=da(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function ug(e,t){return Math.max(e.min,Math.min(e.max,t))}var fg=Math.sign||function(e){return e>=0?1:-1},pa={min:.2,max:4},El=10,dg=.1,pg=.75;function bt(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=Bt(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||pg;var r=this;t.on("canvas.mouseover",function(){r._init(e.enabled!==!1)}),t.on("canvas.mouseout",function(){r._init(!1)})}bt.$inject=["config.zoomScroll","eventBus","canvas"],bt.prototype.scroll=function(t){this._canvas.scroll(t)},bt.prototype.reset=function(){this._canvas.zoom("fit-viewport")},bt.prototype.zoom=function(t,n){var r=bl(pa,El*2);this._totalDelta+=t,Math.abs(this._totalDelta)>dg&&(this._zoom(t,n,r),this._totalDelta=0)},bt.prototype._handleWheel=function(t){if(this._enabled){var n=this._container;t.preventDefault();var r=t.ctrlKey||Uh()&&t.metaKey,i=t.shiftKey,a=-1*this._scale,o;if(r?a*=t.deltaMode===0?.02:.32:a*=t.deltaMode===0?1:16,r){var l=n.getBoundingClientRect(),c={x:t.clientX-l.left,y:t.clientY-l.top};o=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*fg(t.deltaY)*a,this.zoom(o,c)}else i?o={dx:a*t.deltaY,dy:0}:o={dx:a*t.deltaX,dy:a*t.deltaY},this.scroll(o)}},bt.prototype.stepZoom=function(t,n){var r=bl(pa,El);this._zoom(t,n,r)},bt.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,a=da(r.zoom()),o=Math.round(a/n)*n;o+=n*i;var l=Math.pow(10,o);r.zoom(ug(pa,l),t)},bt.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t>"u"&&(t=!i),i!==t&&Lt[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t},bt.prototype._init=function(e){this.toggle(e)};const _l={__init__:["zoomScroll"],zoomScroll:["type",bt]};var hg=/^djs-cursor-.*$/;function xl(e){var t=rn(document.body);t.removeMatching(hg),e&&t.add("djs-cursor-"+e)}function mg(){xl(null)}var yg=5e3;function gg(e,t){t=t||"element.click";function n(){return!1}return e.once(t,yg,n),function(){e.off(t,n)}}var vg=15;function Sl(e,t){var n;function r(l){return o(l.originalEvent)}e.on("canvas.focus.changed",function(l){l.focused?e.on("element.mousedown",500,r):e.off("element.mousedown",r)});function i(l){var c=n.start,d=n.button,p=Rs(l),m=wl(p,c);if(!n.dragging&&wg(m)>vg&&(n.dragging=!0,d===0&&gg(e),xl("grab")),n.dragging){var w=n.last||n.start;m=wl(p,w),t.scroll({dx:m.x,dy:m.y}),n.last=p}l.preventDefault()}function a(l){Lt.unbind(document,"mousemove",i),Lt.unbind(document,"mouseup",a),n=null,mg()}function o(l){if(!Xo(l.target,".djs-draggable")){var c=l.button;if(!(c>=2||l.ctrlKey||l.shiftKey||l.altKey))return n={button:c,start:Rs(l)},Lt.bind(document,"mousemove",i),Lt.bind(document,"mouseup",a),!0}}this.isActive=function(){return!!n}}Sl.$inject=["eventBus","canvas"];function wg(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const Al={__init__:["moveCanvas"],moveCanvas:["type",Sl]},kl={name:"Camunda",uri:"http://camunda.org/schema/1.0/bpmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:JSON.parse('[{"name":"Definitions","isAbstract":true,"extends":["bpmn:Definitions"],"properties":[{"name":"diagramRelationId","isAttr":true,"type":"String"}]},{"name":"InOutBinding","superClass":["Element"],"isAbstract":true,"properties":[{"name":"source","isAttr":true,"type":"String"},{"name":"sourceExpression","isAttr":true,"type":"String"},{"name":"target","isAttr":true,"type":"String"},{"name":"businessKey","isAttr":true,"type":"String"},{"name":"local","isAttr":true,"type":"Boolean","default":false},{"name":"variables","isAttr":true,"type":"String"}]},{"name":"In","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity","bpmn:SignalEventDefinition"]}},{"name":"Out","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity"]}},{"name":"AsyncCapable","isAbstract":true,"extends":["bpmn:Activity","bpmn:Gateway","bpmn:Event"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false},{"name":"asyncBefore","isAttr":true,"type":"Boolean","default":false},{"name":"asyncAfter","isAttr":true,"type":"Boolean","default":false},{"name":"exclusive","isAttr":true,"type":"Boolean","default":true}]},{"name":"JobPriorized","isAbstract":true,"extends":["bpmn:Process","camunda:AsyncCapable"],"properties":[{"name":"jobPriority","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinitionExtension","isAbstract":true,"extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false}]},{"name":"ErrorEventDefinitionExtension","isAbstract":true,"extends":["bpmn:ErrorEventDefinition"],"properties":[{"name":"errorCodeVariable","isAttr":true,"type":"String"},{"name":"errorMessageVariable","isAttr":true,"type":"String"}]},{"name":"ErrorEventDefinition","superClass":["bpmn:ErrorEventDefinition","Element"],"properties":[{"name":"expression","isAttr":true,"type":"String"}],"meta":{"allowedIn":["bpmn:ServiceTask"]}},{"name":"Error","isAbstract":true,"extends":["bpmn:Error"],"properties":[{"name":"camunda:errorMessage","isAttr":true,"type":"String"}]},{"name":"PotentialStarter","superClass":["Element"],"properties":[{"name":"resourceAssignmentExpression","type":"bpmn:ResourceAssignmentExpression"}]},{"name":"FormSupported","isAbstract":true,"extends":["bpmn:StartEvent","bpmn:UserTask"],"properties":[{"name":"formHandlerClass","isAttr":true,"type":"String"},{"name":"formKey","isAttr":true,"type":"String"},{"name":"formRef","isAttr":true,"type":"String"},{"name":"formRefBinding","isAttr":true,"type":"String"},{"name":"formRefVersion","isAttr":true,"type":"String"}]},{"name":"TemplateSupported","isAbstract":true,"extends":["bpmn:Collaboration","bpmn:Process","bpmn:FlowElement"],"properties":[{"name":"modelerTemplate","isAttr":true,"type":"String"},{"name":"modelerTemplateVersion","isAttr":true,"type":"Integer"}]},{"name":"Initiator","isAbstract":true,"extends":["bpmn:StartEvent"],"properties":[{"name":"initiator","isAttr":true,"type":"String"}]},{"name":"ScriptTask","isAbstract":true,"extends":["bpmn:ScriptTask"],"properties":[{"name":"resultVariable","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Process","isAbstract":true,"extends":["bpmn:Process"],"properties":[{"name":"candidateStarterGroups","isAttr":true,"type":"String"},{"name":"candidateStarterUsers","isAttr":true,"type":"String"},{"name":"versionTag","isAttr":true,"type":"String"},{"name":"historyTimeToLive","isAttr":true,"type":"String"},{"name":"isStartableInTasklist","isAttr":true,"type":"Boolean","default":true}]},{"name":"EscalationEventDefinitionExtension","isAbstract":true,"extends":["bpmn:EscalationEventDefinition"],"properties":[{"name":"escalationCodeVariable","isAttr":true,"type":"String"}]},{"name":"FormalExpression","isAbstract":true,"extends":["bpmn:FormalExpression"],"properties":[{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Assignable","extends":["bpmn:UserTask"],"properties":[{"name":"assignee","isAttr":true,"type":"String"},{"name":"candidateUsers","isAttr":true,"type":"String"},{"name":"candidateGroups","isAttr":true,"type":"String"},{"name":"dueDate","isAttr":true,"type":"String"},{"name":"followUpDate","isAttr":true,"type":"String"},{"name":"priority","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"calledElementBinding","isAttr":true,"type":"String","default":"latest"},{"name":"calledElementVersion","isAttr":true,"type":"String"},{"name":"calledElementVersionTag","isAttr":true,"type":"String"},{"name":"calledElementTenantId","isAttr":true,"type":"String"},{"name":"caseRef","isAttr":true,"type":"String"},{"name":"caseBinding","isAttr":true,"type":"String","default":"latest"},{"name":"caseVersion","isAttr":true,"type":"String"},{"name":"caseTenantId","isAttr":true,"type":"String"},{"name":"variableMappingClass","isAttr":true,"type":"String"},{"name":"variableMappingDelegateExpression","isAttr":true,"type":"String"}]},{"name":"ServiceTaskLike","extends":["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"resultVariable","isAttr":true,"type":"String"}]},{"name":"DmnCapable","extends":["bpmn:BusinessRuleTask"],"properties":[{"name":"decisionRef","isAttr":true,"type":"String"},{"name":"decisionRefBinding","isAttr":true,"type":"String","default":"latest"},{"name":"decisionRefVersion","isAttr":true,"type":"String"},{"name":"mapDecisionResult","isAttr":true,"type":"String","default":"resultList"},{"name":"decisionRefTenantId","isAttr":true,"type":"String"}]},{"name":"ExternalCapable","extends":["camunda:ServiceTaskLike"],"properties":[{"name":"type","isAttr":true,"type":"String"},{"name":"topic","isAttr":true,"type":"String"}]},{"name":"TaskPriorized","extends":["bpmn:Process","camunda:ExternalCapable"],"properties":[{"name":"taskPriority","isAttr":true,"type":"String"}]},{"name":"Properties","superClass":["Element"],"meta":{"allowedIn":["*"]},"properties":[{"name":"values","type":"Property","isMany":true}]},{"name":"Property","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"value","type":"String","isAttr":true}]},{"name":"Connector","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"}]},{"name":"InputOutput","superClass":["Element"],"meta":{"allowedIn":["bpmn:FlowNode","camunda:Connector"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"},{"name":"inputParameters","isMany":true,"type":"InputParameter"},{"name":"outputParameters","isMany":true,"type":"OutputParameter"}]},{"name":"InputOutputParameter","properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"InputOutputParameterDefinition","isAbstract":true},{"name":"List","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"items","isMany":true,"type":"InputOutputParameterDefinition"}]},{"name":"Map","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"entries","isMany":true,"type":"Entry"}]},{"name":"Entry","properties":[{"name":"key","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"Value","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"id","isAttr":true,"type":"String"},{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Script","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"scriptFormat","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Field","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike","camunda:ExecutionListener","camunda:TaskListener"]},"properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"expression","type":"String"},{"name":"stringValue","isAttr":true,"type":"String"},{"name":"string","type":"String"}]},{"name":"InputParameter","superClass":["InputOutputParameter"]},{"name":"OutputParameter","superClass":["InputOutputParameter"]},{"name":"Collectable","isAbstract":true,"extends":["bpmn:MultiInstanceLoopCharacteristics"],"superClass":["camunda:AsyncCapable"],"properties":[{"name":"collection","isAttr":true,"type":"String"},{"name":"elementVariable","isAttr":true,"type":"String"}]},{"name":"FailedJobRetryTimeCycle","superClass":["Element"],"meta":{"allowedIn":["camunda:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},"properties":[{"name":"body","isBody":true,"type":"String"}]},{"name":"ExecutionListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true}]},{"name":"TaskListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:UserTask"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true},{"name":"id","type":"String","isAttr":true},{"name":"eventDefinitions","type":"bpmn:TimerEventDefinition","isMany":true}]},{"name":"FormProperty","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"required","type":"String","isAttr":true},{"name":"readable","type":"String","isAttr":true},{"name":"writable","type":"String","isAttr":true},{"name":"variable","type":"String","isAttr":true},{"name":"expression","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"default","type":"String","isAttr":true},{"name":"values","type":"Value","isMany":true}]},{"name":"FormData","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"fields","type":"FormField","isMany":true},{"name":"businessKey","type":"String","isAttr":true}]},{"name":"FormField","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"label","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"defaultValue","type":"String","isAttr":true},{"name":"properties","type":"Properties"},{"name":"validation","type":"Validation"},{"name":"values","type":"Value","isMany":true}]},{"name":"Validation","superClass":["Element"],"properties":[{"name":"constraints","type":"Constraint","isMany":true}]},{"name":"Constraint","superClass":["Element"],"properties":[{"name":"name","type":"String","isAttr":true},{"name":"config","type":"String","isAttr":true}]},{"name":"ConditionalEventDefinitionExtension","isAbstract":true,"extends":["bpmn:ConditionalEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"},{"name":"variableEvents","isAttr":true,"type":"String"}]}]'),emumerations:[]},bg={class:"task-track"},Eg={class:"subject-container"},_g={class:"track-table"},xg=xt(s.defineComponent({name:"UiFlowTaskTrack",__name:"TaskTrack",props:s.mergeModels({data:{default:()=>[]}},{isHide:{type:Boolean,default:!1},isHideModifiers:{}}),emits:["update:isHide"],setup(e){const t=s.useModel(e,"isHide"),n={currentPage:1,pageSize:20,total:0},r=[{label:"办理环节",prop:"activityName",minWidth:"200px"},{label:"办理人",prop:"assigneesNames",minWidth:"200px"},{label:"办理方式",prop:"dealTypeLabel",width:"180px"},{label:"开始时间",prop:"startTime",width:"180px",formatter:i=>i.startTime?dr(i.startTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"结束时间",prop:"endTime",width:"180px",formatter:i=>i.endTime?dr(i.endTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"滞留时长",prop:"duration",width:"140px",formatter:i=>typeof i.duration=="string"?i.duration.split(",").join(""):i.duration||""},{label:"处理状态",prop:"stateLabel",width:"100px"}];return(i,a)=>{const o=s.resolveComponent("el-icon");return s.openBlock(),s.createElementBlock("div",bg,[s.createElementVNode("div",Eg,[a[1]||(a[1]=s.createElementVNode("div",{class:"subject-heading"},[s.createElementVNode("div",{class:"subject-line"}),s.createElementVNode("div",{class:"subject-title"},"办理轨迹")],-1)),s.createElementVNode("button",{class:"hide-btn",type:"button",onClick:a[0]||(a[0]=l=>t.value=!t.value)},[s.createVNode(o,null,{default:s.withCtx(()=>[t.value?(s.openBlock(),s.createBlock(s.unref(Ql),{key:0})):(s.openBlock(),s.createBlock(s.unref(Jl),{key:1}))]),_:1}),s.createElementVNode("span",null,s.toDisplayString(t.value?"显示":"隐藏"),1)])]),s.withDirectives(s.createElementVNode("div",_g,[s.createVNode(ko,{data:e.data,"hide-number":!1,"hide-page":!0,"hide-selection":!0,"page-config":n,"table-label":r,"table-height":"100%"},null,8,["data"])],512),[[s.vShow,!t.value]])])}}}),[["__scopeId","data-v-744e5443"]]),ha=e=>xe({url:"/server/runtime/event/get",method:"post",data:e}),ma=e=>xe({url:"/server/history/trackinst/event/query",method:"post",data:e}),Sg=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:e=>xe({url:"/server/runtime/event/activate",method:"post",data:e}),flowMonitorLine:ha,flowTrack:ma,suspendFlow:e=>xe({url:"/server/runtime/event/suspend",method:"post",data:e}),terminateFlow:e=>xe({url:"/server/runtime/event/terminate",method:"post",data:e})},Symbol.toStringTag,{value:"Module"}));function Cl(e){return ue({original:e.point.original||e.point},e.actual)}function Yt(e,t){this._elementRegistry=e,this._graphicsFactory=t}Yt.$inject=["elementRegistry","graphicsFactory"],Yt.prototype.getCroppedWaypoints=function(e,t,n){t=t||e.source,n=n||e.target;var r=this.getDockingPoint(e,t,!0),i=this.getDockingPoint(e,n),a=e.waypoints.slice(r.idx+1,i.idx);return a.unshift(Cl(r)),a.push(Cl(i)),a},Yt.prototype.getDockingPoint=function(e,t,n){var r=e.waypoints,i,a,o;return i=n?0:r.length-1,a=r[i],o=this._getIntersection(t,e,n),{point:a,actual:o||a,idx:i}},Yt.prototype._getIntersection=function(e,t,n){var r=this._getShapePath(e),i=this._getConnectionPath(t);return mh(r,i,n)},Yt.prototype._getConnectionPath=function(e){return this._graphicsFactory.getConnectionPath(e)},Yt.prototype._getShapePath=function(e){return this._graphicsFactory.getShapePath(e)},Yt.prototype._getGfx=function(e){return this._elementRegistry.getGraphics(e)};const Fr=105,$r=60,ya=2;function ga(e){var t,n;return!!((n=(t=e==null?void 0:e.businessObject)==null?void 0:t.$instanceOf)!=null&&n.call(t,"bpmn:Task"))}function Rl(e,t){e.on("shape.add",1500,({element:n})=>{var l;const r=n;if(r.type==="label"||r.labelTarget||!ga(r)||r.width===Fr&&r.height===$r)return;const i=(r.width-Fr)/2,a=(r.height-$r)/2;r.x+=i,r.y+=a,r.width=Fr,r.height=$r;const o=(l=r.di)==null?void 0:l.bounds;o&&(o.x=r.x,o.y=r.y,o.width=Fr,o.height=$r)}),e.on("connection.add",1500,({element:n})=>{var o;const r=n;if(!ga(r.source)&&!ga(r.target)||!r.waypoints||r.waypoints.length<2)return;const i=t.getCroppedWaypoints(r);r.waypoints=i;const a=(o=r.di)==null?void 0:o.waypoint;Array.isArray(a)&&a.length===i.length&&a.forEach((l,c)=>{l.x=i[c].x,l.y=i[c].y})})}Rl.$inject=["eventBus","connectionDocking"];const Tl={__init__:["compactTaskSize"],connectionDocking:["type",Yt],compactTaskSize:["type",Rl]};function Nl(e){e.on("connection.add",1400,({element:t})=>{const n=t;if(n.type!=="bpmn:SequenceFlow"||n.waypoints.length<2)return;const r=n.waypoints,i=r[r.length-2],a=r[r.length-1],o=a.x-i.x,l=a.y-i.y,c=Math.hypot(o,l);c<=ya||(n.waypoints=[...r.slice(0,-1),{...a,x:a.x-o/c*ya,y:a.y-l/c*ya}])})}Nl.$inject=["eventBus"];const Il={__init__:["sequenceFlowTargetGap"],sequenceFlowTargetGap:["type",Nl]},Ag={class:"flow-diagram"},kg=xt(s.defineComponent({name:"UiFlowDiagram",__name:"FlowDiagram",props:{processDefinitionId:{},processInstanceId:{}},emits:["loaded","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,a=s.ref(),o=s.shallowRef(),l=s.ref(),c=s.ref([]),d=s.ref(!1);let p=0;function m(){var y;a.value&&((y=o.value)==null||y.destroy(),o.value=s.markRaw(new Wn({container:a.value,additionalModules:[_l,Al,Tl,Il],moddleExtensions:{camunda:kl}})))}function w(y,v,k=!1){if(!y||!o.value)return;const x=o.value.get("canvas").getGraphics(y);if(!x)return;let _=".djs-visual rect, .djs-visual path";k&&(_+=", .djs-visual circle"),x.querySelectorAll(_).forEach(j=>{j.style.fill=v,j.style.stroke="#333"}),x.querySelectorAll(".djs-visual text").forEach(j=>{j.style.fill="#333"})}function g(y,v,k){var J;const D=y.style.getPropertyValue(v)||y.getAttribute(v),x=(J=D==null?void 0:D.match(/#([^)'"\s]+)/))==null?void 0:J[1],_=y.ownerSVGElement;if(!x||!_)return;const j=Array.from(_.querySelectorAll("marker")).find(K=>K.id===x);if(!(j!=null&&j.parentElement))return;const $=k.replace(/[^a-zA-Z0-9]/g,""),T=`${x}-flowstream-${$}`;let q=Array.from(_.querySelectorAll("marker")).find(K=>K.id===T);q||(q=j.cloneNode(!0),q.id=T,q.querySelectorAll("path, polygon, polyline").forEach(K=>{K.style.fill=k,K.style.stroke=k}),j.parentElement.appendChild(q));const de=`url(#${T})`;y.style.setProperty(v,de),y.setAttribute(v,de)}function M(y,v){if(!y||!o.value)return;const D=o.value.get("canvas").getGraphics(y);D&&D.querySelectorAll(".djs-visual > path").forEach(x=>{x.style.fill="none",x.style.stroke=v,g(x,"marker-start",v),g(x,"marker-end",v)})}function O(y){const v=y.filter(_=>_.type==="bpmn:StartEvent");if(v.length!==1)return[];const k=[],D=new Set;let x=v[0];for(;x&&!D.has(x.id);){D.add(x.id);const _=(x.outgoing||[]).filter(q=>q.type==="bpmn:SequenceFlow");if(!_.length)return k;if(_.length!==1)return[];const j=_[0],$=j.target,T=(($==null?void 0:$.incoming)||[]).filter(q=>q.type==="bpmn:SequenceFlow");if(!$||T.length!==1)return[];k.push(j),x=$}return[]}function N(y){var D;const v=((D=l.value)==null?void 0:D.sequenceFlowStates)||[];if(!v.length)return;const k=v.map(x=>y.get(x.sequenceFlowId||x.id)).filter(x=>(x==null?void 0:x.type)==="bpmn:SequenceFlow");if(k.length){k.forEach(x=>M(x,"#98e5b5"));return}O(y).slice(0,v.length).forEach(x=>M(x,"#98e5b5"))}function E(){var k;if(!o.value)return;const y=o.value.get("elementRegistry"),v=new Set;(((k=l.value)==null?void 0:k.flowNodeStates)||[]).forEach(D=>{v.add(D.id),w(y.get(D.id),D.state==="executing"?"#ffd37e":"#98e5b5")}),y.filter(D=>D.type==="bpmn:StartEvent").forEach(D=>{v.add(D.id),w(D,"#98e5b5",!0)}),y.filter(D=>D.type==="bpmn:EndEvent").forEach(D=>{v.add(D.id),w(D,"#f14b12",!0)}),y.forEach(D=>{var x;!v.has(D.id)&&((x=D.type)!=null&&x.includes("Task"))&&w(D,"#eee")}),N(y)}async function R(){const y=++p;try{await s.nextTick(),m();const[v,k,D]=await Promise.all([lr({procdefId:r.processDefinitionId}),ha({processInstanceId:r.processInstanceId,fetchFlowNodeState:!0,fetchSequenceFlowState:!0}),ma({processInstanceId:r.processInstanceId})]);if(y!==p||!o.value)return;l.value=k.data||{},c.value=D.data||[],await o.value.importXML(v),o.value.get("canvas").zoom("fit-viewport",!0),E(),i("loaded")}catch(v){i("error",v)}}return s.watch(()=>[r.processDefinitionId,r.processInstanceId],R),s.onMounted(R),s.onBeforeUnmount(()=>{var y;p++,(y=o.value)==null||y.destroy(),o.value=void 0}),t({refresh:R,viewer:o,trackData:c,isTrackHidden:d}),(y,v)=>(s.openBlock(),s.createElementBlock("div",Ag,[s.createElementVNode("div",{ref_key:"canvasRef",ref:a,class:"canvas"},null,512),v[1]||(v[1]=s.createStaticVNode('<div class="legend" data-v-8965faa4><div class="legend-item undo" data-v-8965faa4><div class="legend-circle" data-v-8965faa4></div><span data-v-8965faa4>未办理环节</span></div><div class="legend-item doing" data-v-8965faa4><div class="legend-circle" data-v-8965faa4></div><span data-v-8965faa4>当前环节</span></div><div class="legend-item done" data-v-8965faa4><div class="legend-circle" data-v-8965faa4></div><span data-v-8965faa4>已办理环节</span></div></div>',1)),s.createVNode(xg,{"is-hide":d.value,"onUpdate:isHide":v[0]||(v[0]=k=>d.value=k),class:s.normalizeClass(["bottom-container",{"is-collapsed":d.value}]),data:c.value},null,8,["is-hide","class","data"])]))}}),[["__scopeId","data-v-8965faa4"]]),Cg=xt(s.defineComponent({name:"UiFlowDefinitionPreview",__name:"FlowDefinitionPreview",props:{processDefinitionId:{default:""},bpmnXml:{default:""},fitViewport:{type:Boolean,default:!0}},emits:["loaded","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,a=s.ref(),o=s.shallowRef();let l=0,c=!1,d,p;function m(){var E;a.value&&((E=o.value)==null||E.destroy(),c=!1,o.value=s.markRaw(new Wn({container:a.value,additionalModules:[_l,Al,Tl,Il],moddleExtensions:{camunda:kl}})))}async function w(){if(r.bpmnXml.trim())return r.bpmnXml;const E=r.processDefinitionId.trim();if(!E)throw new Error("流程定义预览需要传入 processDefinitionId 或 bpmnXml");return lr({procdefId:E})}function g(E=r.fitViewport){var y;if(!o.value||!c)return;const R=o.value.get("canvas");(y=R.resized)==null||y.call(R),E&&R.zoom("fit-viewport",!0)}function M(){g(!0)}function O(){p!==void 0&&cancelAnimationFrame(p),p=requestAnimationFrame(()=>{p=void 0,g()})}async function N(){const E=++l;try{await s.nextTick(),m();const R=o.value;if(!R)throw new Error("流程定义预览容器尚未就绪");const y=await w();if(E!==l||o.value!==R||(await R.importXML(y),E!==l||o.value!==R))return;c=!0,g(),i("loaded")}catch(R){E===l&&i("error",R)}}return s.watch(()=>[r.processDefinitionId,r.bpmnXml],N),s.watch(()=>r.fitViewport,E=>{E&&M()}),s.onMounted(()=>{a.value&&typeof ResizeObserver<"u"&&(d=new ResizeObserver(O),d.observe(a.value)),N()}),s.onBeforeUnmount(()=>{var E;l++,d==null||d.disconnect(),p!==void 0&&cancelAnimationFrame(p),(E=o.value)==null||E.destroy(),o.value=void 0}),t({refresh:N,fitViewport:M,viewer:o}),(E,R)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"canvasRef",ref:a,class:"flow-definition-preview"},null,512))}}),[["__scopeId","data-v-a8c7db17"]]),Dl=s.defineComponent({name:"UiFlowStart",__name:"FlowStart",props:{dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},defaultOpinion:{default:""},bpmnXml:{default:""},singleAssignee:{type:Boolean,default:!1},assignmentQueryParams:{default:()=>({})},beforeSend:{}},emits:["started","afterSend","close","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,a=s.ref(),o=s.ref(!1),l=s.ref(!1),c=s.ref(!1),d=s.ref(),p=s.ref();async function m(R){if(l.value)throw new Error("流程正在启动,请勿重复提交");l.value=!0;let y;try{const k=(await cr({processDefinitionId:R.processDefinitionId})).data||[];if(k.length!==1)throw new Error(k.length?`流程存在 ${k.length} 个首办节点,无法自动启动`:"流程未找到首办节点,无法启动");if(y=(await fi(R)).data,!(y!=null&&y.processInstanceId)||!y.processDefinitionId||!y.workId)throw new Error("流程引擎未返回流程实例 ID、流程定义 ID 或起草人待办 ID");const x=k[0];if(o.value=!1,d.value={startArgs:R,startResult:y,activity:{activityId:x.id,activityName:x.name||x.activityName},variables:R.variables||{},dealUser:{id:R.draftUserId,userId:R.draftUserId,name:R.draftUserName}},c.value=!1,p.value=void 0,await s.nextTick(),!a.value)throw new Error("发送组件尚未就绪")}catch(v){throw l.value=!1,i("error",{phase:"start",error:v}),v}try{return i("started",y),await w(),y}finally{l.value=!1}}async function w(){if(!d.value)throw new Error("没有可继续发送的流程上下文");try{if(r.beforeSend&&await r.beforeSend(d.value)===!1)return o.value=!1,!1;if(await s.nextTick(),!a.value)throw new Error("发送组件尚未就绪");return await a.value.open(),!0}catch(R){throw i("error",{phase:"beforeSend",error:R}),R}}function g(){var y,v;if(o.value){(y=a.value)==null||y.close();return}const R=(v=d.value)==null?void 0:v.startResult;R&&(!c.value&&R.processInstanceId&&or({processInstanceId:R.processInstanceId}).catch(k=>i("error",{phase:"send",error:k})),d.value=void 0,i("close",R))}function M(R){p.value=R}function O(R){!d.value||!p.value||(c.value=!0,i("afterSend",{startResult:d.value.startResult,sendData:p.value,sendResult:R}))}function N(R){i("error",{phase:"send",error:R})}function E(){var y;const R=(y=d.value)==null?void 0:y.startResult;i("close",R),c.value&&(d.value=void 0,c.value=!1)}return t({start:m,open:w,close:g,starting:l,sendVisible:o,context:d,sendRef:a}),(R,y)=>d.value?(s.openBlock(),s.createBlock(Ni,{key:0,ref_key:"sendRef",ref:a,modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=v=>o.value=v),"process-definition-id":d.value.startResult.processDefinitionId,"process-instance-id":d.value.startResult.processInstanceId,activity:d.value.activity,"assignment-query-params":e.assignmentQueryParams,"work-id":d.value.startResult.workId,variables:d.value.variables,"deal-user":d.value.dealUser,"bpmn-xml":e.bpmnXml,"force-single-assignee":e.singleAssignee,"delete-instance-on-cancel":"","show-trigger":!1,"dialog-title":e.dialogTitle,"dialog-width":e.dialogWidth,"default-opinion":e.defaultOpinion,onBeforeSend:M,onAfterSend:O,onClose:E,onError:N},null,8,["modelValue","process-definition-id","process-instance-id","activity","assignment-query-params","work-id","variables","deal-user","bpmn-xml","force-single-assignee","dialog-title","dialog-width","default-opinion"])):s.createCommentVNode("",!0)}});let va,Et,wa=!1;function Rg(e){va=e}function Tg(e){return e instanceof Error?e.message:typeof e=="string"?e:"流程操作失败"}function Pl(e){return{...e,message:Tg(e.error)}}async function Ng(e,t){return e?await e(t)!==!1:!0}function qn(e,t){if(e)try{Promise.resolve(e(t)).catch(n=>{console.error("[FlowStream] runtimeService 回调执行失败",n)})}catch(n){console.error("[FlowStream] runtimeService 回调执行失败",n)}}function Bl(e){e.disposed||(e.disposed=!0,s.render(null,e.container),e.container.remove(),Et===e&&(Et=void 0))}function Ig(e){var t;return(t=e.component)==null?void 0:t.exposed}function Ol(){if(!(Et!=null&&Et.exposed)||Et.disposed)throw new Error("当前没有已启动且可继续发送的流程");return Et}const ba={start:(async e=>{if(typeof document>"u")throw new Error("flowstream.runtimeService.start() 只能在浏览器环境中调用");if(!va)throw new Error("调用 runtimeService.start() 前必须先执行 app.use(flowstream)");if(wa||Et&&!Et.disposed)throw new Error("当前已有已启动但尚未发送完成的流程,请调用 runtimeService.open() 继续办理");const{dialogTitle:t="发送",dialogWidth:n="1200px",defaultOpinion:r="",bpmnXml:i="",singleAssignee:a=!1,assignmentQueryParams:o={},onBeforeStart:l,onBeforeSend:c,onStarted:d,onAfterSend:p,onClose:m,onError:w,...g}=e;wa=!0;try{if(!await Ng(l,g))return!1}catch(E){throw w&&qn(w,Pl({phase:"beforeStart",error:E})),E}finally{wa=!1}const M=document.createElement("div");M.className="ui-flow-runtime-service-host",document.body.appendChild(M);const O={container:M,vnode:void 0,sendCompleted:!1,disposed:!1},N=s.createVNode(Dl,{dialogTitle:t,dialogWidth:n,defaultOpinion:r,bpmnXml:i,singleAssignee:a,assignmentQueryParams:o,beforeSend:c,onStarted:E=>{O.startResult=E,qn(d,E)},onAfterSend:E=>{O.sendCompleted=!0,qn(p,E)},onClose:E=>{m&&qn(m,E),s.nextTick(()=>Bl(O))},onError:E=>{w&&qn(w,Pl(E))}});N.appContext=va,O.vnode=N,Et=O;try{if(s.render(N,M),await s.nextTick(),O.exposed=Ig(N),!O.exposed)throw new Error("流程启动服务挂载失败");return await O.exposed.start(g)}catch(E){throw O.startResult||Bl(O),E}}),async open(){return Ol().exposed.open()},close(){Ol().exposed.close()},async getApps(e){return(await li(e)).data||[]},async getFlows(e){return(await ci(e)).data||[]}};function Kt(e){const t=e;return t.install=n=>{e.name&&!n.component(e.name)&&n.component(e.name,e)},t}const Dg={...Sg,...Tf},Ml=Kt(Ec),Ll=Kt(id),Vl=Kt(gd),Fl=Kt(So),$l=Kt(Ni),Ul=Kt(kg),jl=Kt(Cg),zl=Kt(Dl),Pg={FlowButton:Ml,FlowButtons:Ll,FlowGrid:Vl,FlowJump:Fl,FlowSend:$l,FlowDiagram:Ul,FlowDefinitionPreview:jl,FlowStart:zl},Ur={runtimeService:ba,getRuntimeService(){return ba},install(e,t={}){yo(t),Rg(e._context),e.use(oe),Object.values(Pg).forEach(n=>{e.component(n.name)||e.component(n.name,n)})}},Bg=Ur,Og=Ur;pe.FlowButton=Ml,pe.FlowButtons=Ll,pe.FlowDefinitionPreview=jl,pe.FlowDiagram=Ul,pe.FlowGrid=Vl,pe.FlowJump=Fl,pe.FlowSend=$l,pe.FlowStart=zl,pe.FlowstreamUIPlus=Ur,pe.LeadalFlowVue3=Bg,pe.WorkflowComponentsVue3=Og,pe.activateFlow=_i,pe.checkSend=Ai,pe.claimTask=hi,pe.completeTask=vi,pe.configureWorkflow=yo,pe.default=Ur,pe.deleteDraftTask=vo,pe.deleteProcessInstance=or,pe.doneTaskList=di,pe.downloadBpmn=lr,pe.draftFlowList=go,pe.draftTaskList=ui,pe.flowApi=Dg,pe.flowMonitorLine=ha,pe.flowStartNodeList=_o,pe.flowTrack=ma,pe.getAppList=li,pe.getFirstHandleNodes=cr,pe.getFlowList=ci,pe.getOptList=pi,pe.jumpTask=Ri,pe.nextSendNode=Ci,pe.nodeAssistant=ur,pe.organUserTree=ki,pe.quickStart=fi,pe.receiveMessageEvent=Eo,pe.recycleTask=gi,pe.revocationTask=mi,pe.rollbackTask=yi,pe.runtimeService=ba,pe.saveDraft=wo,pe.sendTask=Si,pe.startDraft=bo,pe.startNodes=Ti,pe.suspendFlow=Ei,pe.terminateFlow=xi,pe.todoTaskList=sr,pe.turnAfterTask=bi,pe.turnBeforeTask=wi,pe.workflowHttp=ar,Object.defineProperties(pe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));