@leadal/flowstream-ui-plus 0.0.8 → 0.0.10

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(ue,_e){typeof exports=="object"&&typeof module<"u"?_e(exports,require("element-plus"),require("vue")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue"],_e):(ue=typeof globalThis<"u"?globalThis:ue||self,_e(ue.FlowstreamUIPlus={},ue.ElementPlus,ue.Vue))})(this,(function(ue,_e,l){"use strict";/*! Element Plus Icons Vue v2.3.2 */var Js=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"})]))}}),Zs=Js,Qs=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"})]))}}),el=Qs,tl=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"})]))}}),Ki=tl,nl=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"})]))}}),Gi=nl,rl=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"})]))}}),il=rl,ol=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"})]))}}),al=ol,sl=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"})]))}}),ll=sl,cl=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"})]))}}),ul=cl,fl=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"})]))}}),Pn=fl,dl=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"})]))}}),Dn=dl,pl=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"})]))}}),Xi=pl,hl=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"})]))}}),ml=hl,yl=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"})]))}}),Ji=yl;const gl={key:1,"aria-hidden":"true"},vl=["href"],wl=l.defineComponent({name:"SvgIcon",inheritAttrs:!1,__name:"SvgIcon",props:{iconClass:{},className:{}},setup(e){const t=e,n={back:Ki,delete:al,save:ll,enable:Ji,start:Ji,hang:ml,restore:Dn,revocation:Pn,taskWithdraw:Pn,taskRecyle:Dn,terminate:il,jump:Xi,taskJump:Xi,taskComplete:Gi,taskSend:ul,taskRollback:Ki,taskClaim:Gi,turnBefore:Pn,taskTurnBefore:Pn,turnAfter:Dn,taskTurnAfter:Dn},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",gl,[l.createElementVNode("use",{href:`#icon-${e.iconClass}`},null,8,vl)]))],16))}}),Et=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},bl=Et(wl,[["__scopeId","data-v-7aad397e"]]),El={class:"ui-flow-btn"},_l=Et(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,f)=>{const d=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("span",El,[o.value?(l.openBlock(),l.createBlock(d,{key:0,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.createVNode(bl,{"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 Zi(e,t){return function(){return e.apply(t,arguments)}}const{toString:xl}=Object.prototype,{getPrototypeOf:Xt}=Object,{iterator:fn,toStringTag:Qi}=Symbol,In=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dn=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),In(n,t))return!0;n=Xt(n)}return!1},Sl=(e,t)=>e!=null&&dn(e,t)?e[t]:void 0,_r=(e=>t=>{const n=xl.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ze=e=>(e=e.toLowerCase(),t=>_r(t)===e),On=e=>t=>typeof t===e,{isArray:Ot}=Array,Bt=On("undefined");function Jt(e){return e!==null&&!Bt(e)&&e.constructor!==null&&!Bt(e.constructor)&&He(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const eo=Ze("ArrayBuffer");function Al(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&eo(e.buffer),t}const kl=On("string"),He=On("function"),to=On("number"),Zt=e=>e!==null&&typeof e=="object",Cl=e=>e===!0||e===!1,Bn=e=>{if(!Zt(e))return!1;const t=Xt(e);return(t===null||t===Object.prototype||Xt(t)===null)&&!dn(e,Qi)&&!dn(e,fn)},Rl=e=>{if(!Zt(e)||Jt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Tl=Ze("Date"),Nl=Ze("File"),Pl=e=>!!(e&&typeof e.uri<"u"),Dl=e=>e&&typeof e.getParts<"u",Il=Ze("Blob"),Ol=Ze("FileList"),Bl=Ze("Set"),Ml=e=>Zt(e)&&He(e.pipe);function Ll(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const no=Ll(),ro=typeof no.FormData<"u"?no.FormData:void 0,Fl=e=>{if(!e)return!1;if(ro&&e instanceof ro)return!0;const t=Xt(e);if(!t||t===Object.prototype||!He(e.append))return!1;const n=_r(e);return n==="formdata"||n==="object"&&He(e.toString)&&e.toString()==="[object FormData]"},$l=Ze("URLSearchParams"),[Vl,jl,Ul,zl]=["ReadableStream","Request","Response","Headers"].map(Ze),Hl=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Ot(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Jt(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 io(e,t){if(Jt(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 Mt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,oo=e=>!Bt(e)&&e!==Mt;function xr(...e){const{caseless:t,skipUndefined:n}=oo(this)&&this||{},r={},i=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=t&&typeof a=="string"&&io(r,a)||a,f=In(r,s)?r[s]:void 0;Bn(f)&&Bn(o)?r[s]=xr(f,o):Bn(o)?r[s]=xr({},o):Ot(o)?r[s]=o.slice():(!n||!Bt(o))&&(r[s]=o)};for(let o=0,a=e.length;o<a;o++){const s=e[o];if(!s||Jt(s)||(pn(s,i),typeof s!="object"||Ot(s)))continue;const f=Object.getOwnPropertySymbols(s);for(let d=0;d<f.length;d++){const h=f[d];nc.call(s,h)&&i(s[h],h)}}return r}const Wl=(e,t,n,{allOwnKeys:r}={})=>(pn(t,(i,o)=>{n&&He(i)?Object.defineProperty(e,o,{__proto__:null,value:Zi(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),ql=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yl=(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)},Kl=(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&&Xt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gl=(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},Xl=e=>{if(!e)return null;if(Ot(e))return e;let t=e.length;if(!to(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Xt(Uint8Array)),Zl=(e,t)=>{const r=(e&&e[fn]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Ql=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ec=Ze("HTMLFormElement"),tc=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:nc}=Object.prototype,rc=Ze("RegExp"),ao=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};pn(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},ic=e=>{ao(e,(t,n)=>{if(He(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(He(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+"'")})}})},oc=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Ot(e)?r(e):r(String(e).split(t)),n},ac=()=>{},sc=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function lc(e){return!!(e&&He(e.append)&&e[Qi]==="FormData"&&e[fn])}const cc=e=>{const t=new WeakSet,n=r=>{if(Zt(r)){if(t.has(r))return;if(Jt(r))return r;if(!("toJSON"in r)){t.add(r);let i;if(Bl(r)){i=[];for(const o of r){const a=n(o);!Bt(a)&&i.push(a)}}else i=Ot(r)?[]:{},pn(r,(o,a)=>{const s=n(o);!Bt(s)&&(i[a]=s)});return t.delete(r),i}}return r};return n(e)},uc=Ze("AsyncFunction"),fc=e=>e&&(Zt(e)||He(e))&&He(e.then)&&He(e.catch),so=((e,t)=>e?setImmediate:t?((n,r)=>(Mt.addEventListener("message",({source:i,data:o})=>{i===Mt&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Mt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",He(Mt.postMessage)),dc=typeof queueMicrotask<"u"?queueMicrotask.bind(Mt):typeof process<"u"&&process.nextTick||so,lo=e=>e!=null&&He(e[fn]),w={isArray:Ot,isArrayBuffer:eo,isBuffer:Jt,isFormData:Fl,isArrayBufferView:Al,isString:kl,isNumber:to,isBoolean:Cl,isObject:Zt,isPlainObject:Bn,isEmptyObject:Rl,isReadableStream:Vl,isRequest:jl,isResponse:Ul,isHeaders:zl,isUndefined:Bt,isDate:Tl,isFile:Nl,isReactNativeBlob:Pl,isReactNative:Dl,isBlob:Il,isRegExp:rc,isFunction:He,isStream:Ml,isURLSearchParams:$l,isTypedArray:Jl,isFileList:Ol,forEach:pn,merge:xr,extend:Wl,trim:Hl,stripBOM:ql,inherits:Yl,toFlatObject:Kl,kindOf:_r,kindOfTest:Ze,endsWith:Gl,toArray:Xl,forEachEntry:Zl,matchAll:Ql,isHTMLForm:ec,hasOwnProperty:In,hasOwnProp:In,hasOwnInPrototypeChain:dn,getSafeProp:Sl,reduceDescriptors:ao,freezeMethods:ic,toObjectSet:oc,toCamelCase:tc,noop:ac,toFiniteNumber:sc,findKey:io,global:Mt,isContextDefined:oo,isSpecCompliantForm:lc,toJSONObject:cc,isAsyncFn:uc,isThenable:fc,setImmediate:so,asap:dc,isIterable:lo,isSafeIterable:e=>e!=null&&dn(e,fn)&&lo(e)},pc=w.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"]),hc=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=w.hasOwnProp(t,n);!n||s&&w.hasOwnProp(pc,n)||(n==="set-cookie"?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t};function mc(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 yc=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),gc=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Sr(e,t){return w.isArray(e)?e.map(n=>Sr(n,t)):mc(String(e).replace(t,""))}const vc=e=>Sr(e,yc),wc=e=>Sr(e,gc);function co(e){const t=Object.create(null);return w.forEach(e.toJSON(),(n,r)=>{t[r]=wc(n)}),t}const uo=Symbol("internals");function hn(e){return e&&String(e).trim().toLowerCase()}function Mn(e){return e===!1||e==null?e:w.isArray(e)?e.map(Mn):vc(String(e))}function bc(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 Ec=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Ar(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 _c(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 xc(e){const t=Object.create(null),n=String(e);let r=0,i=!1,o=!1;function a(s){const f=Ar(n.slice(r,s)),d=f.indexOf("=");if(d<1)return;const h=Ar(f.slice(0,d));if(!Ec.test(h))return;const m=h.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const R=Ar(f.slice(d+1));t[m]=_c(R)}for(let s=0;s<n.length;s++){const f=n.charCodeAt(s);i?o?o=!1:f===92?o=!0:f===34&&(i=!1):f===34?i=!0:(f===44||f===59)&&(a(s),r=s+1)}return a(n.length),t}const Sc=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function kr(e,t,n,r,i){if(w.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!w.isString(t)){if(w.isString(r))return t.indexOf(r)!==-1;if(w.isRegExp(r))return r.test(t)}}function Ac(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function kc(e,t){const n=w.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 Fe=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,f,d){const h=hn(f);if(!h)return;const m=w.findKey(i,h);(!m||i[m]===void 0||d===!0||d===void 0&&i[m]!==!1)&&(i[m||f]=Mn(s))}const a=(s,f)=>w.forEach(s,(d,h)=>o(d,h,f));if(w.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(w.isString(t)&&(t=t.trim())&&!Sc(t))a(hc(t),n);else if(w.isObject(t)&&w.isSafeIterable(t)){let s=Object.create(null),f,d;for(const h of t){if(!w.isArray(h))throw new TypeError("Object iterator must return a key-value pair");d=h[0],w.hasOwnProp(s,d)?(f=s[d],s[d]=w.isArray(f)?[...f,h[1]]:[f,h[1]]):s[d]=h[1]}a(s,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=hn(t),t){const r=w.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return bc(i);if(w.isFunction(n))return n.call(this,i,r);if(w.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=hn(t),t){const r=w.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||kr(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=hn(a),a){const s=w.findKey(r,a);s&&(!n||kr(r,r[s],s,n))&&(delete r[s],i=!0)}}return w.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||kr(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return w.forEach(this,(i,o)=>{const a=w.findKey(r,o);if(a){n[a]=Mn(i),delete n[o];return}const s=t?Ac(o):String(o).trim();s!==o&&delete n[o],n[s]=Mn(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return w.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&w.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 w.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 xc(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[uo]=this[uo]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=hn(a);r[s]||(kc(i,a),r[s]=!0)}return w.isArray(t)?t.forEach(o):o(t),this}};Fe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),w.reduceDescriptors(Fe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),w.freezeMethods(Fe);const Ln="[REDACTED ****]";function Cc(e){if(w.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(w.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Rc(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],i=o=>{if(o===null||typeof o!="object"||w.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof Fe&&(o=o.toJSON()),r.push(o);let a;if(w.isArray(o))a=[],o.forEach((s,f)=>{const d=i(s);w.isUndefined(d)||(a[f]=d)});else{if(!w.isPlainObject(o)&&Cc(o))return r.pop(),o;a=Object.create(null);for(const[s,f]of Object.entries(o)){const d=n.has(s.toLowerCase())?Ln:i(f);w.isUndefined(d)||(a[s]=d)}}return r.pop(),a};return i(e)}function fo(e){try{return String(e)}catch{return""}}function Tc(e){return e.errors.map(n=>{try{return n&&n.message?fo(n.message):fo(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let ne=class Gs extends Error{static from(t,n,r,i,o,a){let s=t.message;!s&&w.isArray(t.errors)&&t.errors.length&&(s=Tc(t));const f=new Gs(s,n||t.code,r,i,o);return Object.defineProperty(f,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),f.name=t.name,t.status!=null&&f.status==null&&(f.status=t.status),a&&Object.assign(f,a),f}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&&w.hasOwnProp(t,"redact")?t.redact:void 0,r=w.isArray(n)&&n.length>0?Rc(t,n):w.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 Nc=null,po=100;function Cr(e){return w.isPlainObject(e)||w.isArray(e)}function ho(e){return w.endsWith(e,"[]")?e.slice(0,-2):e}function Rr(e,t,n){return e?e.concat(t).map(function(i,o){return i=ho(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Pc(e){return w.isArray(e)&&!e.some(Cr)}const Dc=w.toFlatObject(w,{},null,function(t){return/^is[A-Z]/.test(t)});function Fn(e,t,n){if(!w.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=w.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(I,y){return!w.isUndefined(y[I])});const r=n.metaTokens,i=n.visitor||Y,o=n.dots,a=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?po:n.maxDepth,d=s&&w.isSpecCompliantForm(t),h=[];if(!w.isFunction(i))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(w.isDate(S))return S.toISOString();if(w.isBoolean(S))return S.toString();if(!d&&w.isBlob(S))throw new ne("Blob is not supported. Use a Buffer instead.");if(w.isArrayBuffer(S)||w.isTypedArray(S)){if(d&&typeof s=="function")return new s([S]);throw new ne("Blob is not supported. Use a Buffer instead.",ne.ERR_NOT_SUPPORT)}return S}function R(S){if(S>f)throw new ne("Object is too deeply nested ("+S+" levels). Max depth: "+f,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function L(S,I){if(f===1/0)return JSON.stringify(S);const y=[];return JSON.stringify(S,function(A,T){if(!w.isObject(T))return T;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(T),R(I+y.length-1),T})}function Y(S,I,y){let v=S;if(w.isReactNative(t)&&w.isReactNativeBlob(S))return t.append(Rr(y,I,o),m(S)),!1;if(S&&!y&&typeof S=="object"){if(w.endsWith(I,"{}"))I=r?I:I.slice(0,-2),S=L(S,1);else if(w.isArray(S)&&Pc(S)||(w.isFileList(S)||w.endsWith(I,"[]"))&&(v=w.toArray(S)))return I=ho(I),v.forEach(function(T,x){!(w.isUndefined(T)||T===null)&&t.append(a===!0?Rr([I],x,o):a===null?I:I+"[]",m(T))}),!1}return Cr(S)?!0:(t.append(Rr(y,I,o),m(S)),!1)}const U=Object.assign(Dc,{defaultVisitor:Y,convertValue:m,isVisitable:Cr});function D(S,I,y=0){if(!w.isUndefined(S)){if(R(y),h.indexOf(S)!==-1)throw new Error("Circular reference detected in "+I.join("."));h.push(S),w.forEach(S,function(A,T){(!(w.isUndefined(A)||A===null)&&i.call(t,A,w.isString(T)?T.trim():T,I,U))===!0&&D(A,I?I.concat(T):[T],y+1)}),h.pop()}}if(!w.isObject(e))throw new TypeError("data must be an object");return D(e),t}function mo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Tr(e,t){this._pairs=[],e&&Fn(e,this,t)}const yo=Tr.prototype;yo.append=function(t,n){this._pairs.push([t,n])},yo.toString=function(t){const n=t?r=>t.call(this,r,mo):mo;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Ic(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function go(e,t,n){if(!t)return e;e=e||"";const r=w.isFunction(n)?{serialize:n}:n,i=w.getSafeProp(r,"encode")||Ic,o=w.getSafeProp(r,"serialize");let a;if(o?a=o(t,r):a=w.isURLSearchParams(t)?t.toString():new Tr(t,r).toString(i),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class vo{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){w.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Nr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Oc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Tr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Pr=typeof window<"u"&&typeof document<"u",Dr=typeof navigator=="object"&&navigator||void 0,Bc=Pr&&(!Dr||["ReactNative","NativeScript","NS"].indexOf(Dr.product)<0),Mc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lc=Pr&&window.location.href||"http://localhost",Be={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pr,hasStandardBrowserEnv:Bc,hasStandardBrowserWebWorkerEnv:Mc,navigator:Dr,origin:Lc},Symbol.toStringTag,{value:"Module"})),...Oc};function Fc(e,t){return Fn(e,new Be.classes.URLSearchParams,{visitor:function(n,r,i,o){return Be.isNode&&w.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const wo=po;function bo(e){if(e>wo)throw new ne("FormData field is too deeply nested ("+e+" levels). Max depth: "+wo,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function $c(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)bo(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Vc(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 Eo(e){function t(n,r,i,o){bo(o);let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),f=o>=n.length;return a=!a&&w.isArray(i)?i.length:a,f?(w.hasOwnProp(i,a)?i[a]=w.isArray(i[a])?i[a].concat(r):[i[a],r]:i[a]=r,!s):((!w.hasOwnProp(i,a)||!w.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&w.isArray(i[a])&&(i[a]=Vc(i[a])),!s)}if(w.isFormData(e)&&w.isFunction(e.entries)){const n={};return w.forEachEntry(e,(r,i)=>{t($c(r),i,n,0)}),n}return null}const Qt=(e,t)=>e!=null&&w.hasOwnProp(e,t)?e[t]:void 0;function jc(e,t,n){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const mn={transitional:Nr,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=w.isObject(t);if(o&&w.isHTMLForm(t)&&(t=new FormData(t)),w.isFormData(t))return i?JSON.stringify(Eo(t)):t;if(w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t)||w.isReadableStream(t))return t;if(w.isArrayBufferView(t))return t.buffer;if(w.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){const f=Qt(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Fc(t,f).toString();if((s=w.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=Qt(this,"env"),h=d&&d.FormData;return Fn(s?{"files[]":t}:t,h&&new h,f)}}return o||i?(n.setContentType("application/json",!1),jc(t)):t}],transformResponse:[function(t){const n=Qt(this,"transitional")||mn.transitional,r=n&&n.forcedJSONParsing,i=Qt(this,"responseType"),o=i==="json";if(w.isResponse(t)||w.isReadableStream(t))return t;if(t&&w.isString(t)&&(r&&!i||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Qt(this,"parseReviver"))}catch(f){if(s)throw f.name==="SyntaxError"?ne.from(f,ne.ERR_BAD_RESPONSE,this,null,Qt(this,"response")):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch","query"],e=>{mn.headers[e]={}});function Ir(e,t){const n=this||mn,r=t||n,i=Fe.from(r.headers);let o=r.data;return w.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function _o(e){return!!(e&&e.__CANCEL__)}let yn=class extends ne{constructor(t,n,r){super(t??"canceled",ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function xo(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 Uc(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function zc(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(f){const d=Date.now(),h=r[o];a||(a=d),n[i]=f,r[i]=d;let m=o,R=0;for(;m!==i;)R+=n[m++],m=m%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-a<t)return;const L=h&&d-h;return L?Math.round(R*1e3/L):void 0}}function Hc(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 $n=(e,t,n=3)=>{let r=0;const i=zc(50,250);return Hc(o=>{if(!o||typeof o.loaded!="number")return;const a=o.loaded,s=o.lengthComputable?o.total:void 0,f=Math.max(0,s!=null?Math.min(a,s):a),d=Math.max(0,f-r),h=i(d);r=Math.max(r,f);const m={loaded:f,total:s,progress:s?f/s:void 0,bytes:d,rate:h||void 0,estimated:h&&s?(s-f)/h:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(m)},n)},So=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ao=(e,t=w.asap)=>(...n)=>t(()=>e(...n)),Wc=Be.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Be.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):()=>!0,qc=Be.hasStandardBrowserEnv?{write(e,t,n,r,i,o,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];w.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),w.isString(r)&&s.push(`path=${r}`),w.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),w.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 Yc(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Kc(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 Gc=/^https?:(?!\/\/)/i,Xc=/[\t\n\r]/g;function Jc(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Zc(e){return Jc(e).replace(Xc,"")}function Qc(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${Ln}`)}function eu(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Ln}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Ln}`);return n===-1?i:`${i}#${Qc(t.slice(n+1))}`}function ko(e,t){if(typeof e=="string"){const n=Zc(e);if(Gc.test(n))throw new ne(`Invalid URL ${JSON.stringify(eu(n))}: missing "//" after protocol`,ne.ERR_INVALID_URL,t)}}function Co(e,t,n,r){ko(t,r);let i=!Yc(t);return e&&(i||n===!1)?(ko(e,r),Kc(e,t)):t}const Ro=e=>e instanceof Fe?{...e}:e,tu=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Lt(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,R,L){return w.isPlainObject(h)&&w.isPlainObject(m)?w.merge.call({caseless:L},h,m):w.isPlainObject(m)?w.merge({},m):w.isArray(m)?m.slice():m}function i(h,m,R,L){if(w.isUndefined(m)){if(!w.isUndefined(h))return r(void 0,h,R,L)}else return r(h,m,R,L)}function o(h,m){if(!w.isUndefined(m))return r(void 0,m)}function a(h,m){if(w.isUndefined(m)){if(!w.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function s(h){const m=w.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!w.isUndefined(m))if(w.isPlainObject(m)){if(w.hasOwnProp(m,h))return m[h]}else return;const R=w.hasOwnProp(e,"transitional")?e.transitional:void 0;if(w.isPlainObject(R)&&w.hasOwnProp(R,h))return R[h]}function f(h,m,R){if(w.hasOwnProp(t,R))return r(h,m);if(w.hasOwnProp(e,R))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:f,headers:(h,m,R)=>i(Ro(h),Ro(m),R,!0)};return w.forEach(tu({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const R=w.hasOwnProp(d,m)?d[m]:i,L=w.hasOwnProp(e,m)?e[m]:void 0,Y=w.hasOwnProp(t,m)?t[m]:void 0,U=R(L,Y,m);w.isUndefined(U)&&R!==f||(n[m]=U)}),w.hasOwnProp(t,"validateStatus")&&w.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(w.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const nu=["content-type","content-length"];function ru(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{nu.includes(r.toLowerCase())&&e.set(r,i)})}const iu=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function To(e){const t=Lt({},e),n=R=>w.hasOwnProp(t,R)?t[R]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const f=n("auth"),d=n("baseURL"),h=n("allowAbsoluteUrls"),m=n("url");if(t.headers=s=Fe.from(s),t.url=go(Co(d,m,h,t),n("params"),n("paramsSerializer")),f){const R=w.getSafeProp(f,"username")||"",L=w.getSafeProp(f,"password")||"";try{s.set("Authorization","Basic "+btoa(R+":"+(L?iu(L):"")))}catch(Y){throw ne.from(Y,ne.ERR_BAD_OPTION_VALUE,e)}}if(w.isFormData(r)&&(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv||w.isReactNative(r)?s.setContentType(void 0):w.isFunction(r.getHeaders)&&ru(s,r.getHeaders(),n("formDataHeaderPolicy"))),Be.hasStandardBrowserEnv&&(w.isFunction(i)&&(i=i(t)),i===!0||i==null&&Wc(t.url))){const L=o&&a&&qc.read(a);L&&s.set(o,L)}return t}const ou=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=To(e);let o=i.data;const a=Fe.from(i.headers).normalize();let{responseType:s,onUploadProgress:f,onDownloadProgress:d}=i,h,m,R,L,Y;function U(){L&&L(),Y&&Y(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let D=new XMLHttpRequest;D.open(i.method.toUpperCase(),i.url,!0),D.timeout=i.timeout;function S(){if(!D)return;const y=Fe.from("getAllResponseHeaders"in D&&D.getAllResponseHeaders()),A={data:!s||s==="text"||s==="json"?D.responseText:D.response,status:D.status,statusText:D.statusText,headers:y,config:e,request:D};xo(function(x){n(x),U()},function(x){r(x),U()},A),D=null}"onloadend"in D?D.onloadend=S:D.onreadystatechange=function(){!D||D.readyState!==4||D.status===0&&!(D.responseURL&&D.responseURL.startsWith("file:"))||setTimeout(S)},D.onabort=function(){D&&(r(new ne("Request aborted",ne.ECONNABORTED,e,D)),U(),D=null)},D.onerror=function(v){const A=v&&v.message?v.message:"Network Error",T=new ne(A,ne.ERR_NETWORK,e,D);T.event=v||null,r(T),U(),D=null},D.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const A=i.transitional||Nr;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new ne(v,A.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,e,D)),U(),D=null},o===void 0&&a.setContentType(null),"setRequestHeader"in D&&w.forEach(co(a),function(v,A){D.setRequestHeader(A,v)}),w.isUndefined(i.withCredentials)||(D.withCredentials=!!i.withCredentials),s&&s!=="json"&&(D.responseType=i.responseType),d&&([R,Y]=$n(d,!0),D.addEventListener("progress",R)),f&&D.upload&&([m,L]=$n(f),D.upload.addEventListener("progress",m),D.upload.addEventListener("loadend",L)),(i.cancelToken||i.signal)&&(h=y=>{D&&(r(!y||y.type?new yn(null,e,D):y),D.abort(),U(),D=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const I=Uc(i.url);if(I&&!Be.protocols.includes(I)){r(new ne("Unsupported protocol "+I+":",ne.ERR_BAD_REQUEST,e)),U();return}D.send(o||null)})},au=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(f){if(!r){r=!0,a();const d=f instanceof Error?f:this.reason;n.abort(d instanceof ne?d:new yn(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(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>{if(!r){if(f.aborted){i.call(f);return}f.addEventListener("abort",i,{once:!0})}});const{signal:s}=n;return s.unsubscribe=()=>w.asap(a),s},su=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},lu=async function*(e,t){for await(const n of cu(e))yield*su(n,t)},cu=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()}},No=(e,t,n,r)=>{const i=lu(e,t);let o=0,a,s=f=>{a||(a=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:d,value:h}=await i.next();if(d){s(),f.close();return}let m=h.byteLength;if(n){let R=o+=m;n(R)}f.enqueue(new Uint8Array(h))}catch(d){throw s(d),d}},cancel(f){return s(f),i.return()}},{highWaterMark:2})},Po=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Do=(e,t,n)=>t+2<n&&Po(e.charCodeAt(t+1))&&Po(e.charCodeAt(t+2)),Io=e=>e<=57?e-48:(e&223)-55,uu=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,fu=e=>e===9||e===10||e===12||e===13||e===32,du=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},pu=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)},hu=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&&Do(e,o,t)&&(a=Io(e.charCodeAt(o+1))*16+Io(e.charCodeAt(o+2)),o+=2),!fu(a)){if(a===61){r++;continue}if(!uu(a)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?pu(e):du(n)},mu=(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,f=i.length;s<f;s++){const d=i.charCodeAt(s);if(d===37&&Do(i,s,f))a+=1,s+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&s+1<f){const h=i.charCodeAt(s+1);h>=56320&&h<=57343?(a+=4,s++):a+=3}else a+=3}return a};function yu(e){const t=typeof e=="string"?e.indexOf("#"):-1;return mu(t===-1?e:e.slice(0,t),hu)}const Or="1.19.0",Oo=64*1024,{isFunction:Vn}=w,gu=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Bo=e=>{if(!w.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Mo=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vu=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},wu=e=>{const t=w.global!==void 0&&w.global!==null?w.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=w.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:o,Response:a}=e,s=i?Vn(i):typeof fetch=="function",f=Vn(o),d=Vn(a);if(!s)return!1;const h=s&&Vn(n),m=s&&(typeof r=="function"?(S=>I=>S.encode(I))(new r):async S=>new Uint8Array(await new o(S).arrayBuffer())),R=f&&h&&Mo(()=>{let S=!1;const I=new o(Be.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),y=I.headers.has("Content-Type");return I.body!=null&&I.body.cancel(),S&&!y}),L=d&&h&&Mo(()=>w.isReadableStream(new a("").body)),Y={stream:L&&(S=>S.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!Y[S]&&(Y[S]=(I,y)=>{let v=I&&I[S];if(v)return v.call(I);throw new ne(`Response type '${S}' is not supported`,ne.ERR_NOT_SUPPORT,y)})});const U=async S=>{if(S==null)return 0;if(w.isBlob(S))return S.size;if(w.isSpecCompliantForm(S))return(await new o(Be.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(w.isArrayBufferView(S)||w.isArrayBuffer(S))return S.byteLength;if(w.isURLSearchParams(S)&&(S=S+""),w.isString(S))return(await m(S)).byteLength},D=async(S,I)=>{const y=w.toFiniteNumber(S.getContentLength());return y??U(I)};return async S=>{let{url:I,method:y,data:v,signal:A,cancelToken:T,timeout:x,onDownloadProgress:E,onUploadProgress:j,responseType:M,headers:_,withCredentials:q="same-origin",fetchOptions:re,maxContentLength:Z,maxBodyLength:H}=To(S);const G=w.isNumber(Z)&&Z>-1,ee=w.isNumber(H)&&H>-1,X=ae=>w.hasOwnProp(S,ae)?S[ae]:void 0;let B=i||fetch;M=M?(M+"").toLowerCase():"text";let O=au([A,T&&T.toAbortSignal()],x),$=null;const C=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let k,V=null;const he=()=>new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,S,$);try{let ae;const p=X("auth");if(p){const F=w.getSafeProp(p,"username")||"",W=w.getSafeProp(p,"password")||"";ae={username:F,password:W}}if(vu(I)){const F=new URL(I,Be.origin);if(!ae&&(F.username||F.password)){const W=Bo(F.username),ie=Bo(F.password);ae={username:W,password:ie}}(F.username||F.password)&&(F.username="",F.password="",I=F.href)}if(ae&&(_.delete("authorization"),_.set("Authorization","Basic "+btoa(gu((ae.username||"")+":"+(ae.password||""))))),G&&typeof I=="string"&&I.startsWith("data:")&&yu(I)>Z)throw new ne("maxContentLength size of "+Z+" exceeded",ne.ERR_BAD_RESPONSE,S,$);if(ee&&y!=="get"&&y!=="head"){const F=await U(v);if(typeof F=="number"&&isFinite(F)&&(k=F,F>H))throw he()}const u=ee&&(w.isReadableStream(v)||w.isStream(v)),c=(F,W,ie)=>No(F,Oo,ve=>{if(ee&&ve>H)throw V=he();W&&W(ve)},ie);if(R&&y!=="get"&&y!=="head"&&(j||u)){if(k=k??await D(_,v),k!==0||u){let F=new o(I,{method:"POST",body:v,duplex:"half"}),W;if(w.isFormData(v)&&(W=F.headers.get("content-type"))&&_.setContentType(W),F.body){const[ie,ve]=j&&So(k,$n(Ao(j)))||[];v=c(F.body,ie,ve)}}}else if(u&&!f&&h&&y!=="get"&&y!=="head")v=c(v);else if(u&&f&&!R&&y!=="get"&&y!=="head")throw new ne("Stream request bodies are not supported by the current fetch implementation",ne.ERR_NOT_SUPPORT,S,$);w.isString(q)||(q=q?"include":"omit");const g=f&&"credentials"in o.prototype;if(w.isFormData(v)){const F=_.getContentType();F&&/^multipart\/form-data/i.test(F)&&!/boundary=/i.test(F)&&_.delete("content-type")}_.set("User-Agent","axios/"+Or,!1);const b={...re,signal:O,method:y.toUpperCase(),headers:co(_.normalize()),body:v,duplex:"half",credentials:g?q:void 0};$=f&&new o(I,b);let P=await(f?B($,re):B(I,b));const Q=Fe.from(P.headers);if(G){const F=w.toFiniteNumber(Q.getContentLength());if(F!=null&&F>Z)throw new ne("maxContentLength size of "+Z+" exceeded",ne.ERR_BAD_RESPONSE,S,$)}const ce=L&&(M==="stream"||M==="response");if(L&&P.body&&(E||G||ce&&C)){const F={};["status","statusText","headers"].forEach(ye=>{F[ye]=P[ye]});const W=w.toFiniteNumber(Q.getContentLength()),[ie,ve]=E&&So(W,$n(Ao(E),!0))||[];let Se=0;const de=ye=>{if(G&&(Se=ye,Se>Z))throw new ne("maxContentLength size of "+Z+" exceeded",ne.ERR_BAD_RESPONSE,S,$);ie&&ie(ye)};P=new a(No(P.body,Oo,de,()=>{ve&&ve(),C&&C()}),F)}M=M||"text";let N=await Y[w.findKey(Y,M)||"text"](P,S);if(G&&!L&&!ce){let F;if(N!=null&&(typeof N.byteLength=="number"?F=N.byteLength:typeof N.size=="number"?F=N.size:typeof N=="string"&&(F=typeof r=="function"?new r().encode(N).byteLength:N.length)),typeof F=="number"&&F>Z)throw new ne("maxContentLength size of "+Z+" exceeded",ne.ERR_BAD_RESPONSE,S,$)}return!ce&&C&&C(),await new Promise((F,W)=>{xo(F,W,{data:N,headers:Fe.from(P.headers),status:P.status,statusText:P.statusText,config:S,request:$})})}catch(ae){if(C&&C(),O&&O.aborted&&O.reason instanceof ne){const p=O.reason;throw p.config=S,$&&(p.request=$),ae!==p&&Object.defineProperty(p,"cause",{__proto__:null,value:ae,writable:!0,enumerable:!1,configurable:!0}),p}if(V)throw $&&!V.request&&(V.request=$),V;if(ae instanceof ne)throw $&&!ae.request&&(ae.request=$),ae;if(ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)){const p=new ne("Network Error",ne.ERR_NETWORK,S,$,ae&&ae.response);throw Object.defineProperty(p,"cause",{__proto__:null,value:ae.cause||ae,writable:!0,enumerable:!1,configurable:!0}),p}throw ne.from(ae,ae&&ae.code,S,$,ae&&ae.response)}}},bu=new Map,Lo=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let a=o.length,s=a,f,d,h=bu;for(;s--;)f=o[s],d=h.get(f),d===void 0&&h.set(f,d=s?new Map:wu(t)),h=d;return d};Lo();const Br={http:Nc,xhr:ou,fetch:{get:Lo}};w.forEach(Br,(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}`,Eu=e=>w.isFunction(e)||e===null||e===!1;function _u(e,t){e=w.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,!Eu(r)&&(i=Br[(s=String(r)).toLowerCase()],i===void 0))throw new ne(`Unknown adapter '${s}'`);if(i&&(w.isFunction(i)||(i=i.get(t))))break;o[s||"#"+a]=i}if(!i){const a=Object.entries(o).map(([f,d])=>`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since :
4
- `+a.map(Fo).join(`
5
- `):" "+Fo(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 $o={getAdapter:_u,adapters:Br};function Mr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yn(null,e)}function Lr(e){return Mr(e),e.headers=Fe.from(e.headers),e.data=Ir.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$o.getAdapter(e.adapter||mn.adapter,e)(e).then(function(r){Mr(e),e.response=r;try{r.data=Ir.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Fe.from(r.headers),r},function(r){if(!_o(r)&&(Mr(e),r&&r.response)){e.response=r.response;try{r.response.data=Ir.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Fe.from(r.response.headers)}return Promise.reject(r)})}const jn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{jn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Vo={};jn.transitional=function(t,n,r){function i(o,a){return"[Axios v"+Or+"] 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&&!Vo[a]&&(Vo[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}},jn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function xu(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],f=s===void 0||a(s,o,e);if(f!==!0)throw new ne("option "+o+" must be "+f,ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ne("Unknown option "+o,ne.ERR_BAD_OPTION)}}const Un={assertOptions:xu,validators:jn},$e=Un.validators;let Ft=class{constructor(t){this.defaults=t||{},this.interceptors={request:new vo,response:new vo}}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(`
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 Rl=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"})]))}}),Tl=Rl,Pl=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"})]))}}),Nl=Pl,Dl=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=Dl,Il=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=Il,Ol=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"})]))}}),Bl=Ol,Ml=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"})]))}}),Ll=Ml,Fl=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"})]))}}),$l=Fl,Vl=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"})]))}}),jl=Vl,Ul=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"})]))}}),Fn=Ul,zl=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"})]))}}),$n=zl,Hl=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=Hl,Wl=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"})]))}}),ql=Wl,Yl=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=Yl;const Kl={key:1,"aria-hidden":"true"},Gl=["href"],Xl=l.defineComponent({name:"SvgIcon",inheritAttrs:!1,__name:"SvgIcon",props:{iconClass:{},className:{}},setup(e){const t=e,n={back:uo,delete:Ll,save:$l,enable:ho,start:ho,hang:ql,restore:$n,revocation:Fn,taskWithdraw:Fn,taskRecyle:$n,terminate:Bl,jump:po,taskJump:po,taskComplete:fo,taskSend:jl,taskRollback:uo,taskClaim:fo,turnBefore:Fn,taskTurnBefore:Fn,turnAfter:$n,taskTurnAfter:$n},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",Kl,[l.createElementVNode("use",{href:`#icon-${e.iconClass}`},null,8,Gl)]))],16))}}),St=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},Jl=St(Xl,[["__scopeId","data-v-7aad397e"]]),Zl={class:"ui-flow-btn"},Ql=St(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",Zl,[o.value?(l.openBlock(),l.createBlock(d,{key:0,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.createVNode(Jl,{"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:ec}=Object.prototype,{getPrototypeOf:rn}=Object,{iterator:vn,toStringTag:yo}=Symbol,Vn=(({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),Vn(n,t))return!0;n=rn(n)}return!1},tc=(e,t)=>e!=null&&wn(e,t)?e[t]:void 0,Or=(e=>t=>{const n=ec.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),et=e=>(e=e.toLowerCase(),t=>Or(t)===e),jn=e=>t=>typeof t===e,{isArray:Ut}=Array,zt=jn("undefined");function on(e){return e!==null&&!zt(e)&&e.constructor!==null&&!zt(e.constructor)&&qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const go=et("ArrayBuffer");function nc(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&go(e.buffer),t}const rc=jn("string"),qe=jn("function"),vo=jn("number"),an=e=>e!==null&&typeof e=="object",ic=e=>e===!0||e===!1,Un=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)},oc=e=>{if(!an(e)||on(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ac=et("Date"),sc=et("File"),lc=e=>!!(e&&typeof e.uri<"u"),cc=e=>e&&typeof e.getParts<"u",uc=et("Blob"),fc=et("FileList"),dc=et("Set"),pc=e=>an(e)&&qe(e.pipe);function hc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const wo=hc(),bo=typeof wo.FormData<"u"?wo.FormData:void 0,mc=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=Or(e);return n==="formdata"||n==="object"&&qe(e.toString)&&e.toString()==="[object FormData]"},yc=et("URLSearchParams"),[gc,vc,wc,bc]=["ReadableStream","Request","Response","Headers"].map(et),Ec=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]),Ut(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 Ht=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_o=e=>!zt(e)&&e!==Ht;function Br(...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=Vn(r,s)?r[s]:void 0;Un(c)&&Un(o)?r[s]=Br(c,o):Un(o)?r[s]=Br({},o):Ut(o)?r[s]=o.slice():(!n||!zt(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"||Ut(s)))continue;const c=Object.getOwnPropertySymbols(s);for(let d=0;d<c.length;d++){const h=c[d];Ic.call(s,h)&&i(s[h],h)}}return r}const _c=(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),xc=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Sc=(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)},Ac=(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},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},Cc=e=>{if(!e)return null;if(Ut(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},Rc=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&rn(Uint8Array)),Tc=(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])}},Pc=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Nc=et("HTMLFormElement"),Dc=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:Ic}=Object.prototype,Oc=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)},Bc=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+"'")})}})},Mc=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Ut(e)?r(e):r(String(e).split(t)),n},Lc=()=>{},Fc=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function $c(e){return!!(e&&qe(e.append)&&e[yo]==="FormData"&&e[vn])}const Vc=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(dc(r)){i=[];for(const o of r){const a=n(o);!zt(a)&&i.push(a)}}else i=Ut(r)?[]:{},bn(r,(o,a)=>{const s=n(o);!zt(s)&&(i[a]=s)});return t.delete(r),i}}return r};return n(e)},jc=et("AsyncFunction"),Uc=e=>e&&(an(e)||qe(e))&&qe(e.then)&&qe(e.catch),So=((e,t)=>e?setImmediate:t?((n,r)=>(Ht.addEventListener("message",({source:i,data:o})=>{i===Ht&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Ht.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",qe(Ht.postMessage)),zc=typeof queueMicrotask<"u"?queueMicrotask.bind(Ht):typeof process<"u"&&process.nextTick||So,Ao=e=>e!=null&&qe(e[vn]),_={isArray:Ut,isArrayBuffer:go,isBuffer:on,isFormData:mc,isArrayBufferView:nc,isString:rc,isNumber:vo,isBoolean:ic,isObject:an,isPlainObject:Un,isEmptyObject:oc,isReadableStream:gc,isRequest:vc,isResponse:wc,isHeaders:bc,isUndefined:zt,isDate:ac,isFile:sc,isReactNativeBlob:lc,isReactNative:cc,isBlob:uc,isRegExp:Oc,isFunction:qe,isStream:pc,isURLSearchParams:yc,isTypedArray:Rc,isFileList:fc,forEach:bn,merge:Br,extend:_c,trim:Ec,stripBOM:xc,inherits:Sc,toFlatObject:Ac,kindOf:Or,kindOfTest:et,endsWith:kc,toArray:Cc,forEachEntry:Tc,matchAll:Pc,isHTMLForm:Nc,hasOwnProperty:Vn,hasOwnProp:Vn,hasOwnInPrototypeChain:wn,getSafeProp:tc,reduceDescriptors:xo,freezeMethods:Bc,toObjectSet:Mc,toCamelCase:Dc,noop:Lc,toFiniteNumber:Fc,findKey:Eo,global:Ht,isContextDefined:_o,isSpecCompliantForm:$c,toJSONObject:Vc,isAsyncFn:jc,isThenable:Uc,setImmediate:So,asap:zc,isIterable:Ao,isSafeIterable:e=>e!=null&&wn(e,vn)&&Ao(e)},Hc=_.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"]),Wc=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=_.hasOwnProp(t,n);!n||s&&_.hasOwnProp(Hc,n)||(n==="set-cookie"?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t};function qc(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 Yc=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Kc=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Mr(e,t){return _.isArray(e)?e.map(n=>Mr(n,t)):qc(String(e).replace(t,""))}const Gc=e=>Mr(e,Yc),Xc=e=>Mr(e,Kc);function ko(e){const t=Object.create(null);return _.forEach(e.toJSON(),(n,r)=>{t[r]=Xc(n)}),t}const Co=Symbol("internals");function En(e){return e&&String(e).trim().toLowerCase()}function zn(e){return e===!1||e==null?e:_.isArray(e)?e.map(zn):Gc(String(e))}function Jc(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 Zc=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Lr(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 Qc(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 eu(e){const t=Object.create(null),n=String(e);let r=0,i=!1,o=!1;function a(s){const c=Lr(n.slice(r,s)),d=c.indexOf("=");if(d<1)return;const h=Lr(c.slice(0,d));if(!Zc.test(h))return;const m=h.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const w=Lr(c.slice(d+1));t[m]=Qc(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 tu=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fr(e,t,n,r,i){if(_.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_.isString(t)){if(_.isString(r))return t.indexOf(r)!==-1;if(_.isRegExp(r))return r.test(t)}}function nu(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ru(e,t){const n=_.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=_.findKey(i,h);(!m||i[m]===void 0||d===!0||d===void 0&&i[m]!==!1)&&(i[m||c]=zn(s))}const a=(s,c)=>_.forEach(s,(d,h)=>o(d,h,c));if(_.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(_.isString(t)&&(t=t.trim())&&!tu(t))a(Wc(t),n);else if(_.isObject(t)&&_.isSafeIterable(t)){let s=Object.create(null),c,d;for(const h of t){if(!_.isArray(h))throw new TypeError("Object iterator must return a key-value pair");d=h[0],_.hasOwnProp(s,d)?(c=s[d],s[d]=_.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=_.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Jc(i);if(_.isFunction(n))return n.call(this,i,r);if(_.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=_.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Fr(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=_.findKey(r,a);s&&(!n||Fr(r,r[s],s,n))&&(delete r[s],i=!0)}}return _.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||Fr(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return _.forEach(this,(i,o)=>{const a=_.findKey(r,o);if(a){n[a]=zn(i),delete n[o];return}const s=t?nu(o):String(o).trim();s!==o&&delete n[o],n[s]=zn(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_.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 _.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 eu(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]||(ru(i,a),r[s]=!0)}return _.isArray(t)?t.forEach(o):o(t),this}};$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_.reduceDescriptors($e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),_.freezeMethods($e);const Hn="[REDACTED ****]";function iu(e){if(_.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(_.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function ou(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],i=o=>{if(o===null||typeof o!="object"||_.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof $e&&(o=o.toJSON()),r.push(o);let a;if(_.isArray(o))a=[],o.forEach((s,c)=>{const d=i(s);_.isUndefined(d)||(a[c]=d)});else{if(!_.isPlainObject(o)&&iu(o))return r.pop(),o;a=Object.create(null);for(const[s,c]of Object.entries(o)){const d=n.has(s.toLowerCase())?Hn:i(c);_.isUndefined(d)||(a[s]=d)}}return r.pop(),a};return i(e)}function Ro(e){try{return String(e)}catch{return""}}function au(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 kl extends Error{static from(t,n,r,i,o,a){let s=t.message;!s&&_.isArray(t.errors)&&t.errors.length&&(s=au(t));const c=new kl(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&&_.hasOwnProp(t,"redact")?t.redact:void 0,r=_.isArray(n)&&n.length>0?ou(t,n):_.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 su=null,To=100;function $r(e){return _.isPlainObject(e)||_.isArray(e)}function Po(e){return _.endsWith(e,"[]")?e.slice(0,-2):e}function Vr(e,t,n){return e?e.concat(t).map(function(i,o){return i=Po(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function lu(e){return _.isArray(e)&&!e.some($r)}const cu=_.toFlatObject(_,{},null,function(t){return/^is[A-Z]/.test(t)});function Wn(e,t,n){if(!_.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(D,y){return!_.isUndefined(y[D])});const r=n.metaTokens,i=n.visitor||O,o=n.dots,a=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?To:n.maxDepth,d=s&&_.isSpecCompliantForm(t),h=[];if(!_.isFunction(i))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(_.isDate(S))return S.toISOString();if(_.isBoolean(S))return S.toString();if(!d&&_.isBlob(S))throw new ne("Blob is not supported. Use a Buffer instead.");if(_.isArrayBuffer(S)||_.isTypedArray(S)){if(d&&typeof s=="function")return new s([S]);throw new ne("Blob is not supported. Use a Buffer instead.",ne.ERR_NOT_SUPPORT)}return S}function w(S){if(S>c)throw new ne("Object is too deeply nested ("+S+" levels). Max depth: "+c,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(S,D){if(c===1/0)return JSON.stringify(S);const y=[];return JSON.stringify(S,function(R,N){if(!_.isObject(N))return N;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(N),w(D+y.length-1),N})}function O(S,D,y){let v=S;if(_.isReactNative(t)&&_.isReactNativeBlob(S))return t.append(Vr(y,D,o),m(S)),!1;if(S&&!y&&typeof S=="object"){if(_.endsWith(D,"{}"))D=r?D:D.slice(0,-2),S=g(S,1);else if(_.isArray(S)&&lu(S)||(_.isFileList(S)||_.endsWith(D,"[]"))&&(v=_.toArray(S)))return D=Po(D),v.forEach(function(N,x){!(_.isUndefined(N)||N===null)&&t.append(a===!0?Vr([D],x,o):a===null?D:D+"[]",m(N))}),!1}return $r(S)?!0:(t.append(Vr(y,D,o),m(S)),!1)}const B=Object.assign(cu,{defaultVisitor:O,convertValue:m,isVisitable:$r});function C(S,D,y=0){if(!_.isUndefined(S)){if(w(y),h.indexOf(S)!==-1)throw new Error("Circular reference detected in "+D.join("."));h.push(S),_.forEach(S,function(R,N){(!(_.isUndefined(R)||R===null)&&i.call(t,R,_.isString(N)?N.trim():N,D,B))===!0&&C(R,D?D.concat(N):[N],y+1)}),h.pop()}}if(!_.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 jr(e,t){this._pairs=[],e&&Wn(e,this,t)}const Do=jr.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 uu(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=_.isFunction(n)?{serialize:n}:n,i=_.getSafeProp(r,"encode")||uu,o=_.getSafeProp(r,"serialize");let a;if(o?a=o(t,r):a=_.isURLSearchParams(t)?t.toString():new jr(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){_.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ur={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},fu={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:jr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},zr=typeof window<"u"&&typeof document<"u",Hr=typeof navigator=="object"&&navigator||void 0,du=zr&&(!Hr||["ReactNative","NativeScript","NS"].indexOf(Hr.product)<0),pu=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hu=zr&&window.location.href||"http://localhost",Me={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zr,hasStandardBrowserEnv:du,hasStandardBrowserWebWorkerEnv:pu,navigator:Hr,origin:hu},Symbol.toStringTag,{value:"Module"})),...fu};function mu(e,t){return Wn(e,new Me.classes.URLSearchParams,{visitor:function(n,r,i,o){return Me.isNode&&_.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 yu(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 gu(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&&_.isArray(i)?i.length:a,c?(_.hasOwnProp(i,a)?i[a]=_.isArray(i[a])?i[a].concat(r):[i[a],r]:i[a]=r,!s):((!_.hasOwnProp(i,a)||!_.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&_.isArray(i[a])&&(i[a]=gu(i[a])),!s)}if(_.isFormData(e)&&_.isFunction(e.entries)){const n={};return _.forEachEntry(e,(r,i)=>{t(yu(r),i,n,0)}),n}return null}const sn=(e,t)=>e!=null&&_.hasOwnProp(e,t)?e[t]:void 0;function vu(e,t,n){if(_.isString(e))try{return(t||JSON.parse)(e),_.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _n={transitional:Ur,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=_.isObject(t);if(o&&_.isHTMLForm(t)&&(t=new FormData(t)),_.isFormData(t))return i?JSON.stringify(Lo(t)):t;if(_.isArrayBuffer(t)||_.isBuffer(t)||_.isStream(t)||_.isFile(t)||_.isBlob(t)||_.isReadableStream(t))return t;if(_.isArrayBufferView(t))return t.buffer;if(_.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 mu(t,c).toString();if((s=_.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=sn(this,"env"),h=d&&d.FormData;return Wn(s?{"files[]":t}:t,h&&new h,c)}}return o||i?(n.setContentType("application/json",!1),vu(t)):t}],transformResponse:[function(t){const n=sn(this,"transitional")||_n.transitional,r=n&&n.forcedJSONParsing,i=sn(this,"responseType"),o=i==="json";if(_.isResponse(t)||_.isReadableStream(t))return t;if(t&&_.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}}};_.forEach(["delete","get","head","post","put","patch","query"],e=>{_n.headers[e]={}});function Wr(e,t){const n=this||_n,r=t||n,i=$e.from(r.headers);let o=r.data;return _.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 wu(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function bu(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 Eu(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 qn=(e,t,n=3)=>{let r=0;const i=bu(50,250);return Eu(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=_.asap)=>(...n)=>t(()=>e(...n)),_u=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,xu=Me.hasStandardBrowserEnv?{write(e,t,n,r,i,o,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];_.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),_.isString(r)&&s.push(`path=${r}`),_.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),_.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 Su(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Au(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,Cu=/[\t\n\r]/g;function Ru(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Tu(e){return Ru(e).replace(Cu,"")}function Pu(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${Hn}`)}function Nu(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Hn}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Hn}`);return n===-1?i:`${i}#${Pu(t.slice(n+1))}`}function Uo(e,t){if(typeof e=="string"){const n=Tu(e);if(ku.test(n))throw new ne(`Invalid URL ${JSON.stringify(Nu(n))}: missing "//" after protocol`,ne.ERR_INVALID_URL,t)}}function zo(e,t,n,r){Uo(t,r);let i=!Su(t);return e&&(i||n===!1)?(Uo(e,r),Au(e,t)):t}const Ho=e=>e instanceof $e?{...e}:e,Du=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Wt(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 _.isPlainObject(h)&&_.isPlainObject(m)?_.merge.call({caseless:g},h,m):_.isPlainObject(m)?_.merge({},m):_.isArray(m)?m.slice():m}function i(h,m,w,g){if(_.isUndefined(m)){if(!_.isUndefined(h))return r(void 0,h,w,g)}else return r(h,m,w,g)}function o(h,m){if(!_.isUndefined(m))return r(void 0,m)}function a(h,m){if(_.isUndefined(m)){if(!_.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function s(h){const m=_.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!_.isUndefined(m))if(_.isPlainObject(m)){if(_.hasOwnProp(m,h))return m[h]}else return;const w=_.hasOwnProp(e,"transitional")?e.transitional:void 0;if(_.isPlainObject(w)&&_.hasOwnProp(w,h))return w[h]}function c(h,m,w){if(_.hasOwnProp(t,w))return r(h,m);if(_.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 _.forEach(Du({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const w=_.hasOwnProp(d,m)?d[m]:i,g=_.hasOwnProp(e,m)?e[m]:void 0,O=_.hasOwnProp(t,m)?t[m]:void 0,B=w(g,O,m);_.isUndefined(B)&&w!==c||(n[m]=B)}),_.hasOwnProp(t,"validateStatus")&&_.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(_.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Iu=["content-type","content-length"];function Ou(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{Iu.includes(r.toLowerCase())&&e.set(r,i)})}const Bu=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Wo(e){const t=Wt({},e),n=w=>_.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=_.getSafeProp(c,"username")||"",g=_.getSafeProp(c,"password")||"";try{s.set("Authorization","Basic "+btoa(w+":"+(g?Bu(g):"")))}catch(O){throw ne.from(O,ne.ERR_BAD_OPTION_VALUE,e)}}if(_.isFormData(r)&&(Me.hasStandardBrowserEnv||Me.hasStandardBrowserWebWorkerEnv||_.isReactNative(r)?s.setContentType(void 0):_.isFunction(r.getHeaders)&&Ou(s,r.getHeaders(),n("formDataHeaderPolicy"))),Me.hasStandardBrowserEnv&&(_.isFunction(i)&&(i=i(t)),i===!0||i==null&&_u(t.url))){const g=o&&a&&xu.read(a);g&&s.set(o,g)}return t}const Mu=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,O;function B(){g&&g(),O&&O(),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 S(){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(x){n(x),B()},function(x){r(x),B()},R),C=null}"onloadend"in C?C.onloadend=S:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.startsWith("file:"))||setTimeout(S)},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",N=new ne(R,ne.ERR_NETWORK,e,C);N.event=v||null,r(N),B(),C=null},C.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const R=i.transitional||Ur;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&&_.forEach(ko(a),function(v,R){C.setRequestHeader(R,v)}),_.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),s&&s!=="json"&&(C.responseType=i.responseType),d&&([w,O]=qn(d,!0),C.addEventListener("progress",w)),c&&C.upload&&([m,g]=qn(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 D=wu(i.url);if(D&&!Me.protocols.includes(D)){r(new ne("Unsupported protocol "+D+":",ne.ERR_BAD_REQUEST,e)),B();return}C.send(o||null)})},Lu=(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=()=>_.asap(a),s},Fu=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},$u=async function*(e,t){for await(const n of Vu(e))yield*Fu(n,t)},Vu=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=$u(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,ju=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,Uu=e=>e===9||e===10||e===12||e===13||e===32,zu=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},Hu=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)},Wu=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),!Uu(a)){if(a===61){r++;continue}if(!ju(a)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?Hu(e):zu(n)},qu=(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 Yu(e){const t=typeof e=="string"?e.indexOf("#"):-1;return qu(t===-1?e:e.slice(0,t),Wu)}const qr="1.19.0",Xo=64*1024,{isFunction:Yn}=_,Ku=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Jo=e=>{if(!_.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Zo=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Gu=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Xu=e=>{const t=_.global!==void 0&&_.global!==null?_.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=_.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:o,Response:a}=e,s=i?Yn(i):typeof fetch=="function",c=Yn(o),d=Yn(a);if(!s)return!1;const h=s&&Yn(n),m=s&&(typeof r=="function"?(S=>D=>S.encode(D))(new r):async S=>new Uint8Array(await new o(S).arrayBuffer())),w=c&&h&&Zo(()=>{let S=!1;const D=new o(Me.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),y=D.headers.has("Content-Type");return D.body!=null&&D.body.cancel(),S&&!y}),g=d&&h&&Zo(()=>_.isReadableStream(new a("").body)),O={stream:g&&(S=>S.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!O[S]&&(O[S]=(D,y)=>{let v=D&&D[S];if(v)return v.call(D);throw new ne(`Response type '${S}' is not supported`,ne.ERR_NOT_SUPPORT,y)})});const B=async S=>{if(S==null)return 0;if(_.isBlob(S))return S.size;if(_.isSpecCompliantForm(S))return(await new o(Me.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(_.isArrayBufferView(S)||_.isArrayBuffer(S))return S.byteLength;if(_.isURLSearchParams(S)&&(S=S+""),_.isString(S))return(await m(S)).byteLength},C=async(S,D)=>{const y=_.toFiniteNumber(S.getContentLength());return y??B(D)};return async S=>{let{url:D,method:y,data:v,signal:R,cancelToken:N,timeout:x,onDownloadProgress:E,onUploadProgress:V,responseType:F,headers:T,withCredentials:W="same-origin",fetchOptions:re,maxContentLength:J,maxBodyLength:H}=Wo(S);const Y=_.isNumber(J)&&J>-1,Z=_.isNumber(H)&&H>-1,q=se=>_.hasOwnProp(S,se)?S[se]:void 0;let K=i||fetch;F=F?(F+"").toLowerCase():"text";let I=Lu([R,N&&N.toAbortSignal()],x),j=null;const k=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let P,U=null;const ie=()=>new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,S,j);try{let se;const p=q("auth");if(p){const oe=_.getSafeProp(p,"username")||"",M=_.getSafeProp(p,"password")||"";se={username:oe,password:M}}if(Gu(D)){const oe=new URL(D,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="",D=oe.href)}if(se&&(T.delete("authorization"),T.set("Authorization","Basic "+btoa(Ku((se.username||"")+":"+(se.password||""))))),Y&&typeof D=="string"&&D.startsWith("data:")&&Yu(D)>J)throw new ne("maxContentLength size of "+J+" exceeded",ne.ERR_BAD_RESPONSE,S,j);if(Z&&y!=="get"&&y!=="head"){const oe=await B(v);if(typeof oe=="number"&&isFinite(oe)&&(P=oe,oe>H))throw ie()}const f=Z&&(_.isReadableStream(v)||_.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(P=P??await C(T,v),P!==0||f){let oe=new o(D,{method:"POST",body:v,duplex:"half"}),M;if(_.isFormData(v)&&(M=oe.headers.get("content-type"))&&T.setContentType(M),oe.body){const[G,Q]=V&&Vo(P,qn(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,S,j);_.isString(W)||(W=W?"include":"omit");const b=c&&"credentials"in o.prototype;if(_.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/"+qr,!1);const A={...re,signal:I,method:y.toUpperCase(),headers:ko(T.normalize()),body:v,duplex:"half",credentials:b?W:void 0};j=c&&new o(D,A);let L=await(c?K(j,re):K(D,A));const ee=$e.from(L.headers);if(Y){const oe=_.toFiniteNumber(ee.getContentLength());if(oe!=null&&oe>J)throw new ne("maxContentLength size of "+J+" exceeded",ne.ERR_BAD_RESPONSE,S,j)}const fe=g&&(F==="stream"||F==="response");if(g&&L.body&&(E||Y||fe&&k)){const oe={};["status","statusText","headers"].forEach(ve=>{oe[ve]=L[ve]});const M=_.toFiniteNumber(ee.getContentLength()),[G,Q]=E&&Vo(M,qn(jo(E),!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,S,j);G&&G(ve)};L=new a(qo(L.body,Xo,ye,()=>{Q&&Q(),k&&k()}),oe)}F=F||"text";let me=await O[_.findKey(O,F)||"text"](L,S);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,S,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:S,request:j})})}catch(se){if(k&&k(),I&&I.aborted&&I.reason instanceof ne){const p=I.reason;throw p.config=S,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,S,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,S,j,se&&se.response)}}},Ju=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=Ju;for(;s--;)c=o[s],d=h.get(c),d===void 0&&h.set(c,d=s?new Map:Xu(t)),h=d;return d};Qo();const Yr={http:su,xhr:Mu,fetch:{get:Qo}};_.forEach(Yr,(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}`,Zu=e=>_.isFunction(e)||e===null||e===!1;function Qu(e,t){e=_.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,!Zu(r)&&(i=Yr[(s=String(r)).toLowerCase()],i===void 0))throw new ne(`Unknown adapter '${s}'`);if(i&&(_.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:Qu,adapters:Yr};function Kr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xn(null,e)}function Gr(e){return Kr(e),e.headers=$e.from(e.headers),e.data=Wr.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){Kr(e),e.response=r;try{r.data=Wr.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=$e.from(r.headers),r},function(r){if(!Fo(r)&&(Kr(e),r&&r.response)){e.response=r.response;try{r.response.data=Wr.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=$e.from(r.response.headers)}return Promise.reject(r)})}const Kn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Kn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const na={};Kn.transitional=function(t,n,r){function i(o,a){return"[Axios v"+qr+"] 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}},Kn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ef(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 Gn={assertOptions:ef,validators:Kn},Ve=Gn.validators;let qt=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
6
  `);return a===-1?"":i.stack.slice(a+1)})();try{if(!r.stack)r.stack=o;else if(o){const a=o.indexOf(`
7
7
  `),s=a===-1?-1:o.indexOf(`
8
- `,a+1),f=s===-1?"":o.slice(s+1);String(r.stack).endsWith(f)||(r.stack+=`
9
- `+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Lt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Un.assertOptions(r,{silentJSONParsing:$e.transitional($e.boolean),forcedJSONParsing:$e.transitional($e.boolean),clarifyTimeoutError:$e.transitional($e.boolean),legacyInterceptorReqResOrdering:$e.transitional($e.boolean),advertiseZstdAcceptEncoding:$e.transitional($e.boolean),validateStatusUndefinedResolves:$e.transitional($e.boolean)},!1),i!=null&&(w.isFunction(i)?n.paramsSerializer={serialize:i}:Un.assertOptions(i,{encode:$e.function,serialize:$e.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Un.assertOptions(n,{baseUrl:$e.spelling("baseURL"),withXsrfToken:$e.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&w.merge(o.common,o[n.method]);o&&w.forEach(["delete","get","head","post","put","patch","query","common"],Y=>{delete o[Y]}),n.headers=Fe.concat(a,o);const s=[];let f=!0;this.interceptors.request.forEach(function(U){if(typeof U.runWhen=="function"&&U.runWhen(n)===!1)return;f=f&&U.synchronous;const D=n.transitional||Nr;D&&D.legacyInterceptorReqResOrdering?s.unshift(U.fulfilled,U.rejected):s.push(U.fulfilled,U.rejected)});const d=[];this.interceptors.response.forEach(function(U){d.push(U.fulfilled,U.rejected)});let h,m=0,R;if(!f){const Y=[Lr.bind(this),void 0];for(Y.unshift(...s),Y.push(...d),R=Y.length,h=Promise.resolve(n);m<R;)h=h.then(Y[m++],Y[m++]);return h}R=s.length;let L=n;for(;m<R;){const Y=s[m++],U=s[m++];try{L=Y?Y(L):L}catch(D){if(!U){h=Promise.reject(D);break}try{const S=U.call(this,D);w.isThenable(S)&&(h=Promise.resolve(S).then(()=>Lr.call(this,L)))}catch(S){h=Promise.reject(S)}break}}if(!h)try{h=Lr.call(this,L)}catch(Y){h=Promise.reject(Y)}for(m=0,R=d.length;m<R;)h=h.then(d[m++],d[m++]);return h}getUri(t){t=Lt(this.defaults,t);const n=Co(t.baseURL,t.url,t.allowAbsoluteUrls,t);return go(n,t.params,t.paramsSerializer)}};w.forEach(["delete","get","head","options"],function(t){Ft.prototype[t]=function(n,r){return this.request(Lt(r||{},{method:t,url:n,data:r&&w.hasOwnProp(r,"data")?r.data:void 0}))}}),w.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,a,s){return this.request(Lt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Ft.prototype[t]=n(),t!=="query"&&(Ft.prototype[t+"Form"]=n(!0))});let Su=class Xs{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 yn(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 Xs(function(i){t=i}),cancel:t}}};function Au(e){return function(n){return e.apply(null,n)}}function ku(e){return w.isObject(e)&&e.isAxiosError===!0}const Fr={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(Fr).forEach(([e,t])=>{Fr[t]=e});function jo(e){const t=new Ft(e),n=Zi(Ft.prototype.request,t);return w.extend(n,Ft.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return jo(Lt(e,i))},n}const Pe=jo(mn);Pe.Axios=Ft,Pe.CanceledError=yn,Pe.CancelToken=Su,Pe.isCancel=_o,Pe.VERSION=Or,Pe.toFormData=Fn,Pe.AxiosError=ne,Pe.Cancel=Pe.CanceledError,Pe.all=function(t){return Promise.all(t)},Pe.spread=Au,Pe.isAxiosError=ku,Pe.mergeConfig=Lt,Pe.AxiosHeaders=Fe,Pe.formToJSON=e=>Eo(w.isHTMLForm(e)?new FormData(e):e),Pe.getAdapter=$o.getAdapter,Pe.HttpStatusCode=Fr,Pe.default=Pe;const{Axios:xy,AxiosError:Sy,CanceledError:Ay,isCancel:ky,CancelToken:Cy,VERSION:Ry,all:Ty,Cancel:Ny,isAxiosError:Py,spread:Dy,toFormData:Iy,AxiosHeaders:Oy,HttpStatusCode:By,formToJSON:My,getAdapter:Ly,mergeConfig:Fy,create:$y}=Pe,ht={baseURL:"",timeout:6e4,getToken:void 0};function Uo(e={}){e.baseURL!==void 0&&(ht.baseURL=e.baseURL),e.timeout!==void 0&&(ht.timeout=e.timeout),e.getToken!==void 0&&(ht.getToken=e.getToken)}const Cu="";function Ru(e){return(e||"").replace(/\/$/,"")||Cu}const zn=Pe.create({timeout:ht.timeout});zn.interceptors.request.use(e=>{var n;e.baseURL=Ru(ht.baseURL||e.baseURL),e.timeout=ht.timeout;const t=(n=ht.getToken)==null?void 0:n.call(ht);return t&&(e.headers.Authorization=t),e}),zn.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 Ee(e){return zn.request(e)}const zo=e=>Ee({url:"/server/repository/flowdef/event/latest",method:"post",data:e}),$r=e=>Ee({url:"/server/app/event/list",method:"get",data:e}),Vr=e=>Ee({url:"/server/repository/flowdef/event/query",method:"post",data:e}),jr=(e,t)=>Ee({url:`/console/plugin/simulate/event/page/draft/${e.currentPage}/${e.pageSize}`,method:"post",data:t}),Ho=e=>Ee({url:"/console/plugin/simulate/event/delete",method:"post",data:e}),Wo=e=>Ee({url:"/console/plugin/simulate",method:"post",data:e}),qo=e=>Ee({url:"/server/runtime/event/start",method:"post",data:e}),Ur=e=>Ee({url:"/server/runtime/event/quickStart",method:"post",data:e}),Hn=e=>Ee({url:"/server/runtime/event/delete",method:"post",data:e}),Yo=e=>Ee({url:"/server/runtime/event/messageEventReceived",method:"post",data:e}),Wn=e=>Ee({url:"/server/work/event/query",method:"post",data:e}),zr=e=>Ee({url:"/server/history/workinst/event/query",method:"post",data:e}),Hr=e=>Ee({url:"/server/operate/def/event/get",method:"post",data:e}),Wr=e=>Ee({url:"/server/task/event/claim",method:"post",data:e}),qr=e=>Ee({url:"/server/task/event/withdraw",method:"post",data:e}),Yr=e=>Ee({url:"/server/task/event/rollback",method:"post",data:e}),Kr=e=>Ee({url:"/server/task/event/recyle",method:"post",data:e}),Gr=e=>Ee({url:"/server/task/event/complete",method:"post",data:e}),Xr=e=>Ee({url:"/server/task/event/turnBefore",method:"post",data:e}),Jr=e=>Ee({url:"/server/task/event/turnAfter",method:"post",data:e}),Zr=e=>Ee({url:"/server/runtime/event/suspend",method:"post",data:e}),Qr=e=>Ee({url:"/server/runtime/event/activate",method:"post",data:e}),ei=e=>Ee({url:"/server/runtime/event/terminate",method:"post",data:e}),ti=e=>Ee({url:`/console/flowdef/event/download/procdefId/${e.procdefId}/extname/bpmn`,method:"get",noCode:!0}),ni=e=>Ee({url:"/server/task/event/send",method:"post",data:e}),qn=e=>Ee({url:"/server/model/event/get/firsthandle",method:"post",data:e}),Ko=qn,Yn=e=>Ee({url:"/server/assignment/event/query",method:"post",data:e}),ri=(e="")=>Ee({url:`/console/plugin/identify/usertree/organ/event/tree/${e}`,method:"get"}),ii=e=>Ee({url:"/server/model/event/get/succeding",method:"post",data:e}),oi=e=>Ee({url:"/server/task/event/jump",method:"post",data:e}),ai=e=>Ee({url:"/server/model/event/get/usertasks",method:"post",data:e}),Tu=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:Qr,claimTask:Wr,completeTask:Gr,deleteDraftTask:Ho,deleteProcessInstance:Hn,doneTaskList:zr,downloadBpmn:ti,draftFlowList:zo,draftTaskList:jr,flowStartNodeList:Ko,getAppList:$r,getFirstHandleNodes:qn,getFlowList:Vr,getOptList:Hr,jumpTask:oi,nextSendNode:ii,nodeAssistant:Yn,organUserTree:ri,quickStart:Ur,receiveMessageEvent:Yo,recycleTask:Kr,revocationTask:qr,rollbackTask:Yr,saveDraft:Wo,sendTask:ni,startDraft:qo,startNodes:ai,suspendFlow:Zr,terminateFlow:ei,todoTaskList:Wn,turnAfterTask:Jr,turnBeforeTask:Xr},Symbol.toStringTag,{value:"Module"})),Go=3e3;function Kn(e){if(e!==void 0)return e;if(typeof window>"u"||typeof document>"u")return Go;let t=Go-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 Nu={class:"ui-flow-jump"},Pu={class:"dialog-footer"},Xo=Et(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),f=l.ref(!1),d=l.ref(!1),h=l.ref([]),m=l.ref([]),R=l.ref(""),L=l.ref("");let Y=0;const U=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),D=l.computed(()=>String(r.dealUser.name||U.value)),S={children:"children",label:"label",value:"value",disabled:"disabled",isLeaf:B=>B.hasChild===!1};function I(B){return B?String(B.id||B.activityId||""):""}function y(B){return B?String(B.activityName||B.name||B.id||B.activityId||""):""}function v(B){return Array.isArray(B)?B.map(O=>{const $=O||{},C=I($);return{...$,id:C,name:y($)}}).filter(O=>O.id):[]}function A(B){return B.map(O=>{const $=O||{},C=String($.id||$.userId||""),k=String($.ntype||"user"),V=Array.isArray($.childs)?$.childs:Array.isArray($.children)?$.children:void 0;return{...$,id:C,value:C,label:String($.caption||$.name||$.id||$.userId||""),caption:String($.caption||$.name||$.id||$.userId||""),ntype:k,hasChild:!!($.hasChild||V!=null&&V.length),disabled:k!=="user",children:V?A(V):void 0}}).filter(O=>O.id)}function T(){return U.value?[{id:U.value,value:U.value,label:D.value,caption:D.value,name:D.value,ntype:"user",hasChild:!1,disabled:!1}]:[]}async function x(){const B=String(r.processDefinitionId||""),O=++Y;if(!B)return h.value=[],h.value;f.value=!0;try{const $=await ai({processDefinitionId:B}),C=v($==null?void 0:$.data);return O!==Y||B!==String(r.processDefinitionId||"")?C:(h.value=C,h.value)}catch($){throw O===Y&&(h.value=[]),i("error",$),$}finally{O===Y&&(f.value=!1)}}async function E(B="",O){const $=await Yn({processDefinitionId:String(r.processDefinitionId),activityId:R.value,ntype:O||"",parentId:B,userId:U.value,extendParams:{...r.assignmentQueryParams}});return A(Array.isArray($.data)?$.data:[])}async function j(){if(m.value=[],L.value="",!R.value)return[];d.value=!0;try{const B=await E();m.value=B.length?B:T()}catch{m.value=T()}finally{d.value=!1}return m.value.length===1&&m.value[0].ntype==="user"&&(L.value=m.value[0].id),m.value}async function M(B,O){if(B.level===0){O(m.value);return}if(B.data.hasChild===!1||B.data.ntype==="user"){O([]);return}if(Array.isArray(B.data.children)&&B.data.children.length){O(B.data.children);return}try{const $=await E(String(B.data.id),String(B.data.ntype||""));O($)}catch($){i("error",$),O([])}}async function _(){await j()}function q(B,O){const $=B?I(B):R.value,C=String(O||L.value||U.value);return{workId:r.workId,flowNodeAssignee:{activityId:$,assignees:[{name:C,userId:C}]},variables:{}}}async function re(B){const O=B||q();i("beforeJump",O),s.value=!0;try{const $=await oi(O);return i("afterJump",$,O),$}catch($){throw i("error",$),$}finally{s.value=!1}}async function Z(){if(!r.workId){_e.ElMessage.warning("当前任务缺少 workId,无法执行跳转");return}if(!R.value){_e.ElMessage.warning("请选择开始节点");return}if(!L.value){_e.ElMessage.warning("请选择办理人");return}try{await re(),o.value=!1,_e.ElMessage.success("跳转任务成功")}catch{}}async function H(){a.value=Kn(r.zIndex),o.value=!0,R.value="",L.value="",m.value=[],i("open");try{await x()}catch{}}function G(){o.value=!1}function ee(){i("close")}function X(){i("click"),H()}return l.watch(()=>r.modelValue,B=>{B&&!o.value&&H(),!B&&o.value&&(o.value=!1)}),l.watch(o,B=>i("update:modelValue",B)),l.watch(()=>r.processDefinitionId,()=>{R.value="",L.value="",m.value=[],r.processDefinitionId?x().catch(()=>{}):h.value=[]}),l.watch(U,()=>{o.value&&R.value&&j()}),l.onMounted(()=>{r.modelValue?H():r.processDefinitionId&&x().catch(()=>{})}),t({visible:o,effectiveZIndex:a,loading:s,nodeLoading:f,assigneeLoading:d,startNodeList:h,selectedActivityId:R,selectedAssigneeId:L,open:H,close:G,getStartNodes:x,assembleData:q,jump:re}),(B,O)=>{const $=l.resolveComponent("el-button"),C=l.resolveComponent("el-option"),k=l.resolveComponent("el-select"),V=l.resolveComponent("el-form-item"),he=l.resolveComponent("el-tree-select"),ae=l.resolveComponent("el-form"),p=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",Nu,[e.showTrigger?(l.openBlock(),l.createBlock($,{key:0,type:"primary",loading:s.value,onClick:X},{default:l.withCtx(()=>[l.renderSlot(B.$slots,"default",{},()=>[O[3]||(O[3]=l.createTextVNode("跳转",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(p,{modelValue:o.value,"onUpdate:modelValue":O[2]||(O[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:ee},{footer:l.withCtx(()=>[l.createElementVNode("div",Pu,[l.createVNode($,{type:"primary",loading:s.value,onClick:Z},{default:l.withCtx(()=>[...O[4]||(O[4]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode($,{disabled:s.value,onClick:G},{default:l.withCtx(()=>[...O[5]||(O[5]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createVNode(ae,{class:"jump-form","label-width":"108px"},{default:l.withCtx(()=>[l.createVNode(V,{label:"开始节点",required:""},{default:l.withCtx(()=>[l.createVNode(k,{modelValue:R.value,"onUpdate:modelValue":O[0]||(O[0]=u=>R.value=u),clearable:"",filterable:"",loading:f.value,teleported:!1,placeholder:"请选择",style:{width:"100%"},onChange:_},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,u=>(l.openBlock(),l.createBlock(C,{key:I(u),label:y(u),value:I(u)},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),l.createVNode(V,{label:"办理人",required:""},{default:l.withCtx(()=>[l.createVNode(he,{modelValue:L.value,"onUpdate:modelValue":O[1]||(O[1]=u=>L.value=u),"check-strictly":"",clearable:"",data:m.value,disabled:!R.value,load:M,loading:d.value,props:S,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-40cc6874"]]),Du={class:"ui-flow-send"},Iu={class:"send-panel"},Ou={class:"current-activity"},Bu={class:"node-groups"},Mu=["onClick"],Lu={class:"group-name"},Fu={class:"group-deal-type"},$u={class:"send-center"},Vu={class:"assignee-transfer"},ju={class:"assignee-box"},Uu={class:"tree-node"},zu={key:1,class:"candidate-list"},Hu={class:"assignee-box selected-list"},Wu={key:0,class:"node-state"},qu={class:"opinion-panel"},Yu={class:"dialog-footer"},si=Et(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(),f=l.ref(!1),d=l.ref(!1),h=l.ref(!1),m=l.ref(!1),R=l.ref([]),L=l.ref([]),Y=l.ref([]),U=l.ref([]),D=l.ref([]),S=l.ref(!1),I=l.ref(""),y=l.ref("nextNode"),v=l.ref(""),A=l.ref([]),T=l.ref(!1),x=l.ref(0),E=l.ref(),j=l.ref(!1),M={children:"childs",label:"caption",isLeaf:z=>z.hasChild===!1},_=l.computed(()=>String(i.dealUser.userId||i.dealUser.id||"")),q=l.computed(()=>L.value.find(z=>re(z)===I.value));function re(z){return z?String(z.id||z.activityId||""):""}function Z(z){return["userTask","USER_TASK"].includes(String(z.flowElementType||""))}function H(z){return`${z.activity}:${z.id}`}function G(z){return typeof z=="boolean"?"boolean":typeof z=="number"?Number.isInteger(z)?"integer":"double":z instanceof Date?"date":"string"}function ee(){A.value=Object.entries(i.variables).map(([z,K])=>({variableName:z,variableType:G(K),variableValue:K})),T.value=!1}function X(){return A.value.reduce((z,K)=>(K.variableName&&(z[K.variableName]=K.variableValue),z),{})}function B(){I.value="",R.value=[],L.value=[],Y.value=[],U.value=[],D.value=[],S.value=!1}function O(z){if(!i.bpmnXml||!z||typeof DOMParser>"u")return;const K=new DOMParser().parseFromString(i.bpmnXml,"text/xml");return Array.from(K.getElementsByTagName("*")).find(pe=>pe.getAttribute("id")===z)}function $(z){if(i.forceSingleAssignee)return!0;const K=O(z);if(!K)return!0;if(Array.from(K.children||[]).some(Je=>Je.localName==="multiInstanceLoopCharacteristics"))return!1;const J=["assigneUser","candidateUser"],we=Array.from(K.getElementsByTagName("*")).filter(Je=>Je.localName==="properties"&&J.includes(Je.getAttribute("type")||"")).flatMap(Je=>Array.from(Je.getElementsByTagName("*")).filter(je=>je.localName==="property"));if(we.some(Je=>{const je=Je.getAttribute("assignType");return!!(je&&je!=="user")}))return!1;const be=we.map(Je=>Je.getAttribute("value")).filter(Boolean),rt=K.getAttribute("camunda:assignee")||"";return rt&&!rt.includes("${")&&be.push(...rt.split(",").filter(Boolean)),new Set(be).size<=1}function C(z){var K;return((K=L.value.find(pe=>re(pe)===z))==null?void 0:K.isSingleAssignee)!==!1}function k(z){return String(z||"").trim().toLowerCase()}function V(z){if(i.forceSingleAssignee)return!0;const K=k(z.dealType);return K?["signle","single"].includes(K):$(re(z))}function he(z){const K=L.value.find(pe=>re(pe)===z);return K?String(r[k(K.dealType)]||(K.isSingleAssignee?"单人单办":"多人办理")):""}function ae(z,K){const pe=re(K),J=String(K.activityName||K.name||pe);return z.map(we=>{const be=we||{};return{...be,id:String(be.id||""),caption:String(be.caption||be.name||be.id||""),ntype:String(be.ntype||"user"),hasChild:be.hasChild,activity:pe,activityName:J,disabled:be.ntype!=="user",childs:Array.isArray(be.childs)?ae(be.childs,K):void 0}})}async function p(z,K="",pe=""){m.value=!0;try{const J=await Yn({processDefinitionId:String(i.processDefinitionId),activityId:re(z),parentId:K,ntype:pe,userId:_.value,extendParams:{...i.assignmentQueryParams}}),we=ae(Array.isArray(J.data)?J.data:[],z);return K?we:I.value!==re(z)?[]:(S.value=we.some(be=>["router","organ"].includes(be.ntype||"")),S.value?(U.value=we,Y.value=[],await l.nextTick(),ce(we)):(U.value=[],Y.value=we),we)}catch(J){throw o("error",J),J}finally{m.value=!1}}async function u(z,K){if(z.level===0){K(U.value);return}if(z.data.hasChild===!1||!q.value){K([]);return}if(Array.isArray(z.data.childs)&&z.data.childs.length){K(z.data.childs),await l.nextTick(),ce(z.data.childs);return}try{const pe=await p(q.value,String(z.data.id),String(z.data.ntype||""));K(pe),await l.nextTick(),ce(pe)}catch{K([])}}async function c(z=X()){const K=++x.value;d.value=!0,h.value=!1,B();try{const pe=await ii({processDefinitionId:i.processDefinitionId,activityId:i.activity.activityId,processInstanceId:i.processInstanceId,workId:i.workId,variables:z});if(K!==x.value)return[];R.value=pe.data||[],L.value=R.value.filter(Z).map(we=>({...we,isSingleAssignee:V(we)})),h.value=!0,T.value=!1,o("nextNodesResolved",R.value);const J=L.value[0];if(J){I.value=re(J);try{await p(J)}catch{}}return R.value}catch(pe){throw K===x.value&&(h.value=!1),o("error",pe),pe}finally{K===x.value&&(d.value=!1)}}async function g(z){I.value=re(z),Y.value=[],U.value=[],S.value=!1;try{await p(z)}catch{}}function b(z){return D.value.some(K=>H(K)===H(z))}function P(z,K){const pe=H(z);K?(C(z.activity)&&(D.value=D.value.filter(J=>J.activity!==z.activity)),D.value.some(J=>H(J)===pe)||D.value.push({...z})):D.value=D.value.filter(J=>H(J)!==pe)}function Q(z,K){z.ntype==="user"&&(K&&C(z.activity)&&D.value.filter(J=>J.activity===z.activity).forEach(J=>{var we;return(we=E.value)==null?void 0:we.setChecked(J.id,!1,!1)}),P(z,K))}function ce(z){z.forEach(K=>{var pe,J;K.ntype==="user"&&b(K)&&((pe=E.value)==null||pe.setChecked(K.id,!0,!1)),(J=K.childs)!=null&&J.length&&ce(K.childs)})}function N(z){var K;D.value=D.value.filter(pe=>H(pe)!==H(z)),S.value&&((K=E.value)==null||K.setChecked(z.id,!1,!1))}function F(){const z=D.value.reduce((K,pe)=>{let J=K.get(pe.activity);return J||(J={activityId:pe.activity,assignees:[]},K.set(pe.activity,J)),J.assignees.some(we=>we.userId===pe.id)||J.assignees.push({name:pe.id,userId:pe.id}),K},new Map);return{workId:i.workId,flowNodeAssignees:Array.from(z.values()),variables:X(),opinion:v.value}}async function W(z){const K=z||F();o("beforeSend",K),f.value=!0;try{const pe=await ni(K);return o("afterSend",pe,K),pe}catch(pe){throw o("error",pe),pe}finally{f.value=!1}}async function ie(){if(d.value){_e.ElMessage.warning("正在计算下一环节,请稍后再发送");return}if(T.value||!h.value){y.value="variables",_e.ElMessage.warning("流程变量已变化,请重新计算下一环节");return}const z=L.value.find(K=>!D.value.some(pe=>pe.activity===re(K)));if(z){I.value=re(z),y.value="nextNode",_e.ElMessage.warning(`请选择“${z.activityName||z.name||re(z)}”的办理人`),await g(z);return}try{await W(),j.value=!0,a.value=!1,_e.ElMessage.success("发送成功")}catch{}}async function ve(){s.value=Kn(i.zIndex),a.value=!0,j.value=!1,v.value=i.defaultOpinion,y.value="nextNode",ee(),o("open");try{await c(X())}catch{}}function Se(){a.value=!1}function de(){o("close"),!(!i.deleteInstanceOnCancel||j.value)&&i.processInstanceId&&Hn({processInstanceId:i.processInstanceId}).catch(z=>o("error",z))}function ye(){o("click"),ve()}return l.watch(()=>i.modelValue,z=>{z&&!a.value&&ve(),!z&&a.value&&(a.value=!1)}),l.watch(a,z=>o("update:modelValue",z)),l.onMounted(()=>{i.modelValue&&ve()}),t({visible:a,effectiveZIndex:s,loading:f,nodeLoading:d,nodeResolved:h,nextNodes:R,open:ve,close:Se,getNextNode:c,assembleData:F,send:W}),(z,K)=>{const pe=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",Du,[e.showTrigger?(l.openBlock(),l.createBlock(l.unref(_e.ElButton),{key:0,type:"primary",loading:f.value,onClick:ye},{default:l.withCtx(()=>[l.renderSlot(z.$slots,"default",{},()=>[K[3]||(K[3]=l.createTextVNode("发送",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(l.unref(_e.ElDialog),{modelValue:a.value,"onUpdate:modelValue":K[2]||(K[2]=J=>a.value=J),"append-to-body":"",class:"ui-flow-send-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":s.value,onClosed:de},{footer:l.withCtx(()=>[l.createElementVNode("div",Yu,[l.createVNode(l.unref(_e.ElButton),{type:"primary",loading:f.value,onClick:ie},{default:l.withCtx(()=>[...K[10]||(K[10]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(l.unref(_e.ElButton),{disabled:f.value,onClick:Se},{default:l.withCtx(()=>[...K[11]||(K[11]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createElementVNode("div",Iu,[l.createElementVNode("div",Ou,[K[4]||(K[4]=l.createTextVNode(" 当前环节:",-1)),l.createElementVNode("strong",null,l.toDisplayString(e.activity.activityName||e.activity.activityId),1)]),l.createElementVNode("aside",Bu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(L.value,J=>(l.openBlock(),l.createElementBlock("button",{key:re(J),class:l.normalizeClass(["node-group",{active:I.value===re(J)}]),type:"button",onClick:we=>g(J)},[K[5]||(K[5]=l.createElementVNode("span",{class:"group-avatar"},"♟",-1)),l.createElementVNode("span",Lu,l.toDisplayString(J.activityName||J.name||re(J)),1),l.createElementVNode("span",Fu,l.toDisplayString(he(re(J))),1)],10,Mu))),128)),h.value&&!L.value.length?(l.openBlock(),l.createBlock(l.unref(_e.ElEmpty),{key:0,description:"没有下一用户任务","image-size":44})):l.createCommentVNode("",!0)]),l.createElementVNode("section",$u,[l.createElementVNode("div",Vu,[l.withDirectives((l.openBlock(),l.createElementBlock("div",ju,[S.value?(l.openBlock(),l.createBlock(l.unref(_e.ElTree),{key:0,ref_key:"assigneeTreeRef",ref:E,class:"assignee-tree",data:U.value,load:u,props:M,"check-on-click-node":"","check-strictly":"",lazy:"","node-key":"id","show-checkbox":"",onCheckChange:Q},{default:l.withCtx(({data:J})=>[l.createElementVNode("span",Uu,[l.createElementVNode("span",null,l.toDisplayString(J.ntype==="user"?"●":"▣"),1),l.createElementVNode("span",null,l.toDisplayString(J.caption||J.id),1)])]),_:1},8,["data"])):(l.openBlock(),l.createElementBlock("div",zu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Y.value,J=>(l.openBlock(),l.createBlock(l.unref(_e.ElCheckbox),{key:H(J),"model-value":b(J),class:"candidate-item",onChange:we=>P(J,!!we)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(J.caption||J.name||J.id),1)]),_:2},1032,["model-value","onChange"]))),128)),!m.value&&!Y.value.length?(l.openBlock(),l.createBlock(l.unref(_e.ElEmpty),{key:0,description:"暂无可选办理人","image-size":44})):l.createCommentVNode("",!0)]))])),[[pe,m.value]]),K[7]||(K[7]=l.createElementVNode("div",{class:"transfer-arrows","aria-hidden":"true"},[l.createElementVNode("span",null,"→"),l.createElementVNode("span",null,"←")],-1)),l.createElementVNode("div",Hu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(D.value,J=>(l.openBlock(),l.createElementBlock("div",{key:H(J),class:"selected-user"},[l.createElementVNode("span",null,l.toDisplayString(J.caption||J.name||J.id),1),l.createVNode(l.unref(_e.ElButton),{link:"",type:"danger",onClick:we=>N(J)},{default:l.withCtx(()=>[...K[6]||(K[6]=[l.createTextVNode("移除",-1)])]),_:1},8,["onClick"])]))),128)),D.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.unref(_e.ElEmpty),{key:0,description:"暂未选择办理人","image-size":44}))])]),l.createVNode(l.unref(_e.ElTabs),{modelValue:y.value,"onUpdate:modelValue":K[0]||(K[0]=J=>y.value=J),type:"card",class:"send-tabs"},{default:l.withCtx(()=>[l.createVNode(l.unref(_e.ElTabPane),{label:"下一环节",name:"nextNode"},{default:l.withCtx(()=>[d.value?(l.openBlock(),l.createElementBlock("div",Wu,"正在根据流程变量计算下一环节...")):(l.openBlock(),l.createBlock(l.unref(_e.ElTable),{key:1,data:D.value,border:"",height:"190"},{empty:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(L.value.length?"请选择办理人":"暂无数据"),1)]),default:l.withCtx(()=>[l.createVNode(l.unref(_e.ElTableColumn),{prop:"activityName",label:"办理环节","min-width":"150"}),l.createVNode(l.unref(_e.ElTableColumn),{prop:"caption",label:"办理人","min-width":"130"},{default:l.withCtx(J=>{var we,be,rt;return[l.createTextVNode(l.toDisplayString(((we=J==null?void 0:J.row)==null?void 0:we.caption)||((be=J==null?void 0:J.row)==null?void 0:be.name)||((rt=J==null?void 0:J.row)==null?void 0:rt.id)||""),1)]}),_:1}),l.createVNode(l.unref(_e.ElTableColumn),{label:"办理方式",width:"120"},{default:l.withCtx(J=>[l.createTextVNode(l.toDisplayString(J!=null&&J.row?he(J.row.activity):""),1)]),_:1}),l.createVNode(l.unref(_e.ElTableColumn),{label:"操作",width:"90",align:"center"},{default:l.withCtx(J=>[J!=null&&J.row?(l.openBlock(),l.createBlock(l.unref(_e.ElButton),{key:0,link:"",type:"danger",onClick:we=>N(J.row)},{default:l.withCtx(()=>[...K[8]||(K[8]=[l.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):l.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"]))]),_:1})]),_:1},8,["modelValue"])]),l.createElementVNode("aside",qu,[K[9]||(K[9]=l.createElementVNode("label",null,"填写意见:",-1)),l.createVNode(l.unref(_e.ElInput),{modelValue:v.value,"onUpdate:modelValue":K[1]||(K[1]=J=>v.value=J),maxlength:"500",placeholder:"请输入意见",resize:"none","show-word-limit":"",type:"textarea"},null,8,["modelValue"])])])]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-99d5debc"]]),Ku={class:"button-group-wrapper"},Gu={key:0,class:"button-state"},Xu={key:0,class:"line"},Ju={key:2,class:"button-group-append"},Zu={class:"sign-selector"},Qu={class:"selected-sign-user"},ef={class:"sign-dialog-footer"},tf=Et(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),f=l.ref(),d=l.ref(!1),h=l.ref(!1),m=l.ref(),R=l.ref(),L=l.ref(!1),Y=l.ref("turnBefore"),U=l.ref(!1),D=l.ref(!1),S=l.ref([]),I=l.ref(),y=l.computed(()=>Y.value==="turnBefore"?"前加签":"后加签"),v={children:"children",label:"caption",disabled:"disabled",isLeaf:"isLeaf"};function A(N,...F){for(const W of F){const ie=N==null?void 0:N[W];if(ie!=null&&String(ie))return String(ie)}return""}function T(N){if(Array.isArray(N))return N;if(!N||typeof N!="object")return[];const F=N;for(const W of["records","list","content","rows"])if(Array.isArray(F[W]))return F[W];return[]}function x(N){const F=A(N,"name","operateName","code","value");if(!F)return;const W=A(N,"label","operateLabel","caption","title")||F;return{...N,name:F,label:W}}const E=l.computed(()=>i.workId||A(f.value,"workId","id")),j=l.computed(()=>i.processInstanceId||A(f.value,"processInstanceId")),M=l.computed(()=>i.processDefinitionId||A(f.value,"processDefinitionId")),_=l.computed(()=>i.taskId||A(f.value,"taskId","taskInstanceId")),q=l.computed(()=>i.activityId||A(f.value,"activityId")),re=l.computed(()=>i.activityName||A(f.value,"activityName")),Z=l.computed(()=>({id:i.dealUserId,userId:i.dealUserId,name:i.dealUserName||i.dealUserId}));function H(N="",F=""){return{action:N,actionLabel:F,workId:E.value,processInstanceId:j.value||void 0,processDefinitionId:M.value||void 0,taskId:_.value||void 0,activityId:q.value||void 0,activityName:re.value||void 0,workData:f.value}}const G=l.computed(()=>{const N=m.value;if(!((N==null?void 0:N.action)!=="taskSend"||!N.workId||!N.processDefinitionId||!N.activityId))return{workId:N.workId,processDefinitionId:N.processDefinitionId,processInstanceId:N.processInstanceId||"",activity:{activityId:N.activityId,activityName:N.activityName}}}),ee=l.computed(()=>{const N=m.value;if(!(!["jump","taskJump"].includes((N==null?void 0:N.action)||"")||!(N!=null&&N.workId)||!N.processDefinitionId))return{workId:N.workId,processDefinitionId:N.processDefinitionId,processInstanceId:N.processInstanceId||""}});async function X(){if(i.workId)return f.value=void 0,H();if(!i.autoResolveWork)return H();if(!i.processInstanceId||!i.dealUserId)throw new Error("FlowButtons 缺少 workId;自动解析待办时必须传入 processInstanceId 和 dealUserId");const N=await Wn({currentPage:1,pageSize:100,assignee:i.dealUserId,assigne:i.dealUserId,userId:i.dealUserId,processInstanceId:i.processInstanceId}),W=T(N.data).find(ve=>A(ve,"processInstanceId")===i.processInstanceId);if(!W)throw new Error("当前用户在该流程实例中没有可办理的待办任务");f.value=W;const ie=H();return o("workResolved",ie),ie}function B(N){return N.map(F=>{const W=F||{},ie=String(W.id||W.userId||""),ve=String(W.ntype||""),Se=Array.isArray(W.childs)?W.childs:Array.isArray(W.children)?W.children:void 0;return{...W,id:ie,caption:String(W.caption||W.name||ie),ntype:ve,hasChild:!!(W.hasChild||Se!=null&&Se.length),isLeaf:ve==="user"||!W.hasChild&&!(Se!=null&&Se.length),disabled:ve!=="user",children:Se?B(Se):void 0}}).filter(F=>F.id)}async function O(N=""){const F=await ri(N);return B(Array.isArray(F.data)?F.data:[])}async function $(N,F){const W=N.level===0?"":String(N.data.id||"");if(N.level>0&&(N.data.ntype==="user"||N.data.hasChild===!1)){F([]);return}U.value=!0;try{const ie=await O(W);N.level===0&&(S.value=ie),F(ie)}catch(ie){o("error",ie),F([])}finally{U.value=!1}}function C(N){N.ntype==="user"&&(I.value=N)}function k(){I.value=void 0,S.value=[]}function V(N){if(!_.value){_e.ElMessage.error("当前待办缺少任务实例 ID,无法加签");return}Y.value=N,R.value=Kn(i.dialogZIndex),L.value=!0}async function he(){var F;if(!((F=I.value)!=null&&F.id)){_e.ElMessage.warning("请选择一名机构人员");return}const N=Y.value;D.value=!0;try{const ie=await(N==="turnBefore"?Xr:Jr)({workId:E.value,taskId:_.value,assignee:I.value.id});L.value=!1,p(N,ie,H(N,y.value))}catch(W){o("error",W)}finally{D.value=!1}}async function ae(){s.value=!0,a.value=[];try{if(await X(),!E.value)return a.value;const N=await Hr({workId:E.value});return a.value=(Array.isArray(N.data)?N.data:[]).map(F=>x(F||{})).filter(F=>!!F),a.value}finally{s.value=!1}}function p(N,F,W){var ie;(ie=i.afterAction)==null||ie.call(i,N,F,W),o("afterAction",N,F,W)}function u(N,F){o("executeAction",N,F)}function c(N){return{processActivate:"restore",processTerminate:"terminate",processSuspend:"hang",processSupspend:"hang"}[N]||N}async function g(N,F,W){var z;const ie=Kn(i.dialogZIndex),ve=`ui-flow-confirm-overlay-${++r}`,Se=_e.ElMessageBox.confirm(`是否${F}此任务?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",modalClass:ve});await l.nextTick(),(z=document.querySelector(`.${ve}`))==null||z.style.setProperty("z-index",String(ie),"important"),await Se;const de={workId:W.workId};let ye;switch(c(N)){case"revocation":case"taskWithdraw":ye=await qr(de);break;case"taskRecyle":ye=await Kr(de);break;case"hang":ye=await Zr({processInstanceIds:[W.processInstanceId||""]});break;case"restore":ye=await Qr(de);break;case"terminate":ye=await ei(de);break;case"taskComplete":ye=await Gr({...de,variables:i.variables});break;case"taskRollback":ye=await Yr(de);break;case"taskClaim":if(!i.dealUserId){u(N,W);return}ye=await Wr({...de,assignee:i.dealUserId});break;default:u(N,W);return}p(N,ye,W),c(N)==="taskClaim"&&await ae()}async function b(N){var F;try{const W=N.name;E.value||await ae();const ie=H(W,N.label);if(!ie.workId)throw new Error("当前待办缺少 workId,无法执行流程操作");if(await((F=i.beforeAction)==null?void 0:F.call(i,W,ie))===!1)return;if(["turnBefore","taskTurnBefore"].includes(W)){V("turnBefore");return}if(["turnAfter","taskTurnAfter"].includes(W)){V("turnAfter");return}if(W==="taskSend"&&i.autoHandleDialogs){if(!ie.processDefinitionId||!ie.activityId)throw new Error("当前待办缺少 processDefinitionId 或 activityId,无法发送");m.value=ie,d.value=!0;return}if(["jump","taskJump"].includes(W)&&i.autoHandleDialogs){if(!ie.processDefinitionId)throw new Error("当前待办缺少 processDefinitionId,无法跳转");m.value=ie,h.value=!0;return}if(["save","start","taskSend","jump","taskJump"].includes(W)){u(W,ie);return}await g(W,N.label,ie)}catch(W){W!=="cancel"&&W!=="close"&&o("error",W)}}function P(N,F){const W={...m.value||H("taskSend","发送"),requestData:F};p("taskSend",N,W),m.value=void 0}function Q(N,F){const W={...m.value||H("taskJump","跳转"),requestData:F};p(W.action,N,W),m.value=void 0}function ce(N){o("error",N)}return l.watch(()=>[i.workId,i.processInstanceId,i.dealUserId],()=>{d.value=!1,h.value=!1,m.value=void 0,ae().catch(N=>o("error",N))},{immediate:!0}),t({loading:s,optList:a,resolvedWorkData:f,getAvailableActions:ae,resolveCurrentWork:X,executeAction:b}),(N,F)=>{const W=l.resolveComponent("ui-button"),ie=l.resolveComponent("el-tree"),ve=l.resolveComponent("el-dialog"),Se=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",Ku,[s.value?(l.openBlock(),l.createElementBlock("span",Gu,"正在加载流程操作...")):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(a.value,(de,ye)=>(l.openBlock(),l.createElementBlock("div",{key:de.name||ye,class:"flex-start-r"},[l.renderSlot(N.$slots,"prefix",{action:de},void 0,!0),l.renderSlot(N.$slots,"default",{action:de},void 0,!0),l.createVNode(W,{onClick:z=>b(de)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(de.label),1)]),_:2},1032,["onClick"]),ye!==a.value.length-1?(l.openBlock(),l.createElementBlock("div",Xu)):l.createCommentVNode("",!0),l.renderSlot(N.$slots,"suffix",{action:de},void 0,!0)]))),128)),N.$slots.append?(l.openBlock(),l.createElementBlock("div",Ju,[l.renderSlot(N.$slots,"append",{actions:a.value,loading:s.value},void 0,!0)])):l.createCommentVNode("",!0),l.createVNode(ve,{modelValue:L.value,"onUpdate:modelValue":F[1]||(F[1]=de=>L.value=de),"append-to-body":"",class:"ui-flow-sign-dialog","close-on-click-modal":!1,title:y.value,width:"760px","z-index":R.value,onClosed:k},{footer:l.withCtx(()=>[l.createElementVNode("div",ef,[l.createVNode(W,{type:"primary",loading:D.value,onClick:he},{default:l.withCtx(()=>[...F[6]||(F[6]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(W,{disabled:D.value,onClick:F[0]||(F[0]=de=>L.value=!1)},{default:l.withCtx(()=>[...F[7]||(F[7]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>{var de,ye;return[l.withDirectives((l.openBlock(),l.createElementBlock("div",Zu,[F[5]||(F[5]=l.createElementVNode("p",{class:"sign-tip"},"仅可选择一名机构人员",-1)),l.createVNode(ie,{data:S.value,load:$,props:v,"highlight-current":"",lazy:"","node-key":"id",onNodeClick:C},null,8,["data"]),l.createElementVNode("div",Qu,[F[4]||(F[4]=l.createTextVNode(" 已选择:",-1)),l.createElementVNode("strong",null,l.toDisplayString(((de=I.value)==null?void 0:de.caption)||((ye=I.value)==null?void 0:ye.name)||"暂无"),1)])])),[[Se,U.value]])]}),_:1},8,["modelValue","title","z-index"]),G.value?(l.openBlock(),l.createBlock(si,{key:3,modelValue:d.value,"onUpdate:modelValue":F[2]||(F[2]=de=>d.value=de),activity:G.value.activity,"assignment-query-params":e.assignmentQueryParams,"deal-user":Z.value,"force-single-assignee":e.forceSingleAssignee,"process-definition-id":G.value.processDefinitionId,"process-instance-id":G.value.processInstanceId,"show-trigger":!1,variables:e.variables,"work-id":G.value.workId,"z-index":e.dialogZIndex,onAfterSend:P,onError:ce},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),ee.value?(l.openBlock(),l.createBlock(Xo,{key:4,modelValue:h.value,"onUpdate:modelValue":F[3]||(F[3]=de=>h.value=de),"assignment-query-params":e.assignmentQueryParams,"deal-user":Z.value,"process-definition-id":ee.value.processDefinitionId,"process-instance-id":ee.value.processInstanceId,"show-trigger":!1,"work-id":ee.value.workId,"z-index":e.dialogZIndex,onAfterJump:Q,onError:ce},null,8,["modelValue","assignment-query-params","deal-user","process-definition-id","process-instance-id","work-id","z-index"])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-f973e0f1"]]);function nf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gn={exports:{}},rf=Gn.exports,Jo;function of(){return Jo||(Jo=1,(function(e,t){(function(n,r){e.exports=r()})(rf,(function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",f="hour",d="day",h="week",m="month",R="quarter",L="year",Y="date",U="Invalid Date",D=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|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,I={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(Z){var H=["th","st","nd","rd"],G=Z%100;return"["+Z+(H[(G-20)%10]||H[G]||H[0])+"]"}},y=function(Z,H,G){var ee=String(Z);return!ee||ee.length>=H?Z:""+Array(H+1-ee.length).join(G)+Z},v={s:y,z:function(Z){var H=-Z.utcOffset(),G=Math.abs(H),ee=Math.floor(G/60),X=G%60;return(H<=0?"+":"-")+y(ee,2,"0")+":"+y(X,2,"0")},m:function Z(H,G){if(H.date()<G.date())return-Z(G,H);var ee=12*(G.year()-H.year())+(G.month()-H.month()),X=H.clone().add(ee,m),B=G-X<0,O=H.clone().add(ee+(B?-1:1),m);return+(-(ee+(G-X)/(B?X-O:O-X))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:m,y:L,w:h,d,D:Y,h:f,m:s,s:a,ms:o,Q:R}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},A="en",T={};T[A]=I;var x="$isDayjsObject",E=function(Z){return Z instanceof q||!(!Z||!Z[x])},j=function Z(H,G,ee){var X;if(!H)return A;if(typeof H=="string"){var B=H.toLowerCase();T[B]&&(X=B),G&&(T[B]=G,X=B);var O=H.split("-");if(!X&&O.length>1)return Z(O[0])}else{var $=H.name;T[$]=H,X=$}return!ee&&X&&(A=X),X||!ee&&A},M=function(Z,H){if(E(Z))return Z.clone();var G=typeof H=="object"?H:{};return G.date=Z,G.args=arguments,new q(G)},_=v;_.l=j,_.i=E,_.w=function(Z,H){return M(Z,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var q=(function(){function Z(G){this.$L=j(G.locale,null,!0),this.parse(G),this.$x=this.$x||G.x||{},this[x]=!0}var H=Z.prototype;return H.parse=function(G){this.$d=(function(ee){var X=ee.date,B=ee.utc;if(X===null)return new Date(NaN);if(_.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var O=X.match(D);if(O){var $=O[2]-1||0,C=(O[7]||"0").substring(0,3);return B?new Date(Date.UTC(O[1],$,O[3]||1,O[4]||0,O[5]||0,O[6]||0,C)):new Date(O[1],$,O[3]||1,O[4]||0,O[5]||0,O[6]||0,C)}}return new Date(X)})(G),this.init()},H.init=function(){var G=this.$d;this.$y=G.getFullYear(),this.$M=G.getMonth(),this.$D=G.getDate(),this.$W=G.getDay(),this.$H=G.getHours(),this.$m=G.getMinutes(),this.$s=G.getSeconds(),this.$ms=G.getMilliseconds()},H.$utils=function(){return _},H.isValid=function(){return this.$d.toString()!==U},H.isSame=function(G,ee){var X=M(G);return this.startOf(ee)<=X&&X<=this.endOf(ee)},H.isAfter=function(G,ee){return M(G)<this.startOf(ee)},H.isBefore=function(G,ee){return this.endOf(ee)<M(G)},H.$g=function(G,ee,X){return _.u(G)?this[ee]:this.set(X,G)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(G,ee){var X=this,B=!!_.u(ee)||ee,O=_.p(G),$=function(c,g){var b=_.w(X.$u?Date.UTC(X.$y,g,c):new Date(X.$y,g,c),X);return B?b:b.endOf(d)},C=function(c,g){return _.w(X.toDate()[c].apply(X.toDate("s"),(B?[0,0,0,0]:[23,59,59,999]).slice(g)),X)},k=this.$W,V=this.$M,he=this.$D,ae="set"+(this.$u?"UTC":"");switch(O){case L:return B?$(1,0):$(31,11);case m:return B?$(1,V):$(0,V+1);case h:var p=this.$locale().weekStart||0,u=(k<p?k+7:k)-p;return $(B?he-u:he+(6-u),V);case d:case Y:return C(ae+"Hours",0);case f:return C(ae+"Minutes",1);case s:return C(ae+"Seconds",2);case a:return C(ae+"Milliseconds",3);default:return this.clone()}},H.endOf=function(G){return this.startOf(G,!1)},H.$set=function(G,ee){var X,B=_.p(G),O="set"+(this.$u?"UTC":""),$=(X={},X[d]=O+"Date",X[Y]=O+"Date",X[m]=O+"Month",X[L]=O+"FullYear",X[f]=O+"Hours",X[s]=O+"Minutes",X[a]=O+"Seconds",X[o]=O+"Milliseconds",X)[B],C=B===d?this.$D+(ee-this.$W):ee;if(B===m||B===L){var k=this.clone().set(Y,1);k.$d[$](C),k.init(),this.$d=k.set(Y,Math.min(this.$D,k.daysInMonth())).$d}else $&&this.$d[$](C);return this.init(),this},H.set=function(G,ee){return this.clone().$set(G,ee)},H.get=function(G){return this[_.p(G)]()},H.add=function(G,ee){var X,B=this;G=Number(G);var O=_.p(ee),$=function(V){var he=M(B);return _.w(he.date(he.date()+Math.round(V*G)),B)};if(O===m)return this.set(m,this.$M+G);if(O===L)return this.set(L,this.$y+G);if(O===d)return $(1);if(O===h)return $(7);var C=(X={},X[s]=r,X[f]=i,X[a]=n,X)[O]||1,k=this.$d.getTime()+G*C;return _.w(k,this)},H.subtract=function(G,ee){return this.add(-1*G,ee)},H.format=function(G){var ee=this,X=this.$locale();if(!this.isValid())return X.invalidDate||U;var B=G||"YYYY-MM-DDTHH:mm:ssZ",O=_.z(this),$=this.$H,C=this.$m,k=this.$M,V=X.weekdays,he=X.months,ae=X.meridiem,p=function(g,b,P,Q){return g&&(g[b]||g(ee,B))||P[b].slice(0,Q)},u=function(g){return _.s($%12||12,g,"0")},c=ae||function(g,b,P){var Q=g<12?"AM":"PM";return P?Q.toLowerCase():Q};return B.replace(S,(function(g,b){return b||(function(P){switch(P){case"YY":return String(ee.$y).slice(-2);case"YYYY":return _.s(ee.$y,4,"0");case"M":return k+1;case"MM":return _.s(k+1,2,"0");case"MMM":return p(X.monthsShort,k,he,3);case"MMMM":return p(he,k);case"D":return ee.$D;case"DD":return _.s(ee.$D,2,"0");case"d":return String(ee.$W);case"dd":return p(X.weekdaysMin,ee.$W,V,2);case"ddd":return p(X.weekdaysShort,ee.$W,V,3);case"dddd":return V[ee.$W];case"H":return String($);case"HH":return _.s($,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return c($,C,!0);case"A":return c($,C,!1);case"m":return String(C);case"mm":return _.s(C,2,"0");case"s":return String(ee.$s);case"ss":return _.s(ee.$s,2,"0");case"SSS":return _.s(ee.$ms,3,"0");case"Z":return O}return null})(g)||O.replace(":","")}))},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(G,ee,X){var B,O=this,$=_.p(ee),C=M(G),k=(C.utcOffset()-this.utcOffset())*r,V=this-C,he=function(){return _.m(O,C)};switch($){case L:B=he()/12;break;case m:B=he();break;case R:B=he()/3;break;case h:B=(V-k)/6048e5;break;case d:B=(V-k)/864e5;break;case f:B=V/i;break;case s:B=V/r;break;case a:B=V/n;break;default:B=V}return X?B:_.a(B)},H.daysInMonth=function(){return this.endOf(m).$D},H.$locale=function(){return T[this.$L]},H.locale=function(G,ee){if(!G)return this.$L;var X=this.clone(),B=j(G,ee,!0);return B&&(X.$L=B),X},H.clone=function(){return _.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()},Z})(),re=q.prototype;return M.prototype=re,[["$ms",o],["$s",a],["$m",s],["$H",f],["$W",d],["$M",m],["$y",L],["$D",Y]].forEach((function(Z){re[Z[1]]=function(H){return this.$g(H,Z[0],Z[1])}})),M.extend=function(Z,H){return Z.$i||(Z(H,q,M),Z.$i=!0),M},M.locale=j,M.isDayjs=E,M.unix=function(Z){return M(1e3*Z)},M.en=T[A],M.Ls=T,M.p={},M}))})(Gn)),Gn.exports}var af=of();const Xn=nf(af),sf={class:"colBtns"},lf={key:0,class:"table-pagination"},cf={class:"left-pagination"},uf={class:"right-pagination"},Zo=Et(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:"default"}},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(),f=l.ref("100%"),d=l.ref(0),h=l.computed(()=>r.tableLabel.filter(x=>{var E;return!((E=x.hiddenCondition)!=null&&E.call(x,x))})),m=l.computed(()=>r.size==="medium"?"default":r.size);function R(x){return x<9?`0${x+1}`:x+1}function L(){var x;(x=s.value)==null||x.clearSelection()}function Y(x,E){var j;(j=s.value)==null||j.toggleRowSelection(x,E)}function U(){var x;(x=s.value)==null||x.toggleAllSelection()}function D(x){var E;(E=s.value)==null||E.setCurrentRow(x)}function S(x){i("page-change",x)}function I(x){i("size-change",x)}function y(){f.value=r.hidePage?"100%":"calc(100% - 45px)"}async function v(){var j;if(!r.operation||r.btnWidth)return;await l.nextTick();const x=((j=a.value)==null?void 0:j.querySelectorAll(".colBtns"))||[];let E=o.operation?120:0;x.forEach(M=>{E=Math.max(E,M.scrollWidth+40)}),d.value=E}function A(x,E,j){var M;r.hideSelection||(M=s.value)==null||M.toggleRowSelection(x),i("row-click",x,E,j)}function T(x,E,j){i("row-dblclick",x,E,j)}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:L,toggleRowSelection:Y,toggleAllSelection:U,setCurrentRow:D,computeHeight:y}),(x,E)=>{const j=l.resolveComponent("el-table-column"),M=l.resolveComponent("el-table"),_=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(M,l.mergeProps({ref_key:"tableRef",ref:s},x.$attrs,{"cell-style":{height:"50px"},data:e.data,"header-cell-style":{background:"#fafafa",color:"#45484B",height:"50px"},height:f.value,size:m.value,border:"","cell-class-name":"c-table-cell","current-row-key":"id","header-row-class-name":"c-table-header",onRowClick:A,onRowDblclick:T}),{default:l.withCtx(()=>[e.hideSelection?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(j,{key:0,align:"center",type:"selection",width:"60"})),e.hideNumber?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(j,{key:1,index:R,align:"center",label:"序号",type:"index",width:"60"})),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,q=>(l.openBlock(),l.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)),l.renderSlot(x.$slots,"default",{},void 0,!0),e.operation?(l.openBlock(),l.createBlock(j,{key:2,fixed:e.isFixed?"right":!1,width:e.btnWidth||d.value||void 0,align:"center",label:"操作"},{default:l.withCtx(q=>[l.createElementVNode("div",sf,[l.renderSlot(x.$slots,"operation",{row:q.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",lf,[l.createElementVNode("div",cf,[l.renderSlot(x.$slots,"pagination-left",{},void 0,!0)]),l.createElementVNode("div",uf,[l.createVNode(_,{"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:S,onSizeChange:I},null,8,["current-page","page-size","total"])])]))],6)}}}),[["__scopeId","data-v-557ddd2c"]]),ff={executing:"审批中",completed:"已完成",deleted:"已删除",canceled:"已取消",withdrawed:"已撤回",recyled:"已回收",rollbacked:"已退回",jumped:"已跳转"},df=[{label:"业务标题",prop:"businessName",minWidth:"180px"},{label:"当前环节",prop:"activityName",minWidth:"180px"},{label:"发送人",prop:"assigneesNames",minWidth:"150px"},{label:"发送时间",prop:"startTime",width:"180px",formatter:e=>e.startTime?Xn(e.startTime).format("YYYY-MM-DD HH:mm:ss"):""}],pf=[{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 hf(e){return{...e,workId:e.workId||e.id,processDefinitionId:e.processDefinitionId,processInstanceId:e.processInstanceId,activityId:e.activityId,activityName:e.activityName}}const mf=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),f=l.reactive({currentPage:1,pageSize:20,total:0}),d=l.computed(()=>r.type==="draft"?pf:df);function h(y){return ff[y]||y||""}function m(y,v){i("onHandle",{action:y,workData:hf(v)})}function R(y){i("onHandle",{action:"view",workData:{...y,processDefinitionId:y.processDefinitionId,workId:y.id,workName:y.title}})}function L(y){return`${y}_${Xn().format("YYYYMMDDHHmmss")}`}function Y(y){const v=L(y.name);i("onHandle",{action:"create",workData:{processDefinitionId:y.processDefinitionId,flowName:y.name,title:v,workName:v}})}function U(y){r.type==="todo"&&m("view",y),r.type==="done"&&m("handle",y)}function D(y){f.currentPage=y,I()}function S(y){f.pageSize=y,f.currentPage=1,I()}async function I(){s.value=!0;try{if(r.type==="todo"||r.type==="done"){const v=await(r.type==="todo"?Wn:zr)({currentPage:f.currentPage,pageSize:f.pageSize,assignee:r.dealUserId});a.value=v.data||[],f.total=Number(v.count||0)}else{const v=(await jr(f,{appId:r.appId,appModuleId:r.appModuleId,createUserId:r.dealUserId})).data||{};a.value=v.records||[],f.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],()=>{f.currentPage=1,I()}),l.onMounted(I),t({data:a,loading:s,pageConfig:f,gridRef:o,loadTableData:I,onRowDblclick:U,create:Y,buildDefaultBusinessTitle:L}),(y,v)=>{const A=l.resolveComponent("el-table-column"),T=l.resolveComponent("el-button");return l.openBlock(),l.createBlock(Zo,{ref_key:"gridRef",ref:o,data:a.value,"hide-number":!1,"hide-selection":!0,"is-fixed":!0,"page-config":f,"table-label":d.value,operation:"","table-height":"100%",onPageChange:D,onRowDblclick:U,onSizeChange:S},{operation:l.withCtx(({row:x})=>[e.type==="todo"?(l.openBlock(),l.createBlock(T,{key:0,link:"",type:"primary",onClick:l.withModifiers(E=>m("view",x),["stop"])},{default:l.withCtx(()=>[...v[0]||(v[0]=[l.createTextVNode(" 办理 ",-1)])]),_:1},8,["onClick"])):e.type==="done"?(l.openBlock(),l.createBlock(T,{key:1,link:"",type:"primary",onClick:l.withModifiers(E=>m("handle",x),["stop"])},{default:l.withCtx(()=>[...v[1]||(v[1]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):e.type==="draft"&&x.state==="audit"?(l.openBlock(),l.createBlock(T,{key:2,link:"",type:"primary",onClick:l.withModifiers(E=>R(x),["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(A,{key:0,align:"center",label:"状态",width:"120"},{default:l.withCtx(({row:x})=>[l.createTextVNode(l.toDisplayString(e.type==="done"?h(x.stateName):x.stateLabel),1)]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["data","page-config","table-label"])}}});function ot(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const gn=Object.prototype.toString,yf=Object.prototype.hasOwnProperty;function li(e){return e===void 0}function en(e){return e!==void 0}function Qo(e){return e==null}function Qe(e){return gn.call(e)==="[object Array]"}function _t(e){return gn.call(e)==="[object Object]"}function xt(e){return gn.call(e)==="[object Number]"}function $t(e){const t=gn.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function at(e){return gn.call(e)==="[object String]"}function tn(e,t){return!Qo(e)&&yf.call(e,t)}function it(e,t){const n=ci(t);let r;return oe(e,function(i,o){if(n(i,o))return r=i,!1}),r}function gf(e,t){const n=ci(t);let r=Qe(e)?-1:void 0;return oe(e,function(i,o){if(n(i,o))return r=o,!1}),r}function nn(e,t){const n=ci(t);let r=[];return oe(e,function(i,o){n(i,o)&&r.push(i)}),r}function oe(e,t){let n,r;if(li(e))return;const i=Qe(e)?bf:wf;for(let o in e)if(tn(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function rn(e,t,n){return oe(e,function(r,i){n=t(n,r,i)}),n}function ea(e,t){return!!rn(e,function(n,r,i){return n&&t(r,i)},!0)}function ta(e,t){return!!it(e,t)}function vf(e,t){let n=[];return oe(e,function(r,i){n.push(t(r,i))}),n}function na(e){return function(t){return ea(e,function(n,r){return t[r]===n})}}function ci(e){return $t(e)?e:t=>t===e}function wf(e){return e}function bf(e){return Number(e)}function ra(e,t){let n,r,i,o;function a(m){let R=Date.now(),L=m?0:o+t-R;if(L>0)return s(L);e.apply(i,r),f()}function s(m){n=setTimeout(a,m)}function f(){n&&clearTimeout(n),n=o=r=i=void 0}function d(){n&&a(!0),f()}function h(...m){o=Date.now(),r=m,i=this,n||s(t)}return h.flush=d,h.cancel=f,h}function St(e,t){return e.bind(t)}function se(e,...t){return Object.assign(e,...t)}function Ef(e,t,n){let r=e;return oe(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];en(a)&&Qo(s)&&(s=r[i]=isNaN(+a)?{}:[]),li(a)?li(n)?delete r[i]:r[i]=n:r=s}),e}function _f(e,t){let n={},r=Object(e);return oe(t,function(i){i in r&&(n[i]=e[i])}),n}function xf(e,t){let n={},r=Object(e);return oe(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}var Sf=1e3;function mt(e,t){var n=this;t=t||Sf,e.on(["render.shape","render.connection"],t,function(r,i){var o=r.type,a=i.element,s=i.gfx,f=i.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,f):n.drawConnection(s,a,f)}),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)})}mt.prototype.canRender=function(e){},mt.prototype.drawShape=function(e,t){},mt.prototype.drawConnection=function(e,t){},mt.prototype.getShapePath=function(e){},mt.prototype.getConnectionPath=function(e){};function le(e,t){var n=Ce(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function Af(e,t){return ta(t,function(n){return le(e,n)})}function Ce(e){return e&&e.businessObject||e}function Vt(e){return e&&e.di}function jt(e,t){return le(e,"bpmn:CallActivity")?!1:le(e,"bpmn:SubProcess")?(t=t||Vt(e),t&&le(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):le(e,"bpmn:Participant")?!!Ce(e).processRef:!0}function ia(e){if(!(!le(e,"bpmn:Participant")&&!le(e,"bpmn:Lane"))){var t=Vt(e).isHorizontal;return t===void 0?!0:t}}function kf(e){return e&&!!Ce(e).triggeredByEvent}function Cf(e){return _t(e)&&tn(e,"waypoints")}function Rf(e){return _t(e)&&tn(e,"labelTarget")}var vn={width:90,height:20},oa=15;function Tf(e){return le(e,"bpmn:Event")||le(e,"bpmn:Gateway")||le(e,"bpmn:DataStoreReference")||le(e,"bpmn:DataObjectReference")||le(e,"bpmn:DataInput")||le(e,"bpmn:DataOutput")||le(e,"bpmn:SequenceFlow")||le(e,"bpmn:MessageFlow")||le(e,"bpmn:Group")}function Nf(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=Pf(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-=oa:a+=oa,{x:a,y:s}}function Pf(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 Df(e){return e.waypoints?Nf(e.waypoints):le(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+vn.height/2}:{x:e.x+e.width/2,y:e.y+e.height+vn.height/2}}function If(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(vn.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=Df(t),r=vn),se({x:n.x-r.width/2,y:n.y-r.height/2},r)}function Of(e){if(le(e,"bpmn:FlowElement")||le(e,"bpmn:Participant")||le(e,"bpmn:Lane")||le(e,"bpmn:SequenceFlow")||le(e,"bpmn:MessageFlow")||le(e,"bpmn:DataInput")||le(e,"bpmn:DataOutput"))return"name";if(le(e,"bpmn:TextAnnotation"))return"text";if(le(e,"bpmn:Group"))return"categoryValueRef"}function Bf(e){var t=e.categoryValueRef;return t&&t.value||""}function Jn(e){var t=e.businessObject,n=Of(t);if(n)return n==="categoryValueRef"?Bf(t):t[n]||""}function wn(e,t){t=!!t,Qe(e)||(e=[e]);var n,r,i,o;return oe(e,function(a){var s=a;a.waypoints&&!t&&(s=wn(a.waypoints,!0));var f=s.x,d=s.y,h=s.height||0,m=s.width||0;(f<n||n===void 0)&&(n=f),(d<r||r===void 0)&&(r=d),(f+m>i||i===void 0)&&(i=f+m),(d+h>o||o===void 0)&&(o=d+h)}),{x:n,y:r,height:o-r,width:i-n}}function aa(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function sa(e){return!!(e&&e.isFrame)}var la=7;function Mf(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function Lf(e,t){return t.appendChild(Mf(e,t))}function Oe(e,t){return Lf(t,e),e}var ui=2,ca={"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":ui,"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":ui,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Ff(e,t){return ca[t]?e.style[t]:e.getAttributeNS(null,t)}function ua(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=ca[r];i?(i===ui&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function $f(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)ua(e,i,t[i])}function Te(e,t,n){if(typeof t=="string")if(n!==void 0)ua(e,t,n);else return Ff(e,t);else $f(e,t);return e}const Vf=Object.prototype.toString;function st(e){return new At(e)}function At(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}At.prototype.add=function(e){return this.list.add(e),this},At.prototype.remove=function(e){return Vf.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},At.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},At.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},At.prototype.array=function(){return Array.from(this.list)},At.prototype.has=At.prototype.contains=function(e){return this.list.contains(e)};var fi={svg:"http://www.w3.org/2000/svg"},fa='<svg xmlns="'+fi.svg+'"';function jf(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(fi.svg)===-1&&(e=fa+e.substring(4)):(e=fa+">"+e+"</svg>",t=!0);var n=Uf(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function Uf(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=jf(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(fi.svg,e),t&&Te(n,t),n}var di=null;function da(){return di===null&&(di=Re("svg")),di}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 zf(e,t,n,r,i,o){var a=da().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 bn(e){return da().createSVGTransform()}var ha=/([&<>]{1})/g,Hf=/([&<>\n\r"]{1})/g,Wf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function pi(e,t){function n(r,i){return Wf[i]||i}return e.replace(t,n)}function ma(e,t){var n,r,i,o,a;switch(e.nodeType){case 3:t.push(pi(e.textContent,ha));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,'="',pi(o.value,Hf),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,r=a.length;n<r;++n)ma(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",pi(e.nodeValue,ha),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function qf(e){for(var t=e.firstChild,n=[];t;)ma(t,n),t=t.nextSibling;return n.join("")}function ya(e,t){return qf(e)}function Zn(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Yf(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Kf(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(Yf(e,r))}function En(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),Kf(n,t)),n.consolidate()}function Ut(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function Gf(e){return["M",e.x,e.y]}function hi(e){return["L",e.x,e.y]}function Xf(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function Jf(e,t){const n=e.length,r=[Gf(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(hi(a));continue}const f=Math.min(t,mi(a.x-o.x,a.y-o.y),mi(s.x-a.x,s.y-a.y));if(!f){r.push(hi(a));continue}const d=Qn(a,o,f),h=Qn(a,o,f*.5),m=Qn(a,s,f),R=Qn(a,s,f*.5);r.push(hi(d)),r.push(Xf(h,R,m))}return r}function Qn(e,t,n){const r=t.x-e.x,i=t.y-e.y,o=mi(r,i),a=n/o;return{x:e.x+r*a,y:e.y+i*a}}function mi(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function yi(e,t,n){xt(t)&&(n=t,t=null),t||(t={});const r=Re("path",t);return xt(n)&&(r.dataset.cornerRadius=String(n)),ga(r,e)}function ga(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return Te(e,{d:Ut(Jf(t,n))}),e}var gi="hsl(225, 10%, 15%)",Zf="white";function lt(e,t){return ta(e.eventDefinitions,function(n){return n.$type===t})}function Qf(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function ed(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function me(e,t,n){var r=Vt(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||Zf}function te(e,t,n){var r=Vt(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||gi}function _n(e,t,n,r){var i=Vt(e),o=i.get("label");return r||o&&o.get("color:color")||t||te(e,n)}function td(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 Ut(i)}function va(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 Ut(a)}function nd(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 Ut(s)}function rd(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 Ut(o)}function xn(e,t={}){return{width:et(e,t),height:We(e,t)}}function et(e,t={}){return tn(t,"width")?t.width:e.width}function We(e,t={}){return tn(t,"height")?t.height:e.height}const De={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};De.td=De.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],De.option=De.optgroup=[1,'<select multiple="multiple">',"</select>"],De.thead=De.tbody=De.colgroup=De.caption=De.tfoot=[1,"<table>","</table>"],De.polyline=De.ellipse=De.polygon=De.circle=De.text=De.line=De.path=De.rect=De.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function ct(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(De,r)?De[r]:De._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 f=t.createDocumentFragment();return f.append(...s.childNodes),f}function id(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 Ye(e,...t){const n=e.style;return oe(t,function(r){r&&oe(r,function(i,o){n[o]=i})}),e}function wa(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const od=Object.prototype.toString;function zt(e){return new kt(e)}function kt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}kt.prototype.add=function(e){return this.list.add(e),this},kt.prototype.remove=function(e){return od.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},kt.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},kt.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},kt.prototype.array=function(){return Array.from(this.list)},kt.prototype.has=kt.prototype.contains=function(e){return this.list.contains(e)};function ba(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ea(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}function ad(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var er={},_a;function sd(){if(_a)return er;_a=1;var e,t,n;function r(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n=e!=="addEventListener"?"on":""}return er.bind=function(i,o,a,s){return e||r(),i[e](n+o,a,s||!1),a},er.unbind=function(i,o,a,s){return t||r(),i[t](n+o,a,s||!1),a},er}var xa=sd(),ld=ad(xa),Ct=id({__proto__:null,default:ld},[xa]),Sa=["focus","blur"];function cd(e,t,n,r,i){return Sa.indexOf(n)!==-1&&(i=!0),Ct.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=Ea(a,t,!0),o.delegateTarget&&r.call(e,o)},i)}function ud(e,t,n,r){return Sa.indexOf(t)!==-1&&(r=!0),Ct.unbind(e,t,n,r)}var vi={bind:cd,unbind:ud};function yt(e,t){return t=t||document,t.querySelector(e)}function fd(e,t){return t=t||document,t.querySelectorAll(e)}function tr(e){e.parentNode&&e.parentNode.removeChild(e)}function wi(e,t,n,r,i){var o=bn();o.setTranslate(t,n);var a=bn();a.setRotate(r||0,0,0);var s=bn();s.setScale(1,1),En(e,[o,a,s])}function Aa(e,t,n){var r=bn();r.setTranslate(t,n),En(e,r)}function dd(e,t){var n=bn();n.setRotate(t,0,0),En(e,n)}function pd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bi={exports:{}},ka;function hd(){if(ka)return bi.exports;ka=1;var e=bi.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 f=Math.pow(n,o),s=Math.floor(Math.random()*f).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 f=e(t,n)}while(Object.hasOwnProperty.call(o,f));return o[f]=a,f},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},bi.exports}var md=hd(),yd=pd(md);function gt(e){if(!(this instanceof gt))return new gt(e);e=e||[128,36,1],this._seed=e.length?yd.rack(e[0],e[1],e[2]):e}gt.prototype.next=function(e){return this._seed(e||!0)},gt.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},gt.prototype.claim=function(e,t){this._seed.set(e,t||!0)},gt.prototype.assigned=function(e){return this._seed.get(e)||!1},gt.prototype.unclaim=function(e){delete this._seed.hats[e]},gt.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var gd=new gt,vd=10,nr=3,wd=1.5,rr=10,bd=4,on=.95,Ed=1,_d=.25;function Ht(e,t,n,r,i,o,a){mt.call(this,t,a);var s=e&&e.defaultFillColor,f=e&&e.defaultStrokeColor,d=e&&e.defaultLabelColor;function h(p){return n.computeStyle(p,{strokeLinecap:"round",strokeLinejoin:"round",stroke:gi,strokeWidth:2,fill:"white"})}function m(p){return n.computeStyle(p,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:gi,strokeWidth:2})}function R(p,u){var{ref:c={x:0,y:0},scale:g=1,element:b,parentGfx:P=i._svg}=u,Q=Re("marker",{id:p,viewBox:"0 0 20 20",refX:c.x,refY:c.y,markerWidth:20*g,markerHeight:20*g,orient:"auto"});Oe(Q,b);var ce=yt(":scope > defs",P);ce||(ce=Re("defs"),Oe(P,ce)),Oe(ce,Q)}function L(p,u,c,g){var b=gd.nextPrefixed("marker-");return Y(p,b,u,c,g),"url(#"+b+")"}function Y(p,u,c,g,b){if(c==="sequenceflow-end"){var P=Re("path",{d:"M 1 5 L 11 10 L 1 15 Z",...h({fill:b,stroke:b,strokeWidth:1})});R(u,{element:P,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(c==="messageflow-start"){var Q=Re("circle",{cx:6,cy:6,r:3.5,...h({fill:g,stroke:b,strokeWidth:1,strokeDasharray:[1e4,1]})});R(u,{element:Q,ref:{x:6,y:6},parentGfx:p})}if(c==="messageflow-end"){var ce=Re("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...h({fill:g,stroke:b,strokeWidth:1,strokeDasharray:[1e4,1]})});R(u,{element:ce,ref:{x:8.5,y:5},parentGfx:p})}if(c==="association-start"){var N=Re("path",{d:"M 11 5 L 1 10 L 11 15",...m({fill:"none",stroke:b,strokeWidth:1.5,strokeDasharray:[1e4,1]})});R(u,{element:N,ref:{x:1,y:10},scale:.5,parentGfx:p})}if(c==="association-end"){var F=Re("path",{d:"M 1 5 L 11 10 L 1 15",...m({fill:"none",stroke:b,strokeWidth:1.5,strokeDasharray:[1e4,1]})});R(u,{element:F,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(c==="conditional-flow-marker"){var W=Re("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...h({fill:g,stroke:b})});R(u,{element:W,ref:{x:-1,y:10},scale:.5,parentGfx:p})}if(c==="conditional-default-flow-marker"){var ie=Re("path",{d:"M 6 4 L 10 16",...h({stroke:b,fill:"none"})});R(u,{element:ie,ref:{x:0,y:10},scale:.5,parentGfx:p})}}function U(p,u,c,g,b={}){_t(g)&&(b=g,g=0),g=g||0,b=h(b);var P=u/2,Q=c/2,ce=Re("circle",{cx:P,cy:Q,r:Math.round((u+c)/4-g),...b});return Oe(p,ce),ce}function D(p,u,c,g,b,P){_t(b)&&(P=b,b=0),b=b||0,P=h(P);var Q=Re("rect",{x:b,y:b,width:u-b*2,height:c-b*2,rx:g,ry:g,...P});return Oe(p,Q),Q}function S(p,u,c,g){var b=u/2,P=c/2,Q=[{x:b,y:0},{x:u,y:P},{x:b,y:c},{x:0,y:P}],ce=Q.map(function(F){return F.x+","+F.y}).join(" ");g=h(g);var N=Re("polygon",{...g,points:ce});return Oe(p,N),N}function I(p,u,c,g){c=m(c);var b=yi(u,c,g);return Oe(p,b),b}function y(p,u,c){return I(p,u,c,5)}function v(p,u,c){c=m(c);var g=Re("path",{...c,d:u});return Oe(p,g),g}function A(p,u,c,g){return v(u,c,se({"data-marker":p},g))}function T(p){return ae[p]}function x(p){return function(u,c,g){return T(p)(u,c,g)}}var E={"bpmn:MessageEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.235,my:.315}}),P=g?te(u,f,c.stroke):me(u,s,c.fill),Q=g?me(u,s,c.fill):te(u,f,c.stroke),ce=v(p,b,{fill:P,stroke:Q,strokeWidth:1});return ce},"bpmn:TimerEventDefinition":function(p,u,c={}){var g=c.width||u.width,b=c.height||u.height,P=c.width?1:2,Q=U(p,g,b,.2*b,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:P}),ce=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:g,containerHeight:b,position:{mx:.5,my:.5}});v(p,ce,{stroke:te(u,f,c.stroke),strokeWidth:P});for(var N=0;N<12;N++){var F=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:g,containerHeight:b,position:{mx:.5,my:.5}}),W=g/2,ie=b/2;v(p,F,{strokeWidth:1,stroke:te(u,f,c.stroke),transform:"rotate("+N*30+","+ie+","+W+")"})}return Q},"bpmn:EscalationEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.2}}),P=g?te(u,f,c.stroke):me(u,s,c.fill);return v(p,b,{fill:P,stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(p,u,c={}){var g=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.222}});return v(p,g,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.57,my:.263}}),P=g?te(u,f,c.stroke):me(u,s,c.fill);return v(p,b,{fill:P,stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.2,my:.722}}),P=g?te(u,f,c.stroke):me(u,s,c.fill);return v(p,b,{fill:P,stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.638,my:-.055}}),P=g?te(u,f,c.stroke):"none",Q=v(p,b,{fill:P,stroke:te(u,f,c.stroke),strokeWidth:1});return dd(Q,45),Q},"bpmn:CompensateEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.22,my:.5}}),P=g?te(u,f,c.stroke):me(u,s,c.fill);return v(p,b,{fill:P,stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.2}}),P=g?te(u,f,c.stroke):me(u,s,c.fill);return v(p,b,{strokeWidth:1,fill:P,stroke:te(u,f,c.stroke)})},"bpmn:MultipleEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.211,my:.36}}),P=g?te(u,f,c.stroke):me(u,s,c.fill);return v(p,b,{fill:P,stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(p,u,c={}){var g=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.458,my:.194}});return v(p,g,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(p,u,c={}){var g=U(p,u.width,u.height,8,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:4});return g}};function j(p,u,c={},g){var b=Ce(p),P=Qf(b),Q=g||p;return b.get("eventDefinitions")&&b.get("eventDefinitions").length>1?b.get("parallelMultiple")?E["bpmn:ParallelMultipleEventDefinition"](u,Q,c,P):E["bpmn:MultipleEventDefinition"](u,Q,c,P):lt(b,"bpmn:MessageEventDefinition")?E["bpmn:MessageEventDefinition"](u,Q,c,P):lt(b,"bpmn:TimerEventDefinition")?E["bpmn:TimerEventDefinition"](u,Q,c,P):lt(b,"bpmn:ConditionalEventDefinition")?E["bpmn:ConditionalEventDefinition"](u,Q,c,P):lt(b,"bpmn:SignalEventDefinition")?E["bpmn:SignalEventDefinition"](u,Q,c,P):lt(b,"bpmn:EscalationEventDefinition")?E["bpmn:EscalationEventDefinition"](u,Q,c,P):lt(b,"bpmn:LinkEventDefinition")?E["bpmn:LinkEventDefinition"](u,Q,c,P):lt(b,"bpmn:ErrorEventDefinition")?E["bpmn:ErrorEventDefinition"](u,Q,c,P):lt(b,"bpmn:CancelEventDefinition")?E["bpmn:CancelEventDefinition"](u,Q,c,P):lt(b,"bpmn:CompensateEventDefinition")?E["bpmn:CompensateEventDefinition"](u,Q,c,P):lt(b,"bpmn:TerminateEventDefinition")?E["bpmn:TerminateEventDefinition"](u,Q,c,P):null}var M={ParticipantMultiplicityMarker:function(p,u,c={}){var g=et(u,c),b=We(u,c),P=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2-6)/g,my:(b-15)/b}});A("participant-multiplicity",p,P,{strokeWidth:2,fill:me(u,s,c.fill),stroke:te(u,f,c.stroke)})},SubProcessMarker:function(p,u,c={}){var g=D(p,14,14,0,{strokeWidth:1,fill:me(u,s,c.fill),stroke:te(u,f,c.stroke)});Aa(g,u.width/2-7.5,u.height-20);var b=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2-7.5)/u.width,my:(u.height-20)/u.height}});A("sub-process",p,b,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke)})},ParallelMarker:function(p,u,c){var g=et(u,c),b=We(u,c),P=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.parallel)/g,my:(b-20)/b}});A("parallel",p,P,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke)})},SequentialMarker:function(p,u,c){var g=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2+c.seq)/u.width,my:(u.height-19)/u.height}});A("sequential",p,g,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke)})},CompensationMarker:function(p,u,c){var g=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2+c.compensation)/u.width,my:(u.height-13)/u.height}});A("compensation",p,g,{strokeWidth:1,fill:me(u,s,c.fill),stroke:te(u,f,c.stroke)})},LoopMarker:function(p,u,c){var g=et(u,c),b=We(u,c),P=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.loop)/g,my:(b-7)/b}});A("loop",p,P,{strokeWidth:1.5,fill:"none",stroke:te(u,f,c.stroke),strokeMiterlimit:.5})},AdhocMarker:function(p,u,c){var g=et(u,c),b=We(u,c),P=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.adhoc)/g,my:(b-15)/b}});A("adhoc",p,P,{strokeWidth:1,fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke)})}};function _(p,u,c,g){M[p](u,c,g)}function q(p,u,c=[],g={}){g={fill:g.fill,stroke:g.stroke,width:et(u,g),height:We(u,g)};var b=Ce(u),P=c.includes("SubProcessMarker");P?g={...g,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:g={...g,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},b.get("isForCompensation")&&c.push("CompensationMarker"),le(b,"bpmn:AdHocSubProcess")&&(c.push("AdhocMarker"),P||se(g,{compensation:g.compensation-18}));var Q=b.get("loopCharacteristics"),ce=Q&&Q.get("isSequential");Q&&(se(g,{compensation:g.compensation-18}),c.includes("AdhocMarker")&&se(g,{seq:-23,loop:-18,parallel:-24}),ce===void 0&&c.push("LoopMarker"),ce===!1&&c.push("ParallelMarker"),ce===!0&&c.push("SequentialMarker")),c.includes("CompensationMarker")&&c.length===1&&se(g,{compensation:-8}),oe(c,function(N){_(N,p,u,g)})}function re(p,u,c={}){c=se({size:{width:100}},c);var g=o.createText(u||"",c);return st(g).add("djs-label"),Oe(p,g),g}function Z(p,u,c,g={}){var b=Ce(u),P=xn({x:u.x,y:u.y,width:u.width,height:u.height},g);return re(p,b.name,{align:c,box:P,padding:7,style:{fill:_n(u,d,f,g.stroke)}})}function H(p,u,c={}){var g={width:u.width,height:u.height,x:u.width/2+u.x,y:u.height/2+u.y};return re(p,Jn(u),{box:g,style:se({},o.getExternalStyle(),{fill:_n(u,d,f,c.stroke)})})}function G(p,u,c,g={}){var b=ia(c),P=re(p,u,{box:{height:30,width:b?We(c,g):et(c,g)},align:"center-middle",style:{fill:_n(c,d,f,g.stroke)}});if(b){var Q=-1*We(c,g);wi(P,0,-Q,270)}}function ee(p,u,c={}){var{width:g,height:b}=xn(u,c);return D(p,g,b,rr,{...c,fill:me(u,s,c.fill),fillOpacity:on,stroke:te(u,f,c.stroke)})}function X(p,u,c={}){var g=Ce(u),b=me(u,s,c.fill),P=te(u,f,c.stroke);return(g.get("associationDirection")==="One"||g.get("associationDirection")==="Both")&&(c.markerEnd=L(p,"association-end",b,P)),g.get("associationDirection")==="Both"&&(c.markerStart=L(p,"association-start",b,P)),c=ge(c,["markerStart","markerEnd"]),y(p,u.waypoints,{...c,stroke:P,strokeDasharray:"0, 5"})}function B(p,u,c={}){var g=me(u,s,c.fill),b=te(u,f,c.stroke),P=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.474,my:.296}}),Q=v(p,P,{fill:g,fillOpacity:on,stroke:b}),ce=Ce(u);if(ed(ce)){var N=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.33,my:(u.height-18)/u.height}});v(p,N,{strokeWidth:2,fill:g,stroke:b})}return Q}function O(p,u,c={}){return U(p,u.width,u.height,{fillOpacity:on,...c,fill:me(u,s,c.fill),stroke:te(u,f,c.stroke)})}function $(p,u,c={}){return S(p,u.width,u.height,{fill:me(u,s,c.fill),fillOpacity:on,stroke:te(u,f,c.stroke)})}function C(p,u,c={}){var g=D(p,et(u,c),We(u,c),0,{fill:me(u,s,c.fill),fillOpacity:c.fillOpacity||on,stroke:te(u,f,c.stroke),strokeWidth:1.5}),b=Ce(u);if(le(b,"bpmn:Lane")){var P=b.get("name");G(p,P,u,c)}return g}function k(p,u,c={}){var g=ee(p,u,c),b=jt(u);if(kf(u)&&(Te(g,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!b)){var P=Ce(u).flowElements||[],Q=P.filter(ce=>le(ce,"bpmn:StartEvent"));Q.length===1&&V(Q[0],p,c,u)}return Z(p,u,b?"center-top":"center-middle",c),b?q(p,u,void 0,c):q(p,u,["SubProcessMarker"],c),g}function V(p,u,c,g){var b=22,P={fill:me(g,s,c.fill),stroke:te(g,f,c.stroke),width:b,height:b},Q=Ce(p).isInterrupting,ce=Q?0:3,N=Q?1:1.2,F=20,W=(b-F)/2,ie="translate("+W+","+W+")";U(u,F,F,{fill:P.fill,stroke:P.stroke,strokeWidth:N,strokeDasharray:ce,transform:ie}),j(p,u,P,g)}function he(p,u,c={}){var g=ee(p,u,c);return Z(p,u,"center-middle",c),q(p,u,void 0,c),g}var ae=this.handlers={"bpmn:AdHocSubProcess":function(p,u,c={}){return jt(u)?c=ge(c,["fill","stroke","width","height"]):c=ge(c,["fill","stroke"]),k(p,u,c)},"bpmn:Association":function(p,u,c={}){return c=ge(c,["fill","stroke"]),X(p,u,c)},"bpmn:BoundaryEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=ge(c,["fill","stroke"]);var b=Ce(u),P=b.get("cancelActivity");c={strokeWidth:1.5,fill:me(u,s,c.fill),fillOpacity:Ed,stroke:te(u,f,c.stroke)},P||(c.strokeDasharray="6");var Q=O(p,u,c);return U(p,u.width,u.height,nr,{...c,fill:"none"}),g&&j(u,p,c),Q},"bpmn:BusinessRuleTask":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=he(p,u,c),b=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),P=v(p,b);Te(P,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1});var Q=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),ce=v(p,Q);return Te(ce,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:CallActivity":function(p,u,c={}){return c=ge(c,["fill","stroke"]),k(p,u,{strokeWidth:5,...c})},"bpmn:ComplexGateway":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=$(p,u,c),b=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:u.width,containerHeight:u.height,position:{mx:.46,my:.26}});return v(p,b,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:DataInput":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=r.getRawPath("DATA_ARROW"),b=B(p,u,c);return v(p,g,{fill:"none",stroke:te(u,f,c.stroke),strokeWidth:1}),b},"bpmn:DataInputAssociation":function(p,u,c={}){return c=ge(c,["fill","stroke"]),X(p,u,{...c,markerEnd:L(p,"association-end",me(u,s,c.fill),te(u,f,c.stroke))})},"bpmn:DataObject":function(p,u,c={}){return c=ge(c,["fill","stroke"]),B(p,u,c)},"bpmn:DataObjectReference":x("bpmn:DataObject"),"bpmn:DataOutput":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=r.getRawPath("DATA_ARROW"),b=B(p,u,c);return v(p,g,{strokeWidth:1,fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke)}),b},"bpmn:DataOutputAssociation":function(p,u,c={}){return c=ge(c,["fill","stroke"]),X(p,u,{...c,markerEnd:L(p,"association-end",me(u,s,c.fill),te(u,f,c.stroke))})},"bpmn:DataStoreReference":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:0,my:.133}});return v(p,g,{fill:me(u,s,c.fill),fillOpacity:on,stroke:te(u,f,c.stroke),strokeWidth:2})},"bpmn:EndEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=ge(c,["fill","stroke"]);var b=O(p,u,{...c,strokeWidth:4});return g&&j(u,p,c),b},"bpmn:EventBasedGateway":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=Ce(u),b=$(p,u,c);U(p,u.width,u.height,u.height*.2,{fill:me(u,"none",c.fill),stroke:te(u,f,c.stroke),strokeWidth:1});var P=g.get("eventGatewayType"),Q=!!g.get("instantiate");function ce(){var F=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:u.width,containerHeight:u.height,position:{mx:.36,my:.44}});v(p,F,{fill:"none",stroke:te(u,f,c.stroke),strokeWidth:2})}if(P==="Parallel"){var N=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:u.width,containerHeight:u.height,position:{mx:.474,my:.296}});v(p,N,{fill:"none",stroke:te(u,f,c.stroke),strokeWidth:1})}else P==="Exclusive"&&(Q||U(p,u.width,u.height,u.height*.26,{fill:"none",stroke:te(u,f,c.stroke),strokeWidth:1}),ce());return b},"bpmn:ExclusiveGateway":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=$(p,u,c),b=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:u.width,containerHeight:u.height,position:{mx:.32,my:.3}}),P=Vt(u);return P.get("isMarkerVisible")&&v(p,b,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:Gateway":function(p,u,c={}){return c=ge(c,["fill","stroke"]),$(p,u,c)},"bpmn:Group":function(p,u,c={}){return c=ge(c,["fill","stroke","width","height"]),D(p,u.width,u.height,rr,{stroke:te(u,f,c.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:et(u,c),height:We(u,c)})},"bpmn:InclusiveGateway":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=$(p,u,c);return U(p,u.width,u.height,u.height*.24,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:2.5}),g},"bpmn:IntermediateEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=ge(c,["fill","stroke"]);var b=O(p,u,{...c,strokeWidth:1.5});return U(p,u.width,u.height,nr,{fill:"none",stroke:te(u,f,c.stroke),strokeWidth:1.5}),g&&j(u,p,c),b},"bpmn:IntermediateCatchEvent":x("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":x("bpmn:IntermediateEvent"),"bpmn:Lane":function(p,u,c={}){return c=ge(c,["fill","stroke","width","height"]),C(p,u,{...c,fillOpacity:_d})},"bpmn:ManualTask":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=he(p,u,c),b=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return v(p,b,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:.5}),g},"bpmn:MessageFlow":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=Ce(u),b=Vt(u),P=me(u,s,c.fill),Q=te(u,f,c.stroke),ce=y(p,u.waypoints,{markerEnd:L(p,"messageflow-end",P,Q),markerStart:L(p,"messageflow-start",P,Q),stroke:Q,strokeDasharray:"10, 11",strokeWidth:1.5});if(g.get("messageRef")){var N=ce.getPointAtLength(ce.getTotalLength()/2),F=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:N.x,y:N.y}}),W={strokeWidth:1};b.get("messageVisibleKind")==="initiating"?(W.fill=P,W.stroke=Q):(W.fill=Q,W.stroke=P);var ie=v(p,F,W),ve=g.get("messageRef"),Se=ve.get("name"),de=re(p,Se,{align:"center-top",fitBox:!0,style:{fill:Q}}),ye=ie.getBBox(),z=de.getBBox(),K=N.x-z.width/2,pe=N.y+ye.height/2+vd;wi(de,K,pe,0)}return ce},"bpmn:ParallelGateway":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=$(p,u,c),b=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:u.width,containerHeight:u.height,position:{mx:.46,my:.2}});return v(p,b,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:Participant":function(p,u,c={}){c=ge(c,["fill","stroke","width","height"]);var g=C(p,u,c),b=jt(u),P=ia(u),Q=Ce(u),ce=Q.get("name");if(b){var N=P?[{x:30,y:0},{x:30,y:We(u,c)}]:[{x:0,y:30},{x:et(u,c),y:30}];I(p,N,{stroke:te(u,f,c.stroke),strokeWidth:wd}),G(p,ce,u,c)}else{var F=xn(u,c);P||(F.height=et(u,c),F.width=We(u,c));var W=re(p,ce,{box:F,align:"center-middle",style:{fill:_n(u,d,f,c.stroke)}});if(!P){var ie=-1*We(u,c);wi(W,0,-ie,270)}}return Q.get("participantMultiplicity")&&_("ParticipantMultiplicityMarker",p,u,c),g},"bpmn:ReceiveTask":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=Ce(u),b=he(p,u,c),P;return g.get("instantiate")?(U(p,28,28,20*.22,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1}),P=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):P=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),v(p,P,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1}),b},"bpmn:ScriptTask":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=he(p,u,c),b=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return v(p,b,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:SendTask":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=he(p,u,c),b=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return v(p,b,{fill:te(u,f,c.stroke),stroke:me(u,s,c.fill),strokeWidth:1}),g},"bpmn:SequenceFlow":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=me(u,s,c.fill),b=te(u,f,c.stroke),P=y(p,u.waypoints,{markerEnd:L(p,"sequenceflow-end",g,b),stroke:b}),Q=Ce(u),{source:ce}=u;if(ce){var N=Ce(ce);Q.get("conditionExpression")&&le(N,"bpmn:Activity")&&Te(P,{markerStart:L(p,"conditional-flow-marker",g,b)}),N.get("default")&&(le(N,"bpmn:Gateway")||le(N,"bpmn:Activity"))&&N.get("default")===Q&&Te(P,{markerStart:L(p,"conditional-default-flow-marker",g,b)})}return P},"bpmn:ServiceTask":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=he(p,u,c);U(p,10,10,{fill:me(u,s,c.fill),stroke:"none",transform:"translate(6, 6)"});var b=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});v(p,b,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1}),U(p,10,10,{fill:me(u,s,c.fill),stroke:"none",transform:"translate(11, 10)"});var P=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return v(p,P,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:StartEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=ge(c,["fill","stroke"]);var b=Ce(u);b.get("isInterrupting")||(c={...c,strokeDasharray:"6"});var P=O(p,u,c);return g&&j(u,p,c),P},"bpmn:SubProcess":function(p,u,c={}){return jt(u)?c=ge(c,["fill","stroke","width","height"]):c=ge(c,["fill","stroke"]),k(p,u,c)},"bpmn:Task":function(p,u,c={}){return c=ge(c,["fill","stroke"]),he(p,u,c)},"bpmn:TextAnnotation":function(p,u,c={}){c=ge(c,["fill","stroke"]);var{width:g,height:b}=xn(u,c),P=D(p,g,b,0,0,{fill:"none",stroke:"none"}),Q=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:0,my:0}});v(p,Q,{stroke:te(u,f,c.stroke)});var ce=Ce(u),N=ce.get("text")||"";return re(p,N,{align:"left-top",box:xn(u,c),padding:la,style:{fill:_n(u,d,f,c.stroke)}}),P},"bpmn:Transaction":function(p,u,c={}){jt(u)?c=ge(c,["fill","stroke","width","height"]):c=ge(c,["fill","stroke"]);var g=k(p,u,{strokeWidth:1.5,...c}),b=n.style(["no-fill","no-events"],{stroke:te(u,f,c.stroke),strokeWidth:1.5}),P=jt(u);return P||(c={}),D(p,et(u,c),We(u,c),rr-nr,nr,b),g},"bpmn:UserTask":function(p,u,c={}){c=ge(c,["fill","stroke"]);var g=he(p,u,c),b=15,P=12,Q=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:b,y:P}});v(p,Q,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:.5});var ce=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:b,y:P}});v(p,ce,{fill:me(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:.5});var N=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:b,y:P}});return v(p,N,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:.5}),g},label:function(p,u,c={}){return H(p,u,c)}};this._drawPath=v,this._renderer=T}ot(Ht,mt),Ht.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Ht.prototype.canRender=function(e){return le(e,"bpmn:BaseElement")},Ht.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Ht.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Ht.prototype.getShapePath=function(e){return Rf(e)?va(e,bd):le(e,"bpmn:Event")?td(e):le(e,"bpmn:Activity")?va(e,rr):le(e,"bpmn:Gateway")?nd(e):rd(e)};function ge(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}var xd=0,Sd={width:150,height:50};function Ad(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function kd(e){return _t(e)?se({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var Ei=null;function Cd(){return Ei||(Ei=document.createElement("canvas").getContext("2d")),Ei}function Rd(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(Ca(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function Ca(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function Td(e,t){var n=Cd();if(!n)return{width:0,height:0};n.font=Rd(t),"letterSpacing"in n&&(n.letterSpacing=Ca(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 Nd(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=Td(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return Pd(e,i,r,o);i=Id(i,o.width,t)}}function Pd(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 Ra="­";function Dd(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===Ra)&&i.pop();break}var a=i[i.length-1];return a&&a===Ra&&(i[i.length-1]="-"),i.join("")}function Id(e,t,n){var r=Math.max(e.length*(n/t),1),i=Dd(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function ir(e){this._config=se({},{size:Sd,padding:xd,style:{},align:"center-top"},e||{})}ir.prototype.createText=function(e,t){return this.layoutText(e,t).element},ir.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},ir.prototype.layoutText=function(e,t){for(var n=se({},this._config.size,t.box),r=se({},this._config.style,t.style),i=Ad(t.align||this._config.align),o=kd(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=Od(r),f=e.split(/\u00AD?\r?\n/),d=[],h=n.width-o.left-o.right;f.length;)d.push(Nd(f,h,r));i.vertical==="middle"&&(o.top=o.bottom=0);var m=rn(d,function(D,S,I){return D+(s||S.height)},0)+o.top+o.bottom,R=rn(d,function(D,S,I){return S.width>D?S.width:D},0),L=o.top;i.vertical==="middle"&&(L+=(n.height-m)/2),L-=(s||d[0].height)/4;var Y=Re("text");Te(Y,r),oe(d,function(D){var S;switch(L+=s||D.height,i.horizontal){case"left":S=o.left;break;case"right":S=(a?R:h)-o.right-D.width;break;default:S=Math.max(((a?R:h)-D.width)/2+o.left,0)}var I=Re("tspan");Te(I,{x:S,y:L}),I.textContent=D.text,Oe(Y,I)});var U={width:R,height:m};return{dimensions:U,element:Y}};function Od(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Bd=12,Md=1.2,Ld=40;function Ta(e){var t=se({fontFamily:"Arial, sans-serif",fontSize:Bd,fontWeight:"normal",lineHeight:Md},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=se({},t,{fontSize:n},e&&e.externalStyle||{}),i=new ir({style:t});this.getExternalLabelBounds=function(a,s){var f={width:Math.max(a.width,vn.width),height:30},d=o(s,f,{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 f=o(s,a,{style:t,align:"left-top",padding:la});return{x:a.x,y:a.y,width:a.width,height:Math.max(Ld,Math.round(f.height))}},this.getDimensions=function(a,s){return i.getDimensions(a,s||{})};function o(a,s,f){return i.getDimensions(a,se({box:s},f))}this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}Ta.$inject=["config.textRenderer"];function Fd(){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,f=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]*f}var m=Ud(r.d,{mx:i,my:o,e:a});return m}}var $d=/\{([^{}]+)\}/g,Vd=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function jd(e,t,n){var r=n;return t.replace(Vd,function(i,o,a,s,f){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&f&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function Ud(e,t){return String(e).replace($d,function(n,r){return jd(n,r,t)})}const zd={__init__:["bpmnRenderer"],bpmnRenderer:["type",Ht],textRenderer:["type",Ta],pathMap:["type",Fd]};function Hd(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const Na={translate:["value",Hd]};function Wd(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function _i(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function qd(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Yd(e){return Wd({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function Kd(e){for(var t=e.waypoints,n=t.reduce(function(d,h,m){var R=t[m-1];if(R){var L=d[d.length-1],Y=L&&L.endLength||0,U=Gd(R,h);d.push({start:R,end:h,startLength:Y,endLength:Y+U,length:U})}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,f={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return f}function xi(e){return Cf(e)?Kd(e):Yd(e)}function Gd(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Me(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function or(e,t,n){return se({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Xd(e,t,n){var r=e.waypoint;return!r||r.length<2?[xi(t),xi(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function Pa(e,t,n){return new Error(`element ${Me(t)} referenced by ${Me(e)}#${n} not yet drawn`)}function vt(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}vt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],vt.prototype.add=function(e,t,n){var r,i,o;if(le(t,"bpmndi:BPMNPlane")){var a=le(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(or(e,t,a)),this._canvas.addRootElement(r)}else if(le(t,"bpmndi:BPMNShape")){var s=!jt(e,t),f=Zd(e);i=n&&(n.hidden||n.collapsed);var d=t.bounds;r=this._elementFactory.createShape(or(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:f})),le(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),le(e,"bpmn:Lane")&&(o=0),le(e,"bpmn:DataStoreReference")&&(Jd(n,xi(d))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(le(t,"bpmndi:BPMNEdge")){var h=this._getSource(e),m=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(or(e,t,{hidden:i,source:h,target:m,waypoints:Xd(t,h,m)})),le(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Me(t)} for element ${Me(e)}`);return Tf(e)&&Jn(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},vt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Me(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw Pa(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)},vt.prototype.addLabel=function(e,t,n){var r,i,o;return r=If(t,n),i=Jn(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(or(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Jn(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)},vt.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?Pa(e,r,t+"Ref"):new Error(`${Me(e)}#${t} Ref not specified`)},vt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},vt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},vt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function Jd(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 Zd(e){return le(e,"bpmn:Group")}const Qd={__depends__:[zd,{__depends__:[Na],bpmnImporter:["type",vt]}]};function Da(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}Da.prototype.next=function(){return this._prefix+ ++this._counter};var ep=new Da("ov"),tp=500;function Ie(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=ep,this._overlayDefaults=se({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=np(n.getContainer()),this._init()}Ie.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Ie.prototype.get=function(e){if(at(e)&&(e={id:e}),at(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?nn(t.overlays,na({type:e.type})):t.overlays.slice():[]}else return e.type?nn(this._overlays,na({type:e.type})):e.id?this._overlays[e.id]:null},Ie.prototype.add=function(e,t,n){if(_t(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=se({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},Ie.prototype.remove=function(e){var t=this.get(e)||[];Qe(t)||(t=[t]);var n=this;oe(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(tr(r.html),tr(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)}})},Ie.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"},Ie.prototype.show=function(){ar(this._overlayRoot)},Ie.prototype.hide=function(){ar(this._overlayRoot,!1)},Ie.prototype.clear=function(){this._overlays={},this._overlayContainers=[],ba(this._overlayRoot)},Ie.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=wn(t);r=o.x,i=o.y}Ia(n,r,i),wa(e.html,"data-container-id",t.id)},Ie.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=wn(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=wn(r).height:s=r.height,o=t.bottom*-1+s}Ia(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Ie.prototype._createOverlayContainer=function(e){var t=ct('<div class="djs-overlays" />');Ye(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Ie.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Oa(this._overlayRoot,n)},Ie.prototype._getOverlayContainer=function(e,t){var n=it(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n},Ie.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)),at(r)&&(r=ct(r)),o=this._getOverlayContainer(n),i=ct('<div class="djs-overlay" data-overlay-id="'+t+'">'),Ye(i,{position:"absolute"}),i.appendChild(r),e.type&&zt(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();ar(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())},Ie.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(),f=!0;(r!==s||n&&(en(i)&&i>t.scale||en(o)&&o<t.scale))&&(f=!1),ar(a,f),this._updateOverlayScale(e,t)},Ie.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),en(r)&&t.scale<r&&(a=(1/t.scale||1)*r),en(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),en(a)&&(s="scale("+a+","+a+")"),Oa(o,s)},Ie.prototype._updateOverlaysVisibilty=function(e){var t=this;oe(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},Ie.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});oe(o,function(f){t.remove(f.id)});var a=t._getOverlayContainer(i);if(a){tr(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",tp,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(oe(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&&zt(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 np(e){var t=ct('<div class="djs-overlay-container" />');return Ye(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function Ia(e,t,n){Ye(e,{left:t+"px",top:n+"px"})}function ar(e,t){e.style.display=t===!1?"none":""}function Oa(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const Ba={__init__:["overlays"],overlays:["type",Ie]};function Ma(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(aa(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)})}Ma.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const rp={__init__:["changeSupport"],changeSupport:["type",Ma]};var ip=1e3;function Ue(e){this._eventBus=e}Ue.$inject=["eventBus"];function op(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}Ue.prototype.on=function(e,t,n,r,i,o){if(($t(t)||xt(t))&&(o=i,i=r,r=n,n=t,t=null),$t(n)&&(o=i,i=r,r=n,n=ip),_t(i)&&(o=i,i=!1),!$t(r))throw new Error("handlerFn must be a function");Qe(e)||(e=[e]);var a=this._eventBus;oe(e,function(s){var f=["commandStack",s,t].filter(function(d){return d}).join(".");a.on(f,n,i?op(r,o):r,o)})},Ue.prototype.canExecute=wt("canExecute"),Ue.prototype.preExecute=wt("preExecute"),Ue.prototype.preExecuted=wt("preExecuted"),Ue.prototype.execute=wt("execute"),Ue.prototype.executed=wt("executed"),Ue.prototype.postExecute=wt("postExecute"),Ue.prototype.postExecuted=wt("postExecuted"),Ue.prototype.revert=wt("revert"),Ue.prototype.reverted=wt("reverted");function wt(e){return function(n,r,i,o,a){($t(n)||xt(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function Si(e,t){t.invoke(Ue,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)})}ot(Si,Ue),Si.$inject=["canvas","injector"];const ap={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Si]};var sp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function lp(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return sp[t]})}var cp="_plane";function Ai(e){var t=e.id;return le(e,"bpmn:SubProcess")?up(t):t}function up(e){return e+cp}var fp="bjs-breadcrumbs-shown";function La(e,t,n){var r=ct('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=zt(i);i.appendChild(r);var a=[];e.on("element.changed",function(f){var d=f.element,h=Ce(d),m=it(a,function(R){return R===h});m&&s()});function s(f){f&&(a=dp(f));var d=a.flatMap(function(m){var R=n.findRoot(Ai(m))||n.findRoot(m.id);if(!R&&le(m,"bpmn:Process")){var L=t.find(function(D){var S=Ce(D);return S&&S.get("processRef")===m});R=L&&n.findRoot(L.id)}if(!R)return[];var Y=lp(m.name||m.id),U=ct('<li><span class="bjs-crumb"><a title="'+Y+'">'+Y+"</a></span></li>");return U.addEventListener("click",function(){n.setRootElement(R)}),U});r.innerHTML="";var h=d.length>1;o.toggle(fp,h),d.forEach(function(m){r.appendChild(m)})}e.on("root.set",function(f){s(f.element)})}La.$inject=["eventBus","elementRegistry","canvas"];function dp(e){for(var t=Ce(e),n=[],r=t;r;r=r.$parent)(le(r,"bpmn:SubProcess")||le(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function Fa(e,t){var n=null,r=new pp;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,!(!le(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var f=(a.x-s.x)*a.scale,d=(a.y-s.y)*a.scale;(f!==0||d!==0)&&t.scroll({dx:f,dy:d}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}Fa.$inject=["eventBus","canvas"];function pp(){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 $a={x:180,y:160};function Wt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}Wt.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)})}},Wt.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;le(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),mp(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 f=t._processToDiagramMap[s.id];t._moveToDiPlane(a,f.plane)}}),i},Wt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=hp(e),r={x:n.x-$a.x,y:n.y-$a.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)})},Wt.prototype._moveToDiPlane=function(e,t){var n=Va(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)},Wt.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},Wt.$inject=["eventBus","moddle"];function Va(e){return le(e,"bpmndi:BPMNDiagram")?e:Va(e.$parent)}function hp(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=_i(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),qd(t)}function mp(e,t){var n=e.$parent;return!(!le(n,"bpmn:SubProcess")||n===t.bpmnElement||Af(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var sr=250,yp='<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>',gp="bjs-drilldown-empty";function Rt(e,t,n,r,i){Ue.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",sr,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",sr,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],sr,function(a){var s=a.oldParent,f=a.newParent||a.parent,d=a.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(d)},!0),this.reverted(["shape.create","shape.move","shape.delete"],sr,function(a){var s=a.oldParent,f=a.newParent||a.parent,d=a.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(d)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}ot(Rt,Ue),Rt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Rt.prototype._canDrillDown=function(e){var t=this._canvas;return le(e,"bpmn:SubProcess")&&t.findRoot(Ai(e))},Rt.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;zt(r.html).toggle(gp,!i)}},Rt.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=ct('<button type="button" class="bjs-drilldown">'+yp+"</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(Ai(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)},Rt.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})},Rt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const vp={__depends__:[Ba,rp,ap],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",La],drilldownCentering:["type",Fa],drilldownOverlayBehavior:["type",Rt],subprocessCompatibility:["type",Wt]};function ja(e){return e.originalEvent||e.srcEvent}function Ua(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 wp(){return/mac/i.test(navigator.platform)}function za(e,t){return(ja(e)||e).button===t}function lr(e){return za(e,0)}function bp(e){return za(e,1)}function Ep(e){var t=ja(e)||e;return lr(e)&&t.shiftKey}function _p(e){return!0}function cr(e){return lr(e)||bp(e)}var Ha=500;function Wa(e,t,n){var r=this;function i(E,j,M){if(!s(E,j)){var _,q,re;M?q=t.getGraphics(M):(_=j.delegateTarget||j.target,_&&(q=_,M=t.get(q))),!(!q||!M)&&(re=e.fire(E,{element:M,gfx:q,originalEvent:j}),re===!1&&(j.stopPropagation(),j.preventDefault()))}}var o={};function a(E){return o[E]}function s(E,j){var M=d[E]||lr;return!M(j)}var f={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":_p,"element.mousedown":cr,"element.mouseup":cr,"element.click":cr,"element.dblclick":cr};function h(E,j,M){var _=f[E];if(!_)throw new Error("unmapped DOM event name <"+E+">");return i(_,j,M)}var m="svg, .djs-element";function R(E,j,M,_){var q=o[M]=function(re){i(M,re)};_&&(d[M]=_),q.$delegate=vi.bind(E,m,j,q)}function L(E,j,M){var _=a(M);_&&vi.unbind(E,j,_.$delegate)}function Y(E){oe(f,function(j,M){R(E,M,j)})}function U(E){oe(f,function(j,M){L(E,M,j)})}e.on("canvas.destroy",function(E){U(E.svg)}),e.on("canvas.init",function(E){Y(E.svg)}),e.on(["shape.added","connection.added"],function(E){var j=E.element,M=E.gfx;e.fire("interactionEvents.createHit",{element:j,gfx:M})}),e.on(["shape.changed","connection.changed"],Ha,function(E){var j=E.element,M=E.gfx;e.fire("interactionEvents.updateHit",{element:j,gfx:M})}),e.on("interactionEvents.createHit",Ha,function(E){var j=E.element,M=E.gfx;r.createDefaultHit(j,M)}),e.on("interactionEvents.updateHit",function(E){var j=E.element,M=E.gfx;r.updateDefaultHit(j,M)});var D=A("djs-hit djs-hit-stroke"),S=A("djs-hit djs-hit-click-stroke"),I=A("djs-hit djs-hit-all"),y=A("djs-hit djs-hit-no-move"),v={all:I,"click-stroke":S,stroke:D,"no-move":y};function A(E,j){return j=se({stroke:"white",strokeWidth:15},j||{}),n.cls(E,["no-fill","no-border"],j)}function T(E,j){var M=v[j];if(!M)throw new Error("invalid hit type <"+j+">");return Te(E,M),E}function x(E,j){Oe(E,j)}this.removeHits=function(E){var j=fd(".djs-hit",E);oe(j,Zn)},this.createDefaultHit=function(E,j){var M=E.waypoints,_=E.isFrame,q;return M?this.createWaypointsHit(j,M):(q=_?"stroke":"all",this.createBoxHit(j,q,{width:E.width,height:E.height}))},this.createWaypointsHit=function(E,j){var M=yi(j);return T(M,"stroke"),x(E,M),M},this.createBoxHit=function(E,j,M){M=se({x:0,y:0},M);var _=Re("rect");return T(_,j),Te(_,M),x(E,_),_},this.updateDefaultHit=function(E,j){var M=yt(".djs-hit",j);if(M)return E.waypoints?ga(M,E.waypoints):Te(M,{width:E.width,height:E.height}),M},this.fire=i,this.triggerMouseEvent=h,this.mouseHandler=a,this.registerEvent=R,this.unregisterEvent=L}Wa.$inject=["eventBus","elementRegistry","styles"];const xp={__init__:["interactionEvents"],interactionEvents:["type",Wa]};function an(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)})}an.$inject=["eventBus","canvas"],an.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()})}},an.prototype.get=function(){return Array.from(this._selectedElements)},an.prototype.isSelected=function(e){return this._selectedElements.has(e)},an.prototype.select=function(e,t){var n=this.get();Qe(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?oe(e,o=>{this._selectedElements.add(o)}):this._selectedElements=new Set(e),this._eventBus.fire("selection.changed",{oldSelection:n,newSelection:this.get()})};var qa="hover",Ya="selected";function Ka(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,qa)}),t.on("element.out",function(i){r(i.element,qa)}),t.on("selection.changed",function(i){function o(d){r(d,Ya)}function a(d){n(d,Ya)}var s=new Set(i.oldSelection),f=new Set(i.newSelection);for(let d of s)f.has(d)||o(d);for(let d of f)s.has(d)||a(d)})}Ka.$inject=["canvas","eventBus"];function Ga(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,f=o.hints||{},d=f.autoSelect;if(a){if(d===!1)return;Qe(d)?t.select(d):t.select(s.filter(Sp))}}),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=it(o,function(f){return a.id===f.id});s||t.select(a)}),e.on("element.click",function(i){if(lr(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,f=Ep(i);if(a&&s)return f?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,f)}})}Ga.$inject=["eventBus","selection","canvas","elementRegistry"];function Sp(e){return!e.hidden}const Ap={__init__:["selectionVisuals","selectionBehavior"],__depends__:[xp],selection:["type",an],selectionVisuals:["type",Ka],selectionBehavior:["type",Ga]},kp=/^class[ {]/;function Cp(e){return kp.test(e.toString())}function ki(e){return Array.isArray(e)}function Ci(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ur(...e){e.length===1&&ki(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const Rp=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Tp=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Np=/\/\*([^*]*)\*\//m;function Pp(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(Cp(e)?Rp:Tp);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(Np);return(i&&i[1]||r).trim()})||[]}function Xa(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 f(y,v){if(!i[y]&&y.includes(".")){const A=y.split(".");let T=f(A.shift());for(;A.length;)T=T[A.shift()];return T}if(Ci(o,y))return o[y];if(Ci(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(ki(y))y=ur(y.slice());else throw s(`Cannot invoke "${y}". Expected a function!`);const T=(y.$inject||Pp(y)).map(x=>Ci(v,x)?v[x]:f(x));return{fn:y,dependencies:T}}function h(y){const{fn:v,dependencies:A}=d(y),T=Function.prototype.bind.call(v,null,...A);return new T}function m(y,v,A){const{fn:T,dependencies:x}=d(y,A);return T.apply(v,x)}function R(y){return ur(v=>y.get(v))}function L(y,v){if(v&&v.length){const A=Object.create(null),T=Object.create(null),x=[],E=[],j=[];let M,_,q,re;for(let Z in i)M=i[Z],v.indexOf(Z)!==-1&&(M[2]==="private"?(_=x.indexOf(M[3]),_===-1?(q=M[3].createChild([],v),re=R(q),x.push(M[3]),E.push(q),j.push(re),A[Z]=[re,Z,"private",q]):A[Z]=[j[_],Z,"private",E[_]]):A[Z]=[M[2],M[1]],T[Z]=!0),(M[2]==="factory"||M[2]==="type")&&M[1].$scope&&v.forEach(H=>{M[1].$scope.indexOf(H)!==-1&&(A[Z]=[M[2],M[1]],T[H]=!0)});v.forEach(Z=>{if(!T[Z])throw new Error('No provider for "'+Z+'". Cannot use provider from the parent!')}),y.unshift(A)}return new Xa(y,a)}const Y={factory:m,type:h,value:function(y){return y}};function U(y,v){const A=y.__init__||[];return function(){A.forEach(T=>{typeof T=="string"?v.get(T):v.invoke(T)})}}function D(y){const v=y.__exports__;if(v){const A=y.__modules__,T=Object.keys(y).reduce((_,q)=>(q!=="__exports__"&&q!=="__modules__"&&q!=="__init__"&&q!=="__depends__"&&(_[q]=y[q]),_),Object.create(null)),x=(A||[]).concat(T),E=L(x),j=ur(function(_){return E.get(_)});v.forEach(function(_){i[_]=[j,_,"private",E]});const M=(y.__init__||[]).slice();return M.unshift(function(){E.init()}),y=Object.assign({},y,{__init__:M}),U(y,E)}return Object.keys(y).forEach(function(A){if(A==="__init__"||A==="__depends__")return;const T=y[A];if(T[2]==="private"){i[A]=T;return}const x=T[0],E=T[1];i[A]=[Y[x],Dp(x,E),x]}),U(y,a)}function S(y,v){return y.indexOf(v)!==-1||(y=(v.__depends__||[]).reduce(S,y),y.indexOf(v)!==-1)?y:y.concat(v)}function I(y){const v=y.reduce(S,[]).map(D);let A=!1;return function(){A||(A=!0,v.forEach(T=>T()))}}this.get=f,this.invoke=m,this.instantiate=h,this.createChild=L,this.init=I(e)}function Dp(e,t){return e!=="value"&&ki(t)&&(t=ur(t.slice())),t}var Ip=1;function Tt(e,t){mt.call(this,e,Ip),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})}ot(Tt,mt),Tt.prototype.canRender=function(){return!0},Tt.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,se({},this.FRAME_STYLE,r||{})):Te(i,se({},this.SHAPE_STYLE,r||{})),Oe(t,i),i},Tt.prototype.drawConnection=function(t,n,r){var i=yi(n.waypoints,se({},this.CONNECTION_STYLE,r||{}));return Oe(t,i),i},Tt.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 Ut(a)},Tt.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 Ut(o)},Tt.$inject=["eventBus","styles"];function Op(){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 se(o,{class:n})},this.style=function(n,r){!Qe(n)&&!r&&(r=n,n=[]);var i=rn(n,function(o,a){return se(o,e[a]||{})},{});return r?se(i,r):i},this.computeStyle=function(n,r,i){return Qe(r)||(i=r,r=[]),t.style(r||[],se({},i,n||{}))}}const Bp={__init__:["defaultRenderer"],defaultRenderer:["type",Tt],styles:["type",Op]};function Mp(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function Lp(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 fr(e,t){return Math.round(e*t)/t}function Ja(e){return xt(e)?e+"px":e}function Fp(e){for(;e.parent;)e=e.parent;return e}function $p(e){e=se({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Ye(n,{position:"relative",overflow:"hidden",width:Ja(e.width),height:Ja(e.height)}),t.appendChild(n),n}function Za(e,t,n){const r=Re("g");st(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const Vp="base",Qa=0,jp=1,Up={shape:["x","y","width","height"],connection:["waypoints"]};function fe(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||{})}fe.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],fe.prototype._init=function(e){const t=this._eventBus,n=this._container=$p(e),r=this._svg=Re("svg");Te(r,{width:"100%",height:"100%"}),wa(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")}),Oe(n,r);const i=this._viewport=Za(r,"viewport");e.deferUpdate&&(this._viewboxChanged=ra(this._viewboxChanged,300)),this._restoreFocus=ra(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)},fe.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},fe.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},fe.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=aa(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},fe.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},fe.prototype.restoreFocus=function(){this._restoreFocus()},fe.prototype._restoreFocus=function(){document.activeElement===document.body&&this.focus()},fe.prototype.isFocused=function(){return this._focused},fe.prototype.getDefaultLayer=function(){return this.getLayer(Vp,Qa)},fe.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},fe.prototype._getChildIndex=function(e){return rn(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},fe.prototype._createLayer=function(e,t){typeof t>"u"&&(t=jp);const n=this._getChildIndex(t);return{group:Za(this._viewport,"layer-"+e,n),index:t,visible:!0}},fe.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},fe.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&&(Zn(n),t.visible=!1),n},fe.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Zn(t.group))},fe.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},fe.prototype.findRoot=function(e){const t=this._resolveElements(e);let n;for(const r of t){const i=this._findPlaneForRoot(Fp(r));if(!i||n&&i.rootElement!==n)return;n=i.rootElement}return n},fe.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},fe.prototype._findPlaneForRoot=function(e){return it(this._planes,function(t){return t.rootElement===e})},fe.prototype._resolveElement=function(e){return typeof e=="string"?this._elementRegistry.get(e):e},fe.prototype._resolveElements=function(e){return Qe(e)||(e=[e]),e.map(t=>this._resolveElement(t)).filter(Boolean)},fe.prototype.getContainer=function(){return this._container},fe.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&&(oe([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),st(i).add(t)):(e.markers.delete(t),st(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},fe.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},fe.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},fe.prototype.hasMarker=function(e,t){return e=this._resolveElement(e),e.markers?e.markers.has(t):!1},fe.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},fe.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},fe.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,Qa);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e},fe.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},fe.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},fe.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)},fe.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})},fe.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})},fe.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=Up[e];if(!ea(n,function(i){return typeof t[i]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},fe.prototype._setParent=function(e,t,n){Lp(t.children,e,n),e.parent=t},fe.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},fe.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},fe.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},fe.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),Mp(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e},fe.prototype.removeShape=function(e){return this._removeElement(e,"shape")},fe.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},fe.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},fe.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},fe.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},fe.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,f,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);En(t,h)});else return o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},a=En(t),i=a?a.matrix:zf(),s=fr(i.a,1e3),f=fr(-i.e||0,1e3),d=fr(-i.f||0,1e3),e=this._cachedViewbox={x:f?f/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},fe.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=se({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),es(t,n)}),{x:n.e,y:n.f}},fe.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(Y=>Y!=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=wn(o),s=_i(a),f=this.viewbox(),d=this.zoom();let h,m;f.y+=t.top/d,f.x+=t.left/d,f.width-=(t.right+t.left)/d,f.height-=(t.bottom+t.top)/d;const R=_i(f);if(!(a.width<f.width&&a.height<f.height))h=a.x-f.x,m=a.y-f.y;else{const Y=Math.max(0,s.right-R.right),U=Math.min(0,s.left-R.left),D=Math.max(0,s.bottom-R.bottom),S=Math.min(0,s.top-R.top);h=Y||U,m=D||S}this.scroll({dx:-h*d,dy:-m*d})},fe.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)}),fr(r.a,1e3)};function es(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}fe.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},fe.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,f,d,h;f=r.getCTM();const m=f.a;return t?(a=se(o,t),s=a.matrixTransform(f.inverse()),d=i.translate(s.x,s.y).scale(1/m*e).translate(-s.x,-s.y),h=f.multiply(d)):h=i.scale(e),es(this._viewport,h),h},fe.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},fe.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}},fe.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var sn="data-element-id";function Ke(e){this._elements={},this._eventBus=e}Ke.$inject=["eventBus"],Ke.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),Te(t,sn,r),n&&Te(n,sn,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},Ke.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(Te(r.gfx,sn,""),r.secondaryGfx&&Te(r.secondaryGfx,sn,""),delete t[n])},Ke.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)},Ke.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,sn,r),t},Ke.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&Te(e,sn);var n=this._elements[t];return n&&n.element},Ke.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t},Ke.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}},Ke.prototype.getAll=function(){return this.filter(function(e){return e})},Ke.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)})},Ke.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)},Ke.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 zp(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 Hp(e){return e.__refs_collection===!0}function Wp(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function ts(e,t,n){var r=zp(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 qp(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 tt(e,t){if(!(this instanceof tt))return new tt(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}tt.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):qp(this,t,e)},tt.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return Hp(n)||ts(this,t,e),n},tt.prototype.ensureBound=function(e,t){Wp(e,t)||this.bind(e,t)},tt.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},tt.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Ri=new tt({name:"children",enumerable:!0,collection:!0},{name:"parent"}),ns=new tt({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),rs=new tt({name:"attachers",collection:!0},{name:"host"}),is=new tt({name:"outgoing",collection:!0},{name:"source"}),os=new tt({name:"incoming",collection:!0},{name:"target"});function Sn(){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)}}),Ri.bind(this,"parent"),ns.bind(this,"labels"),is.bind(this,"outgoing"),os.bind(this,"incoming")}function An(){Sn.call(this),Ri.bind(this,"children"),rs.bind(this,"host"),rs.bind(this,"attachers")}ot(An,Sn);function as(){Sn.call(this),Ri.bind(this,"children")}ot(as,An);function ss(){An.call(this),ns.bind(this,"labelTarget")}ot(ss,An);function ls(){Sn.call(this),is.bind(this,"source"),os.bind(this,"target")}ot(ls,Sn);var Yp={connection:ls,shape:An,label:ss,root:as};function Kp(e,t){var n=Yp[e];if(!n)throw new Error("unknown type: <"+e+">");return se(new n,t)}function ln(){this._uid=12}ln.prototype.createRoot=function(e){return this.create("root",e)},ln.prototype.createLabel=function(e){return this.create("label",e)},ln.prototype.createShape=function(e){return this.create("shape",e)},ln.prototype.createConnection=function(e){return this.create("connection",e)},ln.prototype.create=function(e,t){return t=se({},t||{}),t.id||(t.id=e+"_"+this._uid++),Kp(e,t)};var dr="__fn",cs=1e3,Gp=Array.prototype.slice;function qe(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}qe.prototype.on=function(e,t,n,r){if(e=Qe(e)?e:[e],$t(t)&&(r=n,n=t,t=cs),!xt(t))throw new Error("priority must be a number");var i=n;r&&(i=St(n,r),i[dr]=n[dr]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:i,next:null})})},qe.prototype.once=function(e,t,n,r){var i=this;if($t(t)&&(r=n,n=t,t=cs),!xt(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[dr]=n,this.on(e,t,o)},qe.prototype.off=function(e,t){e=Qe(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})},qe.prototype.createEvent=function(e){var t=new kn;return t.init(e),t},qe.prototype.fire=function(e,t){var n,r,i,o;if(o=Gp.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 kn?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}},qe.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},qe.prototype._destroy=function(){this._listeners={}},qe.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},qe.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=Xp(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},qe.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},qe.prototype._getListeners=function(e){return this._listeners[e]},qe.prototype._setListeners=function(e,t){this._listeners[e]=t},qe.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[dr]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function kn(){}kn.prototype.stopPropagation=function(){this.cancelBubble=!0},kn.prototype.preventDefault=function(){this.defaultPrevented=!0},kn.prototype.init=function(e){se(this,e||{})};function Xp(e,t){return e.apply(null,t)}function Jp(e){return e.childNodes[0]}function Zp(e){return e.parentNode.childNodes[1]}function Ge(e,t){this._eventBus=e,this._elementRegistry=t}Ge.$inject=["eventBus","elementRegistry"],Ge.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=Zp(t),n||(n=Re("g"),st(n).add("djs-children"),Oe(t.parentNode,n))):n=t,n},Ge.prototype._clear=function(e){var t=Jp(e);return ba(t),t},Ge.prototype._createContainer=function(e,t,n,r){var i=Re("g");st(i).add("djs-group"),typeof n<"u"?Qp(i,t,t.childNodes[n]):Oe(t,i);var o=Re("g");st(o).add("djs-element"),st(o).add("djs-"+e),r&&st(o).add("djs-frame"),Oe(i,o);var a=Re("g");return st(a).add("djs-visual"),Oe(o,a),o},Ge.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,sa(t))},Ge.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=rn(e,function(i,o){return o.parent&&(i[o.parent.id]=o.parent),i},{}),oe(r,function(i){var o=i.children;if(o){var a=t._getChildrenContainer(i),s=a.firstChild;oe(o,function(f){var d=n.getGraphics(f).parentNode;d===s?s=s.nextSibling:a.insertBefore(d,s)})}})},Ge.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})},Ge.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},Ge.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})},Ge.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},Ge.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),Aa(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")}},Ge.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);Zn(t.parentNode)};function Qp(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const eh={__depends__:[Bp],__init__:["canvas"],canvas:["type",fe],elementRegistry:["type",Ke],elementFactory:["type",ln],eventBus:["type",qe],graphicsFactory:["type",Ge]};function th(e){var t=new Xa(e);return t.init(),t}function nh(e){e=e||{};var t={config:["value",e]},n=[t,eh].concat(e.modules||[]);return th(n)}function Nt(e,t){this._injector=t||nh(e),this.get("eventBus").fire("diagram.init")}Nt.prototype.get=function(e,t){return this._injector.get(e,t)},Nt.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Nt.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Nt.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function Ti(){}Ti.prototype.get=function(e){return this.$model.properties.get(this,e)},Ti.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function us(e,t){this.model=e,this.properties=t}us.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(Ti.prototype);oe(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}),oe(a,St(function(s,f){this.set(f,s)},this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var rh=se(Object.create(null),{String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0}),fs=se(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 Ni(e,t){var n=fs[e];return n?n(t):t}function Pi(e){return!!rh[e]}function ds(e){return!!fs[e]}function Le(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 Xe(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName=Object.create(null),this.properties=[],this.propertiesByName=Object.create(null)}Xe.prototype.build=function(){return _f(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},Xe.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)},Xe.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},Xe.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=Le(i[0],r),a=Le(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},Xe.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},Xe.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},Xe.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},Xe.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},Xe.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},Xe.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")},Xe.prototype.hasProperty=function(e){return this.propertiesByName[e]},Xe.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(oe(e.properties,St(function(o){o=se({},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 Pt(e,t){this.packageMap=Object.create(null),this.typeMap=Object.create(null),this.packages=[],this.properties=t,oe(e,St(this.registerPackage,this))}Pt.prototype.getPackage=function(e){return this.packageMap[e]},Pt.prototype.getPackages=function(){return this.packages},Pt.prototype.registerPackage=function(e){e=se({},e);var t=this.packageMap;ps(t,e,"prefix"),ps(t,e,"uri"),oe(e.types,St(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Pt.prototype.registerType=function(e,t){e=se({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:se({},e.meta||{})});var n=Le(e.name,t.prefix),r=n.name,i=Object.create(null);oe(e.properties,St(function(o){var a=Le(o.name,n.prefix),s=a.name;Pi(o.type)||(o.type=Le(o.type,a.prefix).name),se(o,{ns:a,name:s}),i[s]=o},this)),se(e,{ns:n,name:r,propertiesByName:i}),oe(e.extends,St(function(o){var a=Le(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},Pt.prototype.mapTypes=function(e,t,n){var r=Pi(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(f,d){var h=Le(f,Pi(f)?"":e.prefix);i.mapTypes(h,t,d)}function a(f){return o(f,!0)}function s(f){return o(f,!1)}if(!r)throw new Error("unknown type <"+e.name+">");oe(r.superClass,n?a:s),t(r,!n),oe(r.traits,a)},Pt.prototype.getEffectiveDescriptor=function(e){var t=Le(e),n=new Xe(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},Pt.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function ps(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function qt(e){this.model=e}qt.prototype.set=function(e,t,n){if(!at(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;ih(n)?r?delete e[i]:delete e.$attrs[Di(t)]:r?i in e?e[i]=n:hs(e,r,n):e.$attrs[Di(t)]=n},qt.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Di(t)];var r=n.name;return!e[r]&&n.isMany&&hs(e,n,[]),e[r]},qt.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=se({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)},qt.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},qt.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},qt.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 ih(e){return typeof e>"u"}function hs(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Di(e){return e.replace(/^:/,"")}function nt(e,t={}){this.properties=new qt(this),this.factory=new us(this,this.properties),this.registry=new Pt(e,this.properties),this.typeCache=Object.create(null),this.config=t}nt.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},nt.prototype.getType=function(e){var t=this.typeCache,n=at(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},nt.prototype.createAny=function(e,t,n){var r=Le(e),i={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){Ef(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}),oe(n,function(a,s){_t(a)&&a.value!==void 0?i[a.name]=a.value:i[s]=a}),i},nt.prototype.getPackage=function(e){return this.registry.getPackage(e)},nt.prototype.getPackages=function(){return this.registry.getPackages()},nt.prototype.getElementDescriptor=function(e){return e.$descriptor},nt.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},nt.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},nt.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var ms=String.fromCharCode,oh=Object.prototype.hasOwnProperty,ah=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,Cn={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(Cn).forEach(function(e){Cn[e.toUpperCase()]=Cn[e]});function sh(e,t,n,r){return r?oh.call(Cn,r)?Cn[r]:"&"+r+";":ms(t||parseInt(n,16))}function Yt(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(ah,sh):e}var ys="non-whitespace outside of root node";function Dt(e){return new Error(e)}function lh(e){return"missing namespace for prefix <"+e+">"}function pr(e){return{get:e,enumerable:!0}}function ch(e){var t=Object.create(null),n;for(n in e)t[n]=e[n];return t}var gs=Symbol("nameCache");function Ii(e){return e+"$uri"}function uh(e){var t=Object.create(null),n,r;for(n in e)r=e[n],t[r]=r,t[Ii(r)]=n;return t}function hr(){return{line:0,column:0}}function fh(e){throw e}function vs(e){if(!this)return new vs(e);var t=e&&e.proxy,n,r,i,o,a=fh,s,f,d,h,m=hr,R=!1,L=!1,Y="",U=!1,D=!1,S=null,I=!1,y,v,A,T;function x(_){_ instanceof Error||(_=Dt(_)),S=_,a(_,m)}function E(_){s&&(_ instanceof Error||(_=Dt(_)),s(_,m))}this.on=function(_,q){if(typeof q!="function")throw Dt("required args <name, cb>");switch(_){case"openTag":r=q;break;case"text":n=q;break;case"closeTag":i=q;break;case"error":a=q;break;case"warn":s=q;break;case"cdata":o=q;break;case"attention":h=q;break;case"question":d=q;break;case"comment":f=q;break;default:throw Dt("unsupported event: "+_)}return this},this.ns=function(_){if(typeof _>"u"&&(_={}),typeof _!="object")throw Dt("required args <nsMap={}>");var q=Object.create(null),re;for(re in _)q[re]=_[re];return D=!0,T=q,this};function j(){y=D?[]:null,v=D?uh(T):null,A=[],m=hr,I=!1,S=null,L=!1,Y=""}this.parse=function(_){if(typeof _!="string")throw Dt("required args <xml=string>");if(R)throw Dt("parse during stream; call end() first");return j(),M(_),m=hr,I=!1,S},this.write=function(_){if(typeof _!="string")throw Dt("required args <xml=string>");return R||(j(),R=!0),S||(Y=M(Y+_,!0)||""),this},this.end=function(){return R||j(),R=!1,S||M(Y),Y="",m=hr,I=!1,S},this.stop=function(){I=!0};function M(_,q=!1){var re=null,Z=null,H,G=0,ee=!1,X=!1,B=0,O=0,$,C,k,V,he,ae,p,u,c,g="",b=0,P;function Q(W,ie){var ve=W.indexOf(":");if(ve===-1)return W;var Se=v[W.substring(0,ve)];return Se?ie===Se?W.substr(ve+1):Se+W.substr(ve):(E(lh(W.substring(0,ve))),null)}function ce(){if(P!==null)return P;var W,ie,ve=D&&v.xmlns,Se=D&&U?[]:null,de=b,ye=g,z=ye.length,K,pe,J,we,be,rt={},Je=new Set,je,xe,Ae;e:for(;de<z;de++)if(je=!1,xe=ye.charCodeAt(de),!(xe===32||xe<14&&xe>8)){for((xe<65||xe>122||xe>90&&xe<97)&&xe!==95&&xe!==58&&(E("illegal first char attribute name"),je=!0),Ae=de+1;Ae<z;Ae++)if(xe=ye.charCodeAt(Ae),!(xe>96&&xe<123||xe>64&&xe<91||xe>47&&xe<59||xe===46||xe===45||xe===95)){if(xe===32||xe<14&&xe>8){E("missing attribute value"),de=Ae;continue e}if(xe===61)break;E("illegal attribute name char"),je=!0}if(be=ye.substring(de,Ae),be==="xmlns:xmlns"&&(E("illegal declaration of xmlns"),je=!0),xe=ye.charCodeAt(Ae+1),xe===34)Ae=ye.indexOf('"',de=Ae+2),Ae===-1&&(Ae=ye.indexOf("'",de),Ae!==-1&&(E("attribute value quote missmatch"),je=!0));else if(xe===39)Ae=ye.indexOf("'",de=Ae+2),Ae===-1&&(Ae=ye.indexOf('"',de),Ae!==-1&&(E("attribute value quote missmatch"),je=!0));else for(E("missing attribute value quotes"),je=!0,Ae=Ae+1;Ae<z&&(xe=ye.charCodeAt(Ae+1),!(xe===32||xe<14&&xe>8));Ae++);for(Ae===-1&&(E("missing closing quotes"),Ae=z,je=!0),je||(J=ye.substring(de,Ae)),de=Ae;Ae+1<z&&(xe=ye.charCodeAt(Ae+1),!(xe===32||xe<14&&xe>8));Ae++)de===Ae&&(E("illegal character after attribute end"),je=!0);if(de=Ae+1,je)continue e;if(Je.has(be)){E("attribute <"+be+"> already defined");continue}if(Je.add(be),!D){rt[be]=J;continue}if(U){if(pe=be==="xmlns"?"xmlns":be.charCodeAt(0)===120&&be.substr(0,6)==="xmlns:"?be.substr(6):null,pe!==null){if(W=Yt(J),ie=Ii(pe),we=T[W],!we){if(pe==="xmlns"||ie in v&&v[ie]!==W)do we="ns"+G++;while(typeof v[we]<"u");else we=pe;T[W]=we}v[pe]!==we&&(K||(v=ch(v),K=!0),v[pe]=we,pe==="xmlns"&&(v[Ii(we)]=W,ve=we),v[ie]=W),rt[be]=J;continue}Se.push(be,J);continue}be=Q(be,ve),be!==null&&(rt[be]=J)}if(U)for(de=0,z=Se.length;de<z;de++)be=Q(Se[de++],ve),J=Se[de],be!==null&&(rt[be]=J);return P=rt}function N(){for(var W=/(\r\n|\r|\n)/g,ie=0,ve=0,Se=0,de=O,ye,z;B>=Se&&(ye=W.exec(_),!(!ye||(de=ye[0].length+ye.index,de>B)));)ie+=1,Se=de;return B==-1?(ve=de,z=_.substring(O)):O===0?z=_.substring(O,B):(ve=B-Se,z=O==-1?_.substring(B):_.substring(B,O+1)),{data:z,line:ie,column:ve}}for(m=N,t&&(c=Object.create({},{name:pr(function(){return p}),originalName:pr(function(){return u}),attrs:pr(ce),ns:pr(function(){return v})}));O!==-1;){if(_.charCodeAt(O)===60?B=O:B=_.indexOf("<",O),B===-1){if(q)return _.substring(O);if(A.length)return x("unexpected end of file");if(!L)return x("missing start tag");O<_.length&&_.substring(O).trim()&&E(ys);return}if(L||(L=!0),O!==B){if(A.length){if(n&&(n(_.substring(O,B),Yt,m),I))return}else if(_.substring(O,B).trim()&&(E(ys),I))return}if(V=_.charCodeAt(B+1),V===33){if(k=_.charCodeAt(B+2),k===91&&_.substr(B+3,6)==="CDATA["){if(O=_.indexOf("]]>",B),O===-1)return q?_.substring(B):x("unclosed cdata");if(o&&(o(_.substring(B+9,O),m),I))return;O+=3;continue}if(k===45&&_.charCodeAt(B+3)===45){if(O=_.indexOf("-->",B),O===-1)return q?_.substring(B):x("unclosed comment");if(f&&(f(_.substring(B+4,O),Yt,m),I))return;O+=3;continue}}if(V===63){if(O=_.indexOf("?>",B),O===-1)return q?_.substring(B):x("unclosed question");if(d&&(d(_.substring(B,O+2),m),I))return;O+=2;continue}for($=B+1;;$++){if(he=_.charCodeAt($),isNaN(he))return q?_.substring(B):(O=-1,x("unclosed tag"));if(he===34)k=_.indexOf('"',$+1),$=k!==-1?k:$;else if(he===39)k=_.indexOf("'",$+1),$=k!==-1?k:$;else if(he===62){O=$;break}}if(V===33){if(h&&(h(_.substring(B,O+1),Yt,m),I))return;O+=1;continue}if(P={},V===47){if(ee=!1,X=!0,!A.length)return x("missing open tag");if($=p=A.pop(),k=B+2+$.length,_.substring(B+2,k)!==$)return x("closing tag mismatch");for(;k<O;k++)if(V=_.charCodeAt(k),!(V===32||V>8&&V<14))return x("close tag")}else{if(_.charCodeAt(O-1)===47?($=p=_.substring(B+1,O-1),ee=!0,X=!0):($=p=_.substring(B+1,O),ee=!0,X=!1),!(V>96&&V<123||V>64&&V<91||V===95||V===58))return x("illegal first char nodeName");for(k=1,C=$.length;k<C;k++)if(V=$.charCodeAt(k),!(V>96&&V<123||V>64&&V<91||V>47&&V<59||V===45||V===95||V==46)){if(V===32||V<14&&V>8){p=$.substring(0,k),P=null;break}return x("invalid nodeName")}X||A.push(p)}if(D){H=v,ee&&(X||y.push(H),P===null&&(U=$.indexOf("xmlns",k)!==-1)&&(b=k,g=$,ce(),U=!1)),u=p,Z!==v&&(re=v[gs],re===void 0&&(re=v[gs]=Object.create(null)),Z=v);var F=re[p];if(F!==void 0)p=F;else{if(V=p.indexOf(":"),V!==-1){if(ae=v[p.substring(0,V)],!ae)return x("missing namespace on <"+u+">");p=p.substr(V+1)}else ae=v.xmlns;ae&&(p=ae+":"+p),re[u]=p}}if(ee&&(b=k,g=$,r&&(t?r(c,Yt,X,m):r(p,ce,Yt,X,m),I)))return;if(X){if(i&&(i(t?c:p,Yt,ee,m),I))return;D&&(ee?v=H:v=y.pop())}O+=1}}}function ws(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Oi={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},bs="property";function Es(e){return e.xml&&e.xml.serialize}function dh(e){const t=Es(e);return t!==bs&&(t||null)}function ph(e){return e.charAt(0).toUpperCase()+e.slice(1)}function _s(e,t){return ws(t)?e.prefix+":"+ph(e.localName):e.name}function hh(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 mh(e,t,n){const r=Le(e,t.xmlns),i=`${t[r.prefix]||r.prefix}:${r.localName}`,o=Le(i);var a=n.getPackage(o.prefix);return hh(o,a)}function It(e){return new Error(e)}function bt(e){return e.$descriptor}function yh(e){se(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw It("expected element");var n=this.elementsById,r=bt(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 It("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function Rn(){}Rn.prototype.handleEnd=function(){},Rn.prototype.handleText=function(){},Rn.prototype.handleNode=function(){};function Bi(){}Bi.prototype=Object.create(Rn.prototype),Bi.prototype.handleNode=function(){return this};function cn(){}cn.prototype=Object.create(Rn.prototype),cn.prototype.handleText=function(e){this.body=(this.body||"")+e};function Tn(e,t){this.property=e,this.context=t}Tn.prototype=Object.create(cn.prototype),Tn.prototype.handleNode=function(e){if(this.element)throw It("expected no sub nodes");return this.element=this.createReference(e),this},Tn.prototype.handleEnd=function(){this.element.id=this.body},Tn.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function Mi(e,t){this.element=t,this.propertyDesc=e}Mi.prototype=Object.create(cn.prototype),Mi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Ni(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function mr(){}mr.prototype=Object.create(cn.prototype),mr.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 Ve(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}Ve.prototype=Object.create(mr.prototype),Ve.prototype.addReference=function(e){this.context.addReference(e)},Ve.prototype.handleText=function(e){var t=this.element,n=bt(t),r=n.bodyProperty;if(!r)throw It("unexpected body text <"+e+">");cn.prototype.handleText.call(this,e)},Ve.prototype.handleEnd=function(){var e=this.body,t=this.element,n=bt(t),r=n.bodyProperty;r&&e!==void 0&&(e=Ni(r.type,e),t.set(r.name,e))},Ve.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=bt(n),i=this.context,o=new n({}),a=this.model,s;return oe(t,function(f,d){var h=r.propertiesByName[d],m;h&&h.isReference?h.isMany?(m=f.split(" "),oe(m,function(R){i.addReference({element:o,property:h.ns.name,id:R})})):i.addReference({element:o,property:h.ns.name,id:f}):(h?f=Ni(h.type,f):d==="xmlns"?d=":"+d:(s=Le(d,r.ns.prefix),a.getPackage(s.prefix)&&i.addWarning({message:"unknown attribute <"+d+">",element:o,property:d,value:f})),o.set(d,f))}),o},Ve.prototype.getPropertyForNode=function(e){var t=e.name,n=Le(t),r=this.type,i=this.model,o=bt(r),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){const d=dh(s);if(d){const h=e.attributes[d];if(h){const m=mh(h,e.ns,i),R=i.getType(m);return se({},s,{effectiveType:bt(R).name})}}return s}var f=i.getPackage(n.prefix);if(f){const d=_s(n,f),h=i.getType(d);if(s=it(o.properties,function(m){return!m.isVirtual&&!m.isReference&&!m.isAttribute&&h.hasType(m.type)}),s)return se({},s,{effectiveType:bt(h).name})}else if(s=it(o.properties,function(d){return!d.isReference&&!d.isAttribute&&d.type==="Element"}),s)return s;throw It("unrecognized element <"+n.name+">")},Ve.prototype.toString=function(){return"ElementDescriptor["+bt(this.type).name+"]"},Ve.prototype.valueHandler=function(e,t){return new Mi(e,t)},Ve.prototype.referenceHandler=function(e){return new Tn(e,this.context)},Ve.prototype.handler=function(e){return e==="Element"?new un(this.model,e,this.context):new Ve(this.model,e,this.context)},Ve.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,ds(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?(se(o,{element:r}),this.context.addReference(o)):o.$parent=r),i};function Li(e,t,n){Ve.call(this,e,t,n)}Li.prototype=Object.create(Ve.prototype),Li.prototype.createElement=function(e){var t=e.name,n=Le(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),a=o&&_s(n,o)||t;if(!i.hasType(a))throw It("unexpected element <"+e.originalName+">");return Ve.prototype.createElement.call(this,e)};function un(e,t,n){this.model=e,this.context=n}un.prototype=Object.create(mr.prototype),un.prototype.createElement=function(e){var t=e.name,n=Le(t),r=n.prefix,i=e.ns[r+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)},un.prototype.handleChild=function(e){var t=new un(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},un.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Fi(e){e instanceof nt&&(e={model:e}),se(this,{lax:!1},e)}Fi.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Ve?(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 yh(se({},t,{rootHandler:r})),s=new vs({proxy:!0}),f=gh();r.context=a,f.push(r);function d(A,T,x){var E=T(),j=E.line,M=E.column,_=E.data;_.charAt(0)==="<"&&_.indexOf(" ")!==-1&&(_=_.slice(0,_.indexOf(" "))+">");var q="unparsable content "+(_?_+" ":"")+`detected
10
- line: `+j+`
11
- column: `+M+`
12
- nested error: `+A.message;if(x)return a.addWarning({message:q,error:A}),!0;throw It(q)}function h(A,T){return d(A,T,!0)}function m(){var A=a.elementsById,T=a.references,x,E;for(x=0;E=T[x];x++){var j=E.element,M=A[E.id],_=bt(j).propertiesByName[E.property];if(M||a.addWarning({message:"unresolved reference <"+E.id+">",element:E.element,property:E.property,value:E.id}),_.isMany){var q=j.get(_.name),re=q.indexOf(E);re===-1&&(re=q.length),M?q[re]=M:q.splice(re,1)}else j.set(_.name,M)}}function R(){f.pop().handleEnd()}var L=/^<\?xml /i,Y=/ encoding="([^"]+)"/i,U=/^utf-8$/i;function D(A){if(L.test(A)){var T=Y.exec(A),x=T&&T[1];!x||U.test(x)||a.addWarning({message:"unsupported document encoding <"+x+">, falling back to UTF-8"})}}function S(A,T){var x=f.peek();try{f.push(x.handleNode(A))}catch(E){d(E,T,o)&&f.push(new Bi)}}function I(A,T){try{f.peek().handleText(A)}catch(x){h(x,T)}}function y(A,T){A.trim()&&I(A,T)}var v=i.getPackages().reduce(function(A,T){return A[T.uri]=T.prefix,A},Object.entries(Oi).reduce(function(A,[T,x]){return A[x]=T,A},i.config&&i.config.nsMap||{}));return s.ns(v).on("openTag",function(A,T,x,E){var j=A.attrs||{},M=Object.keys(j).reduce(function(q,re){var Z=T(j[re]);return q[re]=Z,q},{}),_={name:A.name,originalName:A.originalName,attributes:M,ns:A.ns};S(_,E)}).on("question",D).on("closeTag",R).on("cdata",I).on("text",function(A,T,x){y(T(A),x)}).on("error",d).on("warn",h),new Promise(function(A,T){var x;try{s.parse(e),m()}catch(q){x=q}var E=r.element;!x&&!E&&(x=It("failed to parse document as <"+r.type.$descriptor.name+">"));var j=a.warnings,M=a.references,_=a.elementsById;return x?(x.warnings=j,T(x)):A({rootElement:E,elementsById:_,references:M,warnings:j})})},Fi.prototype.handler=function(e){return new Li(this.model,e)};function gh(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var vh=`<?xml version="1.0" encoding="UTF-8"?>
13
- `,wh=/<|>|'|"|&|\n\r|\n/g,xs=/<|>|&/g;function ut(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}ut.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},ut.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},ut.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},ut.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)},ut.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},ut.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},ut.prototype.getNSKey=function(e){return e.prefix!==void 0?e.uri+"|"+e.prefix:e.uri},ut.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},ut.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 bh(e){return e.charAt(0).toLowerCase()+e.slice(1)}function Eh(e,t){return ws(t)?bh(e):e}function Ss(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function As(e){return at(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function _h(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 xh(e,t){return t.isGeneric?se({localName:t.ns.localName},e):se({localName:Eh(t.ns.localName,t.$pkg)},e)}function Sh(e,t){return se({localName:t.ns.localName},e)}function Ah(e){var t=e.$descriptor;return nn(t.properties,function(n){var r=n.name;if(n.isVirtual||!tn(e,r))return!1;var i=e[r];return i===n.default||i===null?!1:n.isMany?i.length:!0})}var kh={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ch={"<":"lt",">":"gt","&":"amp"};function ks(e,t,n){return e=at(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function Rh(e){return ks(e,wh,kh)}function Th(e){return ks(e,xs,Ch)}function Nh(e){return nn(e,function(t){return t.isAttr})}function Ph(e){return nn(e,function(t){return!t.isAttr})}function $i(e){this.tagName=e}$i.prototype.build=function(e){return this.element=e,this},$i.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()};function Kt(){}Kt.prototype.serializeValue=Kt.prototype.serializeTo=function(e){e.append(this.escape?Th(this.value):this.value)},Kt.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(xs)!==-1&&(this.escape=!0),this};function Vi(e){this.tagName=e}Ss(Vi,Kt),Vi.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=Ah(e),this.parseAttributes(Nh(i)),this.parseContainments(Ph(i))),this.parseGenericAttributes(e,r),this},ke.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return xh(t,e)},ke.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Sh(t,e)},ke.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},ke.prototype.nsAttributeName=function(e){var t;if(at(e)?t=Le(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}:se({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 Kt().build({type:"String"},t));var n=e.$children;n&&oe(n,r=>{this.body.push(new ke(this).build(r))})},ke.prototype.parseNsAttribute=function(e,t,n){var r=e.$model,i=Le(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 oe(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;oe(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;oe(e,function(i){var o=r.get(i.name),a=i.isReference,s=i.isMany;if(s||(o=[o]),i.isBody)n.push(new Kt().build(i,o[0]));else if(ds(i.type))oe(o,function(d){n.push(new Vi(t.addTagName(t.nsPropertyTagName(i))).build(i,d))});else if(a)oe(o,function(d){n.push(new $i(t.addTagName(t.nsPropertyTagName(i))).build(d))});else{var f=Es(i);oe(o,function(d){var h;f?f===bs?h=new ke(t,i):h=new yr(t,i,f):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 ut(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;oe(e,function(r){var i=n.get(r.name);if(r.isReference)if(!r.isMany)i=i.id;else{var o=[];oe(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),As(e)},ke.prototype.addAttribute=function(e,t){var n=this.attrs;at(t)&&(t=Rh(t));var r=gf(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=_h(n).concat(t)),oe(t,function(r){e.append(" ").append(As(r.name)).append('="').append(r.value).append('"')})},ke.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==Kt;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),oe(this.body,function(r){r.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()};function yr(e,t,n){ke.call(this,e,t),this.serialization=n}Ss(yr,ke),yr.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},yr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function Dh(){this.value="",this.write=function(e){this.value+=e}}function Ih(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 Oh(e){e=se({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new Dh,o=new Ih(i,e.format);e.preamble&&o.append(vh);var a=new ke,s=n.$model;if(a.getNamespaces().mapDefaultPrefixes(Bh(s)),a.build(n).serializeTo(o),!r)return i.value}return{toXML:t}}function Bh(e){const t=e.config&&e.config.nsMap||{},n={};for(const r in Oi)n[r]=Oi[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 gr(e,t){nt.call(this,e,t)}gr.prototype=Object.create(nt.prototype),gr.prototype.fromXML=function(e,t,n){at(t)||(n=t,t="bpmn:Definitions");var r=new Fi(se({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)},gr.prototype.toXML=function(e,t){var n=new Oh(t);return new Promise(function(r,i){try{var o=n.toXML(e);return r({xml:o})}catch(a){return i(a)}})};var Mh="BPMN20",Lh="http://www.omg.org/spec/BPMN/20100524/MODEL",Fh="bpmn",$h=[],Vh=[{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"}]}],jh=[{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"}]}],Uh={tagAlias:"lowerCase",typePrefix:"t"},zh={name:Mh,uri:Lh,prefix:Fh,associations:$h,types:Vh,enumerations:jh,xml:Uh},Hh="BPMNDI",Wh="http://www.omg.org/spec/BPMN/20100524/DI",qh="bpmndi",Yh=[{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"]}],Kh=[{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"}]}],Gh=[],Xh={name:Hh,uri:Wh,prefix:qh,types:Yh,enumerations:Kh,associations:Gh},Jh="DC",Zh="http://www.omg.org/spec/DD/20100524/DC",Qh="dc",em=[{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}]}],tm=[],nm={name:Jh,uri:Zh,prefix:Qh,types:em,associations:tm},rm="DI",im="http://www.omg.org/spec/DD/20100524/DI",om="di",am=[{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"}]}],sm=[],lm={tagAlias:"lowerCase"},cm={name:rm,uri:im,prefix:om,types:am,associations:sm,xml:lm},um="bpmn.io colors for BPMN",fm="http://bpmn.io/schema/bpmn/biocolor/1.0",dm="bioc",pm=[{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"}]}],hm=[],mm=[],ym={name:um,uri:fm,prefix:dm,types:pm,enumerations:hm,associations:mm},gm="BPMN in Color",vm="http://www.omg.org/spec/BPMN/non-normative/color/1.0",wm="color",bm=[{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"}]}],Em=[],_m=[],xm={name:gm,uri:vm,prefix:wm,types:bm,enumerations:Em,associations:_m};const Sm={bpmn:zh,bpmndi:Xh,dc:nm,di:cm,bioc:ym,color:xm};function Am(e,t){const n=se({},Sm,e);return new gr(n,t)}function ze(e,t){return e.$instanceOf(t)}function km(e){return it(e.rootElements,function(t){return ze(t,"bpmn:Process")||ze(t,"bpmn:Collaboration")})}function Cm(e){var t={},n=[],r={};function i(C,k){return function(V){C(V,k)}}function o(C){t[C.id]=C}function a(C){return t[C.id]}function s(C,k){var V=C.gfx;if(V)throw new Error(`already rendered ${Me(C)}`);return e.element(C,r[C.id],k)}function f(C,k){return e.root(C,r[C.id],k)}function d(C,k){try{var V=r[C.id]&&s(C,k);return o(C),V}catch(he){h(he.message,{element:C,error:he}),console.error(`failed to import ${Me(C)}`,he)}}function h(C,k){e.error(C,k)}var m=this.registerDi=function(k){var V=k.bpmnElement;V?r[V.id]?h(`multiple DI elements defined for ${Me(V)}`,{element:V}):r[V.id]=k:h(`no bpmnElement referenced in ${Me(k)}`,{element:k})};function R(C){L(C.plane)}function L(C){m(C),oe(C.planeElement,Y)}function Y(C){m(C)}this.handleDefinitions=function(k,V){var he=k.diagrams;if(V&&he.indexOf(V)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!V&&he&&he.length&&(V=he[0]),!V)throw new Error("no diagram to display");r={},R(V);var ae=V.plane;if(!ae)throw new Error(`no plane for ${Me(V)}`);var p=ae.bpmnElement;if(!p)if(p=km(k),p)h(`correcting missing bpmnElement on ${Me(ae)} to ${Me(p)}`),ae.bpmnElement=p,m(ae);else throw new Error("no process or collaboration to display");var u=f(p,ae);if(ze(p,"bpmn:Process")||ze(p,"bpmn:SubProcess"))D(p,u);else if(ze(p,"bpmn:Collaboration"))O(p,u),S(k.rootElements,u);else throw new Error(`unsupported bpmnElement for ${Me(ae)}: ${Me(p)}`);U(n)};var U=this.handleDeferred=function(){for(var k;n.length;)k=n.shift(),k()};function D(C,k){ee(C,k),j(C.ioSpecification,k),E(C.artifacts,k),o(C)}function S(C,k){var V=nn(C,function(he){return!a(he)&&ze(he,"bpmn:Process")&&he.laneSets});V.forEach(i(D,k))}function I(C,k){d(C,k)}function y(C,k){oe(C,i(I,k))}function v(C,k){d(C,k)}function A(C,k){d(C,k)}function T(C,k){d(C,k)}function x(C,k){d(C,k)}function E(C,k){oe(C,function(V){ze(V,"bpmn:Association")?n.push(function(){x(V,k)}):x(V,k)})}function j(C,k){C&&(oe(C.dataInputs,i(A,k)),oe(C.dataOutputs,i(T,k)))}var M=this.handleSubProcess=function(k,V){ee(k,V),E(k.artifacts,V)};function _(C,k){var V=d(C,k);ze(C,"bpmn:SubProcess")&&M(C,V||k),ze(C,"bpmn:Activity")&&j(C.ioSpecification,k),n.push(function(){oe(C.dataInputAssociations,i(v,k)),oe(C.dataOutputAssociations,i(v,k))})}function q(C,k){d(C,k)}function re(C,k){d(C,k)}function Z(C,k){n.push(function(){var V=d(C,k);C.childLaneSet&&H(C.childLaneSet,V||k),$(C)})}function H(C,k){oe(C.lanes,i(Z,k))}function G(C,k){oe(C,i(H,k))}function ee(C,k){X(C.flowElements,k),C.laneSets&&G(C.laneSets,k)}function X(C,k){oe(C,function(V){ze(V,"bpmn:SequenceFlow")?n.push(function(){q(V,k)}):ze(V,"bpmn:BoundaryEvent")?n.unshift(function(){_(V,k)}):ze(V,"bpmn:FlowNode")?_(V,k):ze(V,"bpmn:DataObject")||(ze(V,"bpmn:DataStoreReference")||ze(V,"bpmn:DataObjectReference")?re(V,k):h(`unrecognized flowElement ${Me(V)} in context ${Me(k&&k.businessObject)}`,{element:V,context:k}))})}function B(C,k){var V=d(C,k),he=C.processRef;he&&D(he,V||k)}function O(C,k){oe(C.participants,i(B,k)),n.push(function(){y(C.messageFlows,k)}),E(C.artifacts,k)}function $(C){oe(C.flowNodeRef,function(k){var V=k.get("lanes");V&&V.push(C)})}}function Rm(e,t,n){var r,i,o,a,s=[];function f(d,h){var m={root:function(U,D){return r.add(U,D)},element:function(U,D,S){return r.add(U,D,S)},error:function(U,D){s.push({message:U,context:D})}},R=new Cm(m);h=h||d.diagrams&&d.diagrams[0];var L=Tm(d,h);if(!L)throw new Error("no diagram to display");oe(L,function(U){R.handleDefinitions(d,U)});var Y=h.plane.bpmnElement.id;o.setRootElement(o.findRoot(Y+"_plane")||o.findRoot(Y))}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}),f(t,n),i.fire("import.render.complete",{error:a,warnings:s}),d({warnings:s})}catch(m){return m.warnings=s,h(m)}})}function Tm(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!le(n,"bpmn:Process")&&!le(n,"bpmn:Collaboration")&&(r=Nm(n));var i;le(r,"bpmn:Collaboration")?i=r:i=it(e.rootElements,function(d){if(le(d,"bpmn:Collaboration"))return it(d.participants,function(h){return h.processRef===r})});var o=[r];i&&(o=vf(i.participants,function(d){return d.processRef}),o.push(i));var a=Cs(o),s=[t],f=[n];return oe(e.diagrams,function(d){if(d.plane){var h=d.plane.bpmnElement;a.indexOf(h)!==-1&&f.indexOf(h)===-1&&(s.push(d),f.push(h))}}),s}}function Cs(e){var t=[];return oe(e,function(n){n&&(t.push(n),t=t.concat(Cs(n.flowElements)))}),t}function Nm(e){for(var t=e;t;){if(le(t,"bpmn:Process"))return t;t=t.$parent}}var Pm='<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>',Rs=Pm,Ts={verticalAlign:"middle"},Ns={color:"#404040"},Dm={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},Im={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},Om={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"},Bm='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+Rs+'</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>',ft;function Mm(){ft=ct(Bm),Ye(ft,Dm),Ye(yt("svg",ft),Ts),Ye(yt(".backdrop",ft),Im),Ye(yt(".notice",ft),Om),Ye(yt(".link",ft),Ns,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function Lm(){ft||(Mm(),vi.bind(ft,".backdrop","click",function(e){document.body.removeChild(ft)})),document.body.appendChild(ft)}const vr=5,Ps="djs-outline-hidden";function Ne(e){e=se({},$m,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),jm(this._container)}ot(Ne,Nt),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(R){throw this._emit("import.parse.complete",{error:R}),R}let s=a.rootElement;const f=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:f,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||[]),wr(s,o),s=Fm(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 wr(o,[]),o}if(typeof t=="string"&&(r=Vm(n,t),!r)){const o=new Error("BPMNDiagram <"+t+"> not found");throw wr(o,[]),o}try{this.clear()}catch(o){throw wr(o,[]),o}const{warnings:i}=await Rm(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=yt(":scope > defs",r._svg),a=ya(i),s=o?"<defs>"+ya(o)+"</defs>":"",f=r.getContainer();zt(f).add(Ps);let d;try{d=i.getBBox()}finally{zt(f).remove(Ps)}const h=d.x-vr,m=d.y-vr,R=d.width+vr*2,L=d.height+vr*2;t=`<?xml version="1.0" encoding="utf-8"?>
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=Wt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Gn.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&&(_.isFunction(i)?n.paramsSerializer={serialize:i}:Gn.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),Gn.assertOptions(n,{baseUrl:Ve.spelling("baseURL"),withXsrfToken:Ve.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&_.merge(o.common,o[n.method]);o&&_.forEach(["delete","get","head","post","put","patch","query","common"],O=>{delete o[O]}),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||Ur;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 O=[Gr.bind(this),void 0];for(O.unshift(...s),O.push(...d),w=O.length,h=Promise.resolve(n);m<w;)h=h.then(O[m++],O[m++]);return h}w=s.length;let g=n;for(;m<w;){const O=s[m++],B=s[m++];try{g=O?O(g):g}catch(C){if(!B){h=Promise.reject(C);break}try{const S=B.call(this,C);_.isThenable(S)&&(h=Promise.resolve(S).then(()=>Gr.call(this,g)))}catch(S){h=Promise.reject(S)}break}}if(!h)try{h=Gr.call(this,g)}catch(O){h=Promise.reject(O)}for(m=0,w=d.length;m<w;)h=h.then(d[m++],d[m++]);return h}getUri(t){t=Wt(this.defaults,t);const n=zo(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Io(n,t.params,t.paramsSerializer)}};_.forEach(["delete","get","head","options"],function(t){qt.prototype[t]=function(n,r){return this.request(Wt(r||{},{method:t,url:n,data:r&&_.hasOwnProp(r,"data")?r.data:void 0}))}}),_.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,a,s){return this.request(Wt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}qt.prototype[t]=n(),t!=="query"&&(qt.prototype[t+"Form"]=n(!0))});let tf=class Cl{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 Cl(function(i){t=i}),cancel:t}}};function nf(e){return function(n){return e.apply(null,n)}}function rf(e){return _.isObject(e)&&e.isAxiosError===!0}const Xr={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(Xr).forEach(([e,t])=>{Xr[t]=e});function ra(e){const t=new qt(e),n=mo(qt.prototype.request,t);return _.extend(n,qt.prototype,t,{allOwnKeys:!0}),_.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ra(Wt(e,i))},n}const De=ra(_n);De.Axios=qt,De.CanceledError=xn,De.CancelToken=tf,De.isCancel=Fo,De.VERSION=qr,De.toFormData=Wn,De.AxiosError=ne,De.Cancel=De.CanceledError,De.all=function(t){return Promise.all(t)},De.spread=nf,De.isAxiosError=rf,De.mergeConfig=Wt,De.AxiosHeaders=$e,De.formToJSON=e=>Lo(_.isHTMLForm(e)?new FormData(e):e),De.getAdapter=ta.getAdapter,De.HttpStatusCode=Xr,De.default=De;const{Axios:_g,AxiosError:xg,CanceledError:Sg,isCancel:Ag,CancelToken:kg,VERSION:Cg,all:Rg,Cancel:Tg,isAxiosError:Pg,spread:Ng,toFormData:Dg,AxiosHeaders:Ig,HttpStatusCode:Og,formToJSON:Bg,getAdapter:Mg,mergeConfig:Lg,create:Fg}=De,gt={baseURL:"",timeout:6e4,getToken:void 0};function ia(e={}){e.baseURL!==void 0&&(gt.baseURL=e.baseURL),e.timeout!==void 0&&(gt.timeout=e.timeout),e.getToken!==void 0&&(gt.getToken=e.getToken)}const of="";function af(e){return(e||"").replace(/\/$/,"")||of}const Xn=De.create({timeout:gt.timeout});Xn.interceptors.request.use(e=>{var n;e.baseURL=af(gt.baseURL||e.baseURL),e.timeout=gt.timeout;const t=(n=gt.getToken)==null?void 0:n.call(gt);return t&&(e.headers.Authorization=t),e}),Xn.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 Xn.request(e)}const oa=e=>_e({url:"/server/repository/flowdef/event/latest",method:"post",data:e}),Jr=e=>_e({url:"/server/app/event/list",method:"get",data:e}),Zr=e=>_e({url:"/server/repository/flowdef/event/query",method:"post",data:e}),Qr=(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}),ei=e=>_e({url:"/server/runtime/event/quickStart",method:"post",data:e}),Jn=e=>_e({url:"/server/runtime/event/delete",method:"post",data:e}),ca=e=>_e({url:"/server/runtime/event/messageEventReceived",method:"post",data:e}),Zn=e=>_e({url:"/server/work/event/query",method:"post",data:e}),ti=e=>_e({url:"/server/history/workinst/event/query",method:"post",data:e}),ni=e=>_e({url:"/server/operate/def/event/get",method:"post",data:e}),ri=e=>_e({url:"/server/task/event/claim",method:"post",data:e}),ii=e=>_e({url:"/server/task/event/withdraw",method:"post",data:e}),oi=e=>_e({url:"/server/task/event/rollback",method:"post",data:e}),ai=e=>_e({url:"/server/task/event/recyle",method:"post",data:e}),si=e=>_e({url:"/server/task/event/complete",method:"post",data:e}),li=e=>_e({url:"/server/task/event/turnBefore",method:"post",data:e}),ci=e=>_e({url:"/server/task/event/turnAfter",method:"post",data:e}),ui=e=>_e({url:"/server/runtime/event/suspend",method:"post",data:e}),fi=e=>_e({url:"/server/runtime/event/activate",method:"post",data:e}),di=e=>_e({url:"/server/runtime/event/terminate",method:"post",data:e}),pi=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}),Qn=e=>_e({url:"/server/model/event/get/firsthandle",method:"post",data:e}),ua=Qn,er=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}),sf=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:fi,claimTask:ri,completeTask:si,deleteDraftTask:aa,deleteProcessInstance:Jn,doneTaskList:ti,downloadBpmn:pi,draftFlowList:oa,draftTaskList:Qr,flowStartNodeList:ua,getAppList:Jr,getFirstHandleNodes:Qn,getFlowList:Zr,getOptList:ni,jumpTask:gi,nextSendNode:yi,nodeAssistant:er,organUserTree:mi,quickStart:ei,receiveMessageEvent:ca,recycleTask:ai,revocationTask:ii,rollbackTask:oi,saveDraft:sa,sendTask:hi,startDraft:la,startNodes:vi,suspendFlow:ui,terminateFlow:di,todoTaskList:Zn,turnAfterTask:ci,turnBeforeTask:li},Symbol.toStringTag,{value:"Module"})),fa=3e3;function tr(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 lf={class:"ui-flow-jump"},cf={class:"dialog-footer"},da=St(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(""),O=new Map;let B=0;const C=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),S=l.computed(()=>String(r.dealUser.name||C.value)),D={children:"children",label:"label",value:"value",disabled:"disabled",isLeaf:I=>I.hasChild===!1};function y(I){return I?String(I.id||I.activityId||""):""}function v(I){return I?String(I.activityName||I.name||I.id||I.activityId||""):""}function R(I){return Array.isArray(I)?I.map(j=>{const k=j||{},P=y(k);return{...k,id:P,name:v(k)}}).filter(j=>j.id):[]}function N(I){return I.map(j=>{const k=j||{},P=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 P&&U==="user"&&O.set(P,se||P),{...k,id:P,value:P,label:se,caption:se,ntype:U,hasChild:!!(k.hasChild||ie!=null&&ie.length),disabled:U!=="user",children:ie?N(ie):void 0}}).filter(j=>j.id)}function x(){return C.value?(O.set(C.value,S.value),[{id:C.value,value:C.value,label:S.value,caption:S.value,name:S.value,ntype:"user",hasChild:!1,disabled:!1}]):[]}async function E(){const I=String(r.processDefinitionId||""),j=++B;if(!I)return h.value=[],h.value;c.value=!0;try{const k=await vi({processDefinitionId:I}),P=R(k==null?void 0:k.data);return j!==B||I!==String(r.processDefinitionId||"")?P:(h.value=P,h.value)}catch(k){throw j===B&&(h.value=[]),i("error",k),k}finally{j===B&&(c.value=!1)}}async function V(I="",j){const k=await er({processDefinitionId:String(r.processDefinitionId),activityId:w.value,ntype:j||"",parentId:I,userId:C.value,extendParams:{...r.assignmentQueryParams}});return N(Array.isArray(k.data)?k.data:[])}async function F(){if(m.value=[],g.value="",O.clear(),!w.value)return[];d.value=!0;try{const I=await V();m.value=I.length?I: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(I,j){if(I.level===0){j(m.value);return}if(I.data.hasChild===!1||I.data.ntype==="user"){j([]);return}if(Array.isArray(I.data.children)&&I.data.children.length){j(I.data.children);return}try{const k=await V(String(I.data.id),String(I.data.ntype||""));j(k)}catch(k){i("error",k),j([])}}async function W(){await F()}function re(I,j){const k=I?y(I):w.value,P=String(j||g.value||C.value),U=O.get(P)||(P===C.value?S.value:P);return{workId:r.workId,flowNodeAssignee:{activityId:k,assignees:[{name:U,userId:P}]},variables:{}}}async function J(I){const j=I||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=tr(r.zIndex),o.value=!0,w.value="",g.value="",m.value=[],i("open");try{await E()}catch{}}function Z(){o.value=!1}function q(){i("close")}function K(){i("click"),Y()}return l.watch(()=>r.modelValue,I=>{I&&!o.value&&Y(),!I&&o.value&&(o.value=!1)}),l.watch(o,I=>i("update:modelValue",I)),l.watch(()=>r.processDefinitionId,()=>{w.value="",g.value="",m.value=[],r.processDefinitionId?E().catch(()=>{}):h.value=[]}),l.watch(C,()=>{o.value&&w.value&&F()}),l.onMounted(()=>{r.modelValue?Y():r.processDefinitionId&&E().catch(()=>{})}),t({visible:o,effectiveZIndex:a,loading:s,nodeLoading:c,assigneeLoading:d,startNodeList:h,selectedActivityId:w,selectedAssigneeId:g,open:Y,close:Z,getStartNodes:E,assembleData:re,jump:J}),(I,j)=>{const k=l.resolveComponent("el-button"),P=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",lf,[e.showTrigger?(l.openBlock(),l.createBlock(k,{key:0,type:"primary",loading:s.value,onClick:K},{default:l.withCtx(()=>[l.renderSlot(I.$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",cf,[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(P,{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:D,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"]]),uf={class:"ui-flow-send"},ff={class:"send-panel"},df={class:"current-activity"},pf={class:"node-groups"},hf=["onClick"],mf={class:"group-name"},yf={class:"group-deal-type"},gf={class:"send-center"},vf={class:"assignee-transfer"},wf={class:"assignee-box"},bf={class:"tree-node"},Ef={key:1,class:"candidate-list"},_f={class:"assignee-box selected-list"},xf={key:0,class:"node-state"},Sf={class:"opinion-panel"},Af={class:"dialog-footer"},wi=St(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([]),O=l.ref([]),B=l.ref([]),C=l.ref([]),S=l.ref(!1),D=l.ref(""),y=l.ref("nextNode"),v=l.ref(""),R=l.ref([]),N=l.ref(!1),x=l.ref(0),E=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($)===D.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})),N.value=!1}function q(){return R.value.reduce(($,z)=>(z.variableName&&($[z.variableName]=z.variableValue),$),{})}function K(){D.value="",w.value=[],g.value=[],O.value=[],B.value=[],C.value=[],S.value=!1}function I($){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=I($);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 P($){return String($||"").trim().toLowerCase()}function U($){if(i.forceSingleAssignee)return!0;const z=P($.dealType);return z?["signle","single"].includes(z):j(re($))}function ie($){const z=g.value.find(le=>re(le)===$);return z?String(r[P(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 er({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:D.value!==re($)?[]:(S.value=be.some(Ee=>Ee.ntype!=="user"),S.value?(B.value=be,O.value=[],await l.nextTick(),fe(be)):(B.value=[],O.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=++x.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!==x.value)return[];w.value=le.data||[],g.value=w.value.filter(J).map(be=>({...be,isSingleAssignee:U(be)})),h.value=!0,N.value=!1,o("nextNodesResolved",w.value);const X=g.value[0];if(X){D.value=re(X);try{await p(X)}catch{}}return w.value}catch(le){throw z===x.value&&(h.value=!1),o("error",le),le}finally{z===x.value&&(d.value=!1)}}async function b($){D.value=re($),O.value=[],B.value=[],S.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=E.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=E.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($)),S.value&&((z=E.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(N.value||!h.value){y.value="variables",xe.ElMessage.warning("流程变量已变化,请重新计算下一环节");return}const $=g.value.find(z=>!C.value.some(le=>le.activity===re(z)));if($){D.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=tr(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&&Jn({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",uf,[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",Af,[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",ff,[l.createElementVNode("div",df,[z[4]||(z[4]=l.createTextVNode(" 当前环节:",-1)),l.createElementVNode("strong",null,l.toDisplayString(e.activity.activityName||e.activity.activityId),1)]),l.createElementVNode("aside",pf,[(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:D.value===re(X)}]),type:"button",onClick:be=>b(X)},[z[5]||(z[5]=l.createElementVNode("span",{class:"group-avatar"},"♟",-1)),l.createElementVNode("span",mf,l.toDisplayString(X.activityName||X.name||re(X)),1),l.createElementVNode("span",yf,l.toDisplayString(ie(re(X))),1)],10,hf))),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",gf,[l.createElementVNode("div",vf,[l.withDirectives((l.openBlock(),l.createElementBlock("div",wf,[S.value?(l.openBlock(),l.createBlock(l.unref(xe.ElTree),{key:0,ref_key:"assigneeTreeRef",ref:E,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",bf,[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",Ef,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(O.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&&!O.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",_f,[(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",xf,"正在根据流程变量计算下一环节...")):(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",Sf,[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"]]),kf={class:"button-group-wrapper"},Cf={key:0,class:"button-state"},Rf={key:0,class:"line"},Tf={key:2,class:"button-group-append"},Pf={class:"sign-selector"},Nf={class:"selected-sign-user"},Df={class:"sign-dialog-footer"},If=St(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"},O=l.ref(!1),B=l.ref("turnBefore"),C=l.ref("turnBefore"),S=l.ref(!1),D=l.ref(!1),y=l.ref([]),v=l.ref(),R=l.computed(()=>B.value==="turnBefore"?"前加签":"后加签"),N={children:"children",label:"caption",disabled:"disabled",isLeaf:"isLeaf"};function x(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 E(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=x(M,"name","operateName","code","value");if(!G)return;const Q=x(M,"label","operateLabel","caption","title")||G;return{...M,name:G,label:Q}}const F=l.computed(()=>i.workId||x(c.value,"workId","id")),T=l.computed(()=>i.processInstanceId||x(c.value,"processInstanceId")),W=l.computed(()=>i.processDefinitionId||x(c.value,"processDefinitionId")),re=l.computed(()=>i.taskId||x(c.value,"taskId","taskInstanceId")),J=l.computed(()=>i.activityId||x(c.value,"activityId")),H=l.computed(()=>i.activityName||x(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 I(){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 Zn({currentPage:1,pageSize:100,assignee:i.dealUserId,assigne:i.dealUserId,userId:i.dealUserId,processInstanceId:i.processInstanceId}),Q=E(M.data).find(ye=>x(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 P(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}S.value=!0;try{const he=await k(Q);M.level===0&&(y.value=he),G(he)}catch(he){o("error",he),G([])}finally{S.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=tr(i.dialogZIndex),O.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;D.value=!0;try{const ye=await(M==="turnBefore"?li:ci)({workId:F.value,taskId:re.value,assignee:v.value.id});O.value=!1,u(G,ye,Z(G,R.value))}catch(he){o("error",he)}finally{D.value=!1}}async function f(){s.value=!0,a.value=[];try{if(await I(),!F.value)return a.value;const M=await ni({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=tr(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 ii($);break;case"taskRecyle":z=await ai($);break;case"hang":z=await ui({processInstanceIds:[Q.processInstanceId||""]});break;case"restore":z=await fi($);break;case"terminate":z=await di($);break;case"taskComplete":z=await si({...$,variables:i.variables});break;case"taskRollback":z=await oi($);break;case"taskClaim":if(!i.dealUserId){b(M,Q);return}z=await ri({...$,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:I,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",kf,[s.value?(l.openBlock(),l.createElementBlock("span",Cf,"正在加载流程操作...")):(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",Rf)):l.createCommentVNode("",!0),l.renderSlot(M.$slots,"suffix",{action:$},void 0,!0)]))),128)),M.$slots.append?(l.openBlock(),l.createElementBlock("div",Tf,[l.renderSlot(M.$slots,"append",{actions:a.value,loading:s.value},void 0,!0)])):l.createCommentVNode("",!0),l.createVNode(ye,{modelValue:O.value,"onUpdate:modelValue":G[1]||(G[1]=$=>O.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",Df,[l.createVNode(Q,{type:"primary",loading:D.value,onClick:p},{default:l.withCtx(()=>[...G[6]||(G[6]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(Q,{disabled:D.value,onClick:G[0]||(G[0]=$=>O.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",Pf,[G[5]||(G[5]=l.createElementVNode("p",{class:"sign-tip"},"仅可选择一名机构人员",-1)),l.createVNode(he,{data:y.value,load:P,props:N,"highlight-current":"",lazy:"","node-key":"id",onNodeClick:U},null,8,["data"]),l.createElementVNode("div",Nf,[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,S.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 Of(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nr={exports:{}},Bf=nr.exports,pa;function Mf(){return pa||(pa=1,(function(e,t){(function(n,r){e.exports=r()})(Bf,(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",O="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+)?$/,S=/\[([^\]]+)]|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,D={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,I=H.clone().add(Z+(K?-1:1),m);return+(-(Z+(Y-q)/(K?q-I:I-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:O,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",N={};N[R]=D;var x="$isDayjsObject",E=function(J){return J instanceof W||!(!J||!J[x])},V=function J(H,Y,Z){var q;if(!H)return R;if(typeof H=="string"){var K=H.toLowerCase();N[K]&&(q=K),Y&&(N[K]=Y,q=K);var I=H.split("-");if(!q&&I.length>1)return J(I[0])}else{var j=H.name;N[j]=H,q=j}return!Z&&q&&(R=q),q||!Z&&R},F=function(J,H){if(E(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=E,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[x]=!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 I=q.match(C);if(I){var j=I[2]-1||0,k=(I[7]||"0").substring(0,3);return K?new Date(Date.UTC(I[1],j,I[3]||1,I[4]||0,I[5]||0,I[6]||0,k)):new Date(I[1],j,I[3]||1,I[4]||0,I[5]||0,I[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,I=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)},P=this.$W,U=this.$M,ie=this.$D,se="set"+(this.$u?"UTC":"");switch(I){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=(P<p?P+7:P)-p;return j(K?ie-f:ie+(6-f),U);case d:case O: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),I="set"+(this.$u?"UTC":""),j=(q={},q[d]=I+"Date",q[O]=I+"Date",q[m]=I+"Month",q[g]=I+"FullYear",q[c]=I+"Hours",q[s]=I+"Minutes",q[a]=I+"Seconds",q[o]=I+"Milliseconds",q)[K],k=K===d?this.$D+(Z-this.$W):Z;if(K===m||K===g){var P=this.clone().set(O,1);P.$d[j](k),P.init(),this.$d=P.set(O,Math.min(this.$D,P.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 I=T.p(Z),j=function(U){var ie=F(K);return T.w(ie.date(ie.date()+Math.round(U*Y)),K)};if(I===m)return this.set(m,this.$M+Y);if(I===g)return this.set(g,this.$y+Y);if(I===d)return j(1);if(I===h)return j(7);var k=(q={},q[s]=r,q[c]=i,q[a]=n,q)[I]||1,P=this.$d.getTime()+Y*k;return T.w(P,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",I=T.z(this),j=this.$H,k=this.$m,P=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(S,(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 P+1;case"MM":return T.s(P+1,2,"0");case"MMM":return p(q.monthsShort,P,ie,3);case"MMMM":return p(ie,P);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 I}return null})(b)||I.replace(":","")}))},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(Y,Z,q){var K,I=this,j=T.p(Z),k=F(Y),P=(k.utcOffset()-this.utcOffset())*r,U=this-k,ie=function(){return T.m(I,k)};switch(j){case g:K=ie()/12;break;case m:K=ie();break;case w:K=ie()/3;break;case h:K=(U-P)/6048e5;break;case d:K=(U-P)/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 N[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",O]].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=E,F.unix=function(J){return F(1e3*J)},F.en=N[R],F.Ls=N,F.p={},F}))})(nr)),nr.exports}var Lf=Mf();const rr=Of(Lf),Ff={class:"colBtns"},$f={key:0,class:"table-pagination"},Vf={class:"left-pagination"},jf={class:"right-pagination"},ha=St(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(x=>{var E;return!((E=x.hiddenCondition)!=null&&E.call(x,x))})),m=l.computed(()=>r.size==="medium"?"default":r.size);function w(x){return x<9?`0${x+1}`:x+1}function g(){var x;(x=s.value)==null||x.clearSelection()}function O(x,E){var V;(V=s.value)==null||V.toggleRowSelection(x,E)}function B(){var x;(x=s.value)==null||x.toggleAllSelection()}function C(x){var E;(E=s.value)==null||E.setCurrentRow(x)}function S(x){i("page-change",x)}function D(x){i("size-change",x)}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 x=((V=a.value)==null?void 0:V.querySelectorAll(".colBtns"))||[];let E=o.operation?120:0;x.forEach(F=>{E=Math.max(E,F.scrollWidth+40)}),d.value=E}function R(x,E,V){var F;r.hideSelection||(F=s.value)==null||F.toggleRowSelection(x),i("row-click",x,E,V)}function N(x,E,V){i("row-dblclick",x,E,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:O,toggleAllSelection:B,setCurrentRow:C,computeHeight:y}),(x,E)=>{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},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:R,onRowDblclick:N}),{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(x.$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",Ff,[l.renderSlot(x.$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",$f,[l.createElementVNode("div",Vf,[l.renderSlot(x.$slots,"pagination-left",{},void 0,!0)]),l.createElementVNode("div",jf,[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:S,onSizeChange:D},null,8,["current-page","page-size","total"])])]))],6)}}}),[["__scopeId","data-v-88684f01"]]),Uf={executing:"审批中",completed:"已完成",deleted:"已删除",canceled:"已取消",withdrawed:"已撤回",recyled:"已回收",rollbacked:"已退回",jumped:"已跳转"},zf=[{label:"业务标题",prop:"businessName",minWidth:"180px"},{label:"当前环节",prop:"activityName",minWidth:"180px"},{label:"发送人",prop:"assigneesNames",minWidth:"150px"},{label:"发送时间",prop:"startTime",width:"180px",formatter:e=>e.startTime?rr(e.startTime).format("YYYY-MM-DD HH:mm:ss"):""}],Hf=[{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 Wf(e){return{...e,workId:e.workId||e.id,processDefinitionId:e.processDefinitionId,processInstanceId:e.processInstanceId,activityId:e.activityId,activityName:e.activityName}}const qf=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"?Hf:zf);function h(y){return Uf[y]||y||""}function m(y,v){i("onHandle",{action:y,workData:Wf(v)})}function w(y){i("onHandle",{action:"view",workData:{...y,processDefinitionId:y.processDefinitionId,workId:y.id,workName:y.title}})}function g(y){return`${y}_${rr().format("YYYYMMDDHHmmss")}`}function O(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,D()}function S(y){c.pageSize=y,c.currentPage=1,D()}async function D(){s.value=!0;try{if(r.type==="todo"||r.type==="done"){const v=await(r.type==="todo"?Zn:ti)({currentPage:c.currentPage,pageSize:c.pageSize,assignee:r.dealUserId});a.value=v.data||[],c.total=Number(v.count||0)}else{const v=(await Qr(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,D()}),l.onMounted(D),t({data:a,loading:s,pageConfig:c,gridRef:o,loadTableData:D,onRowDblclick:B,create:O,buildDefaultBusinessTitle:g}),(y,v)=>{const R=l.resolveComponent("el-table-column"),N=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:S},{operation:l.withCtx(({row:x})=>[e.type==="todo"?(l.openBlock(),l.createBlock(N,{key:0,link:"",type:"primary",onClick:l.withModifiers(E=>m("view",x),["stop"])},{default:l.withCtx(()=>[...v[0]||(v[0]=[l.createTextVNode(" 办理 ",-1)])]),_:1},8,["onClick"])):e.type==="done"?(l.openBlock(),l.createBlock(N,{key:1,link:"",type:"primary",onClick:l.withModifiers(E=>m("handle",x),["stop"])},{default:l.withCtx(()=>[...v[1]||(v[1]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):e.type==="draft"&&x.state==="audit"?(l.openBlock(),l.createBlock(N,{key:2,link:"",type:"primary",onClick:l.withModifiers(E=>w(x),["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:x})=>[l.createTextVNode(l.toDisplayString(e.type==="done"?h(x.stateName):x.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,Yf=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)&&Yf.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 Kf(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)?Zf:Jf;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 Gf(e,t){t=Xf(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 Xf(e){return Ct(e)?e:t=>t[e]}function Ei(e){return Ct(e)?e:t=>t===e}function Jf(e){return e}function Zf(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 Qf(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 ed(e,t){let n={},r=Object(e);return ae(t,function(i){i in r&&(n[i]=e[i])}),n}function td(e,t){let n={},r=Object(e);return ae(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}var nd=1e3;function vt(e,t){var n=this;t=t||nd,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)})}vt.prototype.canRender=function(e){},vt.prototype.drawShape=function(e,t){},vt.prototype.drawConnection=function(e,t){},vt.prototype.getShapePath=function(e){},vt.prototype.getConnectionPath=function(e){};function ue(e,t){var n=Ce(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function rd(e,t){return ga(t,function(n){return ue(e,n)})}function Ce(e){return e&&e.businessObject||e}function Yt(e){return e&&e.di}function Kt(e,t){return ue(e,"bpmn:CallActivity")?!1:ue(e,"bpmn:SubProcess")?(t=t||Yt(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=Yt(e).isHorizontal;return t===void 0?!0:t}}function id(e){return e&&!!Ce(e).triggeredByEvent}function od(e){return At(e)&&cn(e,"waypoints")}function ad(e){return At(e)&&cn(e,"labelTarget")}var An={width:90,height:20},_a=15;function sd(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 ld(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=cd(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 cd(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 ud(e){return e.waypoints?ld(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 fd(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=ud(t),r=An),ce({x:n.x-r.width/2,y:n.y-r.height/2},r)}function dd(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 pd(e){var t=e.categoryValueRef;return t&&t.value||""}function ir(e){var t=e.businessObject,n=dd(t);if(n)return n==="categoryValueRef"?pd(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 hd(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function md(e,t){return t.appendChild(hd(e,t))}function Be(e,t){return md(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 yd(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 gd(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 yd(e,t);else gd(e,t);return e}const vd=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 vd.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 wd(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=bd(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function bd(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=wd(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 Ed(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,_d=/([&<>\n\r"]{1})/g,xd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Ai(e,t){function n(r,i){return xd[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,_d),'"');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 Sd(e){for(var t=e.firstChild,n=[];t;)Da(t,n),t=t.nextSibling;return n.join("")}function Ia(e,t){return Sd(e)}function or(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Ad(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function kd(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(Ad(e,r))}function Rn(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),kd(n,t)),n.consolidate()}function Gt(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function Cd(e){return["M",e.x,e.y]}function ki(e){return["L",e.x,e.y]}function Rd(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function Td(e,t){const n=e.length,r=[Cd(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=ar(a,o,c),h=ar(a,o,c*.5),m=ar(a,s,c),w=ar(a,s,c*.5);r.push(ki(d)),r.push(Rd(h,w,m))}return r}function ar(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:Gt(Td(t,n))}),e}var Ti="hsl(225, 10%, 15%)",Pd="white";function ct(e,t){return ga(e.eventDefinitions,function(n){return n.$type===t})}function Nd(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function Dd(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function ge(e,t,n){var r=Yt(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||Pd}function te(e,t,n){var r=Yt(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||Ti}function Tn(e,t,n,r){var i=Yt(e),o=i.get("label");return r||o&&o.get("color:color")||t||te(e,n)}function Id(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 Gt(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 Gt(a)}function Od(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 Gt(s)}function Bd(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 Gt(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 Md(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 Ld=Object.prototype.toString;function Xt(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 Ld.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 Fd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sr={},$a;function $d(){if($a)return sr;$a=1;var e,t,n;function r(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n=e!=="addEventListener"?"on":""}return sr.bind=function(i,o,a,s){return e||r(),i[e](n+o,a,s||!1),a},sr.unbind=function(i,o,a,s){return t||r(),i[t](n+o,a,s||!1),a},sr}var Va=$d(),Vd=Fd(Va),Nt=Md({__proto__:null,default:Vd},[Va]),ja=["focus","blur"];function jd(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 Ud(e,t,n,r){return ja.indexOf(t)!==-1&&(r=!0),Nt.unbind(e,t,n,r)}var Pi={bind:jd,unbind:Ud};function wt(e,t){return t=t||document,t.querySelector(e)}function zd(e,t){return t=t||document,t.querySelectorAll(e)}function lr(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 Hd(e,t){var n=Cn();n.setRotate(t,0,0),Rn(e,n)}function Wd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Di={exports:{}},za;function qd(){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 Yd=qd(),Kd=Wd(Yd);function bt(e){if(!(this instanceof bt))return new bt(e);e=e||[128,36,1],this._seed=e.length?Kd.rack(e[0],e[1],e[2]):e}bt.prototype.next=function(e){return this._seed(e||!0)},bt.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},bt.prototype.claim=function(e,t){this._seed.set(e,t||!0)},bt.prototype.assigned=function(e){return this._seed.get(e)||!1},bt.prototype.unclaim=function(e){delete this._seed.hats[e]},bt.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var Gd=new bt,Xd=10,cr=3,Jd=1.5,ur=10,Zd=4,dn=.95,Qd=1,ep=.25;function Jt(e,t,n,r,i,o,a){vt.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=wt(":scope > defs",L);fe||(fe=Re("defs"),Be(L,fe)),Be(fe,ee)}function g(p,f,u,b){var A=Gd.nextPrefixed("marker-");return O(p,A,f,u,b),"url(#"+A+")"}function O(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 S(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 D(p,f,u,b){u=m(u);var A=Ri(f,u,b);return Be(p,A),A}function y(p,f,u){return D(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 N(p){return se[p]}function x(p){return function(f,u,b){return N(p)(f,u,b)}}var E={"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 Hd(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=Nd(A),ee=b||p;return A.get("eventDefinitions")&&A.get("eventDefinitions").length>1?A.get("parallelMultiple")?E["bpmn:ParallelMultipleEventDefinition"](f,ee,u,L):E["bpmn:MultipleEventDefinition"](f,ee,u,L):ct(A,"bpmn:MessageEventDefinition")?E["bpmn:MessageEventDefinition"](f,ee,u,L):ct(A,"bpmn:TimerEventDefinition")?E["bpmn:TimerEventDefinition"](f,ee,u,L):ct(A,"bpmn:ConditionalEventDefinition")?E["bpmn:ConditionalEventDefinition"](f,ee,u,L):ct(A,"bpmn:SignalEventDefinition")?E["bpmn:SignalEventDefinition"](f,ee,u,L):ct(A,"bpmn:EscalationEventDefinition")?E["bpmn:EscalationEventDefinition"](f,ee,u,L):ct(A,"bpmn:LinkEventDefinition")?E["bpmn:LinkEventDefinition"](f,ee,u,L):ct(A,"bpmn:ErrorEventDefinition")?E["bpmn:ErrorEventDefinition"](f,ee,u,L):ct(A,"bpmn:CancelEventDefinition")?E["bpmn:CancelEventDefinition"](f,ee,u,L):ct(A,"bpmn:CompensateEventDefinition")?E["bpmn:CompensateEventDefinition"](f,ee,u,L):ct(A,"bpmn:TerminateEventDefinition")?E["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,ir(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,ur,{...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(Dd(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 I(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 S(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 P(p,f,u={}){var b=Z(p,f,u),A=Kt(f);if(id(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 Kt(f)?u=we(u,["fill","stroke","width","height"]):u=we(u,["fill","stroke"]),P(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:Qd,stroke:te(f,c,u.stroke)},L||(u.strokeDasharray="6");var ee=I(p,f,u);return B(p,f.width,f.height,cr,{...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"]),P(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":x("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=I(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=Yt(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,ur,{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=I(p,f,{...u,strokeWidth:1.5});return B(p,f.width,f.height,cr,{fill:"none",stroke:te(f,c,u.stroke),strokeWidth:1.5}),b&&V(f,p,u),A},"bpmn:IntermediateCatchEvent":x("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":x("bpmn:IntermediateEvent"),"bpmn:Lane":function(p,f,u={}){return u=we(u,["fill","stroke","width","height"]),k(p,f,{...u,fillOpacity:ep})},"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=Yt(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+Xd;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=Kt(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}];D(p,me,{stroke:te(f,c,u.stroke),strokeWidth:Jd}),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=I(p,f,u);return b&&V(f,p,u),L},"bpmn:SubProcess":function(p,f,u={}){return Kt(f)?u=we(u,["fill","stroke","width","height"]):u=we(u,["fill","stroke"]),P(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={}){Kt(f)?u=we(u,["fill","stroke","width","height"]):u=we(u,["fill","stroke"]);var b=P(p,f,{strokeWidth:1.5,...u}),A=n.style(["no-fill","no-events"],{stroke:te(f,c,u.stroke),strokeWidth:1.5}),L=Kt(f);return L||(u={}),C(p,nt(f,u),Ye(f,u),ur-cr,cr,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=N}at(Jt,vt),Jt.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Jt.prototype.canRender=function(e){return ue(e,"bpmn:BaseElement")},Jt.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Jt.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Jt.prototype.getShapePath=function(e){return ad(e)?Ba(e,Zd):ue(e,"bpmn:Event")?Id(e):ue(e,"bpmn:Activity")?Ba(e,ur):ue(e,"bpmn:Gateway")?Od(e):Bd(e)};function we(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}var tp=0,np={width:150,height:50};function rp(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function ip(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 op(){return Ii||(Ii=document.createElement("canvas").getContext("2d")),Ii}function ap(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 sp(e,t){var n=op();if(!n)return{width:0,height:0};n.font=ap(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 lp(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=sp(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return cp(e,i,r,o);i=fp(i,o.width,t)}}function cp(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 up(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 fp(e,t,n){var r=Math.max(e.length*(n/t),1),i=up(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function fr(e){this._config=ce({},{size:np,padding:tp,style:{},align:"center-top"},e||{})}fr.prototype.createText=function(e,t){return this.layoutText(e,t).element},fr.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},fr.prototype.layoutText=function(e,t){for(var n=ce({},this._config.size,t.box),r=ce({},this._config.style,t.style),i=rp(t.align||this._config.align),o=ip(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=dp(r),c=e.split(/\u00AD?\r?\n/),d=[],h=n.width-o.left-o.right;c.length;)d.push(lp(c,h,r));i.vertical==="middle"&&(o.top=o.bottom=0);var m=fn(d,function(C,S,D){return C+(s||S.height)},0)+o.top+o.bottom,w=fn(d,function(C,S,D){return S.width>C?S.width:C},0),g=o.top;i.vertical==="middle"&&(g+=(n.height-m)/2),g-=(s||d[0].height)/4;var O=Re("text");Te(O,r),ae(d,function(C){var S;switch(g+=s||C.height,i.horizontal){case"left":S=o.left;break;case"right":S=(a?w:h)-o.right-C.width;break;default:S=Math.max(((a?w:h)-C.width)/2+o.left,0)}var D=Re("tspan");Te(D,{x:S,y:g}),D.textContent=C.text,Be(O,D)});var B={width:w,height:m};return{dimensions:B,element:O}};function dp(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var pp=12,hp=1.2,mp=40;function qa(e){var t=ce({fontFamily:"Arial, sans-serif",fontSize:pp,fontWeight:"normal",lineHeight:hp},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=ce({},t,{fontSize:n},e&&e.externalStyle||{}),i=new fr({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(mp,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 yp(){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=bp(r.d,{mx:i,my:o,e:a});return m}}var gp=/\{([^{}]+)\}/g,vp=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function wp(e,t,n){var r=n;return t.replace(vp,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 bp(e,t){return String(e).replace(gp,function(n,r){return wp(n,r,t)})}const Ep={__init__:["bpmnRenderer"],bpmnRenderer:["type",Jt],textRenderer:["type",qa],pathMap:["type",yp]};function _p(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const Ya={translate:["value",_p]};function xp(e,t){return!e||!t?-1:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}var Sp=/,?([a-z]),?/gi,Ka=parseFloat,Pe=Math,Dt=Pe.PI,ft=Pe.min,dt=Pe.max,Ga=Pe.pow,It=Pe.abs,Ap=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig,kp=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig,Xa=Array.isArray||function(e){return e instanceof Array};function Cp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Rp(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 Tp(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 Cp(i,r)?(Rp(o,r),i[r]):(o.length>=1e3&&delete i[o.shift()],o.push(r),i[r]=e(...arguments),i[r])}return t}function Pp(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(Ap,function(r,i,o){var a=[],s=i.toLowerCase();for(o.replace(kp,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 Np(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 Dp(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(Sp,"$1")}function Ip(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,O=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:dr(O),y:dr(B)}}function Za(e){var t=Vp(...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 Op(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,O=0;O<h;O++){var B=d*m[O]+d,C=Qa(B,e,n,i,a),S=Qa(B,t,r,o,s),D=C*C+S*S;g+=w[O]*Pe.sqrt(D)}return d*g}function Bp(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=dr(c/h),w=dr(d/h),g=+m.toFixed(2),O=+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)||O<+ft(t,r).toFixed(2)||O>+dt(t,r).toFixed(2)||O<+ft(o,s).toFixed(2)||O>+dt(o,s).toFixed(2)))return{x:m,y:w}}}}function dr(e){return Math.round(e*1e11)/1e11}function Mp(e,t,n){var r=Za(e),i=Za(t);if(!Op(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,O;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(O=0;O<c;O++){var C=d[g],S=d[g+1],D=h[O],y=h[O+1],v=It(S.x-C.x)<.01?"y":"x",R=It(y.x-D.x)<.01?"y":"x",N=Bp(C.x,C.y,S.x,S.y,D.x,D.y,y.x,y.y),x;if(N){if(x=N.x.toFixed(9)+"#"+N.y.toFixed(9),m[x])continue;m[x]=!0;var E=C.t+It((N[v]-C[v])/(S[v]-C[v]))*(S.t-C.t),V=D.t+It((N[R]-D[R])/(y[R]-D[R]))*(y.t-D.t);E>=0&&E<=1&&V>=0&&V<=1&&w.push({x:N.x,y:N.y,t1:E,t2:V})}}return w}function Lp(e,t,n){e=is(e),t=is(t);for(var r,i,o,a,s,c,d,h,m,w,g=[],O=0,B=e.length;O<B;O++){var C=e[O];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 S=0,D=t.length;S<D;S++){var y=t[S];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=Mp(m,w);{for(var R=0,N=v.length;R<N;R++)v[R].segment1=O,v[R].segment2=S,v[R].bez1=m,v[R].bez2=w;g=g.concat(v)}}}}}return g}function Fp(e){return Xa(e)&&Xa(e[0])}function $p(e){if(Np(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 O=0,B=d.length;O<B;O++)c[O]=d[O];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 pr(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,O=Tp(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)x=d[0],E=d[1],R=d[2],N=d[3];else{g=O(e,t,-m),e=g.x,t=g.y,g=O(s,c,-m),s=g.x,c=g.y;var B=(e-s)/2,C=(t-c)/2,S=B*B/(n*n)+C*C/(r*r);S>1&&(S=Pe.sqrt(S),n=S*n,r=S*r);var D=n*n,y=r*r,v=(o==a?-1:1)*Pe.sqrt(It((D*y-D*C*C-y*B*B)/(D*C*C+y*B*B))),R=v*n*C/r+(e+s)/2,N=v*-r*B/n+(t+c)/2,x=Pe.asin(((t-N)/r).toFixed(9)),E=Pe.asin(((c-N)/r).toFixed(9));x=e<R?Dt-x:x,E=s<R?Dt-E:E,x<0&&(x=Dt*2+x),E<0&&(E=Dt*2+E),a&&x>E&&(x=x-Dt*2),!a&&E>x&&(E=E-Dt*2)}var V=E-x;if(It(V)>h){var F=E,T=s,W=c;E=x+h*(a&&E>x?1:-1),s=R+n*Pe.cos(E),c=N+r*Pe.sin(E),w=rs(s,c,n,r,i,0,a,T,W,[E,F,R,N])}V=E-x;var re=Pe.cos(x),J=Pe.sin(x),H=Pe.cos(E),Y=Pe.sin(E),Z=Pe.tan(V/4),q=4/3*n*Z,K=4/3*r*Z,I=[e,t],j=[e+q*J,t-K*re],k=[s+q*Y,c-K*H],P=[s,c];if(j[0]=2*I[0]-j[0],j[1]=2*I[1]-j[1],d)return[j,k,P].concat(w);w=[j,k,P].concat(w).join().split(",");for(var U=[],ie=0,se=w.length;ie<se;ie++)U[ie]=ie%2?O(w[ie-1],w[ie],m).y:O(w[ie],w[ie+1],m).x;return U}function Vp(e,t,n,r,i,o,a,s){for(var c=[],d=[[],[]],h,m,w,g,O,B,C,S,D=0;D<2;++D){if(D==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,S=Pe.sqrt(C),!(C<0)&&(O=(-m+S)/(2*h),0<O&&O<1&&c.push(O),B=(-m-S)/(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(Fp(e)||(e=Pp(e)),Dp(e))return e;for(var t=Ip($p(e)),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(w,g,O){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":O=="C"||O=="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":O=="Q"||O=="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",...pr(g.x,g.y,w[1],w[2])];break;case"H":w=["C",...pr(g.x,g.y,w[1],g.y)];break;case"V":w=["C",...pr(g.x,g.y,g.x,w[1])];break;case"Z":w=["C",...pr(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 O=w[g];O.length;)o[g]="A",w.splice(g++,0,["C",...O.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 hr(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 jp(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Up(e){return hr({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function zp(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],O=g&&g.endLength||0,B=qp(w,h);d.push({start:w,end:h,startLength:O,endLength:O+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 od(e)?zp(e):Up(e)}function Hp(e,t,n){var r=Wp(e,t);return r.length===1||r.length===2&&xp(r[0],r[1])<1?hr(r[0]):r.length>1?(r=Gf(r,function(i){var o=Math.floor(i.t2*100)||1;return o=100-o,o=(o<10?"0":"")+o,i.segment2+"#"+o}),hr(r[n?0:r.length-1])):null}function Wp(e,t){return Lp(e,t)}function qp(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 mr(e,t,n){return ce({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Yp(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 Et(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}Et.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],Et.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(mr(e,t,a)),this._canvas.addRootElement(r)}else if(ue(t,"bpmndi:BPMNShape")){var s=!Kt(e,t),c=Gp(e);i=n&&(n.hidden||n.collapsed);var d=t.bounds;r=this._elementFactory.createShape(mr(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")&&(Kp(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(mr(e,t,{hidden:i,source:h,target:m,waypoints:Yp(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 sd(e)&&ir(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},Et.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)},Et.prototype.addLabel=function(e,t,n){var r,i,o;return r=fd(t,n),i=ir(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(mr(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!ir(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)},Et.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`)},Et.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},Et.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},Et.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function Kp(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 Gp(e){return ue(e,"bpmn:Group")}const Xp={__depends__:[Ep,{__depends__:[Ya],bpmnImporter:["type",Et]}]};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 Jp=new as("ov"),Zp=500;function Oe(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=Jp,this._overlayDefaults=ce({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=Qp(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&&(lr(r.html),lr(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(){yr(this._overlayRoot)},Oe.prototype.hide=function(){yr(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&&Xt(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();yr(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),yr(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){lr(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",Zp,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&&Xt(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 Qp(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 yr(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 eh={__init__:["changeSupport"],changeSupport:["type",us]};var th=1e3;function ze(e){this._eventBus=e}ze.$inject=["eventBus"];function nh(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=th),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?nh(r,o):r,o)})},ze.prototype.canExecute=_t("canExecute"),ze.prototype.preExecute=_t("preExecute"),ze.prototype.preExecuted=_t("preExecuted"),ze.prototype.execute=_t("execute"),ze.prototype.executed=_t("executed"),ze.prototype.postExecute=_t("postExecute"),ze.prototype.postExecuted=_t("postExecuted"),ze.prototype.revert=_t("revert"),ze.prototype.reverted=_t("reverted");function _t(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 rh={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Fi]};var ih={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function oh(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return ih[t]})}var ah="_plane";function $i(e){var t=e.id;return ue(e,"bpmn:SubProcess")?sh(t):t}function sh(e){return e+ah}var lh="bjs-breadcrumbs-shown";function fs(e,t,n){var r=ut('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=Xt(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=ch(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 S=Ce(C);return S&&S.get("processRef")===m});w=g&&n.findRoot(g.id)}if(!w)return[];var O=oh(m.name||m.id),B=ut('<li><span class="bjs-crumb"><a title="'+O+'">'+O+"</a></span></li>");return B.addEventListener("click",function(){n.setRootElement(w)}),B});r.innerHTML="";var h=d.length>1;o.toggle(lh,h),d.forEach(function(m){r.appendChild(m)})}e.on("root.set",function(c){s(c.element)})}fs.$inject=["eventBus","elementRegistry","canvas"];function ch(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 uh;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 uh(){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 Zt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}Zt.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)})}},Zt.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),dh(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},Zt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=fh(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)})},Zt.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)},Zt.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},Zt.$inject=["eventBus","moddle"];function hs(e){return ue(e,"bpmndi:BPMNDiagram")?e:hs(e.$parent)}function fh(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)}}),jp(t)}function dh(e,t){var n=e.$parent;return!(!ue(n,"bpmn:SubProcess")||n===t.bpmnElement||rd(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var gr=250,ph='<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>',hh="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",gr,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",gr,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],gr,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"],gr,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;Xt(r.html).toggle(hh,!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">'+ph+"</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 mh={__depends__:[cs,eh,rh],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",fs],drilldownCentering:["type",ds],drilldownOverlayBehavior:["type",Bt],subprocessCompatibility:["type",Zt]};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 yh(){return/mac/i.test(navigator.platform)}function gs(e,t){return(ms(e)||e).button===t}function vr(e){return gs(e,0)}function gh(e){return gs(e,1)}function vh(e){var t=ms(e)||e;return vr(e)&&t.shiftKey}function wh(e){return!0}function wr(e){return vr(e)||gh(e)}var vs=500;function ws(e,t,n){var r=this;function i(E,V,F){if(!s(E,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(E,{element:F,gfx:W,originalEvent:V}),re===!1&&(V.stopPropagation(),V.preventDefault()))}}var o={};function a(E){return o[E]}function s(E,V){var F=d[E]||vr;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":wh,"element.mousedown":wr,"element.mouseup":wr,"element.click":wr,"element.dblclick":wr};function h(E,V,F){var T=c[E];if(!T)throw new Error("unmapped DOM event name <"+E+">");return i(T,V,F)}var m="svg, .djs-element";function w(E,V,F,T){var W=o[F]=function(re){i(F,re)};T&&(d[F]=T),W.$delegate=Pi.bind(E,m,V,W)}function g(E,V,F){var T=a(F);T&&Pi.unbind(E,V,T.$delegate)}function O(E){ae(c,function(V,F){w(E,F,V)})}function B(E){ae(c,function(V,F){g(E,F,V)})}e.on("canvas.destroy",function(E){B(E.svg)}),e.on("canvas.init",function(E){O(E.svg)}),e.on(["shape.added","connection.added"],function(E){var V=E.element,F=E.gfx;e.fire("interactionEvents.createHit",{element:V,gfx:F})}),e.on(["shape.changed","connection.changed"],vs,function(E){var V=E.element,F=E.gfx;e.fire("interactionEvents.updateHit",{element:V,gfx:F})}),e.on("interactionEvents.createHit",vs,function(E){var V=E.element,F=E.gfx;r.createDefaultHit(V,F)}),e.on("interactionEvents.updateHit",function(E){var V=E.element,F=E.gfx;r.updateDefaultHit(V,F)});var C=R("djs-hit djs-hit-stroke"),S=R("djs-hit djs-hit-click-stroke"),D=R("djs-hit djs-hit-all"),y=R("djs-hit djs-hit-no-move"),v={all:D,"click-stroke":S,stroke:C,"no-move":y};function R(E,V){return V=ce({stroke:"white",strokeWidth:15},V||{}),n.cls(E,["no-fill","no-border"],V)}function N(E,V){var F=v[V];if(!F)throw new Error("invalid hit type <"+V+">");return Te(E,F),E}function x(E,V){Be(E,V)}this.removeHits=function(E){var V=zd(".djs-hit",E);ae(V,or)},this.createDefaultHit=function(E,V){var F=E.waypoints,T=E.isFrame,W;return F?this.createWaypointsHit(V,F):(W=T?"stroke":"all",this.createBoxHit(V,W,{width:E.width,height:E.height}))},this.createWaypointsHit=function(E,V){var F=Ri(V);return N(F,"stroke"),x(E,F),F},this.createBoxHit=function(E,V,F){F=ce({x:0,y:0},F);var T=Re("rect");return N(T,V),Te(T,F),x(E,T),T},this.updateDefaultHit=function(E,V){var F=wt(".djs-hit",V);if(F)return E.waypoints?Oa(F,E.waypoints):Te(F,{width:E.width,height:E.height}),F},this.fire=i,this.triggerMouseEvent=h,this.mouseHandler=a,this.registerEvent=w,this.unregisterEvent=g}ws.$inject=["eventBus","elementRegistry","styles"];const bh={__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(Eh))}}),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(vr(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,c=vh(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 Eh(e){return!e.hidden}const _h={__init__:["selectionVisuals","selectionBehavior"],__depends__:[bh],selection:["type",pn],selectionVisuals:["type",_s],selectionBehavior:["type",xs]},xh=/^class[ {]/;function Sh(e){return xh.test(e.toString())}function Vi(e){return Array.isArray(e)}function ji(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function br(...e){e.length===1&&Vi(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const Ah=/constructor\s*[^(]*\(\s*([^)]*)\)/m,kh=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Ch=/\/\*([^*]*)\*\//m;function Rh(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(Sh(e)?Ah:kh);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(Ch);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 N=c(R.shift());for(;R.length;)N=N[R.shift()];return N}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=br(y.slice());else throw s(`Cannot invoke "${y}". Expected a function!`);const N=(y.$inject||Rh(y)).map(x=>ji(v,x)?v[x]:c(x));return{fn:y,dependencies:N}}function h(y){const{fn:v,dependencies:R}=d(y),N=Function.prototype.bind.call(v,null,...R);return new N}function m(y,v,R){const{fn:N,dependencies:x}=d(y,R);return N.apply(v,x)}function w(y){return br(v=>y.get(v))}function g(y,v){if(v&&v.length){const R=Object.create(null),N=Object.create(null),x=[],E=[],V=[];let F,T,W,re;for(let J in i)F=i[J],v.indexOf(J)!==-1&&(F[2]==="private"?(T=x.indexOf(F[3]),T===-1?(W=F[3].createChild([],v),re=w(W),x.push(F[3]),E.push(W),V.push(re),R[J]=[re,J,"private",W]):R[J]=[V[T],J,"private",E[T]]):R[J]=[F[2],F[1]],N[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]],N[H]=!0)});v.forEach(J=>{if(!N[J])throw new Error('No provider for "'+J+'". Cannot use provider from the parent!')}),y.unshift(R)}return new Ss(y,a)}const O={factory:m,type:h,value:function(y){return y}};function B(y,v){const R=y.__init__||[];return function(){R.forEach(N=>{typeof N=="string"?v.get(N):v.invoke(N)})}}function C(y){const v=y.__exports__;if(v){const R=y.__modules__,N=Object.keys(y).reduce((T,W)=>(W!=="__exports__"&&W!=="__modules__"&&W!=="__init__"&&W!=="__depends__"&&(T[W]=y[W]),T),Object.create(null)),x=(R||[]).concat(N),E=g(x),V=br(function(T){return E.get(T)});v.forEach(function(T){i[T]=[V,T,"private",E]});const F=(y.__init__||[]).slice();return F.unshift(function(){E.init()}),y=Object.assign({},y,{__init__:F}),B(y,E)}return Object.keys(y).forEach(function(R){if(R==="__init__"||R==="__depends__")return;const N=y[R];if(N[2]==="private"){i[R]=N;return}const x=N[0],E=N[1];i[R]=[O[x],Th(x,E),x]}),B(y,a)}function S(y,v){return y.indexOf(v)!==-1||(y=(v.__depends__||[]).reduce(S,y),y.indexOf(v)!==-1)?y:y.concat(v)}function D(y){const v=y.reduce(S,[]).map(C);let R=!1;return function(){R||(R=!0,v.forEach(N=>N()))}}this.get=c,this.invoke=m,this.instantiate=h,this.createChild=g,this.init=D(e)}function Th(e,t){return e!=="value"&&Vi(t)&&(t=br(t.slice())),t}var Ph=1;function Mt(e,t){vt.call(this,e,Ph),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,vt),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 Gt(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 Gt(o)},Mt.$inject=["eventBus","styles"];function Nh(){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 Dh={__init__:["defaultRenderer"],defaultRenderer:["type",Mt],styles:["type",Nh]};function Ih(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function Oh(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 Er(e,t){return Math.round(e*t)/t}function As(e){return kt(e)?e+"px":e}function Bh(e){for(;e.parent;)e=e.parent;return e}function Mh(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 Lh="base",Cs=0,Fh=1,$h={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=Mh(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(Lh,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=Fh);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&&(or(n),t.visible=!1),n},pe.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],or(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(Bh(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=$h[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){Oh(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),Ih(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:Ed(),s=Er(i.a,1e3),c=Er(-i.e||0,1e3),d=Er(-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(O=>O!=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 O=Math.max(0,s.right-w.right),B=Math.min(0,s.left-w.left),C=Math.max(0,s.bottom-w.bottom),S=Math.min(0,s.top-w.top);h=O||B,m=C||S}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)}),Er(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 Vh(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 jh(e){return e.__refs_collection===!0}function Uh(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Ts(e,t,n){var r=Vh(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 zh(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):zh(this,t,e)},rt.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return jh(n)||Ts(this,t,e),n},rt.prototype.ensureBound=function(e,t){Uh(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 Hh={connection:Ms,shape:Dn,label:Bs,root:Os};function Wh(e,t){var n=Hh[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++),Wh(e,t)};var _r="__fn",Ls=1e3,qh=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[_r]=n[_r]||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[_r]=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=qh.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=Yh(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[_r]===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 Yh(e,t){return e.apply(null,t)}function Kh(e){return e.childNodes[0]}function Gh(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=Gh(t),n||(n=Re("g"),lt(n).add("djs-children"),Be(t.parentNode,n))):n=t,n},Je.prototype._clear=function(e){var t=Kh(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"?Xh(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);or(t.parentNode)};function Xh(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const Jh={__depends__:[Dh],__init__:["canvas"],canvas:["type",pe],elementRegistry:["type",Xe],elementFactory:["type",mn],eventBus:["type",Ke],graphicsFactory:["type",Je]};function Zh(e){var t=new Ss(e);return t.init(),t}function Qh(e){e=e||{};var t={config:["value",e]},n=[t,Jh].concat(e.modules||[]);return Zh(n)}function Lt(e,t){this._injector=t||Qh(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 em=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!!em[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 ed(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 Qt(e){this.model=e}Qt.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;tm(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},Qt.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]},Qt.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)},Qt.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},Qt.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},Qt.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 tm(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 Qt(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){Qf(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,nm=Object.prototype.hasOwnProperty,rm=/&#(\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 im(e,t,n,r){return r?nm.call(On,r)?On[r]:"&"+r+";":zs(t||parseInt(n,16))}function en(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(rm,im):e}var Hs="non-whitespace outside of root node";function $t(e){return new Error(e)}function om(e){return"missing namespace for prefix <"+e+">"}function xr(e){return{get:e,enumerable:!0}}function am(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 sm(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 Sr(){return{line:0,column:0}}function lm(e){throw e}function qs(e){if(!this)return new qs(e);var t=e&&e.proxy,n,r,i,o,a=lm,s,c,d,h,m=Sr,w=!1,g=!1,O="",B=!1,C=!1,S=null,D=!1,y,v,R,N;function x(T){T instanceof Error||(T=$t(T)),S=T,a(T,m)}function E(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,N=W,this};function V(){y=C?[]:null,v=C?sm(N):null,R=[],m=Sr,D=!1,S=null,g=!1,O=""}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=Sr,D=!1,S},this.write=function(T){if(typeof T!="string")throw $t("required args <xml=string>");return w||(V(),w=!0),S||(O=F(O+T,!0)||""),this},this.end=function(){return w||V(),w=!1,S||F(O),O="",m=Sr,D=!1,S},this.stop=function(){D=!0};function F(T,W=!1){var re=null,J=null,H,Y=0,Z=!1,q=!1,K=0,I=0,j,k,P,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):(E(om(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&&(E("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){E("missing attribute value"),ye=Ae;continue e}if(Se===61)break;E("illegal attribute name char"),Ue=!0}if(Ee=ve.substring(ye,Ae),Ee==="xmlns:xmlns"&&(E("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&&(E("attribute value quote missmatch"),Ue=!0));else if(Se===39)Ae=ve.indexOf("'",ye=Ae+2),Ae===-1&&(Ae=ve.indexOf('"',ye),Ae!==-1&&(E("attribute value quote missmatch"),Ue=!0));else for(E("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&&(E("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&&(E("illegal character after attribute end"),Ue=!0);if(ye=Ae+1,Ue)continue e;if(Qe.has(Ee)){E("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=en(X),G=Yi(le),be=N[M],!be){if(le==="xmlns"||G in v&&v[G]!==M)do be="ns"+Y++;while(typeof v[be]<"u");else be=le;N[M]=be}v[le]!==be&&(z||(v=am(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=I,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(I)):I===0?$=T.substring(I,K):(Q=K-he,$=I==-1?T.substring(K):T.substring(K,I+1)),{data:$,line:G,column:Q}}for(m=me,t&&(u=Object.create({},{name:xr(function(){return p}),originalName:xr(function(){return f}),attrs:xr(fe),ns:xr(function(){return v})}));I!==-1;){if(T.charCodeAt(I)===60?K=I:K=T.indexOf("<",I),K===-1){if(W)return T.substring(I);if(R.length)return x("unexpected end of file");if(!g)return x("missing start tag");I<T.length&&T.substring(I).trim()&&E(Hs);return}if(g||(g=!0),I!==K){if(R.length){if(n&&(n(T.substring(I,K),en,m),D))return}else if(T.substring(I,K).trim()&&(E(Hs),D))return}if(U=T.charCodeAt(K+1),U===33){if(P=T.charCodeAt(K+2),P===91&&T.substr(K+3,6)==="CDATA["){if(I=T.indexOf("]]>",K),I===-1)return W?T.substring(K):x("unclosed cdata");if(o&&(o(T.substring(K+9,I),m),D))return;I+=3;continue}if(P===45&&T.charCodeAt(K+3)===45){if(I=T.indexOf("-->",K),I===-1)return W?T.substring(K):x("unclosed comment");if(c&&(c(T.substring(K+4,I),en,m),D))return;I+=3;continue}}if(U===63){if(I=T.indexOf("?>",K),I===-1)return W?T.substring(K):x("unclosed question");if(d&&(d(T.substring(K,I+2),m),D))return;I+=2;continue}for(j=K+1;;j++){if(ie=T.charCodeAt(j),isNaN(ie))return W?T.substring(K):(I=-1,x("unclosed tag"));if(ie===34)P=T.indexOf('"',j+1),j=P!==-1?P:j;else if(ie===39)P=T.indexOf("'",j+1),j=P!==-1?P:j;else if(ie===62){I=j;break}}if(U===33){if(h&&(h(T.substring(K,I+1),en,m),D))return;I+=1;continue}if(L={},U===47){if(Z=!1,q=!0,!R.length)return x("missing open tag");if(j=p=R.pop(),P=K+2+j.length,T.substring(K+2,P)!==j)return x("closing tag mismatch");for(;P<I;P++)if(U=T.charCodeAt(P),!(U===32||U>8&&U<14))return x("close tag")}else{if(T.charCodeAt(I-1)===47?(j=p=T.substring(K+1,I-1),Z=!0,q=!0):(j=p=T.substring(K+1,I),Z=!0,q=!1),!(U>96&&U<123||U>64&&U<91||U===95||U===58))return x("illegal first char nodeName");for(P=1,k=j.length;P<k;P++)if(U=j.charCodeAt(P),!(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,P),L=null;break}return x("invalid nodeName")}q||R.push(p)}if(C){H=v,Z&&(q||y.push(H),L===null&&(B=j.indexOf("xmlns",P)!==-1)&&(A=P,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 x("missing namespace on <"+f+">");p=p.substr(U+1)}else se=v.xmlns;se&&(p=se+":"+p),re[f]=p}}if(Z&&(A=P,b=j,r&&(t?r(u,en,q,m):r(p,fe,en,q,m),D)))return;if(q){if(i&&(i(t?u:p,en,Z,m),D))return;C&&(Z?v=H:v=y.pop())}I+=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 cm(e){const t=Gs(e);return t!==Ks&&(t||null)}function um(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Xs(e,t){return Ys(t)?e.prefix+":"+um(e.localName):e.name}function fm(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 dm(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 fm(o,a)}function Vt(e){return new Error(e)}function xt(e){return e.$descriptor}function pm(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=xt(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 Ar(){}Ar.prototype=Object.create(yn.prototype),Ar.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(Ar.prototype),je.prototype.addReference=function(e){this.context.addReference(e)},je.prototype.handleText=function(e){var t=this.element,n=xt(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=xt(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=xt(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=xt(r),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){const d=cm(s);if(d){const h=e.attributes[d];if(h){const m=dm(h,e.ns,i),w=i.getType(m);return ce({},s,{effectiveType:xt(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:xt(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["+xt(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(Ar.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 pm(ce({},t,{rootHandler:r})),s=new qs({proxy:!0}),c=hm();r.context=a,c.push(r);function d(R,N,x){var E=N(),V=E.line,F=E.column,T=E.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(x)return a.addWarning({message:W,error:R}),!0;throw Vt(W)}function h(R,N){return d(R,N,!0)}function m(){var R=a.elementsById,N=a.references,x,E;for(x=0;E=N[x];x++){var V=E.element,F=R[E.id],T=xt(V).propertiesByName[E.property];if(F||a.addWarning({message:"unresolved reference <"+E.id+">",element:E.element,property:E.property,value:E.id}),T.isMany){var W=V.get(T.name),re=W.indexOf(E);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,O=/ encoding="([^"]+)"/i,B=/^utf-8$/i;function C(R){if(g.test(R)){var N=O.exec(R),x=N&&N[1];!x||B.test(x)||a.addWarning({message:"unsupported document encoding <"+x+">, falling back to UTF-8"})}}function S(R,N){var x=c.peek();try{c.push(x.handleNode(R))}catch(E){d(E,N,o)&&c.push(new Gi)}}function D(R,N){try{c.peek().handleText(R)}catch(x){h(x,N)}}function y(R,N){R.trim()&&D(R,N)}var v=i.getPackages().reduce(function(R,N){return R[N.uri]=N.prefix,R},Object.entries(Ki).reduce(function(R,[N,x]){return R[x]=N,R},i.config&&i.config.nsMap||{}));return s.ns(v).on("openTag",function(R,N,x,E){var V=R.attrs||{},F=Object.keys(V).reduce(function(W,re){var J=N(V[re]);return W[re]=J,W},{}),T={name:R.name,originalName:R.originalName,attributes:F,ns:R.ns};S(T,E)}).on("question",C).on("closeTag",w).on("cdata",D).on("text",function(R,N,x){y(N(R),x)}).on("error",d).on("warn",h),new Promise(function(R,N){var x;try{s.parse(e),m()}catch(W){x=W}var E=r.element;!x&&!E&&(x=Vt("failed to parse document as <"+r.type.$descriptor.name+">"));var V=a.warnings,F=a.references,T=a.elementsById;return x?(x.warnings=V,N(x)):R({rootElement:E,elementsById:T,references:F,warnings:V})})},Zi.prototype.handler=function(e){return new Ji(this.model,e)};function hm(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var mm=`<?xml version="1.0" encoding="UTF-8"?>
13
+ `,ym=/<|>|'|"|&|\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 gm(e){return e.charAt(0).toLowerCase()+e.slice(1)}function vm(e,t){return Ys(t)?gm(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 wm(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 bm(e,t){return t.isGeneric?ce({localName:t.ns.localName},e):ce({localName:vm(t.ns.localName,t.$pkg)},e)}function Em(e,t){return ce({localName:t.ns.localName},e)}function _m(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 xm={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Sm={"<":"lt",">":"gt","&":"amp"};function el(e,t,n){return e=st(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function Am(e){return el(e,ym,xm)}function km(e){return el(e,Js,Sm)}function Cm(e){return un(e,function(t){return t.isAttr})}function Rm(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 tn(){}tn.prototype.serializeValue=tn.prototype.serializeTo=function(e){e.append(this.escape?km(this.value):this.value)},tn.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,tn),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=_m(e),this.parseAttributes(Cm(i)),this.parseContainments(Rm(i))),this.parseGenericAttributes(e,r),this},ke.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return bm(t,e)},ke.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Em(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 tn().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 tn().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 kr(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=Am(t));var r=Kf(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=wm(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!==tn;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 kr(e,t,n){ke.call(this,e,t),this.serialization=n}Zs(kr,ke),kr.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},kr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function Tm(){this.value="",this.write=function(e){this.value+=e}}function Pm(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 Nm(e){e=ce({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new Tm,o=new Pm(i,e.format);e.preamble&&o.append(mm);var a=new ke,s=n.$model;if(a.getNamespaces().mapDefaultPrefixes(Dm(s)),a.build(n).serializeTo(o),!r)return i.value}return{toXML:t}}function Dm(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 Cr(e,t){it.call(this,e,t)}Cr.prototype=Object.create(it.prototype),Cr.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)},Cr.prototype.toXML=function(e,t){var n=new Nm(t);return new Promise(function(r,i){try{var o=n.toXML(e);return r({xml:o})}catch(a){return i(a)}})};var Im="BPMN20",Om="http://www.omg.org/spec/BPMN/20100524/MODEL",Bm="bpmn",Mm=[],Lm=[{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"}]}],Fm=[{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"}]}],$m={tagAlias:"lowerCase",typePrefix:"t"},Vm={name:Im,uri:Om,prefix:Bm,associations:Mm,types:Lm,enumerations:Fm,xml:$m},jm="BPMNDI",Um="http://www.omg.org/spec/BPMN/20100524/DI",zm="bpmndi",Hm=[{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"]}],Wm=[{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"}]}],qm=[],Ym={name:jm,uri:Um,prefix:zm,types:Hm,enumerations:Wm,associations:qm},Km="DC",Gm="http://www.omg.org/spec/DD/20100524/DC",Xm="dc",Jm=[{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}]}],Zm=[],Qm={name:Km,uri:Gm,prefix:Xm,types:Jm,associations:Zm},ey="DI",ty="http://www.omg.org/spec/DD/20100524/DI",ny="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"}]}],iy=[],oy={tagAlias:"lowerCase"},ay={name:ey,uri:ty,prefix:ny,types:ry,associations:iy,xml:oy},sy="bpmn.io colors for BPMN",ly="http://bpmn.io/schema/bpmn/biocolor/1.0",cy="bioc",uy=[{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"}]}],fy=[],dy=[],py={name:sy,uri:ly,prefix:cy,types:uy,enumerations:fy,associations:dy},hy="BPMN in Color",my="http://www.omg.org/spec/BPMN/non-normative/color/1.0",yy="color",gy=[{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"}]}],vy=[],wy=[],by={name:hy,uri:my,prefix:yy,types:gy,enumerations:vy,associations:wy};const Ey={bpmn:Vm,bpmndi:Ym,dc:Qm,di:ay,bioc:py,color:by};function _y(e,t){const n=ce({},Ey,e);return new Cr(n,t)}function He(e,t){return e.$instanceOf(t)}function xy(e){return ot(e.rootElements,function(t){return He(t,"bpmn:Process")||He(t,"bpmn:Collaboration")})}function Sy(e){var t={},n=[],r={};function i(k,P){return function(U){k(U,P)}}function o(k){t[k.id]=k}function a(k){return t[k.id]}function s(k,P){var U=k.gfx;if(U)throw new Error(`already rendered ${Le(k)}`);return e.element(k,r[k.id],P)}function c(k,P){return e.root(k,r[k.id],P)}function d(k,P){try{var U=r[k.id]&&s(k,P);return o(k),U}catch(ie){h(ie.message,{element:k,error:ie}),console.error(`failed to import ${Le(k)}`,ie)}}function h(k,P){e.error(k,P)}var m=this.registerDi=function(P){var U=P.bpmnElement;U?r[U.id]?h(`multiple DI elements defined for ${Le(U)}`,{element:U}):r[U.id]=P:h(`no bpmnElement referenced in ${Le(P)}`,{element:P})};function w(k){g(k.plane)}function g(k){m(k),ae(k.planeElement,O)}function O(k){m(k)}this.handleDefinitions=function(P,U){var ie=P.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=xy(P),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"))I(p,f),S(P.rootElements,f);else throw new Error(`unsupported bpmnElement for ${Le(se)}: ${Le(p)}`);B(n)};var B=this.handleDeferred=function(){for(var P;n.length;)P=n.shift(),P()};function C(k,P){Z(k,P),V(k.ioSpecification,P),E(k.artifacts,P),o(k)}function S(k,P){var U=un(k,function(ie){return!a(ie)&&He(ie,"bpmn:Process")&&ie.laneSets});U.forEach(i(C,P))}function D(k,P){d(k,P)}function y(k,P){ae(k,i(D,P))}function v(k,P){d(k,P)}function R(k,P){d(k,P)}function N(k,P){d(k,P)}function x(k,P){d(k,P)}function E(k,P){ae(k,function(U){He(U,"bpmn:Association")?n.push(function(){x(U,P)}):x(U,P)})}function V(k,P){k&&(ae(k.dataInputs,i(R,P)),ae(k.dataOutputs,i(N,P)))}var F=this.handleSubProcess=function(P,U){Z(P,U),E(P.artifacts,U)};function T(k,P){var U=d(k,P);He(k,"bpmn:SubProcess")&&F(k,U||P),He(k,"bpmn:Activity")&&V(k.ioSpecification,P),n.push(function(){ae(k.dataInputAssociations,i(v,P)),ae(k.dataOutputAssociations,i(v,P))})}function W(k,P){d(k,P)}function re(k,P){d(k,P)}function J(k,P){n.push(function(){var U=d(k,P);k.childLaneSet&&H(k.childLaneSet,U||P),j(k)})}function H(k,P){ae(k.lanes,i(J,P))}function Y(k,P){ae(k,i(H,P))}function Z(k,P){q(k.flowElements,P),k.laneSets&&Y(k.laneSets,P)}function q(k,P){ae(k,function(U){He(U,"bpmn:SequenceFlow")?n.push(function(){W(U,P)}):He(U,"bpmn:BoundaryEvent")?n.unshift(function(){T(U,P)}):He(U,"bpmn:FlowNode")?T(U,P):He(U,"bpmn:DataObject")||(He(U,"bpmn:DataStoreReference")||He(U,"bpmn:DataObjectReference")?re(U,P):h(`unrecognized flowElement ${Le(U)} in context ${Le(P&&P.businessObject)}`,{element:U,context:P}))})}function K(k,P){var U=d(k,P),ie=k.processRef;ie&&C(ie,U||P)}function I(k,P){ae(k.participants,i(K,P)),n.push(function(){y(k.messageFlows,P)}),E(k.artifacts,P)}function j(k){ae(k.flowNodeRef,function(P){var U=P.get("lanes");U&&U.push(k)})}}function Ay(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,S){return r.add(B,C,S)},error:function(B,C){s.push({message:B,context:C})}},w=new Sy(m);h=h||d.diagrams&&d.diagrams[0];var g=ky(d,h);if(!g)throw new Error("no diagram to display");ae(g,function(B){w.handleDefinitions(d,B)});var O=h.plane.bpmnElement.id;o.setRootElement(o.findRoot(O+"_plane")||o.findRoot(O))}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 ky(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!ue(n,"bpmn:Process")&&!ue(n,"bpmn:Collaboration")&&(r=Cy(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 Cy(e){for(var t=e;t;){if(ue(t,"bpmn:Process"))return t;t=t.$parent}}var Ry='<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=Ry,rl={verticalAlign:"middle"},il={color:"#404040"},Ty={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},Py={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},Ny={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"},Dy='<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 Iy(){ht=ut(Dy),Ge(ht,Ty),Ge(wt("svg",ht),rl),Ge(wt(".backdrop",ht),Py),Ge(wt(".notice",ht),Ny),Ge(wt(".link",ht),il,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function Oy(){ht||(Iy(),Pi.bind(ht,".backdrop","click",function(e){document.body.removeChild(ht)})),document.body.appendChild(ht)}const Rr=5,ol="djs-outline-hidden";function Ne(e){e=ce({},My,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),Fy(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||[]),Tr(s,o),s=By(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 Tr(o,[]),o}if(typeof t=="string"&&(r=Ly(n,t),!r)){const o=new Error("BPMNDiagram <"+t+"> not found");throw Tr(o,[]),o}try{this.clear()}catch(o){throw Tr(o,[]),o}const{warnings:i}=await Ay(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=wt(":scope > defs",r._svg),a=Ia(i),s=o?"<defs>"+Ia(o)+"</defs>":"",c=r.getContainer();Xt(c).add(ol);let d;try{d=i.getBBox()}finally{Xt(c).remove(ol)}const h=d.x-Rr,m=d.y-Rr,w=d.width+Rr*2,g=d.height+Rr*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="`+R+'" height="'+L+'" viewBox="'+h+" "+m+" "+R+" "+L+'" 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()&&Nt.prototype.clear.call(this)},Ne.prototype.destroy=function(){Nt.prototype.destroy.call(this),tr(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=yt(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=se(xf(n,["additionalModules"]),{canvas:se({},n.canvas,{container:e}),modules:a});Nt.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=ct('<div class="bjs-container"></div>');return Ye(t,{width:Ds(e.width),height:Ds(e.height),position:e.position}),t},Ne.prototype._createModdle=function(e){const t=se({},this._moddleExtensions,e.moddleExtensions);return new Am(t)},Ne.prototype._modules=[];function wr(e,t){return e.warnings=t,e}function Fm(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 $m={width:"100%",height:"100%",position:"relative"};function Ds(e){return e+(xt(e)?"px":"")}function Vm(e,t){return t&&it(e.diagrams,function(n){return n.id===t})||null}function jm(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Rs+"</a>",r=ct(n);Ye(yt("svg",r),Ts),Ye(r,Ns,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),Ct.bind(r,"click",function(i){Lm(),i.preventDefault()})}function br(e){Ne.call(this,e)}ot(br,Ne),br.prototype._modules=[Qd,vp,Ba,Ap,Na],br.prototype._moddleExtensions={};function Is(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ji(e){return Math.log(e)/Math.log(10)}function Os(e,t){var n=ji(e.min),r=ji(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function Um(e,t){return Math.max(e.min,Math.min(e.max,t))}var zm=Math.sign||function(e){return e>=0?1:-1},Ui={min:.2,max:4},Bs=10,Hm=.1,Wm=.75;function dt(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=St(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||Wm;var r=this;t.on("canvas.mouseover",function(){r._init(e.enabled!==!1)}),t.on("canvas.mouseout",function(){r._init(!1)})}dt.$inject=["config.zoomScroll","eventBus","canvas"],dt.prototype.scroll=function(t){this._canvas.scroll(t)},dt.prototype.reset=function(){this._canvas.zoom("fit-viewport")},dt.prototype.zoom=function(t,n){var r=Os(Ui,Bs*2);this._totalDelta+=t,Math.abs(this._totalDelta)>Hm&&(this._zoom(t,n,r),this._totalDelta=0)},dt.prototype._handleWheel=function(t){if(this._enabled){var n=this._container;t.preventDefault();var r=t.ctrlKey||wp()&&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(),f={x:t.clientX-s.left,y:t.clientY-s.top};a=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*zm(t.deltaY)*o,this.zoom(a,f)}else i?a={dx:o*t.deltaY,dy:0}:a={dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(a)}},dt.prototype.stepZoom=function(t,n){var r=Os(Ui,Bs);this._zoom(t,n,r)},dt.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=ji(r.zoom()),a=Math.round(o/n)*n;a+=n*i;var s=Math.pow(10,a);r.zoom(Um(Ui,s),t)},dt.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t>"u"&&(t=!i),i!==t&&Ct[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t},dt.prototype._init=function(e){this.toggle(e)};const qm={__init__:["zoomScroll"],zoomScroll:["type",dt]};var Ym=/^djs-cursor-.*$/;function Ms(e){var t=zt(document.body);t.removeMatching(Ym),e&&t.add("djs-cursor-"+e)}function Km(){Ms(null)}var Gm=5e3;function Xm(e,t){t=t||"element.click";function n(){return!1}return e.once(t,Gm,n),function(){e.off(t,n)}}var Jm=15;function Ls(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 f=n.start,d=n.button,h=Ua(s),m=Is(h,f);if(!n.dragging&&Zm(m)>Jm&&(n.dragging=!0,d===0&&Xm(e),Ms("grab")),n.dragging){var R=n.last||n.start;m=Is(h,R),t.scroll({dx:m.x,dy:m.y}),n.last=h}s.preventDefault()}function o(s){Ct.unbind(document,"mousemove",i),Ct.unbind(document,"mouseup",o),n=null,Km()}function a(s){if(!Ea(s.target,".djs-draggable")){var f=s.button;if(!(f>=2||s.ctrlKey||s.shiftKey||s.altKey))return n={button:f,start:Ua(s)},Ct.bind(document,"mousemove",i),Ct.bind(document,"mouseup",o),!0}}this.isActive=function(){return!!n}}Ls.$inject=["eventBus","canvas"];function Zm(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const Qm={__init__:["moveCanvas"],moveCanvas:["type",Ls]},ey={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:[]},ty={class:"task-track"},ny={class:"subject-container"},ry={class:"track-table"},iy=Et(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?Xn(i.startTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"结束时间",prop:"endTime",width:"180px",formatter:i=>i.endTime?Xn(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",ty,[l.createElementVNode("div",ny,[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(el),{key:0})):(l.openBlock(),l.createBlock(l.unref(Zs),{key:1}))]),_:1}),l.createElementVNode("span",null,l.toDisplayString(t.value?"显示":"隐藏"),1)])]),l.withDirectives(l.createElementVNode("div",ry,[l.createVNode(Zo,{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-8c8b5c11"]]),zi=e=>Ee({url:"/server/runtime/event/get",method:"post",data:e}),Hi=e=>Ee({url:"/server/history/trackinst/event/query",method:"post",data:e}),oy=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:e=>Ee({url:"/server/runtime/event/activate",method:"post",data:e}),flowMonitorLine:zi,flowTrack:Hi,suspendFlow:e=>Ee({url:"/server/runtime/event/suspend",method:"post",data:e}),terminateFlow:e=>Ee({url:"/server/runtime/event/terminate",method:"post",data:e})},Symbol.toStringTag,{value:"Module"})),ay={class:"flow-diagram"},sy=Et(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(),f=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 br({container:o.value,additionalModules:[qm,Qm],moddleExtensions:{camunda:ey}})))}function R(y,v,A=!1){if(!y||!a.value)return;const x=a.value.get("canvas").getGraphics(y);if(!x)return;let E=".djs-visual rect, .djs-visual path";A&&(E+=", .djs-visual circle"),x.querySelectorAll(E).forEach(j=>{j.style.fill=v,j.style.stroke="#333"}),x.querySelectorAll(".djs-visual text").forEach(j=>{j.style.fill="#333"})}function L(y,v,A){var Z;const T=y.style.getPropertyValue(v)||y.getAttribute(v),x=(Z=T==null?void 0:T.match(/#([^)'"\s]+)/))==null?void 0:Z[1],E=y.ownerSVGElement;if(!x||!E)return;const j=Array.from(E.querySelectorAll("marker")).find(H=>H.id===x);if(!(j!=null&&j.parentElement))return;const M=A.replace(/[^a-zA-Z0-9]/g,""),_=`${x}-flowstream-${M}`;let q=Array.from(E.querySelectorAll("marker")).find(H=>H.id===_);q||(q=j.cloneNode(!0),q.id=_,q.querySelectorAll("path, polygon, polyline").forEach(H=>{H.style.fill=A,H.style.stroke=A}),j.parentElement.appendChild(q));const re=`url(#${_})`;y.style.setProperty(v,re),y.setAttribute(v,re)}function Y(y,v){if(!y||!a.value)return;const T=a.value.get("canvas").getGraphics(y);T&&T.querySelectorAll(".djs-visual > path").forEach(x=>{x.style.fill="none",x.style.stroke=v,L(x,"marker-start",v),L(x,"marker-end",v)})}function U(y){const v=y.filter(E=>E.type==="bpmn:StartEvent");if(v.length!==1)return[];const A=[],T=new Set;let x=v[0];for(;x&&!T.has(x.id);){T.add(x.id);const E=(x.outgoing||[]).filter(q=>q.type==="bpmn:SequenceFlow");if(!E.length)return A;if(E.length!==1)return[];const j=E[0],M=j.target,_=((M==null?void 0:M.incoming)||[]).filter(q=>q.type==="bpmn:SequenceFlow");if(!M||_.length!==1)return[];A.push(j),x=M}return[]}function D(y){var T;const v=((T=s.value)==null?void 0:T.sequenceFlowStates)||[];if(!v.length)return;const A=v.map(x=>y.get(x.sequenceFlowId||x.id)).filter(x=>(x==null?void 0:x.type)==="bpmn:SequenceFlow");if(A.length){A.forEach(x=>Y(x,"#98e5b5"));return}U(y).slice(0,v.length).forEach(x=>Y(x,"#98e5b5"))}function S(){var A;if(!a.value)return;const y=a.value.get("elementRegistry"),v=new Set;(((A=s.value)==null?void 0:A.flowNodeStates)||[]).forEach(T=>{v.add(T.id),R(y.get(T.id),T.state==="executing"?"#ffd37e":"#98e5b5")}),y.filter(T=>T.type==="bpmn:StartEvent").forEach(T=>{v.add(T.id),R(T,"#98e5b5",!0)}),y.filter(T=>T.type==="bpmn:EndEvent").forEach(T=>{v.add(T.id),R(T,"#f14b12",!0)}),y.forEach(T=>{var x;!v.has(T.id)&&((x=T.type)!=null&&x.includes("Task"))&&R(T,"#eee")}),D(y)}async function I(){const y=++h;try{await l.nextTick(),m();const[v,A,T]=await Promise.all([ti({procdefId:r.processDefinitionId}),zi({processInstanceId:r.processInstanceId,fetchFlowNodeState:!0,fetchSequenceFlowState:!0}),Hi({processInstanceId:r.processInstanceId})]);if(y!==h||!a.value)return;s.value=A.data||{},f.value=T.data||[],await a.value.importXML(v),a.value.get("canvas").zoom("fit-viewport",!0),S(),i("loaded")}catch(v){i("error",v)}}return l.watch(()=>[r.processDefinitionId,r.processInstanceId],I),l.onMounted(I),l.onBeforeUnmount(()=>{var y;h++,(y=a.value)==null||y.destroy(),a.value=void 0}),t({refresh:I,viewer:a,trackData:f,isTrackHidden:d}),(y,v)=>(l.openBlock(),l.createElementBlock("div",ay,[l.createElementVNode("div",{ref_key:"canvasRef",ref:o,class:"canvas"},null,512),v[1]||(v[1]=l.createStaticVNode('<div class="legend" data-v-c4f4a933><div class="legend-item undo" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>未办理环节</span></div><div class="legend-item doing" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>当前环节</span></div><div class="legend-item done" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>已办理环节</span></div></div>',1)),l.createVNode(iy,{"is-hide":d.value,"onUpdate:isHide":v[0]||(v[0]=A=>d.value=A),class:"bottom-container",data:f.value,style:l.normalizeStyle({height:d.value?"55px":"360px"})},null,8,["is-hide","data","style"])]))}}),[["__scopeId","data-v-c4f4a933"]]),Fs=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),f=l.ref(!1),d=l.ref(),h=l.ref();async function m(I){if(s.value)throw new Error("流程正在启动,请勿重复提交");s.value=!0;let y;try{const A=(await qn({processDefinitionId:I.processDefinitionId})).data||[];if(A.length!==1)throw new Error(A.length?`流程存在 ${A.length} 个首办节点,无法自动启动`:"流程未找到首办节点,无法启动");if(y=(await Ur(I)).data,!(y!=null&&y.processInstanceId)||!y.processDefinitionId||!y.workId)throw new Error("流程引擎未返回流程实例 ID、流程定义 ID 或起草人待办 ID");const x=A[0];if(a.value=!1,d.value={startArgs:I,startResult:y,activity:{activityId:x.id,activityName:x.name||x.activityName},variables:I.variables||{},dealUser:{id:I.draftUserId,userId:I.draftUserId,name:I.draftUserName}},f.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 R(),y}finally{s.value=!1}}async function R(){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(I){throw i("error",{phase:"beforeSend",error:I}),I}}function L(){var y,v;if(a.value){(y=o.value)==null||y.close();return}const I=(v=d.value)==null?void 0:v.startResult;I&&(!f.value&&I.processInstanceId&&Hn({processInstanceId:I.processInstanceId}).catch(A=>i("error",{phase:"send",error:A})),d.value=void 0,i("close",I))}function Y(I){h.value=I}function U(I){!d.value||!h.value||(f.value=!0,i("afterSend",{startResult:d.value.startResult,sendData:h.value,sendResult:I}))}function D(I){i("error",{phase:"send",error:I})}function S(){var y;const I=(y=d.value)==null?void 0:y.startResult;i("close",I),f.value&&(d.value=void 0,f.value=!1)}return t({start:m,open:R,close:L,starting:s,sendVisible:a,context:d,sendRef:o}),(I,y)=>d.value?(l.openBlock(),l.createBlock(si,{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:Y,onAfterSend:U,onClose:S,onError:D},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 Wi,pt,qi=!1;function ly(e){Wi=e}function cy(e){return e instanceof Error?e.message:typeof e=="string"?e:"流程操作失败"}function $s(e){return{...e,message:cy(e.error)}}async function uy(e,t){return e?await e(t)!==!1:!0}function Nn(e,t){if(e)try{Promise.resolve(e(t)).catch(n=>{console.error("[FlowStream] runtimeService 回调执行失败",n)})}catch(n){console.error("[FlowStream] runtimeService 回调执行失败",n)}}function Vs(e){e.disposed||(e.disposed=!0,l.render(null,e.container),e.container.remove(),pt===e&&(pt=void 0))}function fy(e){var t;return(t=e.component)==null?void 0:t.exposed}function js(){if(!(pt!=null&&pt.exposed)||pt.disposed)throw new Error("当前没有已启动且可继续发送的流程");return pt}const Yi={start:(async e=>{if(typeof document>"u")throw new Error("flowstream.runtimeService.start() 只能在浏览器环境中调用");if(!Wi)throw new Error("调用 runtimeService.start() 前必须先执行 app.use(flowstream)");if(qi||pt&&!pt.disposed)throw new Error("当前已有已启动但尚未发送完成的流程,请调用 runtimeService.open() 继续办理");const{dialogTitle:t="发送",dialogWidth:n="1200px",defaultOpinion:r="",bpmnXml:i="",singleAssignee:o=!1,assignmentQueryParams:a={},onBeforeStart:s,onBeforeSend:f,onStarted:d,onAfterSend:h,onClose:m,onError:R,...L}=e;qi=!0;try{if(!await uy(s,L))return!1}catch(S){throw R&&Nn(R,$s({phase:"beforeStart",error:S})),S}finally{qi=!1}const Y=document.createElement("div");Y.className="ui-flow-runtime-service-host",document.body.appendChild(Y);const U={container:Y,vnode:void 0,sendCompleted:!1,disposed:!1},D=l.createVNode(Fs,{dialogTitle:t,dialogWidth:n,defaultOpinion:r,bpmnXml:i,singleAssignee:o,assignmentQueryParams:a,beforeSend:f,onStarted:S=>{U.startResult=S,Nn(d,S)},onAfterSend:S=>{U.sendCompleted=!0,Nn(h,S)},onClose:S=>{m&&Nn(m,S),l.nextTick(()=>Vs(U))},onError:S=>{R&&Nn(R,$s(S))}});D.appContext=Wi,U.vnode=D,pt=U;try{if(l.render(D,Y),await l.nextTick(),U.exposed=fy(D),!U.exposed)throw new Error("流程启动服务挂载失败");return await U.exposed.start(L)}catch(S){throw U.startResult||Vs(U),S}}),async open(){return js().exposed.open()},close(){js().exposed.close()},async getApps(e){return(await $r(e)).data||[]},async getFlows(e){return(await Vr(e)).data||[]}};function Gt(e){const t=e;return t.install=n=>{e.name&&!n.component(e.name)&&n.component(e.name,e)},t}const dy={...oy,...Tu},Us=Gt(_l),zs=Gt(tf),Hs=Gt(mf),Ws=Gt(Xo),qs=Gt(si),Ys=Gt(sy),Ks=Gt(Fs),py={FlowButton:Us,FlowButtons:zs,FlowGrid:Hs,FlowJump:Ws,FlowSend:qs,FlowDiagram:Ys,FlowStart:Ks},Er={runtimeService:Yi,getRuntimeService(){return Yi},install(e,t={}){Uo(t),ly(e._context),e.use(_e),Object.values(py).forEach(n=>{e.component(n.name)||e.component(n.name,n)})}},hy=Er,my=Er;ue.FlowButton=Us,ue.FlowButtons=zs,ue.FlowDiagram=Ys,ue.FlowGrid=Hs,ue.FlowJump=Ws,ue.FlowSend=qs,ue.FlowStart=Ks,ue.FlowstreamUIPlus=Er,ue.LeadalFlowVue3=hy,ue.WorkflowComponentsVue3=my,ue.activateFlow=Qr,ue.claimTask=Wr,ue.completeTask=Gr,ue.configureWorkflow=Uo,ue.default=Er,ue.deleteDraftTask=Ho,ue.deleteProcessInstance=Hn,ue.doneTaskList=zr,ue.downloadBpmn=ti,ue.draftFlowList=zo,ue.draftTaskList=jr,ue.flowApi=dy,ue.flowMonitorLine=zi,ue.flowStartNodeList=Ko,ue.flowTrack=Hi,ue.getAppList=$r,ue.getFirstHandleNodes=qn,ue.getFlowList=Vr,ue.getOptList=Hr,ue.jumpTask=oi,ue.nextSendNode=ii,ue.nodeAssistant=Yn,ue.organUserTree=ri,ue.quickStart=Ur,ue.receiveMessageEvent=Yo,ue.recycleTask=Kr,ue.revocationTask=qr,ue.rollbackTask=Yr,ue.runtimeService=Yi,ue.saveDraft=Wo,ue.sendTask=ni,ue.startDraft=qo,ue.startNodes=ai,ue.suspendFlow=Zr,ue.terminateFlow=ei,ue.todoTaskList=Wn,ue.turnAfterTask=Jr,ue.turnBeforeTask=Xr,ue.workflowHttp=zn,Object.defineProperties(ue,{__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="'+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),lr(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=wt(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(td(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 _y(t)},Ne.prototype._modules=[];function Tr(e,t){return e.warnings=t,e}function By(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 My={width:"100%",height:"100%",position:"relative"};function al(e){return e+(kt(e)?"px":"")}function Ly(e,t){return t&&ot(e.diagrams,function(n){return n.id===t})||null}function Fy(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(wt("svg",r),rl),Ge(r,il,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),Nt.bind(r,"click",function(i){Oy(),i.preventDefault()})}function Pr(e){Ne.call(this,e)}at(Pr,Ne),Pr.prototype._modules=[Xp,mh,cs,_h,Ya],Pr.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 $y(e,t){return Math.max(e.min,Math.min(e.max,t))}var Vy=Math.sign||function(e){return e>=0?1:-1},no={min:.2,max:4},cl=10,jy=.1,Uy=.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||Uy;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)>jy&&(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||yh()&&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))*Vy(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($y(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 zy={__init__:["zoomScroll"],zoomScroll:["type",mt]};var Hy=/^djs-cursor-.*$/;function ul(e){var t=Xt(document.body);t.removeMatching(Hy),e&&t.add("djs-cursor-"+e)}function Wy(){ul(null)}var qy=5e3;function Yy(e,t){t=t||"element.click";function n(){return!1}return e.once(t,qy,n),function(){e.off(t,n)}}var Ky=15;function fl(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&&Gy(m)>Ky&&(n.dragging=!0,d===0&&Yy(e),ul("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,Wy()}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}}fl.$inject=["eventBus","canvas"];function Gy(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const Xy={__init__:["moveCanvas"],moveCanvas:["type",fl]},Jy={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:[]},Zy={class:"task-track"},Qy={class:"subject-container"},eg={class:"track-table"},tg=St(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?rr(i.startTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"结束时间",prop:"endTime",width:"180px",formatter:i=>i.endTime?rr(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",Zy,[l.createElementVNode("div",Qy,[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(Nl),{key:0})):(l.openBlock(),l.createBlock(l.unref(Tl),{key:1}))]),_:1}),l.createElementVNode("span",null,l.toDisplayString(t.value?"显示":"隐藏"),1)])]),l.withDirectives(l.createElementVNode("div",eg,[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}),ng=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 dl(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(dl(r)),o.push(dl(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 Hp(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 Nr=105,Dr=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 pl(e,t){e.on("shape.add",1500,({element:n})=>{var s;const r=n;if(r.type==="label"||r.labelTarget||!ao(r)||r.width===Nr&&r.height===Dr)return;const i=(r.width-Nr)/2,o=(r.height-Dr)/2;r.x+=i,r.y+=o,r.width=Nr,r.height=Dr;const a=(s=r.di)==null?void 0:s.bounds;a&&(a.x=r.x,a.y=r.y,a.width=Nr,a.height=Dr)}),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})})}pl.$inject=["eventBus","connectionDocking"];const rg={__init__:["compactTaskSize"],connectionDocking:["type",jt],compactTaskSize:["type",pl]};function hl(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}])})}hl.$inject=["eventBus"];const ig={__init__:["sequenceFlowTargetGap"],sequenceFlowTargetGap:["type",hl]},og={class:"flow-diagram"},ag=St(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 Pr({container:o.value,additionalModules:[zy,Xy,rg,ig],moddleExtensions:{camunda:Jy}})))}function w(y,v,R=!1){if(!y||!a.value)return;const x=a.value.get("canvas").getGraphics(y);if(!x)return;let E=".djs-visual rect, .djs-visual path";R&&(E+=", .djs-visual circle"),x.querySelectorAll(E).forEach(V=>{V.style.fill=v,V.style.stroke="#333"}),x.querySelectorAll(".djs-visual text").forEach(V=>{V.style.fill="#333"})}function g(y,v,R){var J;const N=y.style.getPropertyValue(v)||y.getAttribute(v),x=(J=N==null?void 0:N.match(/#([^)'"\s]+)/))==null?void 0:J[1],E=y.ownerSVGElement;if(!x||!E)return;const V=Array.from(E.querySelectorAll("marker")).find(H=>H.id===x);if(!(V!=null&&V.parentElement))return;const F=R.replace(/[^a-zA-Z0-9]/g,""),T=`${x}-flowstream-${F}`;let W=Array.from(E.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 O(y,v){if(!y||!a.value)return;const N=a.value.get("canvas").getGraphics(y);N&&N.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 B(y){const v=y.filter(E=>E.type==="bpmn:StartEvent");if(v.length!==1)return[];const R=[],N=new Set;let x=v[0];for(;x&&!N.has(x.id);){N.add(x.id);const E=(x.outgoing||[]).filter(W=>W.type==="bpmn:SequenceFlow");if(!E.length)return R;if(E.length!==1)return[];const V=E[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),x=F}return[]}function C(y){var N;const v=((N=s.value)==null?void 0:N.sequenceFlowStates)||[];if(!v.length)return;const R=v.map(x=>y.get(x.sequenceFlowId||x.id)).filter(x=>(x==null?void 0:x.type)==="bpmn:SequenceFlow");if(R.length){R.forEach(x=>O(x,"#98e5b5"));return}B(y).slice(0,v.length).forEach(x=>O(x,"#98e5b5"))}function S(){var R;if(!a.value)return;const y=a.value.get("elementRegistry"),v=new Set;(((R=s.value)==null?void 0:R.flowNodeStates)||[]).forEach(N=>{v.add(N.id),w(y.get(N.id),N.state==="executing"?"#ffd37e":"#98e5b5")}),y.filter(N=>N.type==="bpmn:StartEvent").forEach(N=>{v.add(N.id),w(N,"#98e5b5",!0)}),y.filter(N=>N.type==="bpmn:EndEvent").forEach(N=>{v.add(N.id),w(N,"#f14b12",!0)}),y.forEach(N=>{var x;!v.has(N.id)&&((x=N.type)!=null&&x.includes("Task"))&&w(N,"#eee")}),C(y)}async function D(){const y=++h;try{await l.nextTick(),m();const[v,R,N]=await Promise.all([pi({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=N.data||[],await a.value.importXML(v),a.value.get("canvas").zoom("fit-viewport",!0),S(),i("loaded")}catch(v){i("error",v)}}return l.watch(()=>[r.processDefinitionId,r.processInstanceId],D),l.onMounted(D),l.onBeforeUnmount(()=>{var y;h++,(y=a.value)==null||y.destroy(),a.value=void 0}),t({refresh:D,viewer:a,trackData:c,isTrackHidden:d}),(y,v)=>(l.openBlock(),l.createElementBlock("div",og,[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(tg,{"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"]]),ml=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(D){if(s.value)throw new Error("流程正在启动,请勿重复提交");s.value=!0;let y;try{const R=(await Qn({processDefinitionId:D.processDefinitionId})).data||[];if(R.length!==1)throw new Error(R.length?`流程存在 ${R.length} 个首办节点,无法自动启动`:"流程未找到首办节点,无法启动");if(y=(await ei(D)).data,!(y!=null&&y.processInstanceId)||!y.processDefinitionId||!y.workId)throw new Error("流程引擎未返回流程实例 ID、流程定义 ID 或起草人待办 ID");const x=R[0];if(a.value=!1,d.value={startArgs:D,startResult:y,activity:{activityId:x.id,activityName:x.name||x.activityName},variables:D.variables||{},dealUser:{id:D.draftUserId,userId:D.draftUserId,name:D.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(D){throw i("error",{phase:"beforeSend",error:D}),D}}function g(){var y,v;if(a.value){(y=o.value)==null||y.close();return}const D=(v=d.value)==null?void 0:v.startResult;D&&(!c.value&&D.processInstanceId&&Jn({processInstanceId:D.processInstanceId}).catch(R=>i("error",{phase:"send",error:R})),d.value=void 0,i("close",D))}function O(D){h.value=D}function B(D){!d.value||!h.value||(c.value=!0,i("afterSend",{startResult:d.value.startResult,sendData:h.value,sendResult:D}))}function C(D){i("error",{phase:"send",error:D})}function S(){var y;const D=(y=d.value)==null?void 0:y.startResult;i("close",D),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}),(D,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:O,onAfterSend:B,onClose:S,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 sg(e){so=e}function lg(e){return e instanceof Error?e.message:typeof e=="string"?e:"流程操作失败"}function yl(e){return{...e,message:lg(e.error)}}async function cg(e,t){return e?await e(t)!==!1:!0}function Ln(e,t){if(e)try{Promise.resolve(e(t)).catch(n=>{console.error("[FlowStream] runtimeService 回调执行失败",n)})}catch(n){console.error("[FlowStream] runtimeService 回调执行失败",n)}}function gl(e){e.disposed||(e.disposed=!0,l.render(null,e.container),e.container.remove(),yt===e&&(yt=void 0))}function ug(e){var t;return(t=e.component)==null?void 0:t.exposed}function vl(){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 cg(s,g))return!1}catch(S){throw w&&Ln(w,yl({phase:"beforeStart",error:S})),S}finally{lo=!1}const O=document.createElement("div");O.className="ui-flow-runtime-service-host",document.body.appendChild(O);const B={container:O,vnode:void 0,sendCompleted:!1,disposed:!1},C=l.createVNode(ml,{dialogTitle:t,dialogWidth:n,defaultOpinion:r,bpmnXml:i,singleAssignee:o,assignmentQueryParams:a,beforeSend:c,onStarted:S=>{B.startResult=S,Ln(d,S)},onAfterSend:S=>{B.sendCompleted=!0,Ln(h,S)},onClose:S=>{m&&Ln(m,S),l.nextTick(()=>gl(B))},onError:S=>{w&&Ln(w,yl(S))}});C.appContext=so,B.vnode=C,yt=B;try{if(l.render(C,O),await l.nextTick(),B.exposed=ug(C),!B.exposed)throw new Error("流程启动服务挂载失败");return await B.exposed.start(g)}catch(S){throw B.startResult||gl(B),S}}),async open(){return vl().exposed.open()},close(){vl().exposed.close()},async getApps(e){return(await Jr(e)).data||[]},async getFlows(e){return(await Zr(e)).data||[]}};function nn(e){const t=e;return t.install=n=>{e.name&&!n.component(e.name)&&n.component(e.name,e)},t}const fg={...ng,...sf},wl=nn(Ql),bl=nn(If),El=nn(qf),_l=nn(da),xl=nn(wi),Sl=nn(ag),Al=nn(ml),dg={FlowButton:wl,FlowButtons:bl,FlowGrid:El,FlowJump:_l,FlowSend:xl,FlowDiagram:Sl,FlowStart:Al},Ir={runtimeService:co,getRuntimeService(){return co},install(e,t={}){ia(t),sg(e._context),e.use(xe),Object.values(dg).forEach(n=>{e.component(n.name)||e.component(n.name,n)})}},pg=Ir,hg=Ir;de.FlowButton=wl,de.FlowButtons=bl,de.FlowDiagram=Sl,de.FlowGrid=El,de.FlowJump=_l,de.FlowSend=xl,de.FlowStart=Al,de.FlowstreamUIPlus=Ir,de.LeadalFlowVue3=pg,de.WorkflowComponentsVue3=hg,de.activateFlow=fi,de.claimTask=ri,de.completeTask=si,de.configureWorkflow=ia,de.default=Ir,de.deleteDraftTask=aa,de.deleteProcessInstance=Jn,de.doneTaskList=ti,de.downloadBpmn=pi,de.draftFlowList=oa,de.draftTaskList=Qr,de.flowApi=fg,de.flowMonitorLine=ro,de.flowStartNodeList=ua,de.flowTrack=io,de.getAppList=Jr,de.getFirstHandleNodes=Qn,de.getFlowList=Zr,de.getOptList=ni,de.jumpTask=gi,de.nextSendNode=yi,de.nodeAssistant=er,de.organUserTree=mi,de.quickStart=ei,de.receiveMessageEvent=ca,de.recycleTask=ai,de.revocationTask=ii,de.rollbackTask=oi,de.runtimeService=co,de.saveDraft=sa,de.sendTask=hi,de.startDraft=la,de.startNodes=vi,de.suspendFlow=ui,de.terminateFlow=di,de.todoTaskList=Zn,de.turnAfterTask=ci,de.turnBeforeTask=li,de.workflowHttp=Xn,Object.defineProperties(de,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));