@witlink/workflow 1.0.20 → 1.0.21
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.
- package/README.md +4 -0
- package/dist/index.css +1 -1
- package/dist/index.js +287 -274
- package/dist/index.umd.cjs +4 -4
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(pt,ie){typeof exports=="object"&&typeof module<"u"?ie(exports,require("ant-design-vue/es"),require("vue"),require("pinia"),require("vue-i18n"),require("axios"),require("ant-design-vue"),require("@witlink/components")):typeof define=="function"&&define.amd?define(["exports","ant-design-vue/es","vue","pinia","vue-i18n","axios","ant-design-vue","@witlink/components"],ie):(pt=typeof globalThis<"u"?globalThis:pt||self,ie(pt["witlink-workflow"]={},pt.es,pt.Vue,pt.pinia,pt.vueI18n,pt.Axios,pt.antDesignVue,pt.components))})(this,function(pt,ie,p,Kp,Dn,Gx,Ht,bs){"use strict";var o9=Object.defineProperty;var a9=(pt,ie,p)=>ie in pt?o9(pt,ie,{enumerable:!0,configurable:!0,writable:!0,value:p}):pt[ie]=p;var Yp=(pt,ie,p)=>a9(pt,typeof ie!="symbol"?ie+"":ie,p);let xs=Dn.createI18n({locale:"en_US",fallbackLocale:"en_US",legacy:!1,messages:{},silentTranslationWarn:!0});function Yx(t){t&&(xs=t)}function Kx(t,e){const n=xs.global.t;if(n)return n(t,e)}function qx(t){return p.getCurrentScope()?(p.onScopeDispose(t),!0):!1}const Zx=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Jx=Object.prototype.toString,Qx=t=>Jx.call(t)==="[object Object]",eE=()=>{};function tE(...t){if(t.length!==1)return p.toRef(...t);const e=t[0];return typeof e=="function"?p.readonly(p.customRef(()=>({get:e,set:eE}))):p.ref(e)}function nE(t,e){function n(...r){return new Promise((i,o)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return n}const qp=t=>t();function rE(t=qp,e={}){const{initialState:n="active"}=e,r=tE(n==="active");function i(){r.value=!1}function o(){r.value=!0}const a=(...s)=>{r.value&&t(...s)};return{isActive:p.readonly(r),pause:i,resume:o,eventFilter:a}}function ec(t){return Array.isArray(t)?t:[t]}function iE(t){return p.getCurrentInstance()}function oE(t,e,n={}){const{eventFilter:r=qp,...i}=n;return p.watch(t,nE(r,e),i)}function aE(t,e,n={}){const{eventFilter:r,initialState:i="active",...o}=n,{eventFilter:a,pause:s,resume:l,isActive:u}=rE(r,{initialState:i});return{stop:oE(t,e,{...o,eventFilter:a}),pause:s,resume:l,isActive:u}}function sE(t,e=!0,n){iE()?p.onMounted(t,n):e?t():p.nextTick(t)}function lE(t,e,n){return p.watch(t,e,{...n,immediate:!0})}const tc=Zx?window:void 0;function uE(t){var e;const n=p.toValue(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Zp(...t){const e=[],n=()=>{e.forEach(s=>s()),e.length=0},r=(s,l,u,c)=>(s.addEventListener(l,u,c),()=>s.removeEventListener(l,u,c)),i=p.computed(()=>{const s=ec(p.toValue(t[0])).filter(l=>l!=null);return s.every(l=>typeof l!="string")?s:void 0}),o=lE(()=>{var s,l;return[(l=(s=i.value)==null?void 0:s.map(u=>uE(u)))!=null?l:[tc].filter(u=>u!=null),ec(p.toValue(i.value?t[1]:t[0])),ec(p.unref(i.value?t[2]:t[1])),p.toValue(i.value?t[3]:t[2])]},([s,l,u,c])=>{if(n(),!(s!=null&&s.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const d=Qx(c)?{...c}:c;e.push(...s.flatMap(f=>l.flatMap(h=>u.map(v=>r(f,h,v,d)))))},{flush:"post"}),a=()=>{o(),n()};return qx(n),a}const Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ws="__vueuse_ssr_handlers__",cE=dE();function dE(){return ws in Es||(Es[ws]=Es[ws]||{}),Es[ws]}function fE(t,e){return cE[t]||e}function pE(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}const hE={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},Jp="vueuse-storage";function Qp(t,e,n,r={}){var i;const{flush:o="pre",deep:a=!0,listenToStorageChanges:s=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:d=tc,eventFilter:f,onError:h=K=>{console.error(K)},initOnMounted:v}=r,g=(c?p.shallowRef:p.ref)(typeof e=="function"?e():e),m=p.computed(()=>p.toValue(t));if(!n)try{n=fE("getDefaultStorage",()=>{var K;return(K=tc)==null?void 0:K.localStorage})()}catch(K){h(K)}if(!n)return g;const y=p.toValue(e),x=pE(y),S=(i=r.serializer)!=null?i:hE[x],{pause:b,resume:N}=aE(g,()=>E(g.value),{flush:o,deep:a,eventFilter:f});p.watch(m,()=>C(),{flush:o}),d&&s&&sE(()=>{n instanceof Storage?Zp(d,"storage",C,{passive:!0}):Zp(d,Jp,G),v&&C()}),v||C();function A(K,J){if(d){const R={key:m.value,oldValue:K,newValue:J,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",R):new CustomEvent(Jp,{detail:R}))}}function E(K){try{const J=n.getItem(m.value);if(K==null)A(J,null),n.removeItem(m.value);else{const R=S.write(K);J!==R&&(n.setItem(m.value,R),A(J,R))}}catch(J){h(J)}}function O(K){const J=K?K.newValue:n.getItem(m.value);if(J==null)return l&&y!=null&&n.setItem(m.value,S.write(y)),y;if(!K&&u){const R=S.read(J);return typeof u=="function"?u(R,y):x==="object"&&!Array.isArray(R)?{...y,...R}:R}else return typeof J!="string"?J:S.read(J)}function C(K){if(!(K&&K.storageArea!==n)){if(K&&K.key==null){g.value=y;return}if(!(K&&K.key!==m.value)){b();try{(K==null?void 0:K.newValue)!==S.write(g.value)&&(g.value=O(K))}catch(J){h(J)}finally{K?p.nextTick(N):N()}}}}function G(K){C(K.detail)}return g}const ra=new Map;function gE(t){const e=p.getCurrentScope();function n(s){var l;const u=ra.get(t)||new Set;u.add(s),ra.set(t,u);const c=()=>i(s);return(l=e==null?void 0:e.cleanups)==null||l.push(c),c}function r(s){function l(...u){i(l),s(...u)}return n(l)}function i(s){const l=ra.get(t);l&&(l.delete(s),l.size||o())}function o(){ra.delete(t)}function a(s,l){var u;(u=ra.get(t))==null||u.forEach(c=>c(s,l))}return{on:n,once:r,off:i,emit:a,reset:o}}const nc=Gx.create({baseURL:"/cisapi",timeout:3e4});function vE(t){const e=Ss(),r=Qp("Access-Token",{}).value;let i;return typeof r=="string"?i=r:r&&(i=r.value),i&&(t.headers={...t.headers,"Access-Token":i,isoCode:e.lang}),t}function mE(t){const e=t.data;if(!(e instanceof Blob)&&(!e||e.code===void 0))Ht.message.error(e+"");else if(!(e instanceof Blob)&&e.code<0){let n=Kx("err."+e.code);n===`err.${e.code}`&&(n=e.message?e.message:"unknow error"),Ht.message.error(n)}return t}function yE(t){if(t.response){const e=t.response.data;t.response.status===403?Ht.message.error(e.message):t.response.status===401&&Ht.message.error("Authorization verification failed")}else Ht.message.error(t+"");return Promise.reject(t)}nc.interceptors.request.use(vE,t=>Promise.reject(t)),nc.interceptors.response.use(mE,yE);function rn(t){return nc(t).then(e=>e.data)}const Gt={getLangInfo:t=>rn({url:"/system/api/auth/lang-info",method:"get",params:t}),getBusTypeTree:t=>rn({url:"/workorder/api/flow/type/public-tree-root",method:"get",params:t}),getBusTypeTreeData:t=>rn({url:"/workorder/api/flow/type/public-tree-child",method:"get",params:t}),getBpmnList:t=>rn({url:"/workorder/api/flow/bpmn/search-list",method:"get",params:t}),switchBpmnStatus:t=>rn({url:"/workorder/api/flow/bpmn/switch",method:"post",params:t}),delBpmn:t=>rn({url:"/workorder/api/flow/bpmn/delete",method:"delete",params:t}),getBpmnDetail:t=>rn({url:"/workorder/api/flow/bpmn/detail-view",method:"get",params:t}),getBpmnXml:t=>rn({url:"/workorder/api/flow/bpmn/update-load",method:"get",params:t}),getLinkList:t=>rn({url:"/workorder/api/flow/link/public-search-list",method:"get",params:t}),getBranchTree:t=>rn({url:"/system/api/sys/branch/public-search-list-bpmn",method:"get",params:t}),getUserList:t=>rn({url:"/system/api/sys/user/public-search-list-bpmn",method:"get",params:t}),getRoleList:t=>rn({url:"/system/api/sys/role/public-search-list-bpmn",method:"get",params:t}),bpmnInsert:t=>rn({url:"/workorder/api/flow/bpmn/insert",method:"post",data:t}),bpmnUpdate:t=>rn({url:"/workorder/api/flow/bpmn/update",method:"post",data:t}),getTemplateList:t=>rn({url:"/workorder/api/form-template/search-page",method:"get",params:t})},Ss=Kp.defineStore("wfApp",{state:()=>({lang:Qp("locale",""),theme:{colorPrimary:"#165dff",colorInfo:"#165dff",borderRadius:4},localeMap:{}}),actions:{getLangInfo(t){const e=this.lang;e&&(xs.global.locale.value=e,this.localeMap[e]||Gt.getLangInfo({isoCode:e}).then(n=>{if(n.code===0){const r=n.result.detail;this.localeMap[e]=r,xs.global.mergeLocaleMessage(e,r),t&&(this.setLang(""),setTimeout(()=>{this.setLang(e)}))}}))},setLang(t){this.lang=t},setTheme(t){t&&(this.theme=t)},setupLangWatcher(){this.getLangInfo(!0),p.watch(()=>this.lang,()=>this.getLangInfo(!0))}}}),_E=p.defineComponent({__name:"index",setup(t){const e="wf",n=Ss();return(r,i)=>{const o=ie.App,a=ie.ConfigProvider;return p.openBlock(),p.createBlock(a,{prefixCls:p.unref(e),theme:{token:p.unref(n).theme}},{default:p.withCtx(()=>[p.createVNode(o,null,{default:p.withCtx(()=>[p.renderSlot(r.$slots,"default")]),_:3})]),_:3},8,["prefixCls","theme"])}}}),rc={};function eh(t,e={immediate:!0}){const n=Dn.useI18n(),{t:r}=n,i=p.ref({}),o=[].concat(t);function a(){const u=o.map(c=>{const d=rc[c];if(bs.isPromise(d))return d;if(d)return Promise.resolve([c,d]);const f=rn({method:"get",url:"/system/api/sys/dictionary/public-dict-combo-ex",params:{tableType:c}}).then(h=>(rc[c]=h,[c,h]));return rc[c]=f,f});return Promise.all(u).then(c=>{c.forEach(d=>{const[f,h]=d;h&&h.code===0&&(i.value[f]=h.result)})})}p.watchEffect(()=>{const u=i.value;Object.keys(u).forEach(d=>{const f=u[d];for(const h in f){const v=`dct.${d}${h}`,g=r(v);f[h].text=g!==v?g:f[h].text}})}),e.immediate&&a();function s(u,c){const d=i.value[u];if(d&&c){const f=d[c];return f&&f.text?f.text:"-"}return"-"}function l(u){const c=i.value[u];return c?Object.keys(c).map(f=>({label:c[f].text,value:f})):[]}return[i,{fetchDict:a,toList:l,getDictLabel:s}]}const bE=p.defineComponent({__name:"index",props:{type:{type:String,default:""},value:[Number,String],style:{type:Object,default(){return{}}},dictClass:{type:String},showTooltip:{type:Boolean,default:!1}},setup(t){const e=t,[n]=eh(e.type,{immediate:!0}),r=p.ref();p.watchEffect(()=>{let o="-";const a=n.value[e.type];if(a&&!bs.isNullOrUndef(e.value))if(bs.isString(e.value))o=e.value.split(",").filter(l=>l).map(l=>{var u;return(u=a[l])==null?void 0:u.text}).join("、")||"-";else{const s=a[e.value];o=(s==null?void 0:s.text)||"-"}r.value=o});const i=p.computed(()=>{if(e.dictClass)return`${e.dictClass} status${e.value}`});return(o,a)=>{const s=ie.Tooltip;return t.showTooltip?(p.openBlock(),p.createBlock(s,{key:0,placement:"topLeft",title:p.unref(r)},{default:p.withCtx(()=>[p.createElementVNode("span",{class:p.normalizeClass(p.unref(i)),style:p.normalizeStyle(t.style)},p.toDisplayString(p.unref(r)),7)]),_:1},8,["title"])):(p.openBlock(),p.createElementBlock("span",{key:1,class:p.normalizeClass(p.unref(i)),style:p.normalizeStyle(t.style)},p.toDisplayString(p.unref(r)),7))}}}),ic="el",xE="is-",Ri=(t,e,n,r,i)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),r&&(o+=`__${r}`),i&&(o+=`--${i}`),o},EE=Symbol("namespaceContextKey"),wE=t=>{const e=p.getCurrentInstance()?p.inject(EE,p.ref(ic)):p.ref(ic);return p.computed(()=>p.unref(e)||ic)},th=(t,e)=>{const n=wE();return{namespace:n,b:(g="")=>Ri(n.value,t,g,"",""),e:g=>g?Ri(n.value,t,"",g,""):"",m:g=>g?Ri(n.value,t,"","",g):"",be:(g,m)=>g&&m?Ri(n.value,t,g,m,""):"",em:(g,m)=>g&&m?Ri(n.value,t,"",g,m):"",bm:(g,m)=>g&&m?Ri(n.value,t,g,"",m):"",bem:(g,m,y)=>g&&m&&y?Ri(n.value,t,g,m,y):"",is:(g,...m)=>{const y=m.length>=1?m[0]:!0;return g&&y?`${xE}${g}`:""},cssVar:g=>{const m={};for(const y in g)g[y]&&(m[`--${n.value}-${y}`]=g[y]);return m},cssVarName:g=>`--${n.value}-${g}`,cssVarBlock:g=>{const m={};for(const y in g)g[y]&&(m[`--${n.value}-${t}-${y}`]=g[y]);return m},cssVarBlockName:g=>`--${n.value}-${t}-${g}`}};/**
|
|
1
|
+
(function(pt,ie){typeof exports=="object"&&typeof module<"u"?ie(exports,require("ant-design-vue/es"),require("vue"),require("pinia"),require("vue-i18n"),require("axios"),require("ant-design-vue"),require("@witlink/components")):typeof define=="function"&&define.amd?define(["exports","ant-design-vue/es","vue","pinia","vue-i18n","axios","ant-design-vue","@witlink/components"],ie):(pt=typeof globalThis<"u"?globalThis:pt||self,ie(pt["witlink-workflow"]={},pt.es,pt.Vue,pt.pinia,pt.vueI18n,pt.Axios,pt.antDesignVue,pt.components))})(this,function(pt,ie,p,Kp,Dn,Gx,Ft,bs){"use strict";var o9=Object.defineProperty;var a9=(pt,ie,p)=>ie in pt?o9(pt,ie,{enumerable:!0,configurable:!0,writable:!0,value:p}):pt[ie]=p;var Yp=(pt,ie,p)=>a9(pt,typeof ie!="symbol"?ie+"":ie,p);let xs=Dn.createI18n({locale:"en_US",fallbackLocale:"en_US",legacy:!1,messages:{},silentTranslationWarn:!0});function Yx(t){t&&(xs=t)}function Kx(t,e){const n=xs.global.t;if(n)return n(t,e)}function qx(t){return p.getCurrentScope()?(p.onScopeDispose(t),!0):!1}const Zx=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Jx=Object.prototype.toString,Qx=t=>Jx.call(t)==="[object Object]",eE=()=>{};function tE(...t){if(t.length!==1)return p.toRef(...t);const e=t[0];return typeof e=="function"?p.readonly(p.customRef(()=>({get:e,set:eE}))):p.ref(e)}function nE(t,e){function n(...r){return new Promise((i,o)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return n}const qp=t=>t();function rE(t=qp,e={}){const{initialState:n="active"}=e,r=tE(n==="active");function i(){r.value=!1}function o(){r.value=!0}const a=(...s)=>{r.value&&t(...s)};return{isActive:p.readonly(r),pause:i,resume:o,eventFilter:a}}function ec(t){return Array.isArray(t)?t:[t]}function iE(t){return p.getCurrentInstance()}function oE(t,e,n={}){const{eventFilter:r=qp,...i}=n;return p.watch(t,nE(r,e),i)}function aE(t,e,n={}){const{eventFilter:r,initialState:i="active",...o}=n,{eventFilter:a,pause:s,resume:l,isActive:u}=rE(r,{initialState:i});return{stop:oE(t,e,{...o,eventFilter:a}),pause:s,resume:l,isActive:u}}function sE(t,e=!0,n){iE()?p.onMounted(t,n):e?t():p.nextTick(t)}function lE(t,e,n){return p.watch(t,e,{...n,immediate:!0})}const tc=Zx?window:void 0;function uE(t){var e;const n=p.toValue(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Zp(...t){const e=[],n=()=>{e.forEach(s=>s()),e.length=0},r=(s,l,u,c)=>(s.addEventListener(l,u,c),()=>s.removeEventListener(l,u,c)),i=p.computed(()=>{const s=ec(p.toValue(t[0])).filter(l=>l!=null);return s.every(l=>typeof l!="string")?s:void 0}),o=lE(()=>{var s,l;return[(l=(s=i.value)==null?void 0:s.map(u=>uE(u)))!=null?l:[tc].filter(u=>u!=null),ec(p.toValue(i.value?t[1]:t[0])),ec(p.unref(i.value?t[2]:t[1])),p.toValue(i.value?t[3]:t[2])]},([s,l,u,c])=>{if(n(),!(s!=null&&s.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const d=Qx(c)?{...c}:c;e.push(...s.flatMap(f=>l.flatMap(h=>u.map(v=>r(f,h,v,d)))))},{flush:"post"}),a=()=>{o(),n()};return qx(n),a}const Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ws="__vueuse_ssr_handlers__",cE=dE();function dE(){return ws in Es||(Es[ws]=Es[ws]||{}),Es[ws]}function fE(t,e){return cE[t]||e}function pE(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}const hE={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},Jp="vueuse-storage";function Qp(t,e,n,r={}){var i;const{flush:o="pre",deep:a=!0,listenToStorageChanges:s=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:d=tc,eventFilter:f,onError:h=K=>{console.error(K)},initOnMounted:v}=r,g=(c?p.shallowRef:p.ref)(typeof e=="function"?e():e),m=p.computed(()=>p.toValue(t));if(!n)try{n=fE("getDefaultStorage",()=>{var K;return(K=tc)==null?void 0:K.localStorage})()}catch(K){h(K)}if(!n)return g;const y=p.toValue(e),x=pE(y),S=(i=r.serializer)!=null?i:hE[x],{pause:b,resume:N}=aE(g,()=>E(g.value),{flush:o,deep:a,eventFilter:f});p.watch(m,()=>C(),{flush:o}),d&&s&&sE(()=>{n instanceof Storage?Zp(d,"storage",C,{passive:!0}):Zp(d,Jp,G),v&&C()}),v||C();function A(K,J){if(d){const R={key:m.value,oldValue:K,newValue:J,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",R):new CustomEvent(Jp,{detail:R}))}}function E(K){try{const J=n.getItem(m.value);if(K==null)A(J,null),n.removeItem(m.value);else{const R=S.write(K);J!==R&&(n.setItem(m.value,R),A(J,R))}}catch(J){h(J)}}function O(K){const J=K?K.newValue:n.getItem(m.value);if(J==null)return l&&y!=null&&n.setItem(m.value,S.write(y)),y;if(!K&&u){const R=S.read(J);return typeof u=="function"?u(R,y):x==="object"&&!Array.isArray(R)?{...y,...R}:R}else return typeof J!="string"?J:S.read(J)}function C(K){if(!(K&&K.storageArea!==n)){if(K&&K.key==null){g.value=y;return}if(!(K&&K.key!==m.value)){b();try{(K==null?void 0:K.newValue)!==S.write(g.value)&&(g.value=O(K))}catch(J){h(J)}finally{K?p.nextTick(N):N()}}}}function G(K){C(K.detail)}return g}const ra=new Map;function gE(t){const e=p.getCurrentScope();function n(s){var l;const u=ra.get(t)||new Set;u.add(s),ra.set(t,u);const c=()=>i(s);return(l=e==null?void 0:e.cleanups)==null||l.push(c),c}function r(s){function l(...u){i(l),s(...u)}return n(l)}function i(s){const l=ra.get(t);l&&(l.delete(s),l.size||o())}function o(){ra.delete(t)}function a(s,l){var u;(u=ra.get(t))==null||u.forEach(c=>c(s,l))}return{on:n,once:r,off:i,emit:a,reset:o}}const nc=Gx.create({baseURL:"/cisapi",timeout:3e4});function vE(t){const e=Ss(),r=Qp("Access-Token",{}).value;let i;return typeof r=="string"?i=r:r&&(i=r.value),i&&(t.headers={...t.headers,"Access-Token":i,isoCode:e.lang}),t}function mE(t){const e=t.data;if(!(e instanceof Blob)&&(!e||e.code===void 0))Ft.message.error(e+"");else if(!(e instanceof Blob)&&e.code<0){let n=Kx("err."+e.code);n===`err.${e.code}`&&(n=e.message?e.message:"unknow error"),Ft.message.error(n)}return t}function yE(t){if(t.response){const e=t.response.data;t.response.status===403?Ft.message.error(e.message):t.response.status===401&&Ft.message.error("Authorization verification failed")}else Ft.message.error(t+"");return Promise.reject(t)}nc.interceptors.request.use(vE,t=>Promise.reject(t)),nc.interceptors.response.use(mE,yE);function rn(t){return nc(t).then(e=>e.data)}const Gt={getLangInfo:t=>rn({url:"/system/api/auth/lang-info",method:"get",params:t}),getBusTypeTree:t=>rn({url:"/workorder/api/flow/type/public-tree-root",method:"get",params:t}),getBusTypeTreeData:t=>rn({url:"/workorder/api/flow/type/public-tree-child",method:"get",params:t}),getBpmnList:t=>rn({url:"/workorder/api/flow/bpmn/search-list",method:"get",params:t}),switchBpmnStatus:t=>rn({url:"/workorder/api/flow/bpmn/switch",method:"post",params:t}),delBpmn:t=>rn({url:"/workorder/api/flow/bpmn/delete",method:"delete",params:t}),getBpmnDetail:t=>rn({url:"/workorder/api/flow/bpmn/detail-view",method:"get",params:t}),getBpmnXml:t=>rn({url:"/workorder/api/flow/bpmn/update-load",method:"get",params:t}),getLinkList:t=>rn({url:"/workorder/api/flow/link/public-search-list",method:"get",params:t}),getBranchTree:t=>rn({url:"/system/api/sys/branch/public-search-list-bpmn",method:"get",params:t}),getUserList:t=>rn({url:"/system/api/sys/user/public-search-list-bpmn",method:"get",params:t}),getRoleList:t=>rn({url:"/system/api/sys/role/public-search-list-bpmn",method:"get",params:t}),bpmnInsert:t=>rn({url:"/workorder/api/flow/bpmn/insert",method:"post",data:t}),bpmnUpdate:t=>rn({url:"/workorder/api/flow/bpmn/update",method:"post",data:t}),getTemplateList:t=>rn({url:"/workorder/api/form-template/search-page",method:"get",params:t})},Ss=Kp.defineStore("wfApp",{state:()=>({lang:Qp("locale",""),theme:{colorPrimary:"#165dff",colorInfo:"#165dff",borderRadius:4},localeMap:{}}),actions:{getLangInfo(t){const e=this.lang;e&&(xs.global.locale.value=e,this.localeMap[e]||Gt.getLangInfo({isoCode:e}).then(n=>{if(n.code===0){const r=n.result.detail;this.localeMap[e]=r,xs.global.mergeLocaleMessage(e,r),t&&(this.setLang(""),setTimeout(()=>{this.setLang(e)}))}}))},setLang(t){this.lang=t},setTheme(t){t&&(this.theme=t)},setupLangWatcher(){this.getLangInfo(!0),p.watch(()=>this.lang,()=>this.getLangInfo(!0))}}}),_E=p.defineComponent({__name:"index",setup(t){const e="wf",n=Ss();return(r,i)=>{const o=ie.App,a=ie.ConfigProvider;return p.openBlock(),p.createBlock(a,{prefixCls:p.unref(e),theme:{token:p.unref(n).theme}},{default:p.withCtx(()=>[p.createVNode(o,null,{default:p.withCtx(()=>[p.renderSlot(r.$slots,"default")]),_:3})]),_:3},8,["prefixCls","theme"])}}}),rc={};function eh(t,e={immediate:!0}){const n=Dn.useI18n(),{t:r}=n,i=p.ref({}),o=[].concat(t);function a(){const u=o.map(c=>{const d=rc[c];if(bs.isPromise(d))return d;if(d)return Promise.resolve([c,d]);const f=rn({method:"get",url:"/system/api/sys/dictionary/public-dict-combo-ex",params:{tableType:c}}).then(h=>(rc[c]=h,[c,h]));return rc[c]=f,f});return Promise.all(u).then(c=>{c.forEach(d=>{const[f,h]=d;h&&h.code===0&&(i.value[f]=h.result)})})}p.watchEffect(()=>{const u=i.value;Object.keys(u).forEach(d=>{const f=u[d];for(const h in f){const v=`dct.${d}${h}`,g=r(v);f[h].text=g!==v?g:f[h].text}})}),e.immediate&&a();function s(u,c){const d=i.value[u];if(d&&c){const f=d[c];return f&&f.text?f.text:"-"}return"-"}function l(u){const c=i.value[u];return c?Object.keys(c).map(f=>({label:c[f].text,value:f})):[]}return[i,{fetchDict:a,toList:l,getDictLabel:s}]}const bE=p.defineComponent({__name:"index",props:{type:{type:String,default:""},value:[Number,String],style:{type:Object,default(){return{}}},dictClass:{type:String},showTooltip:{type:Boolean,default:!1}},setup(t){const e=t,[n]=eh(e.type,{immediate:!0}),r=p.ref();p.watchEffect(()=>{let o="-";const a=n.value[e.type];if(a&&!bs.isNullOrUndef(e.value))if(bs.isString(e.value))o=e.value.split(",").filter(l=>l).map(l=>{var u;return(u=a[l])==null?void 0:u.text}).join("、")||"-";else{const s=a[e.value];o=(s==null?void 0:s.text)||"-"}r.value=o});const i=p.computed(()=>{if(e.dictClass)return`${e.dictClass} status${e.value}`});return(o,a)=>{const s=ie.Tooltip;return t.showTooltip?(p.openBlock(),p.createBlock(s,{key:0,placement:"topLeft",title:p.unref(r)},{default:p.withCtx(()=>[p.createElementVNode("span",{class:p.normalizeClass(p.unref(i)),style:p.normalizeStyle(t.style)},p.toDisplayString(p.unref(r)),7)]),_:1},8,["title"])):(p.openBlock(),p.createElementBlock("span",{key:1,class:p.normalizeClass(p.unref(i)),style:p.normalizeStyle(t.style)},p.toDisplayString(p.unref(r)),7))}}}),ic="el",xE="is-",Ri=(t,e,n,r,i)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),r&&(o+=`__${r}`),i&&(o+=`--${i}`),o},EE=Symbol("namespaceContextKey"),wE=t=>{const e=p.getCurrentInstance()?p.inject(EE,p.ref(ic)):p.ref(ic);return p.computed(()=>p.unref(e)||ic)},th=(t,e)=>{const n=wE();return{namespace:n,b:(g="")=>Ri(n.value,t,g,"",""),e:g=>g?Ri(n.value,t,"",g,""):"",m:g=>g?Ri(n.value,t,"","",g):"",be:(g,m)=>g&&m?Ri(n.value,t,g,m,""):"",em:(g,m)=>g&&m?Ri(n.value,t,"",g,m):"",bm:(g,m)=>g&&m?Ri(n.value,t,g,"",m):"",bem:(g,m,y)=>g&&m&&y?Ri(n.value,t,g,m,y):"",is:(g,...m)=>{const y=m.length>=1?m[0]:!0;return g&&y?`${xE}${g}`:""},cssVar:g=>{const m={};for(const y in g)g[y]&&(m[`--${n.value}-${y}`]=g[y]);return m},cssVarName:g=>`--${n.value}-${g}`,cssVarBlock:g=>{const m={};for(const y in g)g[y]&&(m[`--${n.value}-${t}-${y}`]=g[y]);return m},cssVarBlockName:g=>`--${n.value}-${t}-${g}`}};/**
|
|
2
2
|
* @vue/shared v3.5.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
@@ -29,7 +29,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
29
29
|
* Released under MIT license <https://lodash.com/license>
|
|
30
30
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
31
31
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
32
|
-
*/var RL="4.17.21",LL=2,IL=1,kL=3,wm=4294967295,BL=Array.prototype,jL=Object.prototype,Sm=jL.hasOwnProperty,Cm=on?on.iterator:void 0,FL=Math.max,Am=Math.min,_d=function(t){return function(e,n,r){if(r==null){var i=Rt(n),o=i&&Vt(n),a=o&&o.length&&Ys(n,o);(a?a.length:i)||(r=n,n=e,e=this)}return t(e,n,r)}}(RD);T.after=kt.after,T.ary=kt.ary,T.assign=$e.assign,T.assignIn=$e.assignIn,T.assignInWith=$e.assignInWith,T.assignWith=$e.assignWith,T.at=$e.at,T.before=kt.before,T.bind=kt.bind,T.bindAll=bt.bindAll,T.bindKey=kt.bindKey,T.castArray=De.castArray,T.chain=Rr.chain,T.chunk=xe.chunk,T.compact=xe.compact,T.concat=xe.concat,T.cond=bt.cond,T.conforms=bt.conforms,T.constant=bt.constant,T.countBy=St.countBy,T.create=$e.create,T.curry=kt.curry,T.curryRight=kt.curryRight,T.debounce=kt.debounce,T.defaults=$e.defaults,T.defaultsDeep=$e.defaultsDeep,T.defer=kt.defer,T.delay=kt.delay,T.difference=xe.difference,T.differenceBy=xe.differenceBy,T.differenceWith=xe.differenceWith,T.drop=xe.drop,T.dropRight=xe.dropRight,T.dropRightWhile=xe.dropRightWhile,T.dropWhile=xe.dropWhile,T.fill=xe.fill,T.filter=St.filter,T.flatMap=St.flatMap,T.flatMapDeep=St.flatMapDeep,T.flatMapDepth=St.flatMapDepth,T.flatten=xe.flatten,T.flattenDeep=xe.flattenDeep,T.flattenDepth=xe.flattenDepth,T.flip=kt.flip,T.flow=bt.flow,T.flowRight=bt.flowRight,T.fromPairs=xe.fromPairs,T.functions=$e.functions,T.functionsIn=$e.functionsIn,T.groupBy=St.groupBy,T.initial=xe.initial,T.intersection=xe.intersection,T.intersectionBy=xe.intersectionBy,T.intersectionWith=xe.intersectionWith,T.invert=$e.invert,T.invertBy=$e.invertBy,T.invokeMap=St.invokeMap,T.iteratee=bt.iteratee,T.keyBy=St.keyBy,T.keys=Vt,T.keysIn=$e.keysIn,T.map=St.map,T.mapKeys=$e.mapKeys,T.mapValues=$e.mapValues,T.matches=bt.matches,T.matchesProperty=bt.matchesProperty,T.memoize=kt.memoize,T.merge=$e.merge,T.mergeWith=$e.mergeWith,T.method=bt.method,T.methodOf=bt.methodOf,T.mixin=_d,T.negate=tl,T.nthArg=bt.nthArg,T.omit=$e.omit,T.omitBy=$e.omitBy,T.once=kt.once,T.orderBy=St.orderBy,T.over=bt.over,T.overArgs=kt.overArgs,T.overEvery=bt.overEvery,T.overSome=bt.overSome,T.partial=kt.partial,T.partialRight=kt.partialRight,T.partition=St.partition,T.pick=$e.pick,T.pickBy=$e.pickBy,T.property=bt.property,T.propertyOf=bt.propertyOf,T.pull=xe.pull,T.pullAll=xe.pullAll,T.pullAllBy=xe.pullAllBy,T.pullAllWith=xe.pullAllWith,T.pullAt=xe.pullAt,T.range=bt.range,T.rangeRight=bt.rangeRight,T.rearg=kt.rearg,T.reject=St.reject,T.remove=xe.remove,T.rest=kt.rest,T.reverse=xe.reverse,T.sampleSize=St.sampleSize,T.set=$e.set,T.setWith=$e.setWith,T.shuffle=St.shuffle,T.slice=xe.slice,T.sortBy=St.sortBy,T.sortedUniq=xe.sortedUniq,T.sortedUniqBy=xe.sortedUniqBy,T.split=mt.split,T.spread=kt.spread,T.tail=xe.tail,T.take=xe.take,T.takeRight=xe.takeRight,T.takeRightWhile=xe.takeRightWhile,T.takeWhile=xe.takeWhile,T.tap=Rr.tap,T.throttle=kt.throttle,T.thru=sl,T.toArray=De.toArray,T.toPairs=$e.toPairs,T.toPairsIn=$e.toPairsIn,T.toPath=bt.toPath,T.toPlainObject=De.toPlainObject,T.transform=$e.transform,T.unary=kt.unary,T.union=xe.union,T.unionBy=xe.unionBy,T.unionWith=xe.unionWith,T.uniq=xe.uniq,T.uniqBy=xe.uniqBy,T.uniqWith=xe.uniqWith,T.unset=$e.unset,T.unzip=xe.unzip,T.unzipWith=xe.unzipWith,T.update=$e.update,T.updateWith=$e.updateWith,T.values=$e.values,T.valuesIn=$e.valuesIn,T.without=xe.without,T.words=mt.words,T.wrap=kt.wrap,T.xor=xe.xor,T.xorBy=xe.xorBy,T.xorWith=xe.xorWith,T.zip=xe.zip,T.zipObject=xe.zipObject,T.zipObjectDeep=xe.zipObjectDeep,T.zipWith=xe.zipWith,T.entries=$e.toPairs,T.entriesIn=$e.toPairsIn,T.extend=$e.assignIn,T.extendWith=$e.assignInWith,_d(T,T),T.add=hn.add,T.attempt=bt.attempt,T.camelCase=mt.camelCase,T.capitalize=mt.capitalize,T.ceil=hn.ceil,T.clamp=yd.clamp,T.clone=De.clone,T.cloneDeep=De.cloneDeep,T.cloneDeepWith=De.cloneDeepWith,T.cloneWith=De.cloneWith,T.conformsTo=De.conformsTo,T.deburr=mt.deburr,T.defaultTo=bt.defaultTo,T.divide=hn.divide,T.endsWith=mt.endsWith,T.eq=De.eq,T.escape=mt.escape,T.escapeRegExp=mt.escapeRegExp,T.every=St.every,T.find=St.find,T.findIndex=xe.findIndex,T.findKey=$e.findKey,T.findLast=St.findLast,T.findLastIndex=xe.findLastIndex,T.findLastKey=$e.findLastKey,T.floor=hn.floor,T.forEach=St.forEach,T.forEachRight=St.forEachRight,T.forIn=$e.forIn,T.forInRight=$e.forInRight,T.forOwn=$e.forOwn,T.forOwnRight=$e.forOwnRight,T.get=$e.get,T.gt=De.gt,T.gte=De.gte,T.has=$e.has,T.hasIn=$e.hasIn,T.head=xe.head,T.identity=wn,T.includes=St.includes,T.indexOf=xe.indexOf,T.inRange=yd.inRange,T.invoke=$e.invoke,T.isArguments=De.isArguments,T.isArray=We,T.isArrayBuffer=De.isArrayBuffer,T.isArrayLike=De.isArrayLike,T.isArrayLikeObject=De.isArrayLikeObject,T.isBoolean=De.isBoolean,T.isBuffer=De.isBuffer,T.isDate=De.isDate,T.isElement=De.isElement,T.isEmpty=De.isEmpty,T.isEqual=De.isEqual,T.isEqualWith=De.isEqualWith,T.isError=De.isError,T.isFinite=De.isFinite,T.isFunction=De.isFunction,T.isInteger=De.isInteger,T.isLength=De.isLength,T.isMap=De.isMap,T.isMatch=De.isMatch,T.isMatchWith=De.isMatchWith,T.isNaN=De.isNaN,T.isNative=De.isNative,T.isNil=De.isNil,T.isNull=De.isNull,T.isNumber=De.isNumber,T.isObject=Rt,T.isObjectLike=De.isObjectLike,T.isPlainObject=De.isPlainObject,T.isRegExp=De.isRegExp,T.isSafeInteger=De.isSafeInteger,T.isSet=De.isSet,T.isString=De.isString,T.isSymbol=De.isSymbol,T.isTypedArray=De.isTypedArray,T.isUndefined=De.isUndefined,T.isWeakMap=De.isWeakMap,T.isWeakSet=De.isWeakSet,T.join=xe.join,T.kebabCase=mt.kebabCase,T.last=kn,T.lastIndexOf=xe.lastIndexOf,T.lowerCase=mt.lowerCase,T.lowerFirst=mt.lowerFirst,T.lt=De.lt,T.lte=De.lte,T.max=hn.max,T.maxBy=hn.maxBy,T.mean=hn.mean,T.meanBy=hn.meanBy,T.min=hn.min,T.minBy=hn.minBy,T.stubArray=bt.stubArray,T.stubFalse=bt.stubFalse,T.stubObject=bt.stubObject,T.stubString=bt.stubString,T.stubTrue=bt.stubTrue,T.multiply=hn.multiply,T.nth=xe.nth,T.noop=bt.noop,T.now=wL.now,T.pad=mt.pad,T.padEnd=mt.padEnd,T.padStart=mt.padStart,T.parseInt=mt.parseInt,T.random=yd.random,T.reduce=St.reduce,T.reduceRight=St.reduceRight,T.repeat=mt.repeat,T.replace=mt.replace,T.result=$e.result,T.round=hn.round,T.sample=St.sample,T.size=St.size,T.snakeCase=mt.snakeCase,T.some=St.some,T.sortedIndex=xe.sortedIndex,T.sortedIndexBy=xe.sortedIndexBy,T.sortedIndexOf=xe.sortedIndexOf,T.sortedLastIndex=xe.sortedLastIndex,T.sortedLastIndexBy=xe.sortedLastIndexBy,T.sortedLastIndexOf=xe.sortedLastIndexOf,T.startCase=mt.startCase,T.startsWith=mt.startsWith,T.subtract=hn.subtract,T.sum=hn.sum,T.sumBy=hn.sumBy,T.template=mt.template,T.times=bt.times,T.toFinite=De.toFinite,T.toInteger=Ke,T.toLength=De.toLength,T.toLower=mt.toLower,T.toNumber=De.toNumber,T.toSafeInteger=De.toSafeInteger,T.toString=De.toString,T.toUpper=mt.toUpper,T.trim=mt.trim,T.trimEnd=mt.trimEnd,T.trimStart=mt.trimStart,T.truncate=mt.truncate,T.unescape=mt.unescape,T.uniqueId=bt.uniqueId,T.upperCase=mt.upperCase,T.upperFirst=mt.upperFirst,T.each=St.forEach,T.eachRight=St.forEachRight,T.first=xe.head,_d(T,function(){var t={};return Dr(T,function(e,n){Sm.call(T.prototype,n)||(t[n]=e)}),t}(),{chain:!1}),T.VERSION=RL,(T.templateSettings=mt.templateSettings).imports._=T,Gn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){T[t].placeholder=T}),Gn(["drop","take"],function(t,e){ot.prototype[t]=function(n){n=n===void 0?1:FL(Ke(n),0);var r=this.__filtered__&&!e?new ot(this):this.clone();return r.__filtered__?r.__takeCount__=Am(n,r.__takeCount__):r.__views__.push({size:Am(n,wm),type:t+(r.__dir__<0?"Right":"")}),r},ot.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),Gn(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==IL||n==kL;ot.prototype[t]=function(i){var o=this.clone();return o.__iteratees__.push({iteratee:Ue(i),type:n}),o.__filtered__=o.__filtered__||r,o}}),Gn(["head","last"],function(t,e){var n="take"+(e?"Right":"");ot.prototype[t]=function(){return this[n](1).value()[0]}}),Gn(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");ot.prototype[t]=function(){return this.__filtered__?new ot(this):this[n](1)}}),ot.prototype.compact=function(){return this.filter(wn)},ot.prototype.find=function(t){return this.filter(t).head()},ot.prototype.findLast=function(t){return this.reverse().find(t)},ot.prototype.invokeMap=Je(function(t,e){return typeof t=="function"?new ot(this):this.map(function(n){return ma(n,t,e)})}),ot.prototype.reject=function(t){return this.filter(tl(Ue(t)))},ot.prototype.slice=function(t,e){t=Ke(t);var n=this;return n.__filtered__&&(t>0||e<0)?new ot(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==void 0&&(e=Ke(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},ot.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},ot.prototype.toArray=function(){return this.take(wm)},Dr(ot.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=T[r?"take"+(e=="last"?"Right":""):e],o=r||/^find/.test(e);i&&(T.prototype[e]=function(){var a=this.__wrapped__,s=r?[1]:arguments,l=a instanceof ot,u=s[0],c=l||We(a),d=function(y){var x=i.apply(T,ci([y],s));return r&&f?x[0]:x};c&&n&&typeof u=="function"&&u.length!=1&&(l=c=!1);var f=this.__chain__,h=!!this.__actions__.length,v=o&&!f,g=l&&!h;if(!o&&c){a=g?a:new ot(this);var m=t.apply(a,s);return m.__actions__.push({func:sl,args:[d],thisArg:void 0}),new Xn(m,f)}return v&&g?t.apply(this,s):(m=this.thru(d),v?r?m.value()[0]:m.value():m)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(t){var e=BL[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);T.prototype[t]=function(){var i=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(We(o)?o:[],i)}return this[n](function(a){return e.apply(We(a)?a:[],i)})}}),Dr(ot.prototype,function(t,e){var n=T[e];if(n){var r=n.name+"";Sm.call(uo,r)||(uo[r]=[]),uo[r].push({name:e,func:n})}}),uo[Rs(void 0,LL).name]=[{name:"wrapper",func:void 0}],ot.prototype.clone=SL,ot.prototype.reverse=CL,ot.prototype.value=PL,T.prototype.at=Rr.at,T.prototype.chain=Rr.wrapperChain,T.prototype.commit=Rr.commit,T.prototype.next=Rr.next,T.prototype.plant=Rr.plant,T.prototype.reverse=Rr.reverse,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=Rr.value,T.prototype.first=T.prototype.head,Cm&&(T.prototype[Cm]=Rr.toIterator);const xo=t=>typeof t=="number",$L=t=>oc(t)?!Number.isNaN(Number(t)):!1;var Om;const bd=typeof window<"u",HL=t=>typeof t=="string",zL=()=>{};bd&&((Om=window==null?void 0:window.navigator)!=null&&Om.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Tm(t){return typeof t=="function"?t():p.unref(t)}function WL(t){return t}function Nm(t){return p.getCurrentScope()?(p.onScopeDispose(t),!0):!1}function UL(t,e=!0){p.getCurrentInstance()?p.onMounted(t):e?t():p.nextTick(t)}function Mm(t){var e;const n=Tm(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Dm=bd?window:void 0;function xd(...t){let e,n,r,i;if(HL(t[0])||Array.isArray(t[0])?([n,r,i]=t,e=Dm):[e,n,r,i]=t,!e)return zL;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=p.watch(()=>[Mm(e),Tm(i)],([c,d])=>{a(),c&&o.push(...n.flatMap(f=>r.map(h=>s(c,f,h,d))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Nm(u),u}function VL(t,e=!1){const n=p.ref(),r=()=>n.value=!!t();return r(),UL(r,e),n}const Pm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Rm="__vueuse_ssr_handlers__";Pm[Rm]=Pm[Rm]||{};var Lm=Object.getOwnPropertySymbols,XL=Object.prototype.hasOwnProperty,GL=Object.prototype.propertyIsEnumerable,YL=(t,e)=>{var n={};for(var r in t)XL.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Lm)for(var r of Lm(t))e.indexOf(r)<0&&GL.call(t,r)&&(n[r]=t[r]);return n};function KL(t,e,n={}){const r=n,{window:i=Dm}=r,o=YL(r,["window"]);let a;const s=VL(()=>i&&"ResizeObserver"in i),l=()=>{a&&(a.disconnect(),a=void 0)},u=p.watch(()=>Mm(t),d=>{l(),s.value&&i&&d&&(a=new ResizeObserver(e),a.observe(d,o))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return Nm(c),{isSupported:s,stop:c}}var Im;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(Im||(Im={}));var qL=Object.defineProperty,km=Object.getOwnPropertySymbols,ZL=Object.prototype.hasOwnProperty,JL=Object.prototype.propertyIsEnumerable,Bm=(t,e,n)=>e in t?qL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QL=(t,e)=>{for(var n in e||(e={}))ZL.call(e,n)&&Bm(t,n,e[n]);if(km)for(var n of km(e))JL.call(e,n)&&Bm(t,n,e[n]);return t};QL({linear:WL},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});class jm extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function eI(t,e){throw new jm(`[${t}] ${e}`)}function Ed(t,e){if(process.env.NODE_ENV!=="production"){const n=oc(t)?new jm(`[${t}] ${e}`):t;console.warn(n)}}const Fm="__epPropKey",tI=t=>t,nI=t=>ac(t)&&!!t[Fm],rI=(t,e)=>{if(!ac(t)||nI(t))return t;const{values:n,required:r,default:i,type:o,validator:a}=t,l={type:o,required:!!r,validator:n||a?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),nh(t,"default")&&d.push(i),c||(c=d.includes(u))),a&&(c||(c=a(u))),!c&&d.length>0){const f=[...new Set(d)].map(h=>JSON.stringify(h)).join(", ");p.warn(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[Fm]:!0};return nh(t,"default")&&(l.default=i),l},ll=t=>Dv(Object.entries(t).map(([e,n])=>[e,rI(n,e)]));var wd=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};const iI="utils/dom/style";function $m(t,e="px"){if(!t)return"";if(xo(t)||$L(t))return`${t}${e}`;if(oc(t))return t;Ed(iI,"binding value must be a string or number")}const oI=(t,e)=>(t.install=n=>{for(const r of[t,...Object.values({})])n.component(r.name,r)},t),aI=ll({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),sI=t=>gi(aI,t),Eo=4,lI={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},uI=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),Sd=Symbol("scrollbarContextKey"),cI=ll({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),dI="Thumb";var Hm=wd(p.defineComponent({__name:"thumb",props:cI,setup(t){const e=t,n=p.inject(Sd),r=th("scrollbar");n||eI(dI,"can not inject scrollbar context");const i=p.ref(),o=p.ref(),a=p.ref({}),s=p.ref(!1);let l=!1,u=!1,c=bd?document.onselectstart:null;const d=p.computed(()=>lI[e.vertical?"vertical":"horizontal"]),f=p.computed(()=>uI({size:e.size,move:e.move,bar:d.value})),h=p.computed(()=>i.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/e.ratio/o.value[d.value.offset]),v=A=>{var E;if(A.stopPropagation(),A.ctrlKey||[1,2].includes(A.button))return;(E=window.getSelection())==null||E.removeAllRanges(),m(A);const O=A.currentTarget;O&&(a.value[d.value.axis]=O[d.value.offset]-(A[d.value.client]-O.getBoundingClientRect()[d.value.direction]))},g=A=>{if(!o.value||!i.value||!n.wrapElement)return;const E=Math.abs(A.target.getBoundingClientRect()[d.value.direction]-A[d.value.client]),O=o.value[d.value.offset]/2,C=(E-O)*100*h.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=C*n.wrapElement[d.value.scrollSize]/100},m=A=>{A.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",y),document.addEventListener("mouseup",x),c=document.onselectstart,document.onselectstart=()=>!1},y=A=>{if(!i.value||!o.value||l===!1)return;const E=a.value[d.value.axis];if(!E)return;const O=(i.value.getBoundingClientRect()[d.value.direction]-A[d.value.client])*-1,C=o.value[d.value.offset]-E,G=(O-C)*100*h.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=G*n.wrapElement[d.value.scrollSize]/100},x=()=>{l=!1,a.value[d.value.axis]=0,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x),N(),u&&(s.value=!1)},S=()=>{u=!1,s.value=!!e.size},b=()=>{u=!0,s.value=l};p.onBeforeUnmount(()=>{N(),document.removeEventListener("mouseup",x)});const N=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return xd(p.toRef(n,"scrollbarElement"),"mousemove",S),xd(p.toRef(n,"scrollbarElement"),"mouseleave",b),(A,E)=>(p.openBlock(),p.createBlock(p.Transition,{name:p.unref(r).b("fade"),persisted:""},{default:p.withCtx(()=>[p.withDirectives(p.createElementVNode("div",{ref_key:"instance",ref:i,class:p.normalizeClass([p.unref(r).e("bar"),p.unref(r).is(p.unref(d).key)]),onMousedown:g},[p.createElementVNode("div",{ref_key:"thumb",ref:o,class:p.normalizeClass(p.unref(r).e("thumb")),style:p.normalizeStyle(p.unref(f)),onMousedown:v},null,38)],34),[[p.vShow,A.always||s.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const fI=ll({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var pI=wd(p.defineComponent({__name:"bar",props:fI,setup(t,{expose:e}){const n=t,r=p.inject(Sd),i=p.ref(0),o=p.ref(0),a=p.ref(""),s=p.ref(""),l=p.ref(1),u=p.ref(1);return e({handleScroll:f=>{if(f){const h=f.offsetHeight-Eo,v=f.offsetWidth-Eo;o.value=f.scrollTop*100/h*l.value,i.value=f.scrollLeft*100/v*u.value}},update:()=>{const f=r==null?void 0:r.wrapElement;if(!f)return;const h=f.offsetHeight-Eo,v=f.offsetWidth-Eo,g=h**2/f.scrollHeight,m=v**2/f.scrollWidth,y=Math.max(g,n.minSize),x=Math.max(m,n.minSize);l.value=g/(h-g)/(y/(h-y)),u.value=m/(v-m)/(x/(v-x)),s.value=y+Eo<h?`${y}px`:"",a.value=x+Eo<v?`${x}px`:""}}),(f,h)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(Hm,{move:i.value,ratio:u.value,size:a.value,always:f.always},null,8,["move","ratio","size","always"]),p.createVNode(Hm,{move:o.value,ratio:l.value,size:s.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const hI=ll({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:tI([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...sI(["ariaLabel","ariaOrientation"])}),gI={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(xo)},Cd="ElScrollbar",vI=p.defineComponent({name:Cd}),mI=p.defineComponent({...vI,props:hI,emits:gI,setup(t,{expose:e,emit:n}){const r=t,i=th("scrollbar");let o,a,s=0,l=0;const u=p.ref(),c=p.ref(),d=p.ref(),f=p.ref(),h=p.computed(()=>{const N={};return r.height&&(N.height=$m(r.height)),r.maxHeight&&(N.maxHeight=$m(r.maxHeight)),[r.wrapStyle,N]}),v=p.computed(()=>[r.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!r.native}]),g=p.computed(()=>[i.e("view"),r.viewClass]),m=()=>{var N;c.value&&((N=f.value)==null||N.handleScroll(c.value),s=c.value.scrollTop,l=c.value.scrollLeft,n("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};function y(N,A){ac(N)?c.value.scrollTo(N):xo(N)&&xo(A)&&c.value.scrollTo(N,A)}const x=N=>{if(!xo(N)){Ed(Cd,"value must be a number");return}c.value.scrollTop=N},S=N=>{if(!xo(N)){Ed(Cd,"value must be a number");return}c.value.scrollLeft=N},b=()=>{var N;(N=f.value)==null||N.update()};return p.watch(()=>r.noresize,N=>{N?(o==null||o(),a==null||a()):({stop:o}=KL(d,b),a=xd("resize",b))},{immediate:!0}),p.watch(()=>[r.maxHeight,r.height],()=>{r.native||p.nextTick(()=>{var N;b(),c.value&&((N=f.value)==null||N.handleScroll(c.value))})}),p.provide(Sd,p.reactive({scrollbarElement:u,wrapElement:c})),p.onActivated(()=>{c.value&&(c.value.scrollTop=s,c.value.scrollLeft=l)}),p.onMounted(()=>{r.native||p.nextTick(()=>{b()})}),p.onUpdated(()=>b()),e({wrapRef:c,update:b,scrollTo:y,setScrollTop:x,setScrollLeft:S,handleScroll:m}),(N,A)=>(p.openBlock(),p.createElementBlock("div",{ref_key:"scrollbarRef",ref:u,class:p.normalizeClass(p.unref(i).b())},[p.createElementVNode("div",{ref_key:"wrapRef",ref:c,class:p.normalizeClass(p.unref(v)),style:p.normalizeStyle(p.unref(h)),tabindex:N.tabindex,onScroll:m},[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(N.tag),{id:N.id,ref_key:"resizeRef",ref:d,class:p.normalizeClass(p.unref(g)),style:p.normalizeStyle(N.viewStyle),role:N.role,"aria-label":N.ariaLabel,"aria-orientation":N.ariaOrientation},{default:p.withCtx(()=>[p.renderSlot(N.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),N.native?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createBlock(pI,{key:0,ref_key:"barRef",ref:f,always:N.always,"min-size":N.minSize},null,8,["always","min-size"]))],2))}});var yI=wd(mI,[["__file","scrollbar.vue"]]);const zm=oI(yI);function Zn(t,e){_I(t)&&(t="100%");var n=bI(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function _I(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function bI(t){return typeof t=="string"&&t.indexOf("%")!==-1}function xI(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function ul(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Ad(t){return t.length===1?"0"+t:String(t)}function EI(t,e,n){return{r:Zn(t,255)*255,g:Zn(e,255)*255,b:Zn(n,255)*255}}function Od(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function wI(t,e,n){var r,i,o;if(t=Zn(t,360),e=Zn(e,100),n=Zn(n,100),e===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+e):n+e-n*e,s=2*n-a;r=Od(s,a,t+1/3),i=Od(s,a,t),o=Od(s,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function SI(t,e,n){t=Zn(t,255),e=Zn(e,255),n=Zn(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case t:o=(e-n)/s+(e<n?6:0);break;case e:o=(n-t)/s+2;break;case n:o=(t-e)/s+4;break}o/=6}return{h:o,s:l,v:a}}function CI(t,e,n){t=Zn(t,360)*6,e=Zn(e,100),n=Zn(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),l=r%6,u=[n,a,o,o,s,n][l],c=[s,n,n,a,o,o][l],d=[o,o,s,n,n,a][l];return{r:u*255,g:c*255,b:d*255}}function AI(t,e,n,r){var i=[Ad(Math.round(t).toString(16)),Ad(Math.round(e).toString(16)),Ad(Math.round(n).toString(16))];return i.join("")}function Wm(t){return jn(t)/255}function jn(t){return parseInt(t,16)}var Um={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function _a(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=NI(t)),typeof t=="object"&&(Jr(t.r)&&Jr(t.g)&&Jr(t.b)?(e=EI(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Jr(t.h)&&Jr(t.s)&&Jr(t.v)?(r=ul(t.s),i=ul(t.v),e=CI(t.h,r,i),a=!0,s="hsv"):Jr(t.h)&&Jr(t.s)&&Jr(t.l)&&(r=ul(t.s),o=ul(t.l),e=wI(t.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=xI(n),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var OI="[-\\+]?\\d+%?",TI="[-\\+]?\\d*\\.\\d+%?",mi="(?:".concat(TI,")|(?:").concat(OI,")"),Td="[\\s|\\(]+(".concat(mi,")[,|\\s]+(").concat(mi,")[,|\\s]+(").concat(mi,")\\s*\\)?"),Nd="[\\s|\\(]+(".concat(mi,")[,|\\s]+(").concat(mi,")[,|\\s]+(").concat(mi,")[,|\\s]+(").concat(mi,")\\s*\\)?"),fr={CSS_UNIT:new RegExp(mi),rgb:new RegExp("rgb"+Td),rgba:new RegExp("rgba"+Nd),hsl:new RegExp("hsl"+Td),hsla:new RegExp("hsla"+Nd),hsv:new RegExp("hsv"+Td),hsva:new RegExp("hsva"+Nd),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function NI(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(Um[t])t=Um[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=fr.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=fr.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=fr.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=fr.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=fr.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=fr.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=fr.hex8.exec(t),n?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),a:Wm(n[4]),format:e?"name":"hex8"}:(n=fr.hex6.exec(t),n?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),format:e?"name":"hex"}:(n=fr.hex4.exec(t),n?{r:jn(n[1]+n[1]),g:jn(n[2]+n[2]),b:jn(n[3]+n[3]),a:Wm(n[4]+n[4]),format:e?"name":"hex8"}:(n=fr.hex3.exec(t),n?{r:jn(n[1]+n[1]),g:jn(n[2]+n[2]),b:jn(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function Jr(t){return!!fr.CSS_UNIT.exec(String(t))}function cl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function MI(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}const dl=Symbol("wf-bus"),DI={class:"wrapper"},PI={class:"content"},RI=["textContent"],LI=p.defineComponent({__name:"BpmnDetail",props:{data:{type:Object,required:!0}},setup(t){const e=t,n=p.ref("1"),r=p.ref(),i=p.ref();function o(){var u;if(!((u=e.data)!=null&&u.code))return;const s=n.value,l={code:e.data.code,type:s};Gt.getBpmnDetail(l).then(c=>{c.code===0&&(s==="1"?r.value="data:image/png;base64,"+c.result:i.value=c.result)})}function a(){o()}return p.onMounted(()=>{o()}),(s,l)=>{const u=ie.RadioButton,c=ie.RadioGroup,d=ie.Image;return p.openBlock(),p.createElementBlock("div",DI,[p.createVNode(c,{value:p.unref(n),"onUpdate:value":l[0]||(l[0]=f=>p.isRef(n)?n.value=f:null),class:"flex-ec mr-sm mt-sm",onChange:a},{default:p.withCtx(()=>[p.createVNode(u,{value:"1"},{default:p.withCtx(()=>l[1]||(l[1]=[p.createTextVNode("png")])),_:1}),p.createVNode(u,{value:"0"},{default:p.withCtx(()=>l[2]||(l[2]=[p.createTextVNode("xml")])),_:1})]),_:1},8,["value"]),p.createElementVNode("div",PI,[p.unref(n)==="1"?(p.openBlock(),p.createBlock(d,{key:0,src:p.unref(r)},null,8,["src"])):(p.openBlock(),p.createElementBlock("span",{key:1,textContent:p.toDisplayString(p.unref(i))},null,8,RI))])])}}}),Qr=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},II=Qr(LI,[["__scopeId","data-v-248c7b10"]]),kI={class:"panel-left"},BI={class:"title"},jI={class:"search-box"},FI={key:2,class:"btns-action"},$I=Qr(p.defineComponent({__name:"BusTypeList",setup(t){const{t:e}=Dn.useI18n(),n=p.ref(),r=p.ref([]),i=p.ref([]),o=p.ref([]),a=p.ref(!0);function s(){var O;o.value=[],r.value=[],i.value=[],(O=v.value)==null||O.reset(),u()}function l(O){if(!Array.isArray(O)||O.length===0)return O||[];function C(G){if(!G||typeof G!="object")return G;const K={...G};return K.title!==void 0&&K.key!==void 0&&(K.title=e(`temp.title${K.key}`)),Array.isArray(K.children)&&K.children.length>0&&(K.children=K.children.map(C)),K}return O.map(C)}function u(O){const C={sync:!0};n.value&&Object.assign(C,{description:n.value}),Gt.getBusTypeTree(C).then(G=>{var K;if(G.code===0){const J=G.result||[];o.value=l(J),J.length&&(r.value=[J[0].key],(K=J[0].children)!=null&&K.length&&(i.value=[J[0].children[0].key],a.value=J[0].children[0].type=="1",g()))}})}const c=p.inject(dl);function d(O,C){C.selected&&C.node.dataRef.isLeaf&&(i.value=O,a.value=C.node.dataRef.type=="1",g())}const f=p.ref([{title:e("bpmn.version"),dataIndex:"version",width:100},{title:e("bpmn.description"),dataIndex:"description",width:250},{title:e("bpmn.used"),dataIndex:"used",width:130},{title:e("bpmn.status"),dataIndex:"status",width:130},{title:e("bpmn.action"),key:"action",width:200,fixed:"right"}]);function h(O){const C={type:i.value[0]};return Object.assign(C,O),Gt.getBpmnList(C)}const v=p.ref(),g=()=>{var O;(O=v.value)==null||O.refresh()},{message:m,modal:y}=Ht.App.useApp();function x(O,C){y.confirm({title:e("button._006_msg1"),content:e(C==="0"?"button._006_msg2":"button._006_msg3"),centered:!0,okButtonProps:{danger:!0},onOk:()=>{const G={code:O.code,status:C};Gt.switchBpmnStatus(G).then(K=>{K.code===0&&(g(),m.success(e("common.successTip")))})}})}function S(){c.emit("changeComp",{comp:"BpmnEditPage",opType:"1",type:i.value[0],isApproval:a.value})}function b(O){c.emit("changeComp",{comp:"BpmnEditPage",opType:"2",code:O.code,type:O.type,isApproval:a.value})}function N(O){c.emit("changeComp",{comp:"BpmnEditPage",opType:"3",type:i.value[0],code:O.code,isApproval:a.value})}function A(O){y.confirm({title:e("button._006_msg1"),content:e("button._004_msg2"),centered:!0,okButtonProps:{danger:!0},onOk:()=>{const C={code:O.code};Gt.delBpmn(C).then(G=>{G.code===0&&(g(),m.success(e("common.successTip")))})}})}function E(O){y.info({title:e("wo_list.btn_chart"),content:p.h(II,{data:O}),centered:!0,footer:null,icon:null,closable:!0,maskClosable:!0,width:1e3,class:"modal-comp"})}return p.onMounted(()=>{s(),p.onActivated(()=>{var O;(O=v.value)==null||O.loadData()})}),(O,C)=>{const G=ie.InputSearch,K=ie.Tree,J=ie.Empty,R=zm,k=ie.Button,B=ie.Space,Z=bE,ee=ie.Switch,ce=p.resolveComponent("a-table-ex"),Be=p.resolveComponent("wl-splitter"),me=p.resolveDirective("permission");return p.openBlock(),p.createBlock(Be,{bordered:!1},{left:p.withCtx(()=>[p.createElementVNode("div",kI,[p.createElementVNode("div",BI,p.toDisplayString(O.$t("bpmn.list_title")),1),p.createElementVNode("div",jI,[p.createVNode(G,{value:p.unref(n),"onUpdate:value":C[0]||(C[0]=de=>p.isRef(n)?n.value=de:null),placeholder:O.$t("bpmn.type_placeholder"),onSearch:s},null,8,["value","placeholder"])]),p.createVNode(R,{class:"tree-wrapper"},{default:p.withCtx(()=>{var de;return[(de=p.unref(o))!=null&&de.length?(p.openBlock(),p.createBlock(K,{key:0,expandedKeys:p.unref(r),"onUpdate:expandedKeys":C[1]||(C[1]=Se=>p.isRef(r)?r.value=Se:null),selectedKeys:p.unref(i),"tree-data":p.unref(o),showLine:!0,onSelect:d},null,8,["expandedKeys","selectedKeys","tree-data"])):(p.openBlock(),p.createBlock(J,{key:1,imageStyle:{height:"64px"}}))]}),_:1})])]),right:p.withCtx(()=>[p.createVNode(B,{class:"ml-lg my-nm"},{default:p.withCtx(()=>[p.withDirectives((p.openBlock(),p.createBlock(k,{type:"primary",onClick:S},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.$t("bpmn.add_workflow")),1)]),_:1})),[[me,"002"]])]),_:1}),p.createVNode(ce,{ref_key:"tableEx",ref:v,class:"table-query bordered mx-lg",columns:p.unref(f),scroll:{x:1100},loadData:h},{bodyCell:p.withCtx(({column:de,record:Se,text:je})=>[de.dataIndex==="used"?(p.openBlock(),p.createBlock(Z,{key:0,type:"BPMN_USED",value:je},null,8,["value"])):p.createCommentVNode("",!0),de.dataIndex==="status"?(p.openBlock(),p.createBlock(ee,{key:1,checked:je,checkedValue:"0",unCheckedValue:"1",disabled:!p.unref(bs.hasPermission)("006"),onChange:he=>x(Se,he)},null,8,["checked","disabled","onChange"])):p.createCommentVNode("",!0),de.key==="action"?(p.openBlock(),p.createElementBlock("div",FI,[p.withDirectives((p.openBlock(),p.createBlock(k,{type:"link",onClick:he=>b(Se)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.$t("common.btn_edit")),1)]),_:2},1032,["onClick"])),[[me,"003"]]),p.withDirectives((p.openBlock(),p.createBlock(k,{type:"link",onClick:he=>A(Se)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.$t("common.btn_del")),1)]),_:2},1032,["onClick"])),[[me,"004"]]),p.withDirectives((p.openBlock(),p.createBlock(k,{type:"link",onClick:he=>E(Se)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.$t("wo_my.btn_detail")),1)]),_:2},1032,["onClick"])),[[me,"005"]]),p.withDirectives((p.openBlock(),p.createBlock(k,{type:"link",onClick:he=>N(Se)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.$t("bpmn.btn_clone")),1)]),_:2},1032,["onClick"])),[[me,"002"]])])):p.createCommentVNode("",!0)]),_:1},8,["columns"])]),_:1})}}}),[["__scopeId","data-v-8a3cde47"]]);var fl,qe,Vm,Wi,Xm,Gm,Ym,Km,Md,Dd,Pd,ba={},qm=[],HI=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xa=Array.isArray;function ei(t,e){for(var n in e)t[n]=e[n];return t}function Rd(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Te(t,e,n){var r,i,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?fl.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]==null&&(a[o]=t.defaultProps[o]);return pl(t,a,r,i,null)}function pl(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Vm,__i:-1,__u:0};return i==null&&qe.vnode!=null&&qe.vnode(o),o}function hl(){return{current:null}}function wo(t){return t.children}function Qe(t,e){this.props=t,this.context=e}function So(t,e){if(e==null)return t.__?So(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?So(t):null}function Zm(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Zm(t)}}function Jm(t){(!t.__d&&(t.__d=!0)&&Wi.push(t)&&!gl.__r++||Xm!=qe.debounceRendering)&&((Xm=qe.debounceRendering)||Gm)(gl)}function gl(){for(var t,e,n,r,i,o,a,s=1;Wi.length;)Wi.length>s&&Wi.sort(Ym),t=Wi.shift(),s=Wi.length,t.__d&&(n=void 0,i=(r=(e=t).__v).__e,o=[],a=[],e.__P&&((n=ei({},r)).__v=r.__v+1,qe.vnode&&qe.vnode(n),Ld(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??So(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,ry(o,n,a),n.__e!=i&&Zm(n)));gl.__r=0}function Qm(t,e,n,r,i,o,a,s,l,u,c){var d,f,h,v,g,m,y=r&&r.__k||qm,x=e.length;for(l=zI(n,e,y,l,x),d=0;d<x;d++)(h=n.__k[d])!=null&&(f=h.__i==-1?ba:y[h.__i]||ba,h.__i=d,m=Ld(t,h,f,i,o,a,s,l,u,c),v=h.__e,h.ref&&f.ref!=h.ref&&(f.ref&&Id(f.ref,null,h),c.push(h.ref,h.__c||v,h)),g==null&&v!=null&&(g=v),4&h.__u||f.__k===h.__k?l=ey(h,l,t):typeof h.type=="function"&&m!==void 0?l=m:v&&(l=v.nextSibling),h.__u&=-7);return n.__e=g,l}function zI(t,e,n,r,i){var o,a,s,l,u,c=n.length,d=c,f=0;for(t.__k=new Array(i),o=0;o<i;o++)(a=e[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(l=o+f,(a=t.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?pl(null,a,null,null,null):xa(a)?pl(wo,{children:a},null,null,null):a.constructor==null&&a.__b>0?pl(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,s=null,(u=a.__i=WI(a,n,l,d))!=-1&&(d--,(s=n[u])&&(s.__u|=2)),s==null||s.__v==null?(u==-1&&(i>c?f--:i<c&&f++),typeof a.type!="function"&&(a.__u|=4)):u!=l&&(u==l-1?f--:u==l+1?f++:(u>l?f--:f++,a.__u|=4))):t.__k[o]=null;if(d)for(o=0;o<c;o++)(s=n[o])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=So(s)),oy(s,s));return r}function ey(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=ey(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=So(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function vl(t,e){return e=e||[],t==null||typeof t=="boolean"||(xa(t)?t.some(function(n){vl(n,e)}):e.push(t)),e}function WI(t,e,n,r){var i,o,a=t.key,s=t.type,l=e[n];if(l===null&&t.key==null||l&&a==l.key&&s==l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((l=e[i])&&(2&l.__u)==0&&a==l.key&&s==l.type)return i;i--}if(o<e.length){if((l=e[o])&&(2&l.__u)==0&&a==l.key&&s==l.type)return o;o++}}return-1}function ty(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||HI.test(e)?n:n+"px"}function ml(t,e,n,r,i){var o;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ty(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||ty(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Km,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Md,t.addEventListener(e,o?Pd:Dd,o)):t.removeEventListener(e,o?Pd:Dd,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function ny(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Md++;else if(e.t<n.u)return;return n(qe.event?qe.event(e):e)}}}function Ld(t,e,n,r,i,o,a,s,l,u){var c,d,f,h,v,g,m,y,x,S,b,N,A,E,O,C,G,K=e.type;if(e.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[s=e.__e=n.__e]),(c=qe.__b)&&c(e);e:if(typeof K=="function")try{if(y=e.props,x="prototype"in K&&K.prototype.render,S=(c=K.contextType)&&r[c.__c],b=c?S?S.props.value:c.__:r,n.__c?m=(d=e.__c=n.__c).__=d.__E:(x?e.__c=d=new K(y,b):(e.__c=d=new Qe(y,b),d.constructor=K,d.render=VI),S&&S.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),x&&d.__s==null&&(d.__s=d.state),x&&K.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=ei({},d.__s)),ei(d.__s,K.getDerivedStateFromProps(y,d.__s))),h=d.props,v=d.state,d.__v=e,f)x&&K.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),x&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(x&&K.getDerivedStateFromProps==null&&y!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(y,b),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(y,d.__s,b)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(d.props=y,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(J){J&&(J.__=e)}),N=0;N<d._sb.length;N++)d.__h.push(d._sb[N]);d._sb=[],d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(y,d.__s,b),x&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,v,g)})}if(d.context=b,d.props=y,d.__P=t,d.__e=!1,A=qe.__r,E=0,x){for(d.state=d.__s,d.__d=!1,A&&A(e),c=d.render(d.props,d.state,d.context),O=0;O<d._sb.length;O++)d.__h.push(d._sb[O]);d._sb=[]}else do d.__d=!1,A&&A(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++E<25);d.state=d.__s,d.getChildContext!=null&&(r=ei(ei({},r),d.getChildContext())),x&&!f&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(h,v)),C=c,c!=null&&c.type===wo&&c.key==null&&(C=iy(c.props.children)),s=Qm(t,xa(C)?C:[C],e,n,r,i,o,a,s,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&a.push(d),m&&(d.__E=d.__=null)}catch(J){if(e.__v=null,l||o!=null)if(J.then){for(e.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,e.__e=s}else for(G=o.length;G--;)Rd(o[G]);else e.__e=n.__e,e.__k=n.__k;qe.__e(J,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):s=e.__e=UI(n.__e,e,n,r,i,o,a,l,u);return(c=qe.diffed)&&c(e),128&e.__u?void 0:s}function ry(t,e,n){for(var r=0;r<n.length;r++)Id(n[r],n[++r],n[++r]);qe.__c&&qe.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){qe.__e(o,i.__v)}})}function iy(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:xa(t)?t.map(iy):ei({},t)}function UI(t,e,n,r,i,o,a,s,l){var u,c,d,f,h,v,g,m=n.props,y=e.props,x=e.type;if(x=="svg"?i="http://www.w3.org/2000/svg":x=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((h=o[u])&&"setAttribute"in h==!!x&&(x?h.localName==x:h.nodeType==3)){t=h,o[u]=null;break}}if(t==null){if(x==null)return document.createTextNode(y);t=document.createElementNS(i,x,y.is&&y),s&&(qe.__m&&qe.__m(e,o),s=!1),o=null}if(x==null)m===y||s&&t.data==y||(t.data=y);else{if(o=o&&fl.call(t.childNodes),m=n.props||ba,!s&&o!=null)for(m={},u=0;u<t.attributes.length;u++)m[(h=t.attributes[u]).name]=h.value;for(u in m)if(h=m[u],u!="children"){if(u=="dangerouslySetInnerHTML")d=h;else if(!(u in y)){if(u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y)continue;ml(t,u,null,h,i)}}for(u in y)h=y[u],u=="children"?f=h:u=="dangerouslySetInnerHTML"?c=h:u=="value"?v=h:u=="checked"?g=h:s&&typeof h!="function"||m[u]===h||ml(t,u,h,m[u],i);if(c)s||d&&(c.__html==d.__html||c.__html==t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(d&&(t.innerHTML=""),Qm(e.type=="template"?t.content:t,xa(f)?f:[f],e,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:n.__k&&So(n,0),s,l),o!=null)for(u=o.length;u--;)Rd(o[u]);s||(u="value",x=="progress"&&v==null?t.removeAttribute("value"):v!=null&&(v!==t[u]||x=="progress"&&!v||x=="option"&&v!=m[u])&&ml(t,u,v,m[u],i),u="checked",g!=null&&g!=t[u]&&ml(t,u,g,m[u],i))}return t}function Id(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){qe.__e(i,n)}}function oy(t,e,n){var r,i;if(qe.unmount&&qe.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||Id(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){qe.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&oy(r[i],e,n||typeof t.type!="function");n||Rd(t.__e),t.__c=t.__=t.__e=void 0}function VI(t,e,n){return this.constructor(t,n)}function XI(t,e,n){var r,i,o,a;e==document&&(e=document.documentElement),qe.__&&qe.__(t,e),i=(r=!1)?null:e.__k,o=[],a=[],Ld(e,t=e.__k=Te(wo,null,[t]),i||ba,ba,e.namespaceURI,i?null:e.firstChild?fl.call(e.childNodes):null,o,i?i.__e:e.firstChild,r,a),ry(o,t,a)}fl=qm.slice,qe={__e:function(t,e,n,r){for(var i,o,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(s){t=s}throw t}},Vm=0,Qe.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ei({},this.state),typeof t=="function"&&(t=t(ei({},n),this.props)),t&&ei(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Jm(this))},Qe.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Jm(this))},Qe.prototype.render=wo,Wi=[],Gm=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ym=function(t,e){return t.__v.__b-e.__v.__b},gl.__r=0,Km=/(PointerCapture)$|Capture$/i,Md=0,Dd=ny(!1),Pd=ny(!0);var GI="An invariant failed, however the error is obfuscated because this is a production build.",yl=[];Object.freeze(yl);var kd={};Object.freeze(kd);function On(){return++pe.mobxGuid}function He(t){throw Mt(!1,t),"X"}function Mt(t,e){if(!t)throw new Error("[mobx] "+(e||GI))}var ay=[];function YI(t,e){return process.env.NODE_ENV==="production"||ay.indexOf(t)!==-1?!1:(ay.push(t),console.error("[mobx] Deprecated: "+t),!0)}function Bd(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var _l=function(){};function KI(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function jd(t){return t!==null&&typeof t=="object"}function Ui(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function qI(t){if(Ao(t)||gn(t))return t;if(Array.isArray(t))return new Map(t);if(Ui(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return He("Cannot convert to map from '"+t+"'")}function Co(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function ZI(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function sy(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!n||n.configurable!==!1&&n.writable!==!1}function JI(t,e){process.env.NODE_ENV!=="production"&&!sy(t,e)&&He("Cannot make property '"+e.toString()+"' observable, it is not configurable and writable in the target object")}function yi(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(r){return jd(r)&&r[n]===!0}}function Ao(t){return t instanceof Map}function Ea(t){return t instanceof Set}function Fd(t){var e=new Set;for(var n in t)e.add(n);return Object.getOwnPropertySymbols(t).forEach(function(r){Object.getOwnPropertyDescriptor(t,r).enumerable&&e.add(r)}),Array.from(e)}function Jn(t){return t&&t.toString?t.toString():new String(t).toString()}function ly(t){return t===null?null:typeof t=="object"?""+t:t}var QI=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ke=Symbol("mobx administration"),Oo=function(){function t(e){e===void 0&&(e="Atom@"+On()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=vt.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.reportObserved=function(){return Ey(this)},t.prototype.reportChanged=function(){gr(),Sk(this),vr()},t.prototype.toString=function(){return this.name},t}(),$d=yi("Atom",Oo);function Hd(t,e,n){e===void 0&&(e=_l),n===void 0&&(n=_l);var r=new Oo(t);return e!==_l&&Fk(r,e),n!==_l&&My(r,n),r}function ek(t,e){return Yy(t,e)}function tk(t,e){return Object.is(t,e)}var To={structural:ek,default:tk};/*! *****************************************************************************
|
|
32
|
+
*/var RL="4.17.21",LL=2,IL=1,kL=3,wm=4294967295,BL=Array.prototype,jL=Object.prototype,Sm=jL.hasOwnProperty,Cm=on?on.iterator:void 0,FL=Math.max,Am=Math.min,_d=function(t){return function(e,n,r){if(r==null){var i=Rt(n),o=i&&Vt(n),a=o&&o.length&&Ys(n,o);(a?a.length:i)||(r=n,n=e,e=this)}return t(e,n,r)}}(RD);T.after=kt.after,T.ary=kt.ary,T.assign=$e.assign,T.assignIn=$e.assignIn,T.assignInWith=$e.assignInWith,T.assignWith=$e.assignWith,T.at=$e.at,T.before=kt.before,T.bind=kt.bind,T.bindAll=bt.bindAll,T.bindKey=kt.bindKey,T.castArray=De.castArray,T.chain=Rr.chain,T.chunk=xe.chunk,T.compact=xe.compact,T.concat=xe.concat,T.cond=bt.cond,T.conforms=bt.conforms,T.constant=bt.constant,T.countBy=St.countBy,T.create=$e.create,T.curry=kt.curry,T.curryRight=kt.curryRight,T.debounce=kt.debounce,T.defaults=$e.defaults,T.defaultsDeep=$e.defaultsDeep,T.defer=kt.defer,T.delay=kt.delay,T.difference=xe.difference,T.differenceBy=xe.differenceBy,T.differenceWith=xe.differenceWith,T.drop=xe.drop,T.dropRight=xe.dropRight,T.dropRightWhile=xe.dropRightWhile,T.dropWhile=xe.dropWhile,T.fill=xe.fill,T.filter=St.filter,T.flatMap=St.flatMap,T.flatMapDeep=St.flatMapDeep,T.flatMapDepth=St.flatMapDepth,T.flatten=xe.flatten,T.flattenDeep=xe.flattenDeep,T.flattenDepth=xe.flattenDepth,T.flip=kt.flip,T.flow=bt.flow,T.flowRight=bt.flowRight,T.fromPairs=xe.fromPairs,T.functions=$e.functions,T.functionsIn=$e.functionsIn,T.groupBy=St.groupBy,T.initial=xe.initial,T.intersection=xe.intersection,T.intersectionBy=xe.intersectionBy,T.intersectionWith=xe.intersectionWith,T.invert=$e.invert,T.invertBy=$e.invertBy,T.invokeMap=St.invokeMap,T.iteratee=bt.iteratee,T.keyBy=St.keyBy,T.keys=Vt,T.keysIn=$e.keysIn,T.map=St.map,T.mapKeys=$e.mapKeys,T.mapValues=$e.mapValues,T.matches=bt.matches,T.matchesProperty=bt.matchesProperty,T.memoize=kt.memoize,T.merge=$e.merge,T.mergeWith=$e.mergeWith,T.method=bt.method,T.methodOf=bt.methodOf,T.mixin=_d,T.negate=tl,T.nthArg=bt.nthArg,T.omit=$e.omit,T.omitBy=$e.omitBy,T.once=kt.once,T.orderBy=St.orderBy,T.over=bt.over,T.overArgs=kt.overArgs,T.overEvery=bt.overEvery,T.overSome=bt.overSome,T.partial=kt.partial,T.partialRight=kt.partialRight,T.partition=St.partition,T.pick=$e.pick,T.pickBy=$e.pickBy,T.property=bt.property,T.propertyOf=bt.propertyOf,T.pull=xe.pull,T.pullAll=xe.pullAll,T.pullAllBy=xe.pullAllBy,T.pullAllWith=xe.pullAllWith,T.pullAt=xe.pullAt,T.range=bt.range,T.rangeRight=bt.rangeRight,T.rearg=kt.rearg,T.reject=St.reject,T.remove=xe.remove,T.rest=kt.rest,T.reverse=xe.reverse,T.sampleSize=St.sampleSize,T.set=$e.set,T.setWith=$e.setWith,T.shuffle=St.shuffle,T.slice=xe.slice,T.sortBy=St.sortBy,T.sortedUniq=xe.sortedUniq,T.sortedUniqBy=xe.sortedUniqBy,T.split=mt.split,T.spread=kt.spread,T.tail=xe.tail,T.take=xe.take,T.takeRight=xe.takeRight,T.takeRightWhile=xe.takeRightWhile,T.takeWhile=xe.takeWhile,T.tap=Rr.tap,T.throttle=kt.throttle,T.thru=sl,T.toArray=De.toArray,T.toPairs=$e.toPairs,T.toPairsIn=$e.toPairsIn,T.toPath=bt.toPath,T.toPlainObject=De.toPlainObject,T.transform=$e.transform,T.unary=kt.unary,T.union=xe.union,T.unionBy=xe.unionBy,T.unionWith=xe.unionWith,T.uniq=xe.uniq,T.uniqBy=xe.uniqBy,T.uniqWith=xe.uniqWith,T.unset=$e.unset,T.unzip=xe.unzip,T.unzipWith=xe.unzipWith,T.update=$e.update,T.updateWith=$e.updateWith,T.values=$e.values,T.valuesIn=$e.valuesIn,T.without=xe.without,T.words=mt.words,T.wrap=kt.wrap,T.xor=xe.xor,T.xorBy=xe.xorBy,T.xorWith=xe.xorWith,T.zip=xe.zip,T.zipObject=xe.zipObject,T.zipObjectDeep=xe.zipObjectDeep,T.zipWith=xe.zipWith,T.entries=$e.toPairs,T.entriesIn=$e.toPairsIn,T.extend=$e.assignIn,T.extendWith=$e.assignInWith,_d(T,T),T.add=hn.add,T.attempt=bt.attempt,T.camelCase=mt.camelCase,T.capitalize=mt.capitalize,T.ceil=hn.ceil,T.clamp=yd.clamp,T.clone=De.clone,T.cloneDeep=De.cloneDeep,T.cloneDeepWith=De.cloneDeepWith,T.cloneWith=De.cloneWith,T.conformsTo=De.conformsTo,T.deburr=mt.deburr,T.defaultTo=bt.defaultTo,T.divide=hn.divide,T.endsWith=mt.endsWith,T.eq=De.eq,T.escape=mt.escape,T.escapeRegExp=mt.escapeRegExp,T.every=St.every,T.find=St.find,T.findIndex=xe.findIndex,T.findKey=$e.findKey,T.findLast=St.findLast,T.findLastIndex=xe.findLastIndex,T.findLastKey=$e.findLastKey,T.floor=hn.floor,T.forEach=St.forEach,T.forEachRight=St.forEachRight,T.forIn=$e.forIn,T.forInRight=$e.forInRight,T.forOwn=$e.forOwn,T.forOwnRight=$e.forOwnRight,T.get=$e.get,T.gt=De.gt,T.gte=De.gte,T.has=$e.has,T.hasIn=$e.hasIn,T.head=xe.head,T.identity=wn,T.includes=St.includes,T.indexOf=xe.indexOf,T.inRange=yd.inRange,T.invoke=$e.invoke,T.isArguments=De.isArguments,T.isArray=We,T.isArrayBuffer=De.isArrayBuffer,T.isArrayLike=De.isArrayLike,T.isArrayLikeObject=De.isArrayLikeObject,T.isBoolean=De.isBoolean,T.isBuffer=De.isBuffer,T.isDate=De.isDate,T.isElement=De.isElement,T.isEmpty=De.isEmpty,T.isEqual=De.isEqual,T.isEqualWith=De.isEqualWith,T.isError=De.isError,T.isFinite=De.isFinite,T.isFunction=De.isFunction,T.isInteger=De.isInteger,T.isLength=De.isLength,T.isMap=De.isMap,T.isMatch=De.isMatch,T.isMatchWith=De.isMatchWith,T.isNaN=De.isNaN,T.isNative=De.isNative,T.isNil=De.isNil,T.isNull=De.isNull,T.isNumber=De.isNumber,T.isObject=Rt,T.isObjectLike=De.isObjectLike,T.isPlainObject=De.isPlainObject,T.isRegExp=De.isRegExp,T.isSafeInteger=De.isSafeInteger,T.isSet=De.isSet,T.isString=De.isString,T.isSymbol=De.isSymbol,T.isTypedArray=De.isTypedArray,T.isUndefined=De.isUndefined,T.isWeakMap=De.isWeakMap,T.isWeakSet=De.isWeakSet,T.join=xe.join,T.kebabCase=mt.kebabCase,T.last=kn,T.lastIndexOf=xe.lastIndexOf,T.lowerCase=mt.lowerCase,T.lowerFirst=mt.lowerFirst,T.lt=De.lt,T.lte=De.lte,T.max=hn.max,T.maxBy=hn.maxBy,T.mean=hn.mean,T.meanBy=hn.meanBy,T.min=hn.min,T.minBy=hn.minBy,T.stubArray=bt.stubArray,T.stubFalse=bt.stubFalse,T.stubObject=bt.stubObject,T.stubString=bt.stubString,T.stubTrue=bt.stubTrue,T.multiply=hn.multiply,T.nth=xe.nth,T.noop=bt.noop,T.now=wL.now,T.pad=mt.pad,T.padEnd=mt.padEnd,T.padStart=mt.padStart,T.parseInt=mt.parseInt,T.random=yd.random,T.reduce=St.reduce,T.reduceRight=St.reduceRight,T.repeat=mt.repeat,T.replace=mt.replace,T.result=$e.result,T.round=hn.round,T.sample=St.sample,T.size=St.size,T.snakeCase=mt.snakeCase,T.some=St.some,T.sortedIndex=xe.sortedIndex,T.sortedIndexBy=xe.sortedIndexBy,T.sortedIndexOf=xe.sortedIndexOf,T.sortedLastIndex=xe.sortedLastIndex,T.sortedLastIndexBy=xe.sortedLastIndexBy,T.sortedLastIndexOf=xe.sortedLastIndexOf,T.startCase=mt.startCase,T.startsWith=mt.startsWith,T.subtract=hn.subtract,T.sum=hn.sum,T.sumBy=hn.sumBy,T.template=mt.template,T.times=bt.times,T.toFinite=De.toFinite,T.toInteger=Ke,T.toLength=De.toLength,T.toLower=mt.toLower,T.toNumber=De.toNumber,T.toSafeInteger=De.toSafeInteger,T.toString=De.toString,T.toUpper=mt.toUpper,T.trim=mt.trim,T.trimEnd=mt.trimEnd,T.trimStart=mt.trimStart,T.truncate=mt.truncate,T.unescape=mt.unescape,T.uniqueId=bt.uniqueId,T.upperCase=mt.upperCase,T.upperFirst=mt.upperFirst,T.each=St.forEach,T.eachRight=St.forEachRight,T.first=xe.head,_d(T,function(){var t={};return Dr(T,function(e,n){Sm.call(T.prototype,n)||(t[n]=e)}),t}(),{chain:!1}),T.VERSION=RL,(T.templateSettings=mt.templateSettings).imports._=T,Gn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){T[t].placeholder=T}),Gn(["drop","take"],function(t,e){ot.prototype[t]=function(n){n=n===void 0?1:FL(Ke(n),0);var r=this.__filtered__&&!e?new ot(this):this.clone();return r.__filtered__?r.__takeCount__=Am(n,r.__takeCount__):r.__views__.push({size:Am(n,wm),type:t+(r.__dir__<0?"Right":"")}),r},ot.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),Gn(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==IL||n==kL;ot.prototype[t]=function(i){var o=this.clone();return o.__iteratees__.push({iteratee:Ue(i),type:n}),o.__filtered__=o.__filtered__||r,o}}),Gn(["head","last"],function(t,e){var n="take"+(e?"Right":"");ot.prototype[t]=function(){return this[n](1).value()[0]}}),Gn(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");ot.prototype[t]=function(){return this.__filtered__?new ot(this):this[n](1)}}),ot.prototype.compact=function(){return this.filter(wn)},ot.prototype.find=function(t){return this.filter(t).head()},ot.prototype.findLast=function(t){return this.reverse().find(t)},ot.prototype.invokeMap=Je(function(t,e){return typeof t=="function"?new ot(this):this.map(function(n){return ma(n,t,e)})}),ot.prototype.reject=function(t){return this.filter(tl(Ue(t)))},ot.prototype.slice=function(t,e){t=Ke(t);var n=this;return n.__filtered__&&(t>0||e<0)?new ot(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==void 0&&(e=Ke(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},ot.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},ot.prototype.toArray=function(){return this.take(wm)},Dr(ot.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=T[r?"take"+(e=="last"?"Right":""):e],o=r||/^find/.test(e);i&&(T.prototype[e]=function(){var a=this.__wrapped__,s=r?[1]:arguments,l=a instanceof ot,u=s[0],c=l||We(a),d=function(y){var x=i.apply(T,ci([y],s));return r&&f?x[0]:x};c&&n&&typeof u=="function"&&u.length!=1&&(l=c=!1);var f=this.__chain__,h=!!this.__actions__.length,v=o&&!f,g=l&&!h;if(!o&&c){a=g?a:new ot(this);var m=t.apply(a,s);return m.__actions__.push({func:sl,args:[d],thisArg:void 0}),new Xn(m,f)}return v&&g?t.apply(this,s):(m=this.thru(d),v?r?m.value()[0]:m.value():m)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(t){var e=BL[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);T.prototype[t]=function(){var i=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(We(o)?o:[],i)}return this[n](function(a){return e.apply(We(a)?a:[],i)})}}),Dr(ot.prototype,function(t,e){var n=T[e];if(n){var r=n.name+"";Sm.call(uo,r)||(uo[r]=[]),uo[r].push({name:e,func:n})}}),uo[Rs(void 0,LL).name]=[{name:"wrapper",func:void 0}],ot.prototype.clone=SL,ot.prototype.reverse=CL,ot.prototype.value=PL,T.prototype.at=Rr.at,T.prototype.chain=Rr.wrapperChain,T.prototype.commit=Rr.commit,T.prototype.next=Rr.next,T.prototype.plant=Rr.plant,T.prototype.reverse=Rr.reverse,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=Rr.value,T.prototype.first=T.prototype.head,Cm&&(T.prototype[Cm]=Rr.toIterator);const xo=t=>typeof t=="number",$L=t=>oc(t)?!Number.isNaN(Number(t)):!1;var Om;const bd=typeof window<"u",HL=t=>typeof t=="string",zL=()=>{};bd&&((Om=window==null?void 0:window.navigator)!=null&&Om.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Tm(t){return typeof t=="function"?t():p.unref(t)}function WL(t){return t}function Nm(t){return p.getCurrentScope()?(p.onScopeDispose(t),!0):!1}function UL(t,e=!0){p.getCurrentInstance()?p.onMounted(t):e?t():p.nextTick(t)}function Mm(t){var e;const n=Tm(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Dm=bd?window:void 0;function xd(...t){let e,n,r,i;if(HL(t[0])||Array.isArray(t[0])?([n,r,i]=t,e=Dm):[e,n,r,i]=t,!e)return zL;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=p.watch(()=>[Mm(e),Tm(i)],([c,d])=>{a(),c&&o.push(...n.flatMap(f=>r.map(h=>s(c,f,h,d))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Nm(u),u}function VL(t,e=!1){const n=p.ref(),r=()=>n.value=!!t();return r(),UL(r,e),n}const Pm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Rm="__vueuse_ssr_handlers__";Pm[Rm]=Pm[Rm]||{};var Lm=Object.getOwnPropertySymbols,XL=Object.prototype.hasOwnProperty,GL=Object.prototype.propertyIsEnumerable,YL=(t,e)=>{var n={};for(var r in t)XL.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Lm)for(var r of Lm(t))e.indexOf(r)<0&&GL.call(t,r)&&(n[r]=t[r]);return n};function KL(t,e,n={}){const r=n,{window:i=Dm}=r,o=YL(r,["window"]);let a;const s=VL(()=>i&&"ResizeObserver"in i),l=()=>{a&&(a.disconnect(),a=void 0)},u=p.watch(()=>Mm(t),d=>{l(),s.value&&i&&d&&(a=new ResizeObserver(e),a.observe(d,o))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return Nm(c),{isSupported:s,stop:c}}var Im;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(Im||(Im={}));var qL=Object.defineProperty,km=Object.getOwnPropertySymbols,ZL=Object.prototype.hasOwnProperty,JL=Object.prototype.propertyIsEnumerable,Bm=(t,e,n)=>e in t?qL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QL=(t,e)=>{for(var n in e||(e={}))ZL.call(e,n)&&Bm(t,n,e[n]);if(km)for(var n of km(e))JL.call(e,n)&&Bm(t,n,e[n]);return t};QL({linear:WL},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});class jm extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function eI(t,e){throw new jm(`[${t}] ${e}`)}function Ed(t,e){if(process.env.NODE_ENV!=="production"){const n=oc(t)?new jm(`[${t}] ${e}`):t;console.warn(n)}}const Fm="__epPropKey",tI=t=>t,nI=t=>ac(t)&&!!t[Fm],rI=(t,e)=>{if(!ac(t)||nI(t))return t;const{values:n,required:r,default:i,type:o,validator:a}=t,l={type:o,required:!!r,validator:n||a?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),nh(t,"default")&&d.push(i),c||(c=d.includes(u))),a&&(c||(c=a(u))),!c&&d.length>0){const f=[...new Set(d)].map(h=>JSON.stringify(h)).join(", ");p.warn(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[Fm]:!0};return nh(t,"default")&&(l.default=i),l},ll=t=>Dv(Object.entries(t).map(([e,n])=>[e,rI(n,e)]));var wd=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};const iI="utils/dom/style";function $m(t,e="px"){if(!t)return"";if(xo(t)||$L(t))return`${t}${e}`;if(oc(t))return t;Ed(iI,"binding value must be a string or number")}const oI=(t,e)=>(t.install=n=>{for(const r of[t,...Object.values({})])n.component(r.name,r)},t),aI=ll({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),sI=t=>gi(aI,t),Eo=4,lI={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},uI=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),Sd=Symbol("scrollbarContextKey"),cI=ll({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),dI="Thumb";var Hm=wd(p.defineComponent({__name:"thumb",props:cI,setup(t){const e=t,n=p.inject(Sd),r=th("scrollbar");n||eI(dI,"can not inject scrollbar context");const i=p.ref(),o=p.ref(),a=p.ref({}),s=p.ref(!1);let l=!1,u=!1,c=bd?document.onselectstart:null;const d=p.computed(()=>lI[e.vertical?"vertical":"horizontal"]),f=p.computed(()=>uI({size:e.size,move:e.move,bar:d.value})),h=p.computed(()=>i.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/e.ratio/o.value[d.value.offset]),v=A=>{var E;if(A.stopPropagation(),A.ctrlKey||[1,2].includes(A.button))return;(E=window.getSelection())==null||E.removeAllRanges(),m(A);const O=A.currentTarget;O&&(a.value[d.value.axis]=O[d.value.offset]-(A[d.value.client]-O.getBoundingClientRect()[d.value.direction]))},g=A=>{if(!o.value||!i.value||!n.wrapElement)return;const E=Math.abs(A.target.getBoundingClientRect()[d.value.direction]-A[d.value.client]),O=o.value[d.value.offset]/2,C=(E-O)*100*h.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=C*n.wrapElement[d.value.scrollSize]/100},m=A=>{A.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",y),document.addEventListener("mouseup",x),c=document.onselectstart,document.onselectstart=()=>!1},y=A=>{if(!i.value||!o.value||l===!1)return;const E=a.value[d.value.axis];if(!E)return;const O=(i.value.getBoundingClientRect()[d.value.direction]-A[d.value.client])*-1,C=o.value[d.value.offset]-E,G=(O-C)*100*h.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=G*n.wrapElement[d.value.scrollSize]/100},x=()=>{l=!1,a.value[d.value.axis]=0,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x),N(),u&&(s.value=!1)},S=()=>{u=!1,s.value=!!e.size},b=()=>{u=!0,s.value=l};p.onBeforeUnmount(()=>{N(),document.removeEventListener("mouseup",x)});const N=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return xd(p.toRef(n,"scrollbarElement"),"mousemove",S),xd(p.toRef(n,"scrollbarElement"),"mouseleave",b),(A,E)=>(p.openBlock(),p.createBlock(p.Transition,{name:p.unref(r).b("fade"),persisted:""},{default:p.withCtx(()=>[p.withDirectives(p.createElementVNode("div",{ref_key:"instance",ref:i,class:p.normalizeClass([p.unref(r).e("bar"),p.unref(r).is(p.unref(d).key)]),onMousedown:g},[p.createElementVNode("div",{ref_key:"thumb",ref:o,class:p.normalizeClass(p.unref(r).e("thumb")),style:p.normalizeStyle(p.unref(f)),onMousedown:v},null,38)],34),[[p.vShow,A.always||s.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const fI=ll({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var pI=wd(p.defineComponent({__name:"bar",props:fI,setup(t,{expose:e}){const n=t,r=p.inject(Sd),i=p.ref(0),o=p.ref(0),a=p.ref(""),s=p.ref(""),l=p.ref(1),u=p.ref(1);return e({handleScroll:f=>{if(f){const h=f.offsetHeight-Eo,v=f.offsetWidth-Eo;o.value=f.scrollTop*100/h*l.value,i.value=f.scrollLeft*100/v*u.value}},update:()=>{const f=r==null?void 0:r.wrapElement;if(!f)return;const h=f.offsetHeight-Eo,v=f.offsetWidth-Eo,g=h**2/f.scrollHeight,m=v**2/f.scrollWidth,y=Math.max(g,n.minSize),x=Math.max(m,n.minSize);l.value=g/(h-g)/(y/(h-y)),u.value=m/(v-m)/(x/(v-x)),s.value=y+Eo<h?`${y}px`:"",a.value=x+Eo<v?`${x}px`:""}}),(f,h)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(Hm,{move:i.value,ratio:u.value,size:a.value,always:f.always},null,8,["move","ratio","size","always"]),p.createVNode(Hm,{move:o.value,ratio:l.value,size:s.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const hI=ll({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:tI([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...sI(["ariaLabel","ariaOrientation"])}),gI={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(xo)},Cd="ElScrollbar",vI=p.defineComponent({name:Cd}),mI=p.defineComponent({...vI,props:hI,emits:gI,setup(t,{expose:e,emit:n}){const r=t,i=th("scrollbar");let o,a,s=0,l=0;const u=p.ref(),c=p.ref(),d=p.ref(),f=p.ref(),h=p.computed(()=>{const N={};return r.height&&(N.height=$m(r.height)),r.maxHeight&&(N.maxHeight=$m(r.maxHeight)),[r.wrapStyle,N]}),v=p.computed(()=>[r.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!r.native}]),g=p.computed(()=>[i.e("view"),r.viewClass]),m=()=>{var N;c.value&&((N=f.value)==null||N.handleScroll(c.value),s=c.value.scrollTop,l=c.value.scrollLeft,n("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};function y(N,A){ac(N)?c.value.scrollTo(N):xo(N)&&xo(A)&&c.value.scrollTo(N,A)}const x=N=>{if(!xo(N)){Ed(Cd,"value must be a number");return}c.value.scrollTop=N},S=N=>{if(!xo(N)){Ed(Cd,"value must be a number");return}c.value.scrollLeft=N},b=()=>{var N;(N=f.value)==null||N.update()};return p.watch(()=>r.noresize,N=>{N?(o==null||o(),a==null||a()):({stop:o}=KL(d,b),a=xd("resize",b))},{immediate:!0}),p.watch(()=>[r.maxHeight,r.height],()=>{r.native||p.nextTick(()=>{var N;b(),c.value&&((N=f.value)==null||N.handleScroll(c.value))})}),p.provide(Sd,p.reactive({scrollbarElement:u,wrapElement:c})),p.onActivated(()=>{c.value&&(c.value.scrollTop=s,c.value.scrollLeft=l)}),p.onMounted(()=>{r.native||p.nextTick(()=>{b()})}),p.onUpdated(()=>b()),e({wrapRef:c,update:b,scrollTo:y,setScrollTop:x,setScrollLeft:S,handleScroll:m}),(N,A)=>(p.openBlock(),p.createElementBlock("div",{ref_key:"scrollbarRef",ref:u,class:p.normalizeClass(p.unref(i).b())},[p.createElementVNode("div",{ref_key:"wrapRef",ref:c,class:p.normalizeClass(p.unref(v)),style:p.normalizeStyle(p.unref(h)),tabindex:N.tabindex,onScroll:m},[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(N.tag),{id:N.id,ref_key:"resizeRef",ref:d,class:p.normalizeClass(p.unref(g)),style:p.normalizeStyle(N.viewStyle),role:N.role,"aria-label":N.ariaLabel,"aria-orientation":N.ariaOrientation},{default:p.withCtx(()=>[p.renderSlot(N.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),N.native?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createBlock(pI,{key:0,ref_key:"barRef",ref:f,always:N.always,"min-size":N.minSize},null,8,["always","min-size"]))],2))}});var yI=wd(mI,[["__file","scrollbar.vue"]]);const zm=oI(yI);function Zn(t,e){_I(t)&&(t="100%");var n=bI(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function _I(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function bI(t){return typeof t=="string"&&t.indexOf("%")!==-1}function xI(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function ul(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Ad(t){return t.length===1?"0"+t:String(t)}function EI(t,e,n){return{r:Zn(t,255)*255,g:Zn(e,255)*255,b:Zn(n,255)*255}}function Od(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function wI(t,e,n){var r,i,o;if(t=Zn(t,360),e=Zn(e,100),n=Zn(n,100),e===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+e):n+e-n*e,s=2*n-a;r=Od(s,a,t+1/3),i=Od(s,a,t),o=Od(s,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function SI(t,e,n){t=Zn(t,255),e=Zn(e,255),n=Zn(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case t:o=(e-n)/s+(e<n?6:0);break;case e:o=(n-t)/s+2;break;case n:o=(t-e)/s+4;break}o/=6}return{h:o,s:l,v:a}}function CI(t,e,n){t=Zn(t,360)*6,e=Zn(e,100),n=Zn(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),l=r%6,u=[n,a,o,o,s,n][l],c=[s,n,n,a,o,o][l],d=[o,o,s,n,n,a][l];return{r:u*255,g:c*255,b:d*255}}function AI(t,e,n,r){var i=[Ad(Math.round(t).toString(16)),Ad(Math.round(e).toString(16)),Ad(Math.round(n).toString(16))];return i.join("")}function Wm(t){return jn(t)/255}function jn(t){return parseInt(t,16)}var Um={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function _a(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=NI(t)),typeof t=="object"&&(Jr(t.r)&&Jr(t.g)&&Jr(t.b)?(e=EI(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Jr(t.h)&&Jr(t.s)&&Jr(t.v)?(r=ul(t.s),i=ul(t.v),e=CI(t.h,r,i),a=!0,s="hsv"):Jr(t.h)&&Jr(t.s)&&Jr(t.l)&&(r=ul(t.s),o=ul(t.l),e=wI(t.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=xI(n),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var OI="[-\\+]?\\d+%?",TI="[-\\+]?\\d*\\.\\d+%?",mi="(?:".concat(TI,")|(?:").concat(OI,")"),Td="[\\s|\\(]+(".concat(mi,")[,|\\s]+(").concat(mi,")[,|\\s]+(").concat(mi,")\\s*\\)?"),Nd="[\\s|\\(]+(".concat(mi,")[,|\\s]+(").concat(mi,")[,|\\s]+(").concat(mi,")[,|\\s]+(").concat(mi,")\\s*\\)?"),fr={CSS_UNIT:new RegExp(mi),rgb:new RegExp("rgb"+Td),rgba:new RegExp("rgba"+Nd),hsl:new RegExp("hsl"+Td),hsla:new RegExp("hsla"+Nd),hsv:new RegExp("hsv"+Td),hsva:new RegExp("hsva"+Nd),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function NI(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(Um[t])t=Um[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=fr.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=fr.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=fr.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=fr.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=fr.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=fr.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=fr.hex8.exec(t),n?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),a:Wm(n[4]),format:e?"name":"hex8"}:(n=fr.hex6.exec(t),n?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),format:e?"name":"hex"}:(n=fr.hex4.exec(t),n?{r:jn(n[1]+n[1]),g:jn(n[2]+n[2]),b:jn(n[3]+n[3]),a:Wm(n[4]+n[4]),format:e?"name":"hex8"}:(n=fr.hex3.exec(t),n?{r:jn(n[1]+n[1]),g:jn(n[2]+n[2]),b:jn(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function Jr(t){return!!fr.CSS_UNIT.exec(String(t))}function cl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function MI(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}const dl=Symbol("wf-bus"),DI={class:"wrapper"},PI={class:"content"},RI=["textContent"],LI=p.defineComponent({__name:"BpmnDetail",props:{data:{type:Object,required:!0}},setup(t){const e=t,n=p.ref("1"),r=p.ref(),i=p.ref();function o(){var u;if(!((u=e.data)!=null&&u.code))return;const s=n.value,l={code:e.data.code,type:s};Gt.getBpmnDetail(l).then(c=>{c.code===0&&(s==="1"?r.value="data:image/png;base64,"+c.result:i.value=c.result)})}function a(){o()}return p.onMounted(()=>{o()}),(s,l)=>{const u=ie.RadioButton,c=ie.RadioGroup,d=ie.Image;return p.openBlock(),p.createElementBlock("div",DI,[p.createVNode(c,{value:p.unref(n),"onUpdate:value":l[0]||(l[0]=f=>p.isRef(n)?n.value=f:null),class:"flex-ec mr-sm mt-sm",onChange:a},{default:p.withCtx(()=>[p.createVNode(u,{value:"1"},{default:p.withCtx(()=>l[1]||(l[1]=[p.createTextVNode("png")])),_:1}),p.createVNode(u,{value:"0"},{default:p.withCtx(()=>l[2]||(l[2]=[p.createTextVNode("xml")])),_:1})]),_:1},8,["value"]),p.createElementVNode("div",PI,[p.unref(n)==="1"?(p.openBlock(),p.createBlock(d,{key:0,src:p.unref(r)},null,8,["src"])):(p.openBlock(),p.createElementBlock("span",{key:1,textContent:p.toDisplayString(p.unref(i))},null,8,RI))])])}}}),Qr=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},II=Qr(LI,[["__scopeId","data-v-248c7b10"]]),kI={class:"panel-left"},BI={class:"title"},jI={class:"search-box"},FI={key:2,class:"btns-action"},$I=Qr(p.defineComponent({__name:"BusTypeList",setup(t){const{t:e}=Dn.useI18n(),n=p.ref(),r=p.ref([]),i=p.ref([]),o=p.ref([]),a=p.ref(!0);function s(){var O;o.value=[],r.value=[],i.value=[],(O=v.value)==null||O.reset(),u()}function l(O){if(!Array.isArray(O)||O.length===0)return O||[];function C(G){if(!G||typeof G!="object")return G;const K={...G};return K.title!==void 0&&K.key!==void 0&&(K.title=e(`temp.title${K.key}`)),Array.isArray(K.children)&&K.children.length>0&&(K.children=K.children.map(C)),K}return O.map(C)}function u(O){const C={sync:!0};n.value&&Object.assign(C,{description:n.value}),Gt.getBusTypeTree(C).then(G=>{var K;if(G.code===0){const J=G.result||[];o.value=l(J),J.length&&(r.value=[J[0].key],(K=J[0].children)!=null&&K.length&&(i.value=[J[0].children[0].key],a.value=J[0].children[0].type=="1",g()))}})}const c=p.inject(dl);function d(O,C){C.selected&&C.node.dataRef.isLeaf&&(i.value=O,a.value=C.node.dataRef.type=="1",g())}const f=p.ref([{title:e("bpmn.version"),dataIndex:"version",width:100},{title:e("bpmn.description"),dataIndex:"description",width:250},{title:e("bpmn.used"),dataIndex:"used",width:130},{title:e("bpmn.status"),dataIndex:"status",width:130},{title:e("bpmn.action"),key:"action",width:200,fixed:"right"}]);function h(O){const C={type:i.value[0]};return Object.assign(C,O),Gt.getBpmnList(C)}const v=p.ref(),g=()=>{var O;(O=v.value)==null||O.refresh()},{message:m,modal:y}=Ft.App.useApp();function x(O,C){y.confirm({title:e("button._006_msg1"),content:e(C==="0"?"button._006_msg2":"button._006_msg3"),centered:!0,okButtonProps:{danger:!0},onOk:()=>{const G={code:O.code,status:C};Gt.switchBpmnStatus(G).then(K=>{K.code===0&&(g(),m.success(e("common.successTip")))})}})}function S(){c.emit("changeComp",{comp:"BpmnEditPage",opType:"1",type:i.value[0],isApproval:a.value})}function b(O){c.emit("changeComp",{comp:"BpmnEditPage",opType:"2",code:O.code,type:O.type,isApproval:a.value})}function N(O){c.emit("changeComp",{comp:"BpmnEditPage",opType:"3",type:i.value[0],code:O.code,isApproval:a.value})}function A(O){y.confirm({title:e("button._006_msg1"),content:e("button._004_msg2"),centered:!0,okButtonProps:{danger:!0},onOk:()=>{const C={code:O.code};Gt.delBpmn(C).then(G=>{G.code===0&&(g(),m.success(e("common.successTip")))})}})}function E(O){y.info({title:e("wo_list.btn_chart"),content:p.h(II,{data:O}),centered:!0,footer:null,icon:null,closable:!0,maskClosable:!0,width:1e3,class:"modal-comp"})}return p.onMounted(()=>{s(),p.onActivated(()=>{var O;(O=v.value)==null||O.loadData()})}),(O,C)=>{const G=ie.InputSearch,K=ie.Tree,J=ie.Empty,R=zm,k=ie.Button,B=ie.Space,Z=bE,ee=ie.Switch,ce=p.resolveComponent("a-table-ex"),Be=p.resolveComponent("wl-splitter"),me=p.resolveDirective("permission");return p.openBlock(),p.createBlock(Be,{bordered:!1},{left:p.withCtx(()=>[p.createElementVNode("div",kI,[p.createElementVNode("div",BI,p.toDisplayString(O.$t("bpmn.list_title")),1),p.createElementVNode("div",jI,[p.createVNode(G,{value:p.unref(n),"onUpdate:value":C[0]||(C[0]=de=>p.isRef(n)?n.value=de:null),placeholder:O.$t("bpmn.type_placeholder"),onSearch:s},null,8,["value","placeholder"])]),p.createVNode(R,{class:"tree-wrapper"},{default:p.withCtx(()=>{var de;return[(de=p.unref(o))!=null&&de.length?(p.openBlock(),p.createBlock(K,{key:0,expandedKeys:p.unref(r),"onUpdate:expandedKeys":C[1]||(C[1]=Se=>p.isRef(r)?r.value=Se:null),selectedKeys:p.unref(i),"tree-data":p.unref(o),showLine:!0,onSelect:d},null,8,["expandedKeys","selectedKeys","tree-data"])):(p.openBlock(),p.createBlock(J,{key:1,imageStyle:{height:"64px"}}))]}),_:1})])]),right:p.withCtx(()=>[p.createVNode(B,{class:"ml-lg my-nm"},{default:p.withCtx(()=>[p.withDirectives((p.openBlock(),p.createBlock(k,{type:"primary",onClick:S},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.$t("bpmn.add_workflow")),1)]),_:1})),[[me,"002"]])]),_:1}),p.createVNode(ce,{ref_key:"tableEx",ref:v,class:"table-query bordered mx-lg",columns:p.unref(f),scroll:{x:1100},loadData:h},{bodyCell:p.withCtx(({column:de,record:Se,text:je})=>[de.dataIndex==="used"?(p.openBlock(),p.createBlock(Z,{key:0,type:"BPMN_USED",value:je},null,8,["value"])):p.createCommentVNode("",!0),de.dataIndex==="status"?(p.openBlock(),p.createBlock(ee,{key:1,checked:je,checkedValue:"0",unCheckedValue:"1",disabled:!p.unref(bs.hasPermission)("006"),onChange:he=>x(Se,he)},null,8,["checked","disabled","onChange"])):p.createCommentVNode("",!0),de.key==="action"?(p.openBlock(),p.createElementBlock("div",FI,[p.withDirectives((p.openBlock(),p.createBlock(k,{type:"link",onClick:he=>b(Se)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.$t("common.btn_edit")),1)]),_:2},1032,["onClick"])),[[me,"003"]]),p.withDirectives((p.openBlock(),p.createBlock(k,{type:"link",onClick:he=>A(Se)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.$t("common.btn_del")),1)]),_:2},1032,["onClick"])),[[me,"004"]]),p.withDirectives((p.openBlock(),p.createBlock(k,{type:"link",onClick:he=>E(Se)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.$t("wo_my.btn_detail")),1)]),_:2},1032,["onClick"])),[[me,"005"]]),p.withDirectives((p.openBlock(),p.createBlock(k,{type:"link",onClick:he=>N(Se)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(O.$t("bpmn.btn_clone")),1)]),_:2},1032,["onClick"])),[[me,"002"]])])):p.createCommentVNode("",!0)]),_:1},8,["columns"])]),_:1})}}}),[["__scopeId","data-v-8a3cde47"]]);var fl,qe,Vm,Wi,Xm,Gm,Ym,Km,Md,Dd,Pd,ba={},qm=[],HI=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xa=Array.isArray;function ei(t,e){for(var n in e)t[n]=e[n];return t}function Rd(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Te(t,e,n){var r,i,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?fl.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]==null&&(a[o]=t.defaultProps[o]);return pl(t,a,r,i,null)}function pl(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Vm,__i:-1,__u:0};return i==null&&qe.vnode!=null&&qe.vnode(o),o}function hl(){return{current:null}}function wo(t){return t.children}function Qe(t,e){this.props=t,this.context=e}function So(t,e){if(e==null)return t.__?So(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?So(t):null}function Zm(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Zm(t)}}function Jm(t){(!t.__d&&(t.__d=!0)&&Wi.push(t)&&!gl.__r++||Xm!=qe.debounceRendering)&&((Xm=qe.debounceRendering)||Gm)(gl)}function gl(){for(var t,e,n,r,i,o,a,s=1;Wi.length;)Wi.length>s&&Wi.sort(Ym),t=Wi.shift(),s=Wi.length,t.__d&&(n=void 0,i=(r=(e=t).__v).__e,o=[],a=[],e.__P&&((n=ei({},r)).__v=r.__v+1,qe.vnode&&qe.vnode(n),Ld(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??So(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,ry(o,n,a),n.__e!=i&&Zm(n)));gl.__r=0}function Qm(t,e,n,r,i,o,a,s,l,u,c){var d,f,h,v,g,m,y=r&&r.__k||qm,x=e.length;for(l=zI(n,e,y,l,x),d=0;d<x;d++)(h=n.__k[d])!=null&&(f=h.__i==-1?ba:y[h.__i]||ba,h.__i=d,m=Ld(t,h,f,i,o,a,s,l,u,c),v=h.__e,h.ref&&f.ref!=h.ref&&(f.ref&&Id(f.ref,null,h),c.push(h.ref,h.__c||v,h)),g==null&&v!=null&&(g=v),4&h.__u||f.__k===h.__k?l=ey(h,l,t):typeof h.type=="function"&&m!==void 0?l=m:v&&(l=v.nextSibling),h.__u&=-7);return n.__e=g,l}function zI(t,e,n,r,i){var o,a,s,l,u,c=n.length,d=c,f=0;for(t.__k=new Array(i),o=0;o<i;o++)(a=e[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(l=o+f,(a=t.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?pl(null,a,null,null,null):xa(a)?pl(wo,{children:a},null,null,null):a.constructor==null&&a.__b>0?pl(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,s=null,(u=a.__i=WI(a,n,l,d))!=-1&&(d--,(s=n[u])&&(s.__u|=2)),s==null||s.__v==null?(u==-1&&(i>c?f--:i<c&&f++),typeof a.type!="function"&&(a.__u|=4)):u!=l&&(u==l-1?f--:u==l+1?f++:(u>l?f--:f++,a.__u|=4))):t.__k[o]=null;if(d)for(o=0;o<c;o++)(s=n[o])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=So(s)),oy(s,s));return r}function ey(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=ey(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=So(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function vl(t,e){return e=e||[],t==null||typeof t=="boolean"||(xa(t)?t.some(function(n){vl(n,e)}):e.push(t)),e}function WI(t,e,n,r){var i,o,a=t.key,s=t.type,l=e[n];if(l===null&&t.key==null||l&&a==l.key&&s==l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((l=e[i])&&(2&l.__u)==0&&a==l.key&&s==l.type)return i;i--}if(o<e.length){if((l=e[o])&&(2&l.__u)==0&&a==l.key&&s==l.type)return o;o++}}return-1}function ty(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||HI.test(e)?n:n+"px"}function ml(t,e,n,r,i){var o;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ty(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||ty(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Km,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Md,t.addEventListener(e,o?Pd:Dd,o)):t.removeEventListener(e,o?Pd:Dd,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function ny(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Md++;else if(e.t<n.u)return;return n(qe.event?qe.event(e):e)}}}function Ld(t,e,n,r,i,o,a,s,l,u){var c,d,f,h,v,g,m,y,x,S,b,N,A,E,O,C,G,K=e.type;if(e.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[s=e.__e=n.__e]),(c=qe.__b)&&c(e);e:if(typeof K=="function")try{if(y=e.props,x="prototype"in K&&K.prototype.render,S=(c=K.contextType)&&r[c.__c],b=c?S?S.props.value:c.__:r,n.__c?m=(d=e.__c=n.__c).__=d.__E:(x?e.__c=d=new K(y,b):(e.__c=d=new Qe(y,b),d.constructor=K,d.render=VI),S&&S.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),x&&d.__s==null&&(d.__s=d.state),x&&K.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=ei({},d.__s)),ei(d.__s,K.getDerivedStateFromProps(y,d.__s))),h=d.props,v=d.state,d.__v=e,f)x&&K.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),x&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(x&&K.getDerivedStateFromProps==null&&y!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(y,b),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(y,d.__s,b)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(d.props=y,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(J){J&&(J.__=e)}),N=0;N<d._sb.length;N++)d.__h.push(d._sb[N]);d._sb=[],d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(y,d.__s,b),x&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,v,g)})}if(d.context=b,d.props=y,d.__P=t,d.__e=!1,A=qe.__r,E=0,x){for(d.state=d.__s,d.__d=!1,A&&A(e),c=d.render(d.props,d.state,d.context),O=0;O<d._sb.length;O++)d.__h.push(d._sb[O]);d._sb=[]}else do d.__d=!1,A&&A(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++E<25);d.state=d.__s,d.getChildContext!=null&&(r=ei(ei({},r),d.getChildContext())),x&&!f&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(h,v)),C=c,c!=null&&c.type===wo&&c.key==null&&(C=iy(c.props.children)),s=Qm(t,xa(C)?C:[C],e,n,r,i,o,a,s,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&a.push(d),m&&(d.__E=d.__=null)}catch(J){if(e.__v=null,l||o!=null)if(J.then){for(e.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,e.__e=s}else for(G=o.length;G--;)Rd(o[G]);else e.__e=n.__e,e.__k=n.__k;qe.__e(J,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):s=e.__e=UI(n.__e,e,n,r,i,o,a,l,u);return(c=qe.diffed)&&c(e),128&e.__u?void 0:s}function ry(t,e,n){for(var r=0;r<n.length;r++)Id(n[r],n[++r],n[++r]);qe.__c&&qe.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){qe.__e(o,i.__v)}})}function iy(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:xa(t)?t.map(iy):ei({},t)}function UI(t,e,n,r,i,o,a,s,l){var u,c,d,f,h,v,g,m=n.props,y=e.props,x=e.type;if(x=="svg"?i="http://www.w3.org/2000/svg":x=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((h=o[u])&&"setAttribute"in h==!!x&&(x?h.localName==x:h.nodeType==3)){t=h,o[u]=null;break}}if(t==null){if(x==null)return document.createTextNode(y);t=document.createElementNS(i,x,y.is&&y),s&&(qe.__m&&qe.__m(e,o),s=!1),o=null}if(x==null)m===y||s&&t.data==y||(t.data=y);else{if(o=o&&fl.call(t.childNodes),m=n.props||ba,!s&&o!=null)for(m={},u=0;u<t.attributes.length;u++)m[(h=t.attributes[u]).name]=h.value;for(u in m)if(h=m[u],u!="children"){if(u=="dangerouslySetInnerHTML")d=h;else if(!(u in y)){if(u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y)continue;ml(t,u,null,h,i)}}for(u in y)h=y[u],u=="children"?f=h:u=="dangerouslySetInnerHTML"?c=h:u=="value"?v=h:u=="checked"?g=h:s&&typeof h!="function"||m[u]===h||ml(t,u,h,m[u],i);if(c)s||d&&(c.__html==d.__html||c.__html==t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(d&&(t.innerHTML=""),Qm(e.type=="template"?t.content:t,xa(f)?f:[f],e,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:n.__k&&So(n,0),s,l),o!=null)for(u=o.length;u--;)Rd(o[u]);s||(u="value",x=="progress"&&v==null?t.removeAttribute("value"):v!=null&&(v!==t[u]||x=="progress"&&!v||x=="option"&&v!=m[u])&&ml(t,u,v,m[u],i),u="checked",g!=null&&g!=t[u]&&ml(t,u,g,m[u],i))}return t}function Id(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){qe.__e(i,n)}}function oy(t,e,n){var r,i;if(qe.unmount&&qe.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||Id(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){qe.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&oy(r[i],e,n||typeof t.type!="function");n||Rd(t.__e),t.__c=t.__=t.__e=void 0}function VI(t,e,n){return this.constructor(t,n)}function XI(t,e,n){var r,i,o,a;e==document&&(e=document.documentElement),qe.__&&qe.__(t,e),i=(r=!1)?null:e.__k,o=[],a=[],Ld(e,t=e.__k=Te(wo,null,[t]),i||ba,ba,e.namespaceURI,i?null:e.firstChild?fl.call(e.childNodes):null,o,i?i.__e:e.firstChild,r,a),ry(o,t,a)}fl=qm.slice,qe={__e:function(t,e,n,r){for(var i,o,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(s){t=s}throw t}},Vm=0,Qe.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ei({},this.state),typeof t=="function"&&(t=t(ei({},n),this.props)),t&&ei(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Jm(this))},Qe.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Jm(this))},Qe.prototype.render=wo,Wi=[],Gm=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ym=function(t,e){return t.__v.__b-e.__v.__b},gl.__r=0,Km=/(PointerCapture)$|Capture$/i,Md=0,Dd=ny(!1),Pd=ny(!0);var GI="An invariant failed, however the error is obfuscated because this is a production build.",yl=[];Object.freeze(yl);var kd={};Object.freeze(kd);function On(){return++pe.mobxGuid}function He(t){throw Mt(!1,t),"X"}function Mt(t,e){if(!t)throw new Error("[mobx] "+(e||GI))}var ay=[];function YI(t,e){return process.env.NODE_ENV==="production"||ay.indexOf(t)!==-1?!1:(ay.push(t),console.error("[mobx] Deprecated: "+t),!0)}function Bd(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var _l=function(){};function KI(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function jd(t){return t!==null&&typeof t=="object"}function Ui(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function qI(t){if(Ao(t)||gn(t))return t;if(Array.isArray(t))return new Map(t);if(Ui(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return He("Cannot convert to map from '"+t+"'")}function Co(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function ZI(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function sy(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!n||n.configurable!==!1&&n.writable!==!1}function JI(t,e){process.env.NODE_ENV!=="production"&&!sy(t,e)&&He("Cannot make property '"+e.toString()+"' observable, it is not configurable and writable in the target object")}function yi(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(r){return jd(r)&&r[n]===!0}}function Ao(t){return t instanceof Map}function Ea(t){return t instanceof Set}function Fd(t){var e=new Set;for(var n in t)e.add(n);return Object.getOwnPropertySymbols(t).forEach(function(r){Object.getOwnPropertyDescriptor(t,r).enumerable&&e.add(r)}),Array.from(e)}function Jn(t){return t&&t.toString?t.toString():new String(t).toString()}function ly(t){return t===null?null:typeof t=="object"?""+t:t}var QI=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ke=Symbol("mobx administration"),Oo=function(){function t(e){e===void 0&&(e="Atom@"+On()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=vt.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.reportObserved=function(){return Ey(this)},t.prototype.reportChanged=function(){gr(),Sk(this),vr()},t.prototype.toString=function(){return this.name},t}(),$d=yi("Atom",Oo);function Hd(t,e,n){e===void 0&&(e=_l),n===void 0&&(n=_l);var r=new Oo(t);return e!==_l&&Fk(r,e),n!==_l&&My(r,n),r}function ek(t,e){return Yy(t,e)}function tk(t,e){return Object.is(t,e)}var To={structural:ek,default:tk};/*! *****************************************************************************
|
|
33
33
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
34
34
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
35
35
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -94,7 +94,7 @@ The dependencies for this derivation are:
|
|
|
94
94
|
* Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
|
|
95
95
|
* Released under the ISC license.
|
|
96
96
|
*/var fp=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},pp=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Hu=function(){function t(e,n){var r=[],i=!0,o=!1,a=void 0;try{for(var s=e[Symbol.iterator](),l;!(i=(l=s.next()).done)&&(r.push(l.value),!(n&&r.length===n));i=!0);}catch(u){o=!0,a=u}finally{try{!i&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();String.prototype.startsWith=String.prototype.startsWith||function(t){return this.indexOf(t)===0},String.prototype.padStart=String.prototype.padStart||function(t,e){for(var n=this;n.length<t;)n=e+n;return n};var XF={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function H0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return n||"0"}var GF=function(){function t(e,n,r,i){fp(this,t);var o=this;function a(l){if(l.startsWith("hsl")){var u=l.match(/([\-\d\.e]+)/g).map(Number),c=Hu(u,4),d=c[0],f=c[1],h=c[2],v=c[3];v===void 0&&(v=1),d/=360,f/=100,h/=100,o.hsla=[d,f,h,v]}else if(l.startsWith("rgb")){var g=l.match(/([\-\d\.e]+)/g).map(Number),m=Hu(g,4),y=m[0],x=m[1],S=m[2],b=m[3];b===void 0&&(b=1),o.rgba=[y,x,S,b]}else l.startsWith("#")?o.rgba=t.hexToRgb(l):o.rgba=t.nameToRgb(l)||t.hexToRgb(l)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(r===void 0){var s=e&&""+e;s&&a(s.toLowerCase())}else this.rgba=[e,n,r,i===void 0?1:i]}return pp(t,[{key:"printRGB",value:function(n){var r=n?this.rgba:this.rgba.slice(0,3),i=r.map(function(o,a){return H0(o,a===3?3:0)});return n?"rgba("+i+")":"rgb("+i+")"}},{key:"printHSL",value:function(n){var r=[360,100,100,1],i=["","%","%",""],o=n?this.hsla:this.hsla.slice(0,3),a=o.map(function(s,l){return H0(s*r[l],l===3?3:1)+i[l]});return n?"hsla("+a+")":"hsl("+a+")"}},{key:"printHex",value:function(n){var r=this.hex;return n?r:r.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){n.length===3&&(n[3]=1),this._rgba=n,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(n){n.length===3&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba,r=n.map(function(i,o){return o<3?i.toString(16):Math.round(i*255).toString(16)});return"#"+r.map(function(i){return i.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var r=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!r.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=r.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(o){return parseInt(o,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var r=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=XF[r];return i===void 0?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var r=Hu(n,4),i=r[0],o=r[1],a=r[2],s=r[3];i/=255,o/=255,a/=255;var l=Math.max(i,o,a),u=Math.min(i,o,a),c=void 0,d=void 0,f=(l+u)/2;if(l===u)c=d=0;else{var h=l-u;switch(d=f>.5?h/(2-l-u):h/(l+u),l){case i:c=(o-a)/h+(o<a?6:0);break;case o:c=(a-i)/h+2;break;case a:c=(i-o)/h+4;break}c/=6}return[c,d,f,s]}},{key:"hslToRgb",value:function(n){var r=Hu(n,4),i=r[0],o=r[1],a=r[2],s=r[3],l=void 0,u=void 0,c=void 0;if(o===0)l=u=c=a;else{var d=function(m,y,x){return x<0&&(x+=1),x>1&&(x-=1),x<.16666666666666666?m+(y-m)*6*x:x<.5?y:x<.6666666666666666?m+(y-m)*(.6666666666666666-x)*6:m},f=a<.5?a*(1+o):a+o-a*o,h=2*a-f;l=d(h,f,i+1/3),u=d(h,f,i),c=d(h,f,i-1/3)}var v=[l*255,u*255,c*255].map(Math.round);return v[3]=s,v}}]),t}(),YF=function(){function t(){fp(this,t),this._events=[]}return pp(t,[{key:"add",value:function(n,r,i){n.addEventListener(r,i,!1),this._events.push({target:n,type:r,handler:i})}},{key:"remove",value:function(n,r,i){this._events=this._events.filter(function(o){var a=!0;return n&&n!==o.target&&(a=!1),r&&r!==o.type&&(a=!1),i&&i!==o.handler&&(a=!1),a&&t._doRemove(o.target,o.type,o.handler),!a})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,r,i){n.removeEventListener(r,i,!1)}}]),t}();function KF(t){var e=document.createElement("div");return e.innerHTML=t,e.firstElementChild}function hp(t,e,n){var r=!1;function i(l,u,c){return Math.max(u,Math.min(l,c))}function o(l,u,c){if(c&&(r=!0),!!r){l.preventDefault();var d=e.getBoundingClientRect(),f=d.width,h=d.height,v=u.clientX,g=u.clientY,m=i(v-d.left,0,f),y=i(g-d.top,0,h);n(m/f,y/h)}}function a(l,u){var c=l.buttons===void 0?l.which:l.buttons;c===1?o(l,l,u):r=!1}function s(l,u){l.touches.length===1?o(l,l.touches[0],u):r=!1}t.add(e,"mousedown",function(l){a(l,!0)}),t.add(e,"touchstart",function(l){s(l,!0)}),t.add(window,"mousemove",a),t.add(e,"touchmove",s),t.add(window,"mouseup",function(l){r=!1}),t.add(e,"touchend",function(l){r=!1}),t.add(e,"touchcancel",function(l){r=!1})}var qF=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,
|
|
97
|
-
linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,ZF=360,z0="keydown",zu="mousedown",gp="focusin";function zr(t,e){return(e||document).querySelector(t)}function JF(t){t.preventDefault(),t.stopPropagation()}function vp(t,e,n,r,i){t.add(e,z0,function(o){n.indexOf(o.key)>=0&&r(o)})}var W0=function(){function t(e){fp(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new YF,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return pp(t,[{key:"setOptions",value:function(n){var r=this;if(!n)return;var i=this.settings;function o(u,c,d){for(var f in u)c[f]=u[f]}if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),o(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var a=n.color||n.colour;a&&this._setColor(a)}var s=i.parent;if(s&&i.popup&&!this._popupInited){var l=function(c){return r.openHandler(c)};this._events.add(s,"click",l),vp(this._events,s,[" ","Spacebar","Enter"],l),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var r=n&&n.type===z0?this._domEdit:this.domElement;setTimeout(function(){return r.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var r=n&&n.type,i=!1;if(!n)i=!0;else if(r===zu||r===gp){var o=(this.__containedEvent||0)+100;n.timeStamp>o&&(i=!0)}else JF(n),i=!0;i&&this.hide()&&(this.settings.parent.style.pointerEvents="",r!==zu&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,r){this.closeHandler(),this.setOptions(n),r&&this.openHandler()}},{key:"setColor",value:function(n,r){this._setColor(n,{silent:r})}},{key:"_setColor",value:function(n,r){if(typeof n=="string"&&(n=n.trim()),!!n){r=r||{};var i=void 0;try{i=new GF(n)}catch(a){if(r.failSilently)return;throw a}if(!this.settings.alpha){var o=i.hsla;o[3]=1,i.hsla=o}this.colour=this.color=i,this._setHSLA(null,null,null,null,r)}}},{key:"setColour",value:function(n,r){this.setColor(n,r)}},{key:"show",value:function(){var n=this.settings.parent;if(!n)return!1;if(this.domElement){var r=this._toggleDOM(!0);return this._setPosition(),r}var i=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',o=KF(i);return this.domElement=o,this._domH=zr(".picker_hue",o),this._domSL=zr(".picker_sl",o),this._domA=zr(".picker_alpha",o),this._domEdit=zr(".picker_editor input",o),this._domSample=zr(".picker_sample",o),this._domOkay=zr(".picker_done button",o),this._domCancel=zr(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,r=this,i=this.domElement,o=this._events;function a(u,c,d){o.add(u,c,d)}a(i,"click",function(u){return u.preventDefault()}),hp(o,this._domH,function(u,c){return r._setHSLA(u)}),hp(o,this._domSL,function(u,c){return r._setHSLA(null,u,1-c)}),this.settings.alpha&&hp(o,this._domA,function(u,c){return r._setHSLA(null,null,null,1-c)});var s=this._domEdit;a(s,"input",function(u){r._setColor(this.value,{fromEditor:!0,failSilently:!0})}),a(s,"focus",function(u){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var u=function(f){return n.closeHandler(f)};a(window,zu,u),a(window,gp,u),vp(o,i,["Esc","Escape"],u);var c=function(f){n.__containedEvent=f.timeStamp};a(i,zu,c),a(i,gp,c),a(n._domCancel,"click",u)});var l=function(c){n._ifPopup(function(){return n.closeHandler(c)}),n.onDone&&n.onDone(n.colour)};a(this._domOkay,"click",l),vp(o,i,["Enter"],l)}},{key:"_setPosition",value:function(){var n=this.settings.parent,r=this.domElement;n!==r.parentNode&&n.appendChild(r),this._ifPopup(function(i){getComputedStyle(n).position==="static"&&(n.style.position="relative");var o=i===!0?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(a){a===o?r.classList.add(a):r.classList.remove(a)}),r.classList.add(o)})}},{key:"_setHSLA",value:function(n,r,i,o,a){a=a||{};var s=this.colour,l=s.hsla;[n,r,i,o].forEach(function(u,c){(u||u===0)&&(l[c]=u)}),s.hsla=l,this._updateUI(a),this.onChange&&!a.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(!this.domElement)return;n=n||{};var r=this.colour,i=r.hsla,o="hsl("+i[0]*ZF+", 100%, 50%)",a=r.hslString,s=r.hslaString,l=this._domH,u=this._domSL,c=this._domA,d=zr(".picker_selector",l),f=zr(".picker_selector",u),h=zr(".picker_selector",c);function v(A,E,O){E.style.left=O*100+"%"}function g(A,E,O){E.style.top=O*100+"%"}v(l,d,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=o,v(u,f,i[1]),g(u,f,1-i[2]),u.style.color=a,g(c,h,1-i[3]);var m=a,y=m.replace("hsl","hsla").replace(")",", 0)"),x="linear-gradient("+[m,y]+")";if(this._domA.style.background=x+", "+qF,!n.fromEditor){var S=this.settings.editorFormat,b=this.settings.alpha,N=void 0;switch(S){case"rgb":N=r.printRGB(b);break;case"hsl":N=r.printHSL(b);break;default:N=r.printHex(b)}this._domEdit.value=N}this._domSample.style.color=s}},{key:"_ifPopup",value:function(n,r){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):r&&r()}},{key:"_toggleDOM",value:function(n){var r=this.domElement;if(!r)return!1;var i=n?"":"none",o=r.style.display!==i;return o&&(r.style.display=i),o}}]),t}();{var mp=document.createElement("style");mp.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(mp),W0.StyleElement=mp}var yp={exports:{}},U0;function V0(){return U0||(U0=1,function(t,e){(function(n,r){t.exports=n()})(function(){var n="object",r="function",i="undefined",o=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],a=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],s=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],l=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"];function u($,w){var _=typeof $[w];return _==r||!!(_==n&&$[w])||_=="unknown"}function c($,w){return!!(typeof $[w]==n&&$[w])}function d($,w){return typeof $[w]!=i}function f($){return function(w,_){for(var F=_.length;F--;)if(!$(w,_[F]))return!1;return!0}}var h=f(u),v=f(c),g=f(d);function m($){return $&&h($,l)&&g($,s)}function y($){return c($,"body")?$.body:$.getElementsByTagName("body")[0]}var x=[].forEach?function($,w){$.forEach(w)}:function($,w){for(var _=0,F=$.length;_<F;++_)w($[_],_)},S={},b=typeof window!=i&&typeof document!=i,N={isHostMethod:u,isHostObject:c,isHostProperty:d,areHostMethods:h,areHostObjects:v,areHostProperties:g,isTextRange:m,getBody:y,forEach:x},A={version:"1.3.2",initialized:!1,isBrowser:b,supported:!0,util:N,features:{},modules:S,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==i?!0:rangyAutoInitialize}};function E($){typeof console!=i&&u(console,"log")&&console.log($)}function O($,w){b&&w?alert($):E($)}function C($){A.initialized=!0,A.supported=!1,O("Rangy is not supported in this environment. Reason: "+$,A.config.alertOnFail)}A.fail=C;function G($){O("Rangy warning: "+$,A.config.alertOnWarn)}A.warn=G;var K;({}).hasOwnProperty?(N.extend=K=function($,w,_){var F,L;for(var se in w)se==="__proto__"||se==="constructor"||se==="prototype"||w.hasOwnProperty(se)&&(F=$[se],L=w[se],_&&F!==null&&typeof F=="object"&&L!==null&&typeof L=="object"&&K(F,L,!0),$[se]=L);return w.hasOwnProperty("toString")&&($.toString=w.toString),$},N.createOptions=function($,w){var _={};return K(_,w),$&&K(_,$),_}):C("hasOwnProperty not supported"),b||C("Rangy can only run in a browser"),function(){var $;if(b){var w=document.createElement("div");w.appendChild(document.createElement("span"));var _=[].slice;try{_.call(w.childNodes,0)[0].nodeType==1&&($=function(F){return _.call(F,0)})}catch{}}$||($=function(F){for(var L=[],se=0,fe=F.length;se<fe;++se)L[se]=F[se];return L}),N.toArray=$}();var J;b&&(u(document,"addEventListener")?J=function($,w,_){$.addEventListener(w,_,!1)}:u(document,"attachEvent")?J=function($,w,_){$.attachEvent("on"+w,_)}:C("Document does not have required addEventListener or attachEvent method"),N.addListener=J);var R=[];function k($){return $.message||$.description||String($)}function B(){if(!(!b||A.initialized)){var $,w=!1,_=!1;u(document,"createRange")&&($=document.createRange(),h($,a)&&g($,o)&&(w=!0));var F=y(document);if(!F||F.nodeName.toLowerCase()!="body"){C("No body element found");return}if(F&&u(F,"createTextRange")&&($=F.createTextRange(),m($)&&(_=!0)),!w&&!_){C("Neither Range nor TextRange are available");return}A.initialized=!0,A.features={implementsDomRange:w,implementsTextRange:_};var L,se;for(var fe in S)(L=S[fe])instanceof me&&L.init(L,A);for(var Ne=0,ze=R.length;Ne<ze;++Ne)try{R[Ne](A)}catch(rt){se="Rangy init listener threw an exception. Continuing. Detail: "+k(rt),E(se)}}}function Z($,w,_){_&&($+=" in module "+_.name),A.warn("DEPRECATED: "+$+" is deprecated. Please use "+w+" instead.")}function ee($,w,_,F){$[w]=function(){return Z(w,_,F),$[_].apply($,N.toArray(arguments))}}N.deprecationNotice=Z,N.createAliasForDeprecatedMethod=ee,A.init=B,A.addInitListener=function($){A.initialized?$(A):R.push($)};var ce=[];A.addShimListener=function($){ce.push($)};function Be($){$=$||window,B();for(var w=0,_=ce.length;w<_;++w)ce[w]($)}b&&(A.shim=A.createMissingNativeApi=Be,ee(A,"createMissingNativeApi","shim"));function me($,w,_){this.name=$,this.dependencies=w,this.initialized=!1,this.supported=!1,this.initializer=_}me.prototype={init:function(){for(var $=this.dependencies||[],w=0,_=$.length,F,L;w<_;++w){if(L=$[w],F=S[L],!F||!(F instanceof me))throw new Error("required module '"+L+"' not found");if(F.init(),!F.supported)throw new Error("required module '"+L+"' not supported")}this.initializer(this)},fail:function($){throw this.initialized=!0,this.supported=!1,new Error($)},warn:function($){A.warn("Module "+this.name+": "+$)},deprecationNotice:function($,w){A.warn("DEPRECATED: "+$+" in module "+this.name+" is deprecated. Please use "+w+" instead")},createError:function($){return new Error("Error in Rangy "+this.name+" module: "+$)}};function de($,w,_){var F=new me($,w,function(L){if(!L.initialized){L.initialized=!0;try{_(A,L),L.supported=!0}catch(fe){var se="Module '"+$+"' failed to load: "+k(fe);E(se),fe.stack&&E(fe.stack)}}});return S[$]=F,F}A.createModule=function($){var w,_;arguments.length==2?(w=arguments[1],_=[]):(w=arguments[2],_=arguments[1]);var F=de($,_,w);A.initialized&&A.supported&&F.init()},A.createCoreModule=function($,w,_){de($,w,_)};function Se(){}A.RangePrototype=Se,A.rangePrototype=new Se;function je(){}A.selectionPrototype=new je,A.createCoreModule("DomUtil",[],function($,w){var _="undefined",F=$.util,L=F.getBody;F.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||w.fail("document missing a Node creation method"),F.isHostMethod(document,"getElementsByTagName")||w.fail("document missing getElementsByTagName method");var se=document.createElement("div");F.areHostMethods(se,["insertBefore","appendChild","cloneNode"])||w.fail("Incomplete Element implementation"),F.isHostProperty(se,"innerHTML")||w.fail("Element is missing innerHTML property");var fe=document.createTextNode("test");F.areHostMethods(fe,["splitText","deleteData","insertData","appendData","cloneNode"])||w.fail("Incomplete Text Node implementation");var Ne=function(Y,ue){for(var Xe=Y.length;Xe--;)if(Y[Xe]===ue)return!0;return!1};function ze(Y){var ue;return typeof Y.namespaceURI==_||(ue=Y.namespaceURI)===null||ue=="http://www.w3.org/1999/xhtml"}function rt(Y){var ue=Y.parentNode;return ue.nodeType==1?ue:null}function Ze(Y){for(var ue=0;Y=Y.previousSibling;)++ue;return ue}function at(Y){switch(Y.nodeType){case 7:case 10:return 0;case 3:case 8:return Y.length;default:return Y.childNodes.length}}function Ct(Y,ue){var Xe=[],Me;for(Me=Y;Me;Me=Me.parentNode)Xe.push(Me);for(Me=ue;Me;Me=Me.parentNode)if(Ne(Xe,Me))return Me;return null}function P(Y,ue,Xe){for(var Me=Xe?ue:ue.parentNode;Me;){if(Me===Y)return!0;Me=Me.parentNode}return!1}function I(Y,ue){return P(Y,ue,!0)}function j(Y,ue,Xe){for(var Me,Dt=Xe?Y:Y.parentNode;Dt;){if(Me=Dt.parentNode,Me===ue)return Dt;Dt=Me}return null}function q(Y){var ue=Y.nodeType;return ue==3||ue==4||ue==8}function H(Y){if(!Y)return!1;var ue=Y.nodeType;return ue==3||ue==8}function re(Y,ue){var Xe=ue.nextSibling,Me=ue.parentNode;return Xe?Me.insertBefore(Y,Xe):Me.appendChild(Y),Y}function te(Y,ue,Xe){var Me=Y.cloneNode(!1);if(Me.deleteData(0,ue),Y.deleteData(ue,Y.length-ue),re(Me,Y),Xe)for(var Dt=0,yt;yt=Xe[Dt++];)yt.node==Y&&yt.offset>ue?(yt.node=Me,yt.offset-=ue):yt.node==Y.parentNode&&yt.offset>Ze(Y)&&++yt.offset;return Me}function oe(Y){if(Y.nodeType==9)return Y;if(typeof Y.ownerDocument!=_)return Y.ownerDocument;if(typeof Y.document!=_)return Y.document;if(Y.parentNode)return oe(Y.parentNode);throw w.createError("getDocument: no document found for node")}function Le(Y){var ue=oe(Y);if(typeof ue.defaultView!=_)return ue.defaultView;if(typeof ue.parentWindow!=_)return ue.parentWindow;throw w.createError("Cannot get a window object for node")}function we(Y){if(typeof Y.contentDocument!=_)return Y.contentDocument;if(typeof Y.contentWindow!=_)return Y.contentWindow.document;throw w.createError("getIframeDocument: No Document object found for iframe element")}function ge(Y){if(typeof Y.contentWindow!=_)return Y.contentWindow;if(typeof Y.contentDocument!=_)return Y.contentDocument.defaultView;throw w.createError("getIframeWindow: No Window object found for iframe element")}function st(Y){return Y&&F.isHostMethod(Y,"setTimeout")&&F.isHostObject(Y,"document")}function et(Y,ue,Xe){var Me;if(Y?F.isHostProperty(Y,"nodeType")?Me=Y.nodeType==1&&Y.tagName.toLowerCase()=="iframe"?we(Y):oe(Y):st(Y)&&(Me=Y.document):Me=document,!Me)throw ue.createError(Xe+"(): Parameter must be a Window object or DOM node");return Me}function nt(Y){for(var ue;ue=Y.parentNode;)Y=ue;return Y}function en(Y,ue,Xe,Me){var Dt,yt,Tr,Un,xn;if(Y==Xe)return ue===Me?0:ue<Me?-1:1;if(Dt=j(Xe,Y,!0))return ue<=Ze(Dt)?-1:1;if(Dt=j(Y,Xe,!0))return Ze(Dt)<Me?-1:1;if(yt=Ct(Y,Xe),!yt)throw new Error("comparePoints error: nodes have no common ancestor");if(Tr=Y===yt?yt:j(Y,yt,!0),Un=Xe===yt?yt:j(Xe,yt,!0),Tr===Un)throw w.createError("comparePoints got to case 4 and childA and childB are the same!");for(xn=yt.firstChild;xn;){if(xn===Tr)return-1;if(xn===Un)return 1;xn=xn.nextSibling}}var ve=!1;function Ae(Y){var ue;try{return ue=Y.parentNode,!1}catch{return!0}}(function(){var Y=document.createElement("b");Y.innerHTML="1";var ue=Y.firstChild;Y.innerHTML="<br />",ve=Ae(ue),$.features.crashyTextNodes=ve})();function dt(Y){if(!Y)return"[No node]";if(ve&&Ae(Y))return"[Broken node]";if(q(Y))return'"'+Y.data+'"';if(Y.nodeType==1){var ue=Y.id?' id="'+Y.id+'"':"";return"<"+Y.nodeName+ue+">[index:"+Ze(Y)+",length:"+Y.childNodes.length+"]["+(Y.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return Y.nodeName}function wt(Y){for(var ue=oe(Y).createDocumentFragment(),Xe;Xe=Y.firstChild;)ue.appendChild(Xe);return ue}var Ft;typeof window.getComputedStyle!=_?Ft=function(Y,ue){return Le(Y).getComputedStyle(Y,null)[ue]}:typeof document.documentElement.currentStyle!=_?Ft=function(Y,ue){return Y.currentStyle?Y.currentStyle[ue]:""}:w.fail("No means of obtaining computed style properties found");function Wn(Y,ue,Xe){var Me=L(Y),Dt=Y.createElement("div");Dt.contentEditable=""+!!Xe,ue&&(Dt.innerHTML=ue);var yt=Me.firstChild;return yt?Me.insertBefore(Dt,yt):Me.appendChild(Dt),Dt}function bn(Y){return Y.parentNode.removeChild(Y)}function tn(Y){this.root=Y,this._next=Y}tn.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var Y=this._current=this._next,ue,Xe;if(this._current)if(ue=Y.firstChild,ue)this._next=ue;else{for(Xe=null;Y!==this.root&&!(Xe=Y.nextSibling);)Y=Y.parentNode;this._next=Xe}return this._current},detach:function(){this._current=this._next=this.root=null}};function nn(Y){return new tn(Y)}function cn(Y,ue){this.node=Y,this.offset=ue}cn.prototype={equals:function(Y){return!!Y&&this.node===Y.node&&this.offset==Y.offset},inspect:function(){return"[DomPosition("+dt(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}};function Nn(Y){this.code=this[Y],this.codeName=Y,this.message="DOMException: "+this.codeName}Nn.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},Nn.prototype.toString=function(){return this.message},$.dom={arrayContains:Ne,isHtmlNamespace:ze,parentElement:rt,getNodeIndex:Ze,getNodeLength:at,getCommonAncestor:Ct,isAncestorOf:P,isOrIsAncestorOf:I,getClosestAncestorIn:j,isCharacterDataNode:q,isTextOrCommentNode:H,insertAfter:re,splitDataNode:te,getDocument:oe,getWindow:Le,getIframeWindow:ge,getIframeDocument:we,getBody:L,isWindow:st,getContentDocument:et,getRootContainer:nt,comparePoints:en,isBrokenNode:Ae,inspectNode:dt,getComputedStyleProperty:Ft,createTestElement:Wn,removeNode:bn,fragmentFromNodeChildren:wt,createIterator:nn,DomPosition:cn},$.DOMException=Nn}),A.createCoreModule("DomRange",["DomUtil"],function($,w){var _=$.dom,F=$.util,L=_.DomPosition,se=$.DOMException,fe=_.isCharacterDataNode,Ne=_.getNodeIndex,ze=_.isOrIsAncestorOf,rt=_.getDocument,Ze=_.comparePoints,at=_.splitDataNode,Ct=_.getClosestAncestorIn,P=_.getNodeLength,I=_.arrayContains,j=_.getRootContainer,q=$.features.crashyTextNodes,H=_.removeNode;function re(D,z){return D.nodeType!=3&&(ze(D,z.startContainer)||ze(D,z.endContainer))}function te(D){return D.document||rt(D.startContainer)}function oe(D){return j(D.startContainer)}function Le(D){return new L(D.parentNode,Ne(D))}function we(D){return new L(D.parentNode,Ne(D)+1)}function ge(D,z,Q){var le=D.nodeType==11?D.firstChild:D;return fe(z)?Q==z.length?_.insertAfter(D,z):z.parentNode.insertBefore(D,Q==0?z:at(z,Q)):Q>=z.childNodes.length?z.appendChild(D):z.insertBefore(D,z.childNodes[Q]),le}function st(D,z,Q){if(xt(D),xt(z),te(z)!=te(D))throw new se("WRONG_DOCUMENT_ERR");var le=Ze(D.startContainer,D.startOffset,z.endContainer,z.endOffset),Oe=Ze(D.endContainer,D.endOffset,z.startContainer,z.startOffset);return Q?le<=0&&Oe>=0:le<0&&Oe>0}function et(D){for(var z,Q,le=te(D.range).createDocumentFragment(),Oe;Q=D.next();){if(z=D.isPartiallySelectedSubtree(),Q=Q.cloneNode(!z),z&&(Oe=D.getSubtreeIterator(),Q.appendChild(et(Oe)),Oe.detach()),Q.nodeType==10)throw new se("HIERARCHY_REQUEST_ERR");le.appendChild(Q)}return le}function nt(D,z,Q){var le,Oe;Q=Q||{stop:!1};for(var it,ae;it=D.next();)if(D.isPartiallySelectedSubtree()){if(z(it)===!1){Q.stop=!0;return}else if(ae=D.getSubtreeIterator(),nt(ae,z,Q),ae.detach(),Q.stop)return}else for(le=_.createIterator(it);Oe=le.next();)if(z(Oe)===!1){Q.stop=!0;return}}function en(D){for(var z;D.next();)D.isPartiallySelectedSubtree()?(z=D.getSubtreeIterator(),en(z),z.detach()):D.remove()}function ve(D){for(var z,Q=te(D.range).createDocumentFragment(),le;z=D.next();){if(D.isPartiallySelectedSubtree()?(z=z.cloneNode(!1),le=D.getSubtreeIterator(),z.appendChild(ve(le)),le.detach()):D.remove(),z.nodeType==10)throw new se("HIERARCHY_REQUEST_ERR");Q.appendChild(z)}return Q}function Ae(D,z,Q){var le=!!(z&&z.length),Oe,it=!!Q;le&&(Oe=new RegExp("^("+z.join("|")+")$"));var ae=[];return nt(new wt(D,!1),function(Ee){if(!(le&&!Oe.test(Ee.nodeType))&&!(it&&!Q(Ee))){var Ie=D.startContainer;if(!(Ee==Ie&&fe(Ie)&&D.startOffset==Ie.length)){var tt=D.endContainer;Ee==tt&&fe(tt)&&D.endOffset==0||ae.push(Ee)}}}),ae}function dt(D){var z=typeof D.getName>"u"?"Range":D.getName();return"["+z+"("+_.inspectNode(D.startContainer)+":"+D.startOffset+", "+_.inspectNode(D.endContainer)+":"+D.endOffset+")]"}function wt(D,z){if(this.range=D,this.clonePartiallySelectedTextNodes=z,!D.collapsed){this.sc=D.startContainer,this.so=D.startOffset,this.ec=D.endContainer,this.eo=D.endOffset;var Q=D.commonAncestorContainer;this.sc===this.ec&&fe(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc===Q&&!fe(this.sc)?this.sc.childNodes[this.so]:Ct(this.sc,Q,!0),this._last=this.ec===Q&&!fe(this.ec)?this.ec.childNodes[this.eo-1]:Ct(this.ec,Q,!0))}}wt.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var D=this._current=this._next;return D&&(this._next=D!==this._last?D.nextSibling:null,fe(D)&&this.clonePartiallySelectedTextNodes&&(D===this.ec&&(D=D.cloneNode(!0)).deleteData(this.eo,D.length-this.eo),this._current===this.sc&&(D=D.cloneNode(!0)).deleteData(0,this.so))),D},remove:function(){var D=this._current,z,Q;fe(D)&&(D===this.sc||D===this.ec)?(z=D===this.sc?this.so:0,Q=D===this.ec?this.eo:D.length,z!=Q&&D.deleteData(z,Q-z)):D.parentNode&&H(D)},isPartiallySelectedSubtree:function(){var D=this._current;return re(D,this.range)},getSubtreeIterator:function(){var D;if(this.isSingleCharacterDataNode)D=this.range.cloneRange(),D.collapse(!1);else{D=new $t(te(this.range));var z=this._current,Q=z,le=0,Oe=z,it=P(z);ze(z,this.sc)&&(Q=this.sc,le=this.so),ze(z,this.ec)&&(Oe=this.ec,it=this.eo),ft(D,Q,le,Oe,it)}return new wt(D,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var Ft=[1,3,4,5,7,8,10],Wn=[2,9,11],bn=[5,6,10,12],tn=[1,3,4,5,7,8,10,11],nn=[1,3,4,5,7,8];function cn(D){return function(z,Q){for(var le,Oe=Q?z:z.parentNode;Oe;){if(le=Oe.nodeType,I(D,le))return Oe;Oe=Oe.parentNode}return null}}var Nn=cn([9,11]),Y=cn(bn),ue=cn([6,10,12]),Xe=cn([1]);function Me(D,z){if(ue(D,z))throw new se("INVALID_NODE_TYPE_ERR")}function Dt(D,z){if(!I(z,D.nodeType))throw new se("INVALID_NODE_TYPE_ERR")}function yt(D,z){if(z<0||z>(fe(D)?D.length:D.childNodes.length))throw new se("INDEX_SIZE_ERR")}function Tr(D,z){if(Nn(D,!0)!==Nn(z,!0))throw new se("WRONG_DOCUMENT_ERR")}function Un(D){if(Y(D,!0))throw new se("NO_MODIFICATION_ALLOWED_ERR")}function xn(D,z){if(!D)throw new se(z)}function gs(D,z){return z<=(fe(D)?D.length:D.childNodes.length)}function io(D){return!!D.startContainer&&!!D.endContainer&&!(q&&(_.isBrokenNode(D.startContainer)||_.isBrokenNode(D.endContainer)))&&j(D.startContainer)==j(D.endContainer)&&gs(D.startContainer,D.startOffset)&&gs(D.endContainer,D.endOffset)}function xt(D){if(!io(D))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+D.inspect()+")")}var vs=document.createElement("style"),oi=!1;try{vs.innerHTML="<b>x</b>",oi=vs.firstChild.nodeType==3}catch{}$.features.htmlParsingConforms=oi;var ms=oi?function(D){var z=this.startContainer,Q=rt(z);if(!z)throw new se("INVALID_STATE_ERR");var le=null;return z.nodeType==1?le=z:fe(z)&&(le=_.parentElement(z)),le===null||le.nodeName=="HTML"&&_.isHtmlNamespace(rt(le).documentElement)&&_.isHtmlNamespace(le)?le=Q.createElement("body"):le=le.cloneNode(!1),le.innerHTML=D,_.fragmentFromNodeChildren(le)}:function(D){var z=te(this),Q=z.createElement("body");return Q.innerHTML=D,_.fragmentFromNodeChildren(Q)};function Qo(D,z){xt(D);var Q=D.startContainer,le=D.startOffset,Oe=D.endContainer,it=D.endOffset,ae=Q===Oe;fe(Oe)&&it>0&&it<Oe.length&&at(Oe,it,z),fe(Q)&&le>0&&le<Q.length&&(Q=at(Q,le,z),ae?(it-=le,Oe=Q):Oe==Q.parentNode&&it>=Ne(Q)&&it++,le=0),D.setStartAndEnd(Q,le,Oe,it)}function Ge(D){xt(D);var z=D.commonAncestorContainer.parentNode.cloneNode(!1);return z.appendChild(D.cloneContents()),z.innerHTML}var ea=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ta=0,oo=1,Qu=2,Pi=3,ao=0,ys=1,_s=2,na=3;F.extend($.rangePrototype,{compareBoundaryPoints:function(D,z){xt(this),Tr(this.startContainer,z.startContainer);var Q,le,Oe,it,ae=D==Pi||D==ta?"start":"end",Ee=D==oo||D==ta?"start":"end";return Q=this[ae+"Container"],le=this[ae+"Offset"],Oe=z[Ee+"Container"],it=z[Ee+"Offset"],Ze(Q,le,Oe,it)},insertNode:function(D){if(xt(this),Dt(D,tn),Un(this.startContainer),ze(D,this.startContainer))throw new se("HIERARCHY_REQUEST_ERR");var z=ge(D,this.startContainer,this.startOffset);this.setStartBefore(z)},cloneContents:function(){xt(this);var D,z;if(this.collapsed)return te(this).createDocumentFragment();if(this.startContainer===this.endContainer&&fe(this.startContainer))return D=this.startContainer.cloneNode(!0),D.data=D.data.slice(this.startOffset,this.endOffset),z=te(this).createDocumentFragment(),z.appendChild(D),z;var Q=new wt(this,!0);return D=et(Q),Q.detach(),D},canSurroundContents:function(){xt(this),Un(this.startContainer),Un(this.endContainer);var D=new wt(this,!0),z=D._first&&re(D._first,this)||D._last&&re(D._last,this);return D.detach(),!z},surroundContents:function(D){if(Dt(D,nn),!this.canSurroundContents())throw new se("INVALID_STATE_ERR");var z=this.extractContents();if(D.hasChildNodes())for(;D.lastChild;)D.removeChild(D.lastChild);ge(D,this.startContainer,this.startOffset),D.appendChild(z),this.selectNode(D)},cloneRange:function(){xt(this);for(var D=new $t(te(this)),z=ea.length,Q;z--;)Q=ea[z],D[Q]=this[Q];return D},toString:function(){xt(this);var D=this.startContainer;if(D===this.endContainer&&fe(D))return D.nodeType==3||D.nodeType==4?D.data.slice(this.startOffset,this.endOffset):"";var z=[],Q=new wt(this,!0);return nt(Q,function(le){(le.nodeType==3||le.nodeType==4)&&z.push(le.data)}),Q.detach(),z.join("")},compareNode:function(D){xt(this);var z=D.parentNode,Q=Ne(D);if(!z)throw new se("NOT_FOUND_ERR");var le=this.comparePoint(z,Q),Oe=this.comparePoint(z,Q+1);return le<0?Oe>0?_s:ao:Oe>0?ys:na},comparePoint:function(D,z){return xt(this),xn(D,"HIERARCHY_REQUEST_ERR"),Tr(D,this.startContainer),Ze(D,z,this.startContainer,this.startOffset)<0?-1:Ze(D,z,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ms,toHtml:function(){return Ge(this)},intersectsNode:function(D,z){if(xt(this),j(D)!=oe(this))return!1;var Q=D.parentNode,le=Ne(D);if(!Q)return!0;var Oe=Ze(Q,le,this.endContainer,this.endOffset),it=Ze(Q,le+1,this.startContainer,this.startOffset);return z?Oe<=0&&it>=0:Oe<0&&it>0},isPointInRange:function(D,z){return xt(this),xn(D,"HIERARCHY_REQUEST_ERR"),Tr(D,this.startContainer),Ze(D,z,this.startContainer,this.startOffset)>=0&&Ze(D,z,this.endContainer,this.endOffset)<=0},intersectsRange:function(D){return st(this,D,!1)},intersectsOrTouchesRange:function(D){return st(this,D,!0)},intersection:function(D){if(this.intersectsRange(D)){var z=Ze(this.startContainer,this.startOffset,D.startContainer,D.startOffset),Q=Ze(this.endContainer,this.endOffset,D.endContainer,D.endOffset),le=this.cloneRange();return z==-1&&le.setStart(D.startContainer,D.startOffset),Q==1&&le.setEnd(D.endContainer,D.endOffset),le}return null},union:function(D){if(this.intersectsOrTouchesRange(D)){var z=this.cloneRange();return Ze(D.startContainer,D.startOffset,this.startContainer,this.startOffset)==-1&&z.setStart(D.startContainer,D.startOffset),Ze(D.endContainer,D.endOffset,this.endContainer,this.endOffset)==1&&z.setEnd(D.endContainer,D.endOffset),z}else throw new se("Ranges do not intersect")},containsNode:function(D,z){return z?this.intersectsNode(D,!1):this.compareNode(D)==na},containsNodeContents:function(D){return this.comparePoint(D,0)>=0&&this.comparePoint(D,P(D))<=0},containsRange:function(D){var z=this.intersection(D);return z!==null&&D.equals(z)},containsNodeText:function(D){var z=this.cloneRange();z.selectNode(D);var Q=z.getNodes([3]);if(Q.length>0){z.setStart(Q[0],0);var le=Q.pop();return z.setEnd(le,le.length),this.containsRange(z)}else return this.containsNodeContents(D)},getNodes:function(D,z){return xt(this),Ae(this,D,z)},getDocument:function(){return te(this)},collapseBefore:function(D){this.setEndBefore(D),this.collapse(!1)},collapseAfter:function(D){this.setStartAfter(D),this.collapse(!0)},getBookmark:function(D){var z=te(this),Q=$.createRange(z);D=D||_.getBody(z),Q.selectNodeContents(D);var le=this.intersection(Q),Oe=0,it=0;return le&&(Q.setEnd(le.startContainer,le.startOffset),Oe=Q.toString().length,it=Oe+le.toString().length),{start:Oe,end:it,containerNode:D}},moveToBookmark:function(D){var z=D.containerNode,Q=0;this.setStart(z,0),this.collapse(!0);for(var le=[z],Oe,it=!1,ae=!1,Ee,Ie,tt;!ae&&(Oe=le.pop());)if(Oe.nodeType==3)Ee=Q+Oe.length,!it&&D.start>=Q&&D.start<=Ee&&(this.setStart(Oe,D.start-Q),it=!0),it&&D.end>=Q&&D.end<=Ee&&(this.setEnd(Oe,D.end-Q),ae=!0),Q=Ee;else for(tt=Oe.childNodes,Ie=tt.length;Ie--;)le.push(tt[Ie])},getName:function(){return"DomRange"},equals:function(D){return $t.rangesEqual(this,D)},isValid:function(){return io(this)},inspect:function(){return dt(this)},detach:function(){}});function M(D){D.START_TO_START=ta,D.START_TO_END=oo,D.END_TO_END=Qu,D.END_TO_START=Pi,D.NODE_BEFORE=ao,D.NODE_AFTER=ys,D.NODE_BEFORE_AND_AFTER=_s,D.NODE_INSIDE=na}function W(D){M(D),M(D.prototype)}function ne(D,z){return function(){xt(this);var Q=this.startContainer,le=this.startOffset,Oe=this.commonAncestorContainer,it=new wt(this,!0),ae,Ee;Q!==Oe&&(ae=Ct(Q,Oe,!0),Ee=we(ae),Q=Ee.node,le=Ee.offset),nt(it,Un),it.reset();var Ie=D(it);return it.detach(),z(this,Q,le,Q,le),Ie}}function ye(D,z){function Q(ae,Ee){return function(Ie){Dt(Ie,Ft),Dt(j(Ie),Wn);var tt=(ae?Le:we)(Ie);(Ee?le:Oe)(this,tt.node,tt.offset)}}function le(ae,Ee,Ie){var tt=ae.endContainer,En=ae.endOffset;(Ee!==ae.startContainer||Ie!==ae.startOffset)&&((j(Ee)!=j(tt)||Ze(Ee,Ie,tt,En)==1)&&(tt=Ee,En=Ie),z(ae,Ee,Ie,tt,En))}function Oe(ae,Ee,Ie){var tt=ae.startContainer,En=ae.startOffset;(Ee!==ae.endContainer||Ie!==ae.endOffset)&&((j(Ee)!=j(tt)||Ze(Ee,Ie,tt,En)==-1)&&(tt=Ee,En=Ie),z(ae,tt,En,Ee,Ie))}var it=function(){};it.prototype=$.rangePrototype,D.prototype=new it,F.extend(D.prototype,{setStart:function(ae,Ee){Me(ae,!0),yt(ae,Ee),le(this,ae,Ee)},setEnd:function(ae,Ee){Me(ae,!0),yt(ae,Ee),Oe(this,ae,Ee)},setStartAndEnd:function(){var ae=arguments,Ee=ae[0],Ie=ae[1],tt=Ee,En=Ie;switch(ae.length){case 3:En=ae[2];break;case 4:tt=ae[2],En=ae[3];break}Me(Ee,!0),yt(Ee,Ie),Me(tt,!0),yt(tt,En),z(this,Ee,Ie,tt,En)},setBoundary:function(ae,Ee,Ie){this["set"+(Ie?"Start":"End")](ae,Ee)},setStartBefore:Q(!0,!0),setStartAfter:Q(!1,!0),setEndBefore:Q(!0,!1),setEndAfter:Q(!1,!1),collapse:function(ae){xt(this),ae?z(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):z(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(ae){Me(ae,!0),z(this,ae,0,ae,P(ae))},selectNode:function(ae){Me(ae,!1),Dt(ae,Ft);var Ee=Le(ae),Ie=we(ae);z(this,Ee.node,Ee.offset,Ie.node,Ie.offset)},extractContents:ne(ve,z),deleteContents:ne(en,z),canSurroundContents:function(){xt(this),Un(this.startContainer),Un(this.endContainer);var ae=new wt(this,!0),Ee=ae._first&&re(ae._first,this)||ae._last&&re(ae._last,this);return ae.detach(),!Ee},splitBoundaries:function(){Qo(this)},splitBoundariesPreservingPositions:function(ae){Qo(this,ae)},normalizeBoundaries:function(){xt(this);var ae=this.startContainer,Ee=this.startOffset,Ie=this.endContainer,tt=this.endOffset,En=function(Mn){var Wr=Mn.nextSibling;Wr&&Wr.nodeType==Mn.nodeType&&(Ie=Mn,tt=Mn.length,Mn.appendData(Wr.data),H(Wr))},Vx=function(Mn){var Wr=Mn.previousSibling;if(Wr&&Wr.nodeType==Mn.nodeType){ae=Mn;var i9=Mn.length;if(Ee=Wr.length,Mn.insertData(0,Wr.data),H(Wr),ae==Ie)tt+=Ee,Ie=ae;else if(Ie==Mn.parentNode){var Xx=Ne(Mn);tt==Xx?(Ie=Mn,tt=i9):tt>Xx&&tt--}}},Vp=!0,sr;if(fe(Ie))tt==Ie.length?En(Ie):tt==0&&(sr=Ie.previousSibling,sr&&sr.nodeType==Ie.nodeType&&(tt=sr.length,ae==Ie&&(Vp=!1),sr.appendData(Ie.data),H(Ie),Ie=sr));else{if(tt>0){var Xp=Ie.childNodes[tt-1];Xp&&fe(Xp)&&En(Xp)}Vp=!this.collapsed}if(Vp){if(fe(ae))Ee==0?Vx(ae):Ee==ae.length&&(sr=ae.nextSibling,sr&&sr.nodeType==ae.nodeType&&(Ie==sr&&(Ie=ae,tt+=ae.length),ae.appendData(sr.data),H(sr)));else if(Ee<ae.childNodes.length){var Gp=ae.childNodes[Ee];Gp&&fe(Gp)&&Vx(Gp)}}else ae=Ie,Ee=tt;z(this,ae,Ee,Ie,tt)},collapseToPoint:function(ae,Ee){Me(ae,!0),yt(ae,Ee),this.setStartAndEnd(ae,Ee)},parentElement:function(){xt(this);var ae=this.commonAncestorContainer;return ae?Xe(this.commonAncestorContainer,!0):null}}),W(D)}function Fe(D){D.collapsed=D.startContainer===D.endContainer&&D.startOffset===D.endOffset,D.commonAncestorContainer=D.collapsed?D.startContainer:_.getCommonAncestor(D.startContainer,D.endContainer)}function ft(D,z,Q,le,Oe){D.startContainer=z,D.startOffset=Q,D.endContainer=le,D.endOffset=Oe,D.document=_.getDocument(z),Fe(D)}function $t(D){ft(this,D,0,D,0)}ye($t,ft),F.extend($t,{rangeProperties:ea,RangeIterator:wt,copyComparisonConstants:W,createPrototypeRange:ye,inspect:dt,toHtml:Ge,getRangeDocument:te,rangesEqual:function(D,z){return D.startContainer===z.startContainer&&D.startOffset===z.startOffset&&D.endContainer===z.endContainer&&D.endOffset===z.endOffset}}),$.DomRange=$t}),A.createCoreModule("WrappedRange",["DomRange"],function($,w){var _,F,L=$.dom,se=$.util,fe=L.DomPosition,Ne=$.DomRange,ze=L.getBody,rt=L.getContentDocument,Ze=L.isCharacterDataNode;if($.features.implementsDomRange&&function(){var H,re=Ne.rangeProperties;function te(ve){for(var Ae=re.length,dt;Ae--;)dt=re[Ae],ve[dt]=ve.nativeRange[dt];ve.collapsed=ve.startContainer===ve.endContainer&&ve.startOffset===ve.endOffset}function oe(ve,Ae,dt,wt,Ft){var Wn=ve.startContainer!==Ae||ve.startOffset!=dt,bn=ve.endContainer!==wt||ve.endOffset!=Ft,tn=!ve.equals(ve.nativeRange);(Wn||bn||tn)&&(ve.setEnd(wt,Ft),ve.setStart(Ae,dt))}var Le;_=function(ve){if(!ve)throw w.createError("WrappedRange: Range must be specified");this.nativeRange=ve,te(this)},Ne.createPrototypeRange(_,oe),H=_.prototype,H.selectNode=function(ve){this.nativeRange.selectNode(ve),te(this)},H.cloneContents=function(){return this.nativeRange.cloneContents()},H.surroundContents=function(ve){this.nativeRange.surroundContents(ve),te(this)},H.collapse=function(ve){this.nativeRange.collapse(ve),te(this)},H.cloneRange=function(){return new _(this.nativeRange.cloneRange())},H.refresh=function(){te(this)},H.toString=function(){return this.nativeRange.toString()};var we=document.createTextNode("test");ze(document).appendChild(we);var ge=document.createRange();ge.setStart(we,0),ge.setEnd(we,0);try{ge.setStart(we,1),H.setStart=function(ve,Ae){this.nativeRange.setStart(ve,Ae),te(this)},H.setEnd=function(ve,Ae){this.nativeRange.setEnd(ve,Ae),te(this)},Le=function(ve){return function(Ae){this.nativeRange[ve](Ae),te(this)}}}catch{H.setStart=function(Ae,dt){try{this.nativeRange.setStart(Ae,dt)}catch{this.nativeRange.setEnd(Ae,dt),this.nativeRange.setStart(Ae,dt)}te(this)},H.setEnd=function(Ae,dt){try{this.nativeRange.setEnd(Ae,dt)}catch{this.nativeRange.setStart(Ae,dt),this.nativeRange.setEnd(Ae,dt)}te(this)},Le=function(Ae,dt){return function(wt){try{this.nativeRange[Ae](wt)}catch{this.nativeRange[dt](wt),this.nativeRange[Ae](wt)}te(this)}}}H.setStartBefore=Le("setStartBefore","setEndBefore"),H.setStartAfter=Le("setStartAfter","setEndAfter"),H.setEndBefore=Le("setEndBefore","setStartBefore"),H.setEndAfter=Le("setEndAfter","setStartAfter"),H.selectNodeContents=function(ve){this.setStartAndEnd(ve,0,L.getNodeLength(ve))},ge.selectNodeContents(we),ge.setEnd(we,3);var st=document.createRange();st.selectNodeContents(we),st.setEnd(we,4),st.setStart(we,2),ge.compareBoundaryPoints(ge.START_TO_END,st)==-1&&ge.compareBoundaryPoints(ge.END_TO_START,st)==1?H.compareBoundaryPoints=function(ve,Ae){return Ae=Ae.nativeRange||Ae,ve==Ae.START_TO_END?ve=Ae.END_TO_START:ve==Ae.END_TO_START&&(ve=Ae.START_TO_END),this.nativeRange.compareBoundaryPoints(ve,Ae)}:H.compareBoundaryPoints=function(ve,Ae){return this.nativeRange.compareBoundaryPoints(ve,Ae.nativeRange||Ae)};var et=document.createElement("div");et.innerHTML="123";var nt=et.firstChild,en=ze(document);en.appendChild(et),ge.setStart(nt,1),ge.setEnd(nt,2),ge.deleteContents(),nt.data=="13"&&(H.deleteContents=function(){this.nativeRange.deleteContents(),te(this)},H.extractContents=function(){var ve=this.nativeRange.extractContents();return te(this),ve}),en.removeChild(et),en=null,se.isHostMethod(ge,"createContextualFragment")&&(H.createContextualFragment=function(ve){return this.nativeRange.createContextualFragment(ve)}),ze(document).removeChild(we),H.getName=function(){return"WrappedRange"},$.WrappedRange=_,$.createNativeRange=function(ve){return ve=rt(ve,w,"createNativeRange"),ve.createRange()}}(),$.features.implementsTextRange){var at=function(H){var re=H.parentElement(),te=H.duplicate();te.collapse(!0);var oe=te.parentElement();te=H.duplicate(),te.collapse(!1);var Le=te.parentElement(),we=oe==Le?oe:L.getCommonAncestor(oe,Le);return we==re?we:L.getCommonAncestor(re,we)},Ct=function(H){return H.compareEndPoints("StartToEnd",H)==0},P=function(H,re,te,oe,Le){var we=H.duplicate();we.collapse(te);var ge=we.parentElement();if(L.isOrIsAncestorOf(re,ge)||(ge=re),!ge.canHaveHTML){var st=new fe(ge.parentNode,L.getNodeIndex(ge));return{boundaryPosition:st,nodeInfo:{nodeIndex:st.offset,containerElement:st.node}}}var et=L.getDocument(ge).createElement("span");et.parentNode&&L.removeNode(et);for(var nt,en=te?"StartToStart":"StartToEnd",ve,Ae,dt,wt,Ft=Le&&Le.containerElement==ge?Le.nodeIndex:0,Wn=ge.childNodes.length,bn=Wn,tn=bn;tn==Wn?ge.appendChild(et):ge.insertBefore(et,ge.childNodes[tn]),we.moveToElementText(et),nt=we.compareEndPoints(en,H),!(nt==0||Ft==bn);){if(nt==-1){if(bn==Ft+1)break;Ft=tn}else bn=bn==Ft+1?Ft:tn;tn=Math.floor((Ft+bn)/2),ge.removeChild(et)}if(wt=et.nextSibling,nt==-1&&wt&&Ze(wt)){we.setEndPoint(te?"EndToStart":"EndToEnd",H);var nn;if(/[\r\n]/.test(wt.data)){var cn=we.duplicate(),Nn=cn.text.replace(/\r\n/g,"\r").length;for(nn=cn.moveStart("character",Nn);(nt=cn.compareEndPoints("StartToEnd",cn))==-1;)nn++,cn.moveStart("character",1)}else nn=we.text.length;dt=new fe(wt,nn)}else ve=(oe||!te)&&et.previousSibling,Ae=(oe||te)&&et.nextSibling,Ae&&Ze(Ae)?dt=new fe(Ae,0):ve&&Ze(ve)?dt=new fe(ve,ve.data.length):dt=new fe(ge,L.getNodeIndex(et));return L.removeNode(et),{boundaryPosition:dt,nodeInfo:{nodeIndex:tn,containerElement:ge}}},I=function(H,re){var te,oe,Le=H.offset,we=L.getDocument(H.node),ge,st,et=ze(we).createTextRange(),nt=Ze(H.node);return nt?(te=H.node,oe=te.parentNode):(st=H.node.childNodes,te=Le<st.length?st[Le]:null,oe=H.node),ge=we.createElement("span"),ge.innerHTML="&#feff;",te?oe.insertBefore(ge,te):oe.appendChild(ge),et.moveToElementText(ge),et.collapse(!re),oe.removeChild(ge),nt&&et[re?"moveStart":"moveEnd"]("character",Le),et};F=function(H){this.textRange=H,this.refresh()},F.prototype=new Ne(document),F.prototype.refresh=function(){var H,re,te,oe=at(this.textRange);Ct(this.textRange)?re=H=P(this.textRange,oe,!0,!0).boundaryPosition:(te=P(this.textRange,oe,!0,!1),H=te.boundaryPosition,re=P(this.textRange,oe,!1,!1,te.nodeInfo).boundaryPosition),this.setStart(H.node,H.offset),this.setEnd(re.node,re.offset)},F.prototype.getName=function(){return"WrappedTextRange"},Ne.copyComparisonConstants(F);var j=function(H){if(H.collapsed)return I(new fe(H.startContainer,H.startOffset),!0);var re=I(new fe(H.startContainer,H.startOffset),!0),te=I(new fe(H.endContainer,H.endOffset),!1),oe=ze(Ne.getRangeDocument(H)).createTextRange();return oe.setEndPoint("StartToStart",re),oe.setEndPoint("EndToEnd",te),oe};if(F.rangeToTextRange=j,F.prototype.toTextRange=function(){return j(this)},$.WrappedTextRange=F,!$.features.implementsDomRange||$.config.preferTextRange){var q=function(H){return H("return this;")()}(Function);typeof q.Range>"u"&&(q.Range=F),$.createNativeRange=function(H){return H=rt(H,w,"createNativeRange"),ze(H).createTextRange()},$.WrappedRange=F}}$.createRange=function(H){return H=rt(H,w,"createRange"),new $.WrappedRange($.createNativeRange(H))},$.createRangyRange=function(H){return H=rt(H,w,"createRangyRange"),new Ne(H)},se.createAliasForDeprecatedMethod($,"createIframeRange","createRange"),se.createAliasForDeprecatedMethod($,"createIframeRangyRange","createRangyRange"),$.addShimListener(function(H){var re=H.document;typeof re.createRange>"u"&&(re.createRange=function(){return $.createRange(re)}),re=H=null})}),A.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function($,w){$.config.checkSelectionRanges=!0;var _="boolean",F="number",L=$.dom,se=$.util,fe=se.isHostMethod,Ne=$.DomRange,ze=$.WrappedRange,rt=$.DOMException,Ze=L.DomPosition,at,Ct,P=$.features,I="Control",j=L.getDocument,q=L.getBody,H=Ne.rangesEqual;function re(M){return typeof M=="string"?/^backward(s)?$/i.test(M):!!M}function te(M,W){if(M){if(L.isWindow(M))return M;if(M instanceof xt)return M.win;var ne=L.getContentDocument(M,w,W);return L.getWindow(ne)}else return window}function oe(M){return te(M,"getWinSelection").getSelection()}function Le(M){return te(M,"getDocSelection").document.selection}function we(M){var W=!1;return M.anchorNode&&(W=L.comparePoints(M.anchorNode,M.anchorOffset,M.focusNode,M.focusOffset)==1),W}var ge=fe(window,"getSelection"),st=se.isHostObject(document,"selection");P.implementsWinGetSelection=ge,P.implementsDocSelection=st;var et=st&&(!ge||$.config.preferTextRange);if(et)at=Le,$.isSelectionValid=function(M){var W=te(M,"isSelectionValid").document,ne=W.selection;return ne.type!="None"||j(ne.createRange().parentElement())==W};else if(ge)at=oe,$.isSelectionValid=function(){return!0};else return w.fail("Neither document.selection or window.getSelection() detected."),!1;$.getNativeSelection=at;var nt=at();if(!nt)return w.fail("Native selection was null (possibly issue 138?)"),!1;var en=$.createNativeRange(document),ve=q(document),Ae=se.areHostProperties(nt,["anchorNode","focusNode","anchorOffset","focusOffset"]);P.selectionHasAnchorAndFocus=Ae;var dt=fe(nt,"extend");P.selectionHasExtend=dt;var wt=fe(nt,"setBaseAndExtent");P.selectionHasSetBaseAndExtent=wt;var Ft=typeof nt.rangeCount==F;P.selectionHasRangeCount=Ft;var Wn=!1,bn=!0,tn=dt?function(M,W){var ne=Ne.getRangeDocument(W),ye=$.createRange(ne);ye.collapseToPoint(W.endContainer,W.endOffset),M.addRange(Me(ye)),M.extend(W.startContainer,W.startOffset)}:null;se.areHostMethods(nt,["addRange","getRangeAt","removeAllRanges"])&&typeof nt.rangeCount==F&&P.implementsDomRange&&function(){var M=window.getSelection();if(M){for(var W=M.rangeCount,ne=W>1,ye=[],Fe=we(M),ft=0;ft<W;++ft)ye[ft]=M.getRangeAt(ft);var $t=L.createTestElement(document,"",!1),D=$t.appendChild(document.createTextNode(" ")),z=document.createRange();if(z.setStart(D,1),z.collapse(!0),M.removeAllRanges(),M.addRange(z),bn=M.rangeCount==1,M.removeAllRanges(),!ne){var Q=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(Q&&parseInt(Q[1])>=36)Wn=!1;else{var le=z.cloneRange();z.setStart(D,0),le.setEnd(D,3),le.setStart(D,2),M.addRange(z),M.addRange(le),Wn=M.rangeCount==2}}for(L.removeNode($t),M.removeAllRanges(),ft=0;ft<W;++ft)ft==0&&Fe?tn?tn(M,ye[ft]):($.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),M.addRange(ye[ft])):M.addRange(ye[ft])}}(),P.selectionSupportsMultipleRanges=Wn,P.collapsedNonEditableSelectionsSupported=bn;var nn=!1,cn;ve&&fe(ve,"createControlRange")&&(cn=ve.createControlRange(),se.areHostProperties(cn,["item","add"])&&(nn=!0)),P.implementsControlRange=nn,Ae?Ct=function(M){return M.anchorNode===M.focusNode&&M.anchorOffset===M.focusOffset}:Ct=function(M){return M.rangeCount?M.getRangeAt(M.rangeCount-1).collapsed:!1};function Nn(M,W,ne){var ye=ne?"end":"start",Fe=ne?"start":"end";M.anchorNode=W[ye+"Container"],M.anchorOffset=W[ye+"Offset"],M.focusNode=W[Fe+"Container"],M.focusOffset=W[Fe+"Offset"]}function Y(M){var W=M.nativeSelection;M.anchorNode=W.anchorNode,M.anchorOffset=W.anchorOffset,M.focusNode=W.focusNode,M.focusOffset=W.focusOffset}function ue(M){M.anchorNode=M.focusNode=null,M.anchorOffset=M.focusOffset=0,M.rangeCount=0,M.isCollapsed=!0,M._ranges.length=0,Xe(M)}function Xe(M){M.type=M.rangeCount==0?"None":Ct(M)?"Caret":"Range"}function Me(M){var W;return M instanceof Ne?(W=$.createNativeRange(M.getDocument()),W.setEnd(M.endContainer,M.endOffset),W.setStart(M.startContainer,M.startOffset)):M instanceof ze?W=M.nativeRange:P.implementsDomRange&&M instanceof L.getWindow(M.startContainer).Range&&(W=M),W}function Dt(M){if(!M.length||M[0].nodeType!=1)return!1;for(var W=1,ne=M.length;W<ne;++W)if(!L.isAncestorOf(M[0],M[W]))return!1;return!0}function yt(M){var W=M.getNodes();if(!Dt(W))throw w.createError("getSingleElementFromRange: range "+M.inspect()+" did not consist of a single element");return W[0]}function Tr(M){return!!M&&typeof M.text<"u"}function Un(M,W){var ne=new ze(W);M._ranges=[ne],Nn(M,ne,!1),M.rangeCount=1,M.isCollapsed=ne.collapsed,Xe(M)}function xn(M){if(M._ranges.length=0,M.docSelection.type=="None")ue(M);else{var W=M.docSelection.createRange();if(Tr(W))Un(M,W);else{M.rangeCount=W.length;for(var ne,ye=j(W.item(0)),Fe=0;Fe<M.rangeCount;++Fe)ne=$.createRange(ye),ne.selectNode(W.item(Fe)),M._ranges.push(ne);M.isCollapsed=M.rangeCount==1&&M._ranges[0].collapsed,Nn(M,M._ranges[M.rangeCount-1],!1),Xe(M)}}}function gs(M,W){for(var ne=M.docSelection.createRange(),ye=yt(W),Fe=j(ne.item(0)),ft=q(Fe).createControlRange(),$t=0,D=ne.length;$t<D;++$t)ft.add(ne.item($t));try{ft.add(ye)}catch{throw w.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}ft.select(),xn(M)}var io;fe(nt,"getRangeAt")?io=function(M,W){try{return M.getRangeAt(W)}catch{return null}}:Ae&&(io=function(M){var W=j(M.anchorNode),ne=$.createRange(W);return ne.setStartAndEnd(M.anchorNode,M.anchorOffset,M.focusNode,M.focusOffset),ne.collapsed!==this.isCollapsed&&ne.setStartAndEnd(M.focusNode,M.focusOffset,M.anchorNode,M.anchorOffset),ne});function xt(M,W,ne){this.nativeSelection=M,this.docSelection=W,this._ranges=[],this.win=ne,this.refresh()}xt.prototype=$.selectionPrototype;function vs(M){M.win=M.anchorNode=M.focusNode=M._ranges=null,M.rangeCount=M.anchorOffset=M.focusOffset=0,M.detached=!0,Xe(M)}var oi=[];function ms(M,W){for(var ne=oi.length,ye,Fe;ne--;)if(ye=oi[ne],Fe=ye.selection,W=="deleteAll")vs(Fe);else if(ye.win==M)return W=="delete"?(oi.splice(ne,1),!0):Fe;return W=="deleteAll"&&(oi.length=0),null}var Qo=function(M){if(M&&M instanceof xt)return M.refresh(),M;M=te(M,"getNativeSelection");var W=ms(M),ne=at(M),ye=st?Le(M):null;return W?(W.nativeSelection=ne,W.docSelection=ye,W.refresh()):(W=new xt(ne,ye,M),oi.push({win:M,selection:W})),W};$.getSelection=Qo,se.createAliasForDeprecatedMethod($,"getIframeSelection","getSelection");var Ge=xt.prototype;function ea(M,W){for(var ne=j(W[0].startContainer),ye=q(ne).createControlRange(),Fe=0,ft,$t=W.length;Fe<$t;++Fe){ft=yt(W[Fe]);try{ye.add(ft)}catch{throw w.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}ye.select(),xn(M)}if(!et&&Ae&&se.areHostMethods(nt,["removeAllRanges","addRange"])){Ge.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),ue(this)};var ta=function(M,W){tn(M.nativeSelection,W),M.refresh()};Ft?Ge.addRange=function(M,W){if(nn&&st&&this.docSelection.type==I)gs(this,M);else if(re(W)&&dt)ta(this,M);else{var ne;Wn?ne=this.rangeCount:(this.removeAllRanges(),ne=0);var ye=Me(M).cloneRange();try{this.nativeSelection.addRange(ye)}catch{}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==ne+1){if($.config.checkSelectionRanges){var Fe=io(this.nativeSelection,this.rangeCount-1);Fe&&!H(Fe,M)&&(M=new ze(Fe))}this._ranges[this.rangeCount-1]=M,Nn(this,M,Pi(this.nativeSelection)),this.isCollapsed=Ct(this),Xe(this)}else this.refresh()}}:Ge.addRange=function(M,W){re(W)&&dt?ta(this,M):(this.nativeSelection.addRange(Me(M)),this.refresh())},Ge.setRanges=function(M){if(nn&&st&&M.length>1)ea(this,M);else{this.removeAllRanges();for(var W=0,ne=M.length;W<ne;++W)this.addRange(M[W])}}}else if(fe(nt,"empty")&&fe(en,"select")&&nn&&et)Ge.removeAllRanges=function(){try{if(this.docSelection.empty(),this.docSelection.type!="None"){var M;if(this.anchorNode)M=j(this.anchorNode);else if(this.docSelection.type==I){var W=this.docSelection.createRange();W.length&&(M=j(W.item(0)))}if(M){var ne=q(M).createTextRange();ne.select(),this.docSelection.empty()}}}catch{}ue(this)},Ge.addRange=function(M){this.docSelection.type==I?gs(this,M):($.WrappedTextRange.rangeToTextRange(M).select(),this._ranges[0]=M,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,Nn(this,M,!1),Xe(this))},Ge.setRanges=function(M){this.removeAllRanges();var W=M.length;W>1?ea(this,M):W&&this.addRange(M[0])};else return w.fail("No means of selecting a Range or TextRange was found"),!1;Ge.getRangeAt=function(M){if(M<0||M>=this.rangeCount)throw new rt("INDEX_SIZE_ERR");return this._ranges[M].cloneRange()};var oo;if(et)oo=function(M){var W;$.isSelectionValid(M.win)?W=M.docSelection.createRange():(W=q(M.win.document).createTextRange(),W.collapse(!0)),M.docSelection.type==I?xn(M):Tr(W)?Un(M,W):ue(M)};else if(fe(nt,"getRangeAt")&&typeof nt.rangeCount==F)oo=function(M){if(nn&&st&&M.docSelection.type==I)xn(M);else if(M._ranges.length=M.rangeCount=M.nativeSelection.rangeCount,M.rangeCount){for(var W=0,ne=M.rangeCount;W<ne;++W)M._ranges[W]=new $.WrappedRange(M.nativeSelection.getRangeAt(W));Nn(M,M._ranges[M.rangeCount-1],Pi(M.nativeSelection)),M.isCollapsed=Ct(M),Xe(M)}else ue(M)};else if(Ae&&typeof nt.isCollapsed==_&&typeof en.collapsed==_&&P.implementsDomRange)oo=function(M){var W,ne=M.nativeSelection;ne.anchorNode?(W=io(ne,0),M._ranges=[W],M.rangeCount=1,Y(M),M.isCollapsed=Ct(M),Xe(M)):ue(M)};else return w.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;Ge.refresh=function(M){var W=M?this._ranges.slice(0):null,ne=this.anchorNode,ye=this.anchorOffset;if(oo(this),M){var Fe=W.length;if(Fe!=this._ranges.length||this.anchorNode!=ne||this.anchorOffset!=ye)return!0;for(;Fe--;)if(!H(W[Fe],this._ranges[Fe]))return!0;return!1}};var Qu=function(M,W){var ne=M.getAllRanges();M.removeAllRanges();for(var ye=0,Fe=ne.length;ye<Fe;++ye)H(W,ne[ye])||M.addRange(ne[ye]);M.rangeCount||ue(M)};nn&&st?Ge.removeRange=function(M){if(this.docSelection.type==I){for(var W=this.docSelection.createRange(),ne=yt(M),ye=j(W.item(0)),Fe=q(ye).createControlRange(),ft,$t=!1,D=0,z=W.length;D<z;++D)ft=W.item(D),ft!==ne||$t?Fe.add(W.item(D)):$t=!0;Fe.select(),xn(this)}else Qu(this,M)}:Ge.removeRange=function(M){Qu(this,M)};var Pi;!et&&Ae&&P.implementsDomRange?(Pi=we,Ge.isBackward=function(){return Pi(this)}):Pi=Ge.isBackward=function(){return!1},Ge.isBackwards=Ge.isBackward,Ge.toString=function(){for(var M=[],W=0,ne=this.rangeCount;W<ne;++W)M[W]=""+this._ranges[W];return M.join("")};function ao(M,W){if(M.win.document!=j(W))throw new rt("WRONG_DOCUMENT_ERR")}function ys(M,W){if(W<0||W>(L.isCharacterDataNode(M)?M.length:M.childNodes.length))throw new rt("INDEX_SIZE_ERR")}Ge.collapse=function(M,W){ao(this,M);var ne=$.createRange(M);ne.collapseToPoint(M,W),this.setSingleRange(ne),this.isCollapsed=!0},Ge.collapseToStart=function(){if(this.rangeCount){var M=this._ranges[0];this.collapse(M.startContainer,M.startOffset)}else throw new rt("INVALID_STATE_ERR")},Ge.collapseToEnd=function(){if(this.rangeCount){var M=this._ranges[this.rangeCount-1];this.collapse(M.endContainer,M.endOffset)}else throw new rt("INVALID_STATE_ERR")},Ge.selectAllChildren=function(M){ao(this,M);var W=$.createRange(M);W.selectNodeContents(M),this.setSingleRange(W)},wt?Ge.setBaseAndExtent=function(M,W,ne,ye){this.nativeSelection.setBaseAndExtent(M,W,ne,ye),this.refresh()}:dt&&(Ge.setBaseAndExtent=function(M,W,ne,ye){ys(M,W),ys(ne,ye),ao(this,M),ao(this,ne);var Fe=$.createRange(node),ft=L.comparePoints(M,W,ne,ye)==-1;ft?Fe.setStartAndEnd(ne,ye,M,W):Fe.setStartAndEnd(M,W,ne,ye),this.setSingleRange(Fe,ft)}),Ge.deleteFromDocument=function(){if(nn&&st&&this.docSelection.type==I){for(var M=this.docSelection.createRange(),W;M.length;)W=M.item(0),M.remove(W),L.removeNode(W);this.refresh()}else if(this.rangeCount){var ne=this.getAllRanges();if(ne.length){this.removeAllRanges();for(var ye=0,Fe=ne.length;ye<Fe;++ye)ne[ye].deleteContents();this.addRange(ne[Fe-1])}}},Ge.eachRange=function(M,W){for(var ne=0,ye=this._ranges.length;ne<ye;++ne)if(M(this.getRangeAt(ne)))return W},Ge.getAllRanges=function(){var M=[];return this.eachRange(function(W){M.push(W)}),M},Ge.setSingleRange=function(M,W){this.removeAllRanges(),this.addRange(M,W)},Ge.callMethodOnEachRange=function(M,W){var ne=[];return this.eachRange(function(ye){ne.push(ye[M].apply(ye,W||[]))}),ne};function _s(M){return function(W,ne){var ye;this.rangeCount?(ye=this.getRangeAt(0),ye["set"+(M?"Start":"End")](W,ne)):(ye=$.createRange(this.win.document),ye.setStartAndEnd(W,ne)),this.setSingleRange(ye,this.isBackward())}}Ge.setStart=_s(!0),Ge.setEnd=_s(!1),$.rangePrototype.select=function(M){Qo(this.getDocument()).setSingleRange(this,M)},Ge.changeEachRange=function(M){var W=[],ne=this.isBackward();this.eachRange(function(ye){M(ye),W.push(ye)}),this.removeAllRanges(),ne&&W.length==1?this.addRange(W[0],"backward"):this.setRanges(W)},Ge.containsNode=function(M,W){return this.eachRange(function(ne){return ne.containsNode(M,W)},!0)||!1},Ge.getBookmark=function(M){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[M])}},Ge.moveToBookmark=function(M){for(var W=[],ne=0,ye,Fe;ye=M.rangeBookmarks[ne++];)Fe=$.createRange(this.win),Fe.moveToBookmark(ye),W.push(Fe);M.backward?this.setSingleRange(W[0],"backward"):this.setRanges(W)},Ge.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},Ge.restoreRanges=function(M){this.removeAllRanges();for(var W=0,ne;ne=M.ranges[W];++W)this.addRange(ne,M.backward&&W==0)},Ge.toHtml=function(){var M=[];return this.eachRange(function(W){M.push(Ne.toHtml(W))}),M.join("")},P.implementsTextRange&&(Ge.getNativeTextRange=function(){var M;if(M=this.docSelection){var W=M.createRange();if(Tr(W))return W;throw w.createError("getNativeTextRange: selection is a control selection")}else{if(this.rangeCount>0)return $.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw w.createError("getNativeTextRange: selection contains no range")}});function na(M){var W=[],ne=new Ze(M.anchorNode,M.anchorOffset),ye=new Ze(M.focusNode,M.focusOffset),Fe=typeof M.getName=="function"?M.getName():"Selection";if(typeof M.rangeCount<"u")for(var ft=0,$t=M.rangeCount;ft<$t;++ft)W[ft]=Ne.inspect(M.getRangeAt(ft));return"["+Fe+"(Ranges: "+W.join(", ")+")(anchor: "+ne.inspect()+", focus: "+ye.inspect()+"]"}Ge.getName=function(){return"WrappedSelection"},Ge.inspect=function(){return na(this)},Ge.detach=function(){ms(this.win,"delete"),vs(this)},xt.detachAll=function(){ms(null,"deleteAll")},xt.inspect=na,xt.isDirectionBackward=re,$.Selection=xt,$.selectionPrototype=Ge,$.addShimListener(function(M){typeof M.getSelection>"u"&&(M.getSelection=function(){return Qo(M)}),M=null})});var he=!1,Ve=function($){he||(he=!0,!A.initialized&&A.config.autoInitialize&&B())};return b&&(document.readyState=="complete"?Ve():(u(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",Ve,!1),J(window,"load",Ve))),A})}(yp)),yp.exports}var QF=V0();const X0=cl(QF);var _p={exports:{}},G0;function e5(){return G0||(G0=1,function(t,e){(function(n,r){t.exports=n(V0())})(function(n){return n.createModule("ClassApplier",["WrappedSelection"],function(r,i){var o=r.dom,a=o.DomPosition,s=o.arrayContains,l=r.util,u=l.forEach,c="span",d=l.isHostMethod(document,"createElementNS");function f(P,I){for(var j in P)if(P.hasOwnProperty(j)&&I(j,P[j])===!1)return!1;return!0}function h(P){return P.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function v(P,I){return!!P&&new RegExp("(?:^|\\s)"+I+"(?:\\s|$)").test(P)}function g(P,I){if(typeof P.classList=="object")return P.classList.contains(I);var j=typeof P.className=="string",q=j?P.className:P.getAttribute("class");return v(q,I)}function m(P,I){if(typeof P.classList=="object")P.classList.add(I);else{var j=typeof P.className=="string",q=j?P.className:P.getAttribute("class");q?v(q,I)||(q+=" "+I):q=I,j?P.className=q:P.setAttribute("class",q)}}var y=function(){function P(I,j,q){return j&&q?" ":""}return function(I,j){if(typeof I.classList=="object")I.classList.remove(j);else{var q=typeof I.className=="string",H=q?I.className:I.getAttribute("class");H=H.replace(new RegExp("(^|\\s)"+j+"(\\s|$)"),P),q?I.className=H:I.setAttribute("class",H)}}}();function x(P){var I=typeof P.className=="string";return I?P.className:P.getAttribute("class")}function S(P){return P&&P.split(/\s+/).sort().join(" ")}function b(P){return S(x(P))}function N(P,I){return b(P)==b(I)}function A(P,I){for(var j=I.split(/\s+/),q=0,H=j.length;q<H;++q)if(!g(P,h(j[q])))return!1;return!0}function E(P){var I=P.parentNode;return I&&I.nodeType==1&&!/^(textarea|style|script|select|iframe)$/i.test(I.nodeName)}function O(P,I,j,q,H){var re=P.node,te=P.offset,oe=re,Le=te;re==q&&te>H&&++Le,re==I&&(te==j||te==j+1)&&(oe=q,Le+=H-j),re==I&&te>j+1&&--Le,P.node=oe,P.offset=Le}function C(P,I,j){P.node==I&&P.offset>j&&--P.offset}function G(P,I,j,q){j==-1&&(j=I.childNodes.length);var H=P.parentNode,re=o.getNodeIndex(P);u(q,function(te){O(te,H,re,I,j)}),I.childNodes.length==j?I.appendChild(P):I.insertBefore(P,I.childNodes[j])}function K(P,I){var j=P.parentNode,q=o.getNodeIndex(P);u(I,function(H){C(H,j,q)}),o.removeNode(P)}function J(P,I,j,q,H){for(var re,te=[];re=P.firstChild;)G(re,I,j++,H),te.push(re);return K(P,H),te}function R(P,I){return J(P,P.parentNode,o.getNodeIndex(P),!0,I)}function k(P,I){var j=P.cloneRange();j.selectNodeContents(I);var q=j.intersection(P),H=q?q.toString():"";return H!=""}function B(P){for(var I=P.getNodes([3]),j=0,q;(q=I[j])&&!k(P,q);)++j;for(var H=I.length-1;(q=I[H])&&!k(P,q);)--H;return I.slice(j,H+1)}function Z(P,I){if(P.attributes.length!=I.attributes.length)return!1;for(var j=0,q=P.attributes.length,H,re,te;j<q;++j)if(H=P.attributes[j],te=H.name,te!="class"&&(re=I.attributes.getNamedItem(te),H===null!=(re===null)||H.specified!=re.specified||H.specified&&H.nodeValue!==re.nodeValue))return!1;return!0}function ee(P,I){for(var j=0,q=P.attributes.length,H;j<q;++j)if(H=P.attributes[j].name,!(I&&s(I,H))&&P.attributes[j].specified&&H!="class")return!0;return!1}var ce=o.getComputedStyleProperty,Be=function(){var P=document.createElement("div");return typeof P.isContentEditable=="boolean"?function(I){return I&&I.nodeType==1&&I.isContentEditable}:function(I){return!I||I.nodeType!=1||I.contentEditable=="false"?!1:I.contentEditable=="true"||Be(I.parentNode)}}();function me(P){var I;return P&&P.nodeType==1&&((I=P.parentNode)&&I.nodeType==9&&I.designMode=="on"||Be(P)&&!Be(P.parentNode))}function de(P){return(Be(P)||P.nodeType!=1&&Be(P.parentNode))&&!me(P)}var Se=/^inline(-block|-table)?$/i;function je(P){return P&&P.nodeType==1&&!Se.test(ce(P,"display"))}var he=/[^\r\n\t\f \u200B]/;function Ve(P){if(P.data.length==0)return!0;if(he.test(P.data))return!1;var I=ce(P.parentNode,"whiteSpace");switch(I){case"pre":case"pre-wrap":case"-moz-pre-wrap":return!1;case"pre-line":if(/[\r\n]/.test(P.data))return!1}return je(P.previousSibling)||je(P.nextSibling)}function $(P){var I=[],j,q;for(j=0;q=P[j++];)I.push(new a(q.startContainer,q.startOffset),new a(q.endContainer,q.endOffset));return I}function w(P,I){for(var j=0,q,H,re,te=P.length;j<te;++j)q=P[j],H=I[j*2],re=I[j*2+1],q.setStartAndEnd(H.node,H.offset,re.node,re.offset)}function _(P,I){return o.isCharacterDataNode(P)?I==0?!!P.previousSibling:I==P.length?!!P.nextSibling:!0:I>0&&I<P.childNodes.length}function F(P,I,j,q){var H,re,te=j==0;if(o.isAncestorOf(I,P))return P;if(o.isCharacterDataNode(I)){var oe=o.getNodeIndex(I);if(j==0)j=oe;else if(j==I.length)j=oe+1;else throw i.createError("splitNodeAt() should not be called with offset in the middle of a data node ("+j+" in "+I.data);I=I.parentNode}if(_(I,j)){H=I.cloneNode(!1),re=I.parentNode,H.id&&H.removeAttribute("id");for(var Le,we=0;Le=I.childNodes[j];)G(Le,H,we++,q);return G(H,re,o.getNodeIndex(I)+1,q),I==P?H:F(P,re,o.getNodeIndex(H),q)}else if(P!=I){H=I.parentNode;var ge=o.getNodeIndex(I);return te||ge++,F(P,H,ge,q)}return P}function L(P,I){return P.namespaceURI==I.namespaceURI&&P.tagName.toLowerCase()==I.tagName.toLowerCase()&&N(P,I)&&Z(P,I)&&ce(P,"display")=="inline"&&ce(I,"display")=="inline"}function se(P){var I=P?"nextSibling":"previousSibling";return function(j,q){var H=j.parentNode,re=j[I];if(re){if(re&&re.nodeType==3)return re}else if(q&&(re=H[I],re&&re.nodeType==1&&L(H,re))){var te=re[P?"firstChild":"lastChild"];if(te&&te.nodeType==3)return te}return null}}var fe=se(!1),Ne=se(!0);function ze(P){this.isElementMerge=P.nodeType==1,this.textNodes=[];var I=this.isElementMerge?P.lastChild:P;I&&(this.textNodes[0]=I)}ze.prototype={doMerge:function(P){var I=this.textNodes,j=I[0];if(I.length>1){var q=o.getNodeIndex(j),H=[],re=0,te;u(I,function(oe,Le){te=oe.parentNode,Le>0&&(te.removeChild(oe),te.hasChildNodes()||o.removeNode(te),P&&u(P,function(we){we.node==oe&&(we.node=j,we.offset+=re),we.node==te&&we.offset>q&&(--we.offset,we.offset==q+1&&Le<I.length-1&&(we.node=j,we.offset=re))})),H[Le]=oe.data,re+=oe.data.length}),j.data=H.join("")}return j.data},getLength:function(){for(var P=this.textNodes.length,I=0;P--;)I+=this.textNodes[P].length;return I},toString:function(){var P=[];return u(this.textNodes,function(I,j){P[j]="'"+I.data+"'"}),"[Merge("+P.join(",")+")]"}};var rt=["elementTagName","ignoreWhiteSpace","applyToEditableOnly","useExistingElements","removeEmptyElements","onElementCreate"],Ze={};function at(P,I,j){var q,H,re,te,oe=this;oe.cssClass=oe.className=P;var Le=null,we={};if(typeof I=="object"&&I!==null){for(typeof I.elementTagName<"u"&&(I.elementTagName=I.elementTagName.toLowerCase()),j=I.tagNames,Le=I.elementProperties,we=I.elementAttributes,H=0;te=rt[H++];)I.hasOwnProperty(te)&&(oe[te]=I[te]);q=I.normalize}else q=I;oe.normalize=typeof q>"u"?!0:q,oe.attrExceptions=[];var ge=document.createElement(oe.elementTagName);oe.elementProperties=oe.copyPropertiesToElement(Le,ge,!0),f(we,function(et,nt){oe.attrExceptions.push(et),we[et]=""+nt}),oe.elementAttributes=we,oe.elementSortedClassName=oe.elementProperties.hasOwnProperty("className")?S(oe.elementProperties.className+" "+P):P,oe.applyToAnyTagName=!1;var st=typeof j;if(st=="string")j=="*"?oe.applyToAnyTagName=!0:oe.tagNames=h(j.toLowerCase()).split(/\s*,\s*/);else if(st=="object"&&typeof j.length=="number")for(oe.tagNames=[],H=0,re=j.length;H<re;++H)j[H]=="*"?oe.applyToAnyTagName=!0:oe.tagNames.push(j[H].toLowerCase());else oe.tagNames=[oe.elementTagName]}at.prototype={elementTagName:c,elementProperties:{},elementAttributes:{},ignoreWhiteSpace:!0,applyToEditableOnly:!1,useExistingElements:!0,removeEmptyElements:!0,onElementCreate:null,copyPropertiesToElement:function(P,I,j){var q,H,re={},te,oe,Le,we;for(var ge in P)if(P.hasOwnProperty(ge))if(oe=P[ge],Le=I[ge],ge=="className")m(I,oe),m(I,this.className),I[ge]=S(I[ge]),j&&(re[ge]=oe);else if(ge=="style"){H=Le,j&&(re[ge]=te={});for(q in P[ge])P[ge].hasOwnProperty(q)&&(H[q]=oe[q],j&&(te[q]=H[q]));this.attrExceptions.push(ge)}else I[ge]=oe,j&&(re[ge]=I[ge],we=Ze.hasOwnProperty(ge)?Ze[ge]:ge,this.attrExceptions.push(we));return j?re:""},copyAttributesToElement:function(P,I){for(var j in P)P.hasOwnProperty(j)&&!/^class(?:Name)?$/i.test(j)&&I.setAttribute(j,P[j])},appliesToElement:function(P){return s(this.tagNames,P.tagName.toLowerCase())},getEmptyElements:function(P){var I=this;return P.getNodes([1],function(j){return I.appliesToElement(j)&&!j.hasChildNodes()})},hasClass:function(P){return P.nodeType==1&&(this.applyToAnyTagName||this.appliesToElement(P))&&g(P,this.className)},getSelfOrAncestorWithClass:function(P){for(;P;){if(this.hasClass(P))return P;P=P.parentNode}return null},isModifiable:function(P){return!this.applyToEditableOnly||de(P)},isIgnorableWhiteSpaceNode:function(P){return this.ignoreWhiteSpace&&P&&P.nodeType==3&&Ve(P)},postApply:function(P,I,j,q){var H=P[0],re=P[P.length-1],te=[],oe,Le=H,we=re,ge=0,st=re.length,et;u(P,function(Ae){et=fe(Ae,!q),et?(oe||(oe=new ze(et),te.push(oe)),oe.textNodes.push(Ae),Ae===H&&(Le=oe.textNodes[0],ge=Le.length),Ae===re&&(we=oe.textNodes[0],st=oe.getLength())):oe=null});var nt=Ne(re,!q);if(nt&&(oe||(oe=new ze(re),te.push(oe)),oe.textNodes.push(nt)),te.length){for(var en=0,ve=te.length;en<ve;++en)te[en].doMerge(j);I.setStartAndEnd(Le,ge,we,st)}},createContainer:function(P){var I=o.getDocument(P),j=d&&!o.isHtmlNamespace(P)&&P.namespaceURI?I.createElementNS(P.namespaceURI,this.elementTagName):I.createElement(this.elementTagName);return this.copyPropertiesToElement(this.elementProperties,j,!1),this.copyAttributesToElement(this.elementAttributes,j),m(j,this.className),this.onElementCreate&&this.onElementCreate(j,this),j},elementHasProperties:function(P,I){var j=this;return f(I,function(q,H){if(q=="className")return A(P,H);if(typeof H=="object"){if(!j.elementHasProperties(P[q],H))return!1}else if(P[q]!==H)return!1})},elementHasAttributes:function(P,I){return f(I,function(j,q){if(P.getAttribute(j)!==q)return!1})},applyToTextNode:function(P,I){if(E(P)){var j=P.parentNode;if(j.childNodes.length==1&&this.useExistingElements&&this.appliesToElement(j)&&this.elementHasProperties(j,this.elementProperties)&&this.elementHasAttributes(j,this.elementAttributes))m(j,this.className);else{var q=P.parentNode,H=this.createContainer(q);q.insertBefore(H,P),H.appendChild(P)}}},isRemovable:function(P){return P.tagName.toLowerCase()==this.elementTagName&&b(P)==this.elementSortedClassName&&this.elementHasProperties(P,this.elementProperties)&&!ee(P,this.attrExceptions)&&this.elementHasAttributes(P,this.elementAttributes)&&this.isModifiable(P)},isEmptyContainer:function(P){var I=P.childNodes.length;return P.nodeType==1&&this.isRemovable(P)&&(I==0||I==1&&this.isEmptyContainer(P.firstChild))},removeEmptyContainers:function(P){var I=this,j=P.getNodes([1],function(re){return I.isEmptyContainer(re)}),q=[P],H=$(q);u(j,function(re){K(re,H)}),w(q,H)},undoToTextNode:function(P,I,j,q){if(!I.containsNode(j)){var H=I.cloneRange();H.selectNode(j),H.isPointInRange(I.endContainer,I.endOffset)&&(F(j,I.endContainer,I.endOffset,q),I.setEndAfter(j)),H.isPointInRange(I.startContainer,I.startOffset)&&(j=F(j,I.startContainer,I.startOffset,q))}this.isRemovable(j)?R(j,q):y(j,this.className)},splitAncestorWithClass:function(P,I,j){var q=this.getSelfOrAncestorWithClass(P);q&&F(q,P,I,j)},undoToAncestor:function(P,I){this.isRemovable(P)?R(P,I):y(P,this.className)},applyToRange:function(P,I){var j=this;I=I||[];var q=$(I||[]);P.splitBoundariesPreservingPositions(q),j.removeEmptyElements&&j.removeEmptyContainers(P);var H=B(P);if(H.length){u(H,function(oe){!j.isIgnorableWhiteSpaceNode(oe)&&!j.getSelfOrAncestorWithClass(oe)&&j.isModifiable(oe)&&j.applyToTextNode(oe,q)});var re=H[H.length-1];P.setStartAndEnd(H[0],0,re,re.length),j.normalize&&j.postApply(H,P,q,!1),w(I,q)}var te=j.getEmptyElements(P);u(te,function(oe){m(oe,j.className)})},applyToRanges:function(P){for(var I=P.length;I--;)this.applyToRange(P[I],P);return P},applyToSelection:function(P){var I=r.getSelection(P);I.setRanges(this.applyToRanges(I.getAllRanges()))},undoToRange:function(P,I){var j=this;I=I||[];var q=$(I);P.splitBoundariesPreservingPositions(q),j.removeEmptyElements&&j.removeEmptyContainers(P,q);var H=B(P),re,te,oe=H[H.length-1];if(H.length){j.splitAncestorWithClass(P.endContainer,P.endOffset,q),j.splitAncestorWithClass(P.startContainer,P.startOffset,q);for(var Le=0,we=H.length;Le<we;++Le)re=H[Le],te=j.getSelfOrAncestorWithClass(re),te&&j.isModifiable(re)&&j.undoToAncestor(te,q);P.setStartAndEnd(H[0],0,oe,oe.length),j.normalize&&j.postApply(H,P,q,!0),w(I,q)}var ge=j.getEmptyElements(P);u(ge,function(st){y(st,j.className)})},undoToRanges:function(P){for(var I=P.length;I--;)this.undoToRange(P[I],P);return P},undoToSelection:function(P){var I=r.getSelection(P),j=r.getSelection(P).getAllRanges();this.undoToRanges(j),I.setRanges(j)},isAppliedToRange:function(P){if(P.collapsed||P.toString()=="")return!!this.getSelfOrAncestorWithClass(P.commonAncestorContainer);var I=P.getNodes([3]);if(I.length){for(var j=0,q;q=I[j++];)if(!this.isIgnorableWhiteSpaceNode(q)&&k(P,q)&&this.isModifiable(q)&&!this.getSelfOrAncestorWithClass(q))return!1}return!0},isAppliedToRanges:function(P){var I=P.length;if(I==0)return!1;for(;I--;)if(!this.isAppliedToRange(P[I]))return!1;return!0},isAppliedToSelection:function(P){var I=r.getSelection(P);return this.isAppliedToRanges(I.getAllRanges())},toggleRange:function(P){this.isAppliedToRange(P)?this.undoToRange(P):this.applyToRange(P)},toggleSelection:function(P){this.isAppliedToSelection(P)?this.undoToSelection(P):this.applyToSelection(P)},getElementsWithClassIntersectingRange:function(P){var I=[],j=this;return P.getNodes([3],function(q){var H=j.getSelfOrAncestorWithClass(q);H&&!s(I,H)&&I.push(H)}),I},detach:function(){}};function Ct(P,I,j){return new at(P,I,j)}at.util={hasClass:g,addClass:m,removeClass:y,getClass:x,hasSameClasses:N,hasAllClasses:A,replaceWithOwnChildren:R,elementsHaveSameNonClassAttributes:Z,elementHasNonClassAttributes:ee,splitNodeAt:F,isEditableElement:Be,isEditingHost:me,isEditable:de},r.CssClassApplier=r.ClassApplier=at,r.createClassApplier=Ct,l.createAliasForDeprecatedMethod(r,"createCssClassApplier","createClassApplier",i)}),n})}(_p)),_p.exports}e5();var Y0={toolbar:{allowMultiParagraphSelection:!0,buttons:["bold","colorpicker","italic","underline","strikethrough","quote","justifyLeft","justifyCenter","justifyRight","justifyFull","superscript","subscript","orderedlist","unorderedlist","pre","removeFormat","outdent","indent","h2","h3"],standardizeSelectionStart:!1,updateOnEmptySelection:!1},placeholder:{text:"请输入内容",hideOnClick:!0},disableEditing:!0};function K0(t){var e,n,r=((e=t==null?void 0:t.extensions)===null||e===void 0?void 0:e.button)||((n=t==null?void 0:t.extensions)===null||n===void 0?void 0:n.button),i=(t==null?void 0:t.Extension)||(t==null?void 0:t.Extension),o=r||i;return o?o.extend({name:"colorpicker",tagNames:["mark"],contentDefault:"<b>Color</b>",aria:"Color Picker",action:"colorPicker",init:function(){var a=this,s,l;try{X0.init()}catch{console.error("rangy.init failed")}try{(l=(s=r==null?void 0:r.prototype)===null||s===void 0?void 0:s.init)===null||l===void 0||l.call(this)}catch{console.error("ButtonBase.init failed")}this.colorPicker=new W0({parent:this.button||void 0,color:"#000",onDone:function(u){var c,d,f,h,v;try{a.coloredText&&(!((d=(c=a.coloredText).isAppliedToSelection)===null||d===void 0)&&d.call(c))&&a.coloredText.undoToSelection(),a.coloredText=X0.createClassApplier("colored",{elementTagName:"span",elementProperties:{style:{color:u.hex}},normalize:!0}),a.coloredText.toggleSelection(),(h=(f=a.base)===null||f===void 0?void 0:f.checkContentChanged)===null||h===void 0||h.call(f),(v=a.setInactive)===null||v===void 0||v.call(a)}catch{console.error("Picker.onDone failed")}}})},getButton:function(){return this.button},handleClick:function(){var a,s,l;(a=this.setActive)===null||a===void 0||a.call(this),(l=(s=this.colorPicker)===null||s===void 0?void 0:s.show)===null||l===void 0||l.call(s)},isAlreadyApplied:function(a){var s,l;return((l=(s=a==null?void 0:a.nodeName)===null||s===void 0?void 0:s.toLowerCase)===null||l===void 0?void 0:l.call(s))==="mark"},isActive:function(){var a,s;return(s=(a=this.button)===null||a===void 0?void 0:a.classList)===null||s===void 0?void 0:s.contains("medium-editor-button-active")},setInactive:function(){var a,s;(s=(a=this.button)===null||a===void 0?void 0:a.classList)===null||s===void 0||s.remove("medium-editor-button-active")},setActive:function(){var a,s;(s=(a=this.button)===null||a===void 0?void 0:a.classList)===null||s===void 0||s.add("medium-editor-button-active")}}):(console.warn("MediumEditor button/extension base not available; using noop extension"),function(){function a(){}return a}())}var t5=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),n5=function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},q0=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Z0=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};(function(t){t5(e,t);function e(n){var r=t.call(this,n)||this;r.labelMap=new Map;var i=n.lf,o=n.graphModel;return r.lf=i,r.graphModel=o,r.state={tick:0},r}return e.prototype.componentDidMount=function(){var n=this,r=this.props.graphModel;this.editor=new $u(".lf-label-editor",zi(Y0,{autoLink:!0,extensions:{colorPicker:new(K0($u))}})),r.eventCenter.on("text:update,node:mousemove,node:resize,node:rotate,node:drag,label:drop,node:drop",function(){}),r.eventCenter.on("node:properties-change,node:properties-delete",function(){n.setState({tick:n.state.tick+1})})},e.prototype.componentDidUpdate=function(){var n;this.editor&&this.editor.elements.length>0?this.editor.addElements(".lf-label-editor"):((n=this.editor)===null||n===void 0||n.destroy(),this.editor=new $u(".lf-label-editor",zi(Y0,{autoLink:!0,extensions:{colorPicker:new(K0($u))}})))},e.prototype.componentWillUnmount=function(){var n;(n=this.editor)===null||n===void 0||n.destroy()},e.prototype.getLabels=function(){var n=this,r=this.props,i=r.lf.extension,o=r.graphModel,a=Z0(Z0([],q0(o.nodes),!1),q0(o.edges),!1),s=i.label;if(s){var l=[];return gt(a,function(u){var c,d,f=u.getData(),h=(d=(c=f.properties)===null||c===void 0?void 0:c._label)!==null&&d!==void 0?d:[];gt(h,function(v){var g=n.labelMap,m=new WF(v,u,o);g.set(m.id,m),l.push(V(HF,{label:m,element:u,graphModel:o},m.id))})}),l}return null},e.prototype.render=function(){return V("foreignObject",{id:"lf-label-overlay",class:"lf-label-overlay",children:this.getLabels()})},e.toolName="label-edit-tool",e=n5([vn],e),e})(Qe);var J0=function(){return J0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},J0.apply(this,arguments)},Q0=function(){return Q0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Q0.apply(this,arguments)},ex=function(){return ex=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ex.apply(this,arguments)},tx=function(){return tx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},tx.apply(this,arguments)},bp=function(){return bp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},bp.apply(this,arguments)},xp=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ep=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Wu="lf:defaultNodeMenu",Uu="lf:defaultEdgeMenu",wp="lf:defaultGraphMenu",Vu="lf:defaultSelectionMenu",Sp={nodeMenu:Wu,edgeMenu:Uu,graphMenu:wp,selectionMenu:Vu},ii={nodeMenu:[],edgeMenu:[],graphMenu:[],selectionMenu:[]},r5=function(){function t(e){var n=e.lf,r=this;this.__currentData=null,this.__isSilentMode=!1,this.lf=n,this.__menuDOM=document.createElement("ul"),this.__isSilentMode=n.graphModel.editConfigModel.isSilentMode,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(i){r.setMenuConfig(i)},this.lf.addMenuConfig=function(i){r.addMenuConfig(i)},this.lf.setMenuByType=function(i){r.setMenuByType(i)},this.lf.changeMenuItemDisableStatus=function(i,o,a){r.changeMenuItemDisableStatus(i,o,a)},this.lf.getMenuConfig=function(i){return r.getMenuConfig(i)},this.lf.resetMenuConfigByType=function(i){r.resetMenuConfigByType(i)}}return t.prototype.init=function(){var e=this,n,r,i;ii.nodeMenu=[{text:"删除",callback:function(o){e.lf.deleteNode(o.id)}},{text:"编辑文本",callback:function(o){e.lf.graphModel.editText(o.id)}},{text:"复制",callback:function(o){e.lf.cloneNode(o.id)}}],(n=this.menuTypeMap)===null||n===void 0||n.set(Wu,ii.nodeMenu),ii.edgeMenu=[{text:"删除",callback:function(o){e.lf.deleteEdge(o.id)}},{text:"编辑文本",callback:function(o){e.lf.graphModel.editText(o.id)}}],(r=this.menuTypeMap)===null||r===void 0||r.set(Uu,ii.edgeMenu),ii.graphMenu=[],ii.selectionMenu=[{text:"删除",callback:function(o){e.lf.clearSelectElements(),o.edges.forEach(function(a){return e.lf.deleteEdge(a.id)}),o.nodes.forEach(function(a){return e.lf.deleteNode(a.id)})}}],(i=this.menuTypeMap)===null||i===void 0||i.set(Vu,ii.selectionMenu)},t.prototype.showMenu=function(e,n,r,i){if(!this.__isSilentMode&&!(!r||!r.length)){var o=this.__menuDOM;if(o){if(o.innerHTML="",o.append.apply(o,Ep([],xp(this.__getMenuDom(r)),!1)),!o.children.length)return;if(o.style.display="block",!i){o.style.top="".concat(n,"px"),o.style.left="".concat(e,"px");return}var a=i.width,s=i.height,l=i.clientX,u=i.clientY,c=this.lf.graphModel,d=o.offsetWidth,f=!0,h=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,v=h-l,g=c.rootEl.getBoundingClientRect(),m=g.left+g.width;m<h&&(v=m-l),v<d&&(f=!1),f?o.style.left="".concat(e,"px"):o.style.left="".concat(e-a,"px");var y=o.offsetHeight,x=!0,S=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,b=S-u,N=g.top+g.height;N<S&&(b=N-u),b<y&&(x=!1),x?o.style.top="".concat(n,"px"):o.style.top="".concat(n-s,"px")}}},t.prototype.processMenuConfig=function(e,n){var r=this;if(e){var i=["nodeMenu","edgeMenu","graphMenu","selectionMenu"];i.forEach(function(o){var a,s,l,u,c=e[o],d=Sp[o];if(c!==void 0){if(n==="set")(a=r.menuTypeMap)===null||a===void 0||a.set(d,c||[]);else if(n==="add"&&Array.isArray(c)){var f=(l=(s=r.menuTypeMap)===null||s===void 0?void 0:s.get(d))!==null&&l!==void 0?l:[];(u=r.menuTypeMap)===null||u===void 0||u.set(d,f.concat(c))}}})}},t.prototype.createImageElement=function(e,n){var r=document.createElement("img");return r.src=e,r.alt=n,r.style.width="16px",r.style.height="16px",r.style.objectFit="contain",r},t.prototype.isImageFile=function(e){var n=[".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"];return n.some(function(r){return e.toLowerCase().includes(r)})},t.prototype.processIcon=function(e,n,r){var i;if(typeof n=="string"){var o=n;if(o.startsWith("data:image/")){var a=this.createImageElement(o,r||"icon");e.appendChild(a);return}if(this.isImageFile(o)){var a=this.createImageElement(o,r||"icon");e.appendChild(a);return}if(o.includes("<")&&o.includes(">")){e.innerHTML=o;return}if(o.includes(" ")||o.startsWith(".")){var s=o.replace(/^\./,"").split(" ");(i=e.classList).add.apply(i,Ep([],xp(s),!1));return}e.classList.add(o)}},t.prototype.__getMenuDom=function(e){var n=this,r=[];return e&&e.length>0&&e.forEach(function(i){var o=document.createElement("li");if(i.className?o.className="lf-menu-item ".concat(i.disabled?"lf-menu-item__disabled":""," ").concat(i.className):o.className="lf-menu-item ".concat(i.disabled?"lf-menu-item__disabled":""),i.icon){var a=document.createElement("span");a.className="lf-menu-item-icon",n.processIcon(a,i.icon,i.text),o.appendChild(a)}var s=document.createElement("span");s.className="lf-menu-item-text",i.text&&(s.innerText=i.text),o.appendChild(s),i.disabled&&o.setAttribute("disabled","true"),o.onclickCallback=i.callback,r.push(o)}),r},t.prototype.updateMenuItemDOMStatus=function(e,n){if(!(!this.__menuDOM||this.__menuDOM.style.display==="none")){var r=Array.from(this.__menuDOM.querySelectorAll(".lf-menu-item")),i=r.find(function(a){var s=a.querySelector(".lf-menu-item-text");return(s==null?void 0:s.textContent)===e});if(i){var o=i;n?(o.classList.add("lf-menu-item__disabled"),o.setAttribute("disabled","true")):(o.classList.remove("lf-menu-item__disabled"),o.removeAttribute("disabled"))}}},t.prototype.setupSilentModeListener=function(){var e=this;this.__editConfigChangeHandler=function(n){var r=n.data,i=r.isSilentMode;i!==e.__isSilentMode&&(e.__isSilentMode=i,e.updateMenuVisibility(!i))},this.lf.on("editConfig:changed",this.__editConfigChangeHandler)},t.prototype.updateMenuVisibility=function(e){this.__menuDOM&&(e?this.__currentData&&(this.__menuDOM.style.display="block"):(this.__menuDOM.style.display="none",this.__currentData=null))},t.prototype.refreshCurrentMenu=function(){var e,n,r,i,o,a,s,l,u,c,d;if(!(!this.__menuDOM||this.__menuDOM.style.display==="none"||!this.__currentData)){var f=this.__menuDOM.style,h=f.left,v=f.top,g=[];if(this.__currentData&&typeof this.__currentData=="object")if("sourceNodeId"in this.__currentData&&"targetNodeId"in this.__currentData){var m=this.lf.graphModel.getEdgeModelById(this.__currentData.id);if(m){var y=(n=this.menuTypeMap)===null||n===void 0?void 0:n.get(m.type);m.menu&&Array.isArray(m.menu)?g=m.menu:y?g=y:g=(i=(r=this.menuTypeMap)===null||r===void 0?void 0:r.get(Uu))!==null&&i!==void 0?i:[]}}else if("id"in this.__currentData&&"type"in this.__currentData){var m=this.lf.graphModel.getNodeModelById(this.__currentData.id);if(m){var y=(o=this.menuTypeMap)===null||o===void 0?void 0:o.get(m.type);m.menu&&Array.isArray(m.menu)?g=m.menu:y?g=y:g=(s=(a=this.menuTypeMap)===null||a===void 0?void 0:a.get(Wu))!==null&&s!==void 0?s:[]}}else"nodes"in this.__currentData&&"edges"in this.__currentData?g=(u=(l=this.menuTypeMap)===null||l===void 0?void 0:l.get(Vu))!==null&&u!==void 0?u:[]:g=(d=(c=this.menuTypeMap)===null||c===void 0?void 0:c.get(wp))!==null&&d!==void 0?d:[];g&&g.length>0?(this.__menuDOM.innerHTML="",(e=this.__menuDOM).append.apply(e,Ep([],xp(this.__getMenuDom(g)),!1)),h&&(this.__menuDOM.style.left=h),v&&(this.__menuDOM.style.top=v)):(this.__menuDOM.style.display="none",this.__currentData=null)}},t.prototype.setMenuByType=function(e){var n,r=e.type,i=e.menu;!r||!i||((n=this.menuTypeMap)===null||n===void 0||n.set(r,i),this.refreshCurrentMenu())},t.prototype.getMenuConfig=function(e){var n,r;return(r=(n=this.menuTypeMap)===null||n===void 0?void 0:n.get(Sp[e]))!==null&&r!==void 0?r:[]},t.prototype.resetMenuConfigByType=function(e){var n;this.setMenuConfig((n={},n[e]=ii[e],n))},t.prototype.resetAllMenuConfig=function(){this.setMenuConfig(ii)},t.prototype.setMenuConfig=function(e){this.processMenuConfig(e,"set"),this.refreshCurrentMenu()},t.prototype.addMenuConfig=function(e){this.processMenuConfig(e,"add"),this.refreshCurrentMenu()},t.prototype.changeMenuItem=function(e,n){if(e==="add")this.addMenuConfig(n);else if(e==="reset")this.setMenuConfig(n);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},t.prototype.changeMenuItemDisableStatus=function(e,n,r){var i,o;if(!e||!n){console.warn("params is vaild");return}var a=(o=(i=this.menuTypeMap)===null||i===void 0?void 0:i.get(Sp[e]))!==null&&o!==void 0?o:[];if(!a.length){console.warn("menuMap: ".concat(e," is not exist"));return}var s=a.find(function(l){return l.text===n});if(!s){console.warn("menuItem: ".concat(n," is not exist"));return}s.disabled=r,this.updateMenuItemDOMStatus(n,r)},t.prototype.render=function(e,n){var r=this;e.graphModel.editConfigModel.isSilentMode||(this.__container=n,this.__currentData=null,this.setupSilentModeListener(),this.__menuDOM&&(this.__menuDOM.className="lf-menu",n.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(i){i.stopPropagation();for(var o=i.target;Array.from(o.classList).indexOf("lf-menu-item")===-1&&Array.from(o.classList).indexOf("lf-menu")===-1;)o=o==null?void 0:o.parentElement;Array.from(o.classList).indexOf("lf-menu-item__disabled")>-1||(Array.from(o.classList).indexOf("lf-menu-item")>-1?(o.onclickCallback(r.__currentData,o),r.__menuDOM&&(r.__menuDOM.style.display="none"),r.__currentData=null):console.warn("点击区域不在菜单项内,请检查代码!"))},!0)),this.lf.on("node:contextmenu",function(i){var o,a,s=i.data,l=i.position,u=i.e,c=l.domOverlayPosition,d=c.x,f=c.y,h=s.id,v=r.lf.graphModel.getNodeModelById(h);if(!(!v||r.__isSilentMode)){var g=[],m=(o=r.menuTypeMap)===null||o===void 0?void 0:o.get(v.type);v&&v.menu&&Array.isArray(v.menu)?g=v.menu:m?g=m:g=(a=r.menuTypeMap)===null||a===void 0?void 0:a.get(Wu),r.__currentData=s,r.showMenu(d,f,g,{width:v.width,height:v.height,clientX:u.clientX,clientY:u.clientY})}}),this.lf.on("edge:contextmenu",function(i){var o,a,s,l=i.data,u=i.position,c=i.e,d=u.domOverlayPosition,f=d.x,h=d.y,v=l.id,g=r.lf.graphModel.getEdgeModelById(v);if(!(!g||r.__isSilentMode)){var m=[],y=(o=r.menuTypeMap)===null||o===void 0?void 0:o.get(g.type);g&&g.menu&&Array.isArray(g.menu)?m=g.menu:y?m=y:m=(s=(a=r.menuTypeMap)===null||a===void 0?void 0:a.get(Uu))!==null&&s!==void 0?s:[],r.__currentData=l,r.showMenu(f,h,m,{width:g.width,height:g.height,clientX:c.clientX,clientY:c.clientY})}}),this.lf.on("blank:contextmenu",function(i){var o,a,s=i.position;if(!r.__isSilentMode){var l=(a=(o=r.menuTypeMap)===null||o===void 0?void 0:o.get(wp))!==null&&a!==void 0?a:[],u=s.domOverlayPosition,c=u.x,d=u.y;r.__currentData=bp({},s.canvasOverlayPosition),r.showMenu(c,d,l)}}),this.lf.on("selection:contextmenu",function(i){var o,a=i.data,s=i.position;if(!r.__isSilentMode){var l=(o=r.menuTypeMap)===null||o===void 0?void 0:o.get(Vu),u=s.domOverlayPosition,c=u.x,d=u.y;r.__currentData=a,r.showMenu(c,d,l)}}),this.lf.on("node:mousedown",function(){r.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){r.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){r.__menuDOM.style.display="none"}))},t.prototype.destroy=function(){var e;this.__editConfigChangeHandler&&this.lf.off("editConfig:changed",this.__editConfigChangeHandler),this.__menuDOM&&((e=this===null||this===void 0?void 0:this.__container)===null||e===void 0||e.removeChild(this.__menuDOM),this.__menuDOM=void 0)},t.pluginName="menu",t}(),i5=function(){function t(e){var n=e.lf,r=this;this.lf=n,this.lf.setPatternItems=function(i){r.setPatternItems(i)}}return t.prototype.render=function(e,n){var r=this;if(this.destroy(),!this.shapeList||this.shapeList.length===0){this.domContainer=n;return}this.panelEl=document.createElement("div"),this.panelEl.className="lf-dndpanel",this.shapeList.forEach(function(i){var o;(o=r.panelEl)===null||o===void 0||o.appendChild(r.createDndItem(i))}),n.appendChild(this.panelEl),this.domContainer=n},t.prototype.destroy=function(){this.domContainer&&this.panelEl&&this.domContainer.contains(this.panelEl)&&this.domContainer.removeChild(this.panelEl)},t.prototype.setPatternItems=function(e){this.shapeList=e,this.domContainer&&this.render(this.lf,this.domContainer)},t.prototype.createDndItem=function(e){var n=this,r=document.createElement("div");r.className=e.className?"lf-dnd-item ".concat(e.className):"lf-dnd-item";var i=document.createElement("div");if(i.className="lf-dnd-shape",e.icon&&(i.style.backgroundImage="url(".concat(e.icon,")")),r.appendChild(i),e.label){var o=document.createElement("div");o.innerText=e.label,o.className="lf-dnd-text",r.appendChild(o)}return e.disabled?(r.classList.add("disabled"),r.onmousedown=function(){e.callback&&e.callback(n.lf,n.domContainer)},r):(r.onmousedown=function(){e.type&&n.lf.dnd.startDrag({type:e.type,properties:e.properties,text:e.text}),e.callback&&e.callback(n.lf,n.domContainer)},r.ondblclick=function(a){n.lf.graphModel.eventCenter.emit("dnd:panel-dbclick",{e:a,data:e})},r.onclick=function(a){n.lf.graphModel.eventCenter.emit("dnd:panel-click",{e:a,data:e})},r.oncontextmenu=function(a){n.lf.graphModel.eventCenter.emit("dnd:panel-contextmenu",{e:a,data:e})},r)},t.pluginName="dndPanel",t}(),nx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},rx=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},o5=function(){function t(e){var n=e.lf,r=e.options,i=this,o;this.disabled=!0,this.isWholeNode=!0,this.isWholeEdge=!0,this.originStatusSaved=!1,this.exclusiveMode=!1,this.mouseDownInfo=null,this.originalStopMoveGraph=!1,this.handleBlankMouseDown=function(a){var s=a.e;i.handleMouseDown(s)},this.draw=function(a){var s=i.lf.getPointByClient(a.clientX,a.clientY).domOverlayPosition,l=s.x,u=s.y;if(i.endPoint={x:l,y:u},i.startPoint){var c=i.startPoint,d=c.x,f=c.y,h=d,v=f,g=l-d,m=u-f;l<d&&(h=l,g=d-l),u<f&&(v=u,m=f-u),i.wrapper&&(i.wrapper.style.left="".concat(h,"px"),i.wrapper.style.top="".concat(v,"px"),i.wrapper.style.width="".concat(g,"px"),i.wrapper.style.height="".concat(m,"px"))}},this.drawOff=function(a){if(i.lf.updateEditConfig({stopMoveGraph:i.originalStopMoveGraph}),i.originStatusSaved=!1,i.mouseDownInfo){var s=i.mouseDownInfo,l=s.x,u=s.y,c=s.time,d=Math.abs(a.clientX-l)<5&&Math.abs(a.clientY-u)<5&&Date.now()-c<200;if(d){i.lf.clearSelectElements(),i.cleanupSelectionState();return}}var f=Pe(i.startPoint),h=Pe(i.endPoint);if(document.removeEventListener("mousemove",i.draw),i.exclusiveMode||document.removeEventListener("mouseup",i.drawOff),f&&h){var l=f.x,u=f.y,v=h.x,g=h.y,m=[Math.min(l,v),Math.min(u,g)],y=[Math.max(l,v),Math.max(u,g)];if(i.lf.emit("selection:selected-area",{topLeft:m,bottomRight:y}),Math.abs(v-l)<10&&Math.abs(g-u)<10){i.wrapper&&(i.wrapper.oncontextmenu=null,i.container&&i.wrapper.parentNode===i.container&&i.container.removeChild(i.wrapper),i.wrapper=void 0);return}var x=i.lf.graphModel.getAreaElement(m,y,i.isWholeEdge,i.isWholeNode,!0),S=i.lf.graphModel,b=S.dynamicGroup,N=S.group,A=[],E=i.lf.getSelectElements(),O=new Set(rx(rx([],nx(E.nodes.map(function(K){return K.id})),!1),nx(E.edges.map(function(K){return K.id})),!1));x.forEach(function(K){if(N){var J=N.getNodeGroup(K.id);if(x.includes(J))return}if(b){var J=b.getGroupByNodeId(K.id);if(x.includes(J))return}if(i.exclusiveMode&&O.has(K.id)){i.lf.deselectElementById(K.id);return}i.lf.selectElementById(K.id,!0),A.push(K)}),i.startPoint=void 0,i.endPoint=void 0,A.length>0&&i.lf.emit("selection:drop",{e:a}),i.lf.emit("selection:selected",{elements:A,leftTopPoint:m,rightBottomPoint:y})}i.wrapper&&(i.wrapper.oncontextmenu=null,i.container&&i.wrapper.parentNode===i.container&&i.container.removeChild(i.wrapper),i.wrapper=void 0)},this.lf=n,this.exclusiveMode=(o=r==null?void 0:r.exclusiveMode)!==null&&o!==void 0?o:!1,n.openSelectionSelect=function(){i.openSelectionSelect()},n.closeSelectionSelect=function(){i.closeSelectionSelect()},n.setSelectionSelectMode=function(a){i.setExclusiveMode(a)},this.handleMouseDown=this.handleMouseDown.bind(this),this.draw=this.draw.bind(this),this.drawOff=this.drawOff.bind(this)}return t.prototype.render=function(e,n){this.container=n},t.prototype.cleanupSelectionState=function(){this.wrapper&&(this.wrapper.oncontextmenu=null,this.container&&this.wrapper.parentNode===this.container&&this.container.removeChild(this.wrapper),this.wrapper=void 0),this.startPoint=void 0,this.endPoint=void 0,this.mouseDownInfo=null,document.removeEventListener("mousemove",this.draw),document.removeEventListener("mouseup",this.drawOff)},t.prototype.setExclusiveMode=function(e){e===void 0&&(e=!1),this.exclusiveMode!==e&&(this.cleanupSelectionState(),this.exclusiveMode=e,this.container&&!this.disabled&&(this.removeEventListeners(),this.addEventListeners()))},t.prototype.addEventListeners=function(){this.container&&(this.exclusiveMode?(this.container.style.pointerEvents="auto",this.container.addEventListener("mousedown",this.handleMouseDown)):(this.container.style.pointerEvents="none",this.lf.on("blank:mousedown",this.handleBlankMouseDown)))},t.prototype.removeEventListeners=function(){this.container&&(this.container.style.pointerEvents="none",this.container.removeEventListener("mousedown",this.handleMouseDown)),this.lf.off("blank:mousedown",this.handleBlankMouseDown)},t.prototype.handleMouseDown=function(e){var n;if(!(!this.container||this.disabled)){var r=e.button===2;if(!r){this.cleanupSelectionState(),this.mouseDownInfo={x:e.clientX,y:e.clientY,time:Date.now()},this.originStatusSaved||(this.originalStopMoveGraph=this.lf.getEditConfig().stopMoveGraph,this.originStatusSaved=!0),this.lf.updateEditConfig({stopMoveGraph:!0});var i=this.lf.getPointByClient(e.clientX,e.clientY).domOverlayPosition,o=i.x,a=i.y;this.startPoint={x:o,y:a},this.endPoint={x:o,y:a};var s=document.createElement("div");s.className="lf-selection-select",s.oncontextmenu=function(u){u.preventDefault()},s.style.top="".concat(this.startPoint.y,"px"),s.style.left="".concat(this.startPoint.x,"px"),(n=this.container)===null||n===void 0||n.appendChild(s),this.wrapper=s,document.addEventListener("mousemove",this.draw),document.addEventListener("mouseup",this.drawOff)}}},t.prototype.setSelectionSense=function(e,n){e===void 0&&(e=!0),n===void 0&&(n=!0),this.isWholeEdge=e,this.isWholeNode=n},t.prototype.openSelectionSelect=function(){this.disabled||this.closeSelectionSelect(),this.container&&(this.cleanupSelectionState(),this.addEventListeners(),this.open())},t.prototype.closeSelectionSelect=function(){if(this.container){if(this.wrapper&&this.startPoint&&this.endPoint){var e=Pe(this.endPoint),n=new MouseEvent("mouseup",{clientX:e.x,clientY:e.y});this.drawOff(n)}this.cleanupSelectionState(),this.removeEventListeners(),this.close()}},t.prototype.open=function(){this.disabled=!1},t.prototype.close=function(){this.disabled=!0},t.pluginName="selectionSelect",t}(),ix=function(){return ix=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ix.apply(this,arguments)},ox=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zo=function(){return Zo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Zo.apply(this,arguments)},ds=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},a5={tr:"tl",lb:"tl",tl:"tr",rb:"tr",br:"bl",lt:"bl",bl:"br",rt:"br"};function s5(t){for(var e=t,n=1;n<e.length-1;){var r=ds(e[n-1],2),i=r[0],o=r[1],a=ds(e[n],2),s=a[0],l=a[1],u=ds(e[n+1],2),c=u[0],d=u[1];i===s&&s===c||o===l&&l===d?e.splice(n,1):n++}return e}function l5(t,e,n,r){var i=[t[0],t[1]],o=[t[0],t[1]];switch(n){case"tl":return e==="tr"?(i[1]+=r,o[0]+=r):e==="lb"&&(i[0]+=r,o[1]+=r),[i,o];case"tr":return e==="tl"?(i[1]+=r,o[0]-=r):e==="rb"&&(i[0]-=r,o[1]+=r),[i,o];case"bl":return e==="br"?(i[1]-=r,o[0]+=r):e==="lt"&&(i[0]+=r,o[1]-=r),[i,o];case"br":return e==="bl"?(i[1]-=r,o[0]-=r):e==="rt"&&(i[0]-=r,o[1]-=r),[i,o];default:return[]}}function u5(t,e,n,r){var i,o=1,a="",s="";Math.abs(t[0]-e[0])<=o?a=t[1]>e[1]?"t":"b":Math.abs(t[1]-e[1])<=o&&(a=t[0]>e[0]?"l":"r"),Math.abs(e[0]-n[0])<=o?s=e[1]>n[1]?"t":"b":Math.abs(e[1]-n[1])<=o&&(s=e[0]>n[0]?"l":"r");var l=Math.min(Math.hypot(e[0]-t[0],e[1]-t[1])/2,Math.hypot(n[0]-e[0],n[1]-e[1])/2,r)||1/5*r,u="".concat(a).concat(s),c=a5[u]||"-",d="L ".concat(t[0]," ").concat(t[1]);if(c==="-")d+="L ".concat(e[0]," ").concat(e[1]," L ").concat(n[0]," ").concat(n[1]);else{var f=ds(l5(e,u,c,l),2),h=f[0],v=f[1];h&&v&&(d+="L ".concat(h[0]," ").concat(h[1]," Q ").concat(e[0]," ").concat(e[1]," ").concat(v[0]," ").concat(v[1]),i=ds(v,2),e[0]=i[0],e[1]=i[1])}return d}function c5(t,e){var n=0,r="";if(t.length===2)r+="M".concat(t[n][0]," ").concat(t[n++][1]," L ").concat(t[n][0]," ").concat(t[n][1]);else{for(r+="M".concat(t[n][0]," ").concat(t[n++][1]);n+1<t.length;){var i=t[n-1],o=t[n],a=t[n+++1];r+=u5(i,o,a,e)}r+="L ".concat(t[n][0]," ").concat(t[n][1])}return r}(function(t){ox(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getEdge=function(){var n=this.props.model,r=n.points,i=n.isAnimation,o=n.arrowConfig,a=n.radius,s=a===void 0?5:a,l=n.getEdgeStyle(),u=n.getEdgeAnimationStyle(),c=s5(r.split(" ").map(function(h){return h.split(",").map(function(v){return+v})})),d=c5(c,s),f=Zo(Zo(Zo({style:i?u:{}},l),o),{fill:"none"});return Te("path",Zo({d},f))},e})(os),function(t){ox(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Ya);var ax=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xu=function(){return Xu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Xu.apply(this,arguments)},sx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},lx=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},d5=function(t){ax(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.id,i=n.x,o=n.y,a=n.width,s=n.height,l=n.properties,u=this.props.model.getNodeStyle();return Te("svg",{x:i-a/2,y:o-s/2,width:50,height:24,style:"z-index: 0; background: none; overflow: auto;"},[l.labelText?Te("text",{x:0,y:-5,fontSize:"16px",fill:u.stroke},l.labelText):"",l.disabledDelete?"":Te("text",{x:l.labelText?50:0,y:-5,fontSize:"24px",cursor:"pointer",fill:u.stroke,onclick:this.handleCustomDeleteIconClick.bind(this,r)},"x")])},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.id,l=this.props.model.getNodeStyle();return Te("g",{},[Te("rect",Xu(Xu({},l),{x:r-o/2,y:i-a/2,width:o,height:a,id:s})),this.getLabelShape()])},e.prototype.toFront=function(){},e.prototype.handleCustomDeleteIconClick=function(n){var r=this.props.graphModel;r.deleteNode(n)},e}(hu),f5=function(t){ax(e,t);function e(){var n=t.apply(this,lx([],sx(arguments),!1))||this;return n.d=10,n.isResize=!1,n}return e.prototype.initNodeData=function(n){n.text={value:"",x:n.x,y:n.y,draggable:!1,editable:!1},t.prototype.initNodeData.call(this,n),this.zIndex=0,this.draggable=!0},e.prototype.setAttributes=function(){var n=this,r;this.points=[],((r=this.properties)===null||r===void 0?void 0:r.node_selection_ids).length>1&&setTimeout(function(){var i;n.updatePointsByNodes(((i=n.properties)===null||i===void 0?void 0:i.node_selection_ids)||[])})},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this);return n.stroke=this.properties.strokeColor||"#008000",n.strokeDasharray="10 5",n},e.prototype.getDefaultAnchor=function(){return[]},e.prototype.updatePoints=function(n){this.points=n},e.prototype.updateCoordinate=function(n){var r=n.x,i=n.y;this.x=r,this.y=i},e.prototype.updatePointsByNodes=function(n){var r=this,i=[],o=1/0,a=1/0,s=-1/0,l=-1/0;n.forEach(function(u){var c=r.graphModel.getNodeModelById(u);if(c){var d=c.width,f=c.height,h=c.x,v=c.y;o=Math.min(o,h-d/2-r.d),a=Math.min(a,v-f/2-r.d),s=Math.max(s,h+d/2+r.d),l=Math.max(l,v+f/2+r.d)}}),i.push([o,a],[s,a],[s,l],[o,l]),![o,a,s,l].some(function(u){return Math.abs(u)===1/0})&&(this.updatePoints(i),this.updateCoordinate({x:(s+o)/2,y:(l+a)/2}))},e.prototype.resize=function(n){var r;this.isResize=!0;for(var i=n.width,o=n.height,a={x:i/this.width,y:o/this.height},s=(this.properties.node_selection_ids||[]).slice(),l=[],u=new Set;s.length;){var c=s.shift(),d=(r=this.graphModel.nodesMap[c])===null||r===void 0?void 0:r.model;if(d){if(!Gu(d)){l.push(d);continue}u.has(d.id)||(u.add(d.id),s.push.apply(s,lx([],sx(d.properties.node_selection_ids||[]),!1)))}}var f={x:this.x-this.width/2,y:this.y-this.height/2},h=t.prototype.resize.call(this,n),v={x:this.x-this.width/2,y:this.y-this.height/2};return l.forEach(function(g){g.width=g.width*a.x,g.height=g.height*a.y;var m=(g.x-f.x)*a.x+v.x-g.x,y=(g.y-f.y)*a.y+v.y-g.y;g.move(m,y,!0)}),this.isResize=!1,h},e}(su),Cp="node-selection";(function(){function t(e){var n=e.lf;this.selectNodes=[],this.d=10,this.lf=n,n.register({type:Cp,view:d5,model:f5})}return Object.defineProperty(t.prototype,"selectNodesIds",{get:function(){return this.selectNodes.map(function(e){return e.id})},enumerable:!1,configurable:!0}),t.prototype.addNodeSelection=function(){var e=this.lf.addNode({type:"node-selection",text:"",properties:{node_selection_ids:this.selectNodesIds},x:0,y:0});e.updatePointsByNodes(this.selectNodesIds)},t.prototype.updateNodeSelection=function(){var e,n=this.getNodeSelection();n&&(this.lf.setProperties(n.id,{node_selection_ids:this.selectNodesIds}),(e=this.lf.getNodeModelById(n.id))===null||e===void 0||e.updatePointsByNodes(this.selectNodesIds))},t.prototype.getNodeSelection=function(){var e=this,n=this.selectNodesIds,r=this.lf.getGraphRawData(),i=n.filter(function(o){return o!==e.currentClickNode.id});return r.nodes.find(function(o){if(o.type==="node-selection"){var a=ui(o,"properties.node_selection_ids",[]);return i.every(function(s){return a.includes(s)})}return!1})},t.prototype.onNodeChange=function(e,n){var r=e.graphModel.nodes.filter(function(i){if(!Gu(i))return!1;var o=i.properties.node_selection_ids||[];return o.includes(n.id)});Promise.resolve().then(function(){r.forEach(function(i){i.updatePointsByNodes(i.properties.node_selection_ids||[])})})},t.prototype.render=function(e){var n=this;this.lf=e,e.on("node:click",function(r){var i;if(!(!r.e.shiftKey||r.data.type===Cp)){n.currentClickNode=r.data;var o=!1;n.selectNodesIds.includes(r.data.id)&&((i=n.lf.getNodeModelById(r.data.id))===null||i===void 0||i.setSelected(!1),o=!0);var a=e.getSelectElements(!0).nodes;n.selectNodes=a,n.selectNodes.length===1?o?n.updateNodeSelection():n.addNodeSelection():n.selectNodes.length>1&&n.updateNodeSelection()}}),e.graphModel.addNodeMoveRules(function(r,i,o){if(n.onNodeChange(e,r),Gu(r)&&!r.isResize){var a=r.properties.node_selection_ids||[];return e.graphModel.moveNodes(a,i,o,!0),!0}return!0}),e.graphModel.addNodeResizeRules(function(r){return Gu(r)||n.onNodeChange(e,r),!0})},t.pluginName="node-selection",t})();var Gu=function(t){return!!(t&&t.type===Cp)},p5=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yu=function(){return Yu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Yu.apply(this,arguments)};(function(t){p5(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.properties;return Te("text",{x:r-o/2+5,y:i-a/2+16,fontSize:12,fill:"blue"},s.moreText)},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=this.props.model.getNodeStyle();return Te("g",{},[Te("rect",Yu(Yu({},s),{fill:"#FFFFFF",x:r-o/2,y:i-a/2})),this.getLabelShape()])},e})(Ji);var Ku=2,ux=.16,h5=.05,g5=.05,v5=.15,cx=5,dx=4,m5=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function fx(t){var e=t.r,n=t.g,r=t.b,i=SI(e,n,r);return{h:i.h*360,s:i.s,v:i.v}}function qu(t){var e=t.r,n=t.g,r=t.b;return"#".concat(AI(e,n,r))}function y5(t,e,n){var r=n/100,i={r:(e.r-t.r)*r+t.r,g:(e.g-t.g)*r+t.g,b:(e.b-t.b)*r+t.b};return i}function px(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-Ku*e:Math.round(t.h)+Ku*e:r=n?Math.round(t.h)+Ku*e:Math.round(t.h)-Ku*e,r<0?r+=360:r>=360&&(r-=360),r}function hx(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-ux*e:e===dx?r=t.s+ux:r=t.s+h5*e,r>1&&(r=1),n&&e===cx&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function gx(t,e,n){var r;return n?r=t.v+g5*e:r=t.v-v5*e,r>1&&(r=1),Number(r.toFixed(2))}function Ap(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=_a(t),i=cx;i>0;i-=1){var o=fx(r),a=qu(_a({h:px(o,i,!0),s:hx(o,i,!0),v:gx(o,i,!0)}));n.push(a)}n.push(qu(r));for(var s=1;s<=dx;s+=1){var l=fx(r),u=qu(_a({h:px(l,s),s:hx(l,s),v:gx(l,s)}));n.push(u)}return e.theme==="dark"?m5.map(function(c){var d=c.index,f=c.opacity,h=qu(y5(_a(e.backgroundColor||"#141414"),_a(n[d]),f*100));return h}):n}var Op={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Zu={},Tp={};Object.keys(Op).forEach(function(t){Zu[t]=Ap(Op[t]),Zu[t].primary=Zu[t][5],Tp[t]=Ap(Op[t],{theme:"dark",backgroundColor:"#141414"}),Tp[t].primary=Tp[t][5]});var _5=Zu.blue,b5=Symbol("iconContext"),vx=function(){return p.inject(b5,{prefixCls:p.ref("anticon"),rootClassName:p.ref(""),csp:p.ref()})};function Np(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function x5(t,e){return t&&t.contains?t.contains(e):!1}var mx="data-vc-order",E5="vc-icon-key",Mp=new Map;function yx(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):E5}function Dp(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function w5(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function _x(t){return Array.from((Mp.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function bx(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Np())return null;var n=e.csp,r=e.prepend,i=document.createElement("style");i.setAttribute(mx,w5(r)),n&&n.nonce&&(i.nonce=n.nonce),i.innerHTML=t;var o=Dp(e),a=o.firstChild;if(r){if(r==="queue"){var s=_x(o).filter(function(l){return["prepend","prependQueue"].includes(l.getAttribute(mx))});if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function S5(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Dp(e);return _x(n).find(function(r){return r.getAttribute(yx(e))===t})}function C5(t,e){var n=Mp.get(t);if(!n||!x5(document,n)){var r=bx("",e),i=r.parentNode;Mp.set(t,i),t.removeChild(r)}}function A5(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Dp(n);C5(r,n);var i=S5(e,n);if(i)return n.csp&&n.csp.nonce&&i.nonce!==n.csp.nonce&&(i.nonce=n.csp.nonce),i.innerHTML!==t&&(i.innerHTML=t),i;var o=bx(t,n);return o.setAttribute(yx(n),e),o}function xx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){O5(t,i,n[i])})}return t}function O5(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function T5(t,e){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(e))}function N5(t,e){T5(t,"[@ant-design/icons-vue] ".concat(e))}function Ex(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Pp(t,e,n){return n?p.h(t.tag,xx({key:e},n,t.attrs),(t.children||[]).map(function(r,i){return Pp(r,"".concat(e,"-").concat(t.tag,"-").concat(i))})):p.h(t.tag,xx({key:e},t.attrs),(t.children||[]).map(function(r,i){return Pp(r,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function wx(t){return Ap(t)[0]}function Sx(t){return t?Array.isArray(t)?t:[t]:[]}var M5=`
|
|
97
|
+
linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,ZF=360,z0="keydown",zu="mousedown",gp="focusin";function zr(t,e){return(e||document).querySelector(t)}function JF(t){t.preventDefault(),t.stopPropagation()}function vp(t,e,n,r,i){t.add(e,z0,function(o){n.indexOf(o.key)>=0&&r(o)})}var W0=function(){function t(e){fp(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new YF,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return pp(t,[{key:"setOptions",value:function(n){var r=this;if(!n)return;var i=this.settings;function o(u,c,d){for(var f in u)c[f]=u[f]}if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),o(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var a=n.color||n.colour;a&&this._setColor(a)}var s=i.parent;if(s&&i.popup&&!this._popupInited){var l=function(c){return r.openHandler(c)};this._events.add(s,"click",l),vp(this._events,s,[" ","Spacebar","Enter"],l),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var r=n&&n.type===z0?this._domEdit:this.domElement;setTimeout(function(){return r.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var r=n&&n.type,i=!1;if(!n)i=!0;else if(r===zu||r===gp){var o=(this.__containedEvent||0)+100;n.timeStamp>o&&(i=!0)}else JF(n),i=!0;i&&this.hide()&&(this.settings.parent.style.pointerEvents="",r!==zu&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,r){this.closeHandler(),this.setOptions(n),r&&this.openHandler()}},{key:"setColor",value:function(n,r){this._setColor(n,{silent:r})}},{key:"_setColor",value:function(n,r){if(typeof n=="string"&&(n=n.trim()),!!n){r=r||{};var i=void 0;try{i=new GF(n)}catch(a){if(r.failSilently)return;throw a}if(!this.settings.alpha){var o=i.hsla;o[3]=1,i.hsla=o}this.colour=this.color=i,this._setHSLA(null,null,null,null,r)}}},{key:"setColour",value:function(n,r){this.setColor(n,r)}},{key:"show",value:function(){var n=this.settings.parent;if(!n)return!1;if(this.domElement){var r=this._toggleDOM(!0);return this._setPosition(),r}var i=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',o=KF(i);return this.domElement=o,this._domH=zr(".picker_hue",o),this._domSL=zr(".picker_sl",o),this._domA=zr(".picker_alpha",o),this._domEdit=zr(".picker_editor input",o),this._domSample=zr(".picker_sample",o),this._domOkay=zr(".picker_done button",o),this._domCancel=zr(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,r=this,i=this.domElement,o=this._events;function a(u,c,d){o.add(u,c,d)}a(i,"click",function(u){return u.preventDefault()}),hp(o,this._domH,function(u,c){return r._setHSLA(u)}),hp(o,this._domSL,function(u,c){return r._setHSLA(null,u,1-c)}),this.settings.alpha&&hp(o,this._domA,function(u,c){return r._setHSLA(null,null,null,1-c)});var s=this._domEdit;a(s,"input",function(u){r._setColor(this.value,{fromEditor:!0,failSilently:!0})}),a(s,"focus",function(u){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var u=function(f){return n.closeHandler(f)};a(window,zu,u),a(window,gp,u),vp(o,i,["Esc","Escape"],u);var c=function(f){n.__containedEvent=f.timeStamp};a(i,zu,c),a(i,gp,c),a(n._domCancel,"click",u)});var l=function(c){n._ifPopup(function(){return n.closeHandler(c)}),n.onDone&&n.onDone(n.colour)};a(this._domOkay,"click",l),vp(o,i,["Enter"],l)}},{key:"_setPosition",value:function(){var n=this.settings.parent,r=this.domElement;n!==r.parentNode&&n.appendChild(r),this._ifPopup(function(i){getComputedStyle(n).position==="static"&&(n.style.position="relative");var o=i===!0?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(a){a===o?r.classList.add(a):r.classList.remove(a)}),r.classList.add(o)})}},{key:"_setHSLA",value:function(n,r,i,o,a){a=a||{};var s=this.colour,l=s.hsla;[n,r,i,o].forEach(function(u,c){(u||u===0)&&(l[c]=u)}),s.hsla=l,this._updateUI(a),this.onChange&&!a.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(!this.domElement)return;n=n||{};var r=this.colour,i=r.hsla,o="hsl("+i[0]*ZF+", 100%, 50%)",a=r.hslString,s=r.hslaString,l=this._domH,u=this._domSL,c=this._domA,d=zr(".picker_selector",l),f=zr(".picker_selector",u),h=zr(".picker_selector",c);function v(A,E,O){E.style.left=O*100+"%"}function g(A,E,O){E.style.top=O*100+"%"}v(l,d,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=o,v(u,f,i[1]),g(u,f,1-i[2]),u.style.color=a,g(c,h,1-i[3]);var m=a,y=m.replace("hsl","hsla").replace(")",", 0)"),x="linear-gradient("+[m,y]+")";if(this._domA.style.background=x+", "+qF,!n.fromEditor){var S=this.settings.editorFormat,b=this.settings.alpha,N=void 0;switch(S){case"rgb":N=r.printRGB(b);break;case"hsl":N=r.printHSL(b);break;default:N=r.printHex(b)}this._domEdit.value=N}this._domSample.style.color=s}},{key:"_ifPopup",value:function(n,r){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):r&&r()}},{key:"_toggleDOM",value:function(n){var r=this.domElement;if(!r)return!1;var i=n?"":"none",o=r.style.display!==i;return o&&(r.style.display=i),o}}]),t}();{var mp=document.createElement("style");mp.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(mp),W0.StyleElement=mp}var yp={exports:{}},U0;function V0(){return U0||(U0=1,function(t,e){(function(n,r){t.exports=n()})(function(){var n="object",r="function",i="undefined",o=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],a=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],s=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],l=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"];function u($,w){var _=typeof $[w];return _==r||!!(_==n&&$[w])||_=="unknown"}function c($,w){return!!(typeof $[w]==n&&$[w])}function d($,w){return typeof $[w]!=i}function f($){return function(w,_){for(var F=_.length;F--;)if(!$(w,_[F]))return!1;return!0}}var h=f(u),v=f(c),g=f(d);function m($){return $&&h($,l)&&g($,s)}function y($){return c($,"body")?$.body:$.getElementsByTagName("body")[0]}var x=[].forEach?function($,w){$.forEach(w)}:function($,w){for(var _=0,F=$.length;_<F;++_)w($[_],_)},S={},b=typeof window!=i&&typeof document!=i,N={isHostMethod:u,isHostObject:c,isHostProperty:d,areHostMethods:h,areHostObjects:v,areHostProperties:g,isTextRange:m,getBody:y,forEach:x},A={version:"1.3.2",initialized:!1,isBrowser:b,supported:!0,util:N,features:{},modules:S,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==i?!0:rangyAutoInitialize}};function E($){typeof console!=i&&u(console,"log")&&console.log($)}function O($,w){b&&w?alert($):E($)}function C($){A.initialized=!0,A.supported=!1,O("Rangy is not supported in this environment. Reason: "+$,A.config.alertOnFail)}A.fail=C;function G($){O("Rangy warning: "+$,A.config.alertOnWarn)}A.warn=G;var K;({}).hasOwnProperty?(N.extend=K=function($,w,_){var F,L;for(var se in w)se==="__proto__"||se==="constructor"||se==="prototype"||w.hasOwnProperty(se)&&(F=$[se],L=w[se],_&&F!==null&&typeof F=="object"&&L!==null&&typeof L=="object"&&K(F,L,!0),$[se]=L);return w.hasOwnProperty("toString")&&($.toString=w.toString),$},N.createOptions=function($,w){var _={};return K(_,w),$&&K(_,$),_}):C("hasOwnProperty not supported"),b||C("Rangy can only run in a browser"),function(){var $;if(b){var w=document.createElement("div");w.appendChild(document.createElement("span"));var _=[].slice;try{_.call(w.childNodes,0)[0].nodeType==1&&($=function(F){return _.call(F,0)})}catch{}}$||($=function(F){for(var L=[],se=0,fe=F.length;se<fe;++se)L[se]=F[se];return L}),N.toArray=$}();var J;b&&(u(document,"addEventListener")?J=function($,w,_){$.addEventListener(w,_,!1)}:u(document,"attachEvent")?J=function($,w,_){$.attachEvent("on"+w,_)}:C("Document does not have required addEventListener or attachEvent method"),N.addListener=J);var R=[];function k($){return $.message||$.description||String($)}function B(){if(!(!b||A.initialized)){var $,w=!1,_=!1;u(document,"createRange")&&($=document.createRange(),h($,a)&&g($,o)&&(w=!0));var F=y(document);if(!F||F.nodeName.toLowerCase()!="body"){C("No body element found");return}if(F&&u(F,"createTextRange")&&($=F.createTextRange(),m($)&&(_=!0)),!w&&!_){C("Neither Range nor TextRange are available");return}A.initialized=!0,A.features={implementsDomRange:w,implementsTextRange:_};var L,se;for(var fe in S)(L=S[fe])instanceof me&&L.init(L,A);for(var Ne=0,ze=R.length;Ne<ze;++Ne)try{R[Ne](A)}catch(rt){se="Rangy init listener threw an exception. Continuing. Detail: "+k(rt),E(se)}}}function Z($,w,_){_&&($+=" in module "+_.name),A.warn("DEPRECATED: "+$+" is deprecated. Please use "+w+" instead.")}function ee($,w,_,F){$[w]=function(){return Z(w,_,F),$[_].apply($,N.toArray(arguments))}}N.deprecationNotice=Z,N.createAliasForDeprecatedMethod=ee,A.init=B,A.addInitListener=function($){A.initialized?$(A):R.push($)};var ce=[];A.addShimListener=function($){ce.push($)};function Be($){$=$||window,B();for(var w=0,_=ce.length;w<_;++w)ce[w]($)}b&&(A.shim=A.createMissingNativeApi=Be,ee(A,"createMissingNativeApi","shim"));function me($,w,_){this.name=$,this.dependencies=w,this.initialized=!1,this.supported=!1,this.initializer=_}me.prototype={init:function(){for(var $=this.dependencies||[],w=0,_=$.length,F,L;w<_;++w){if(L=$[w],F=S[L],!F||!(F instanceof me))throw new Error("required module '"+L+"' not found");if(F.init(),!F.supported)throw new Error("required module '"+L+"' not supported")}this.initializer(this)},fail:function($){throw this.initialized=!0,this.supported=!1,new Error($)},warn:function($){A.warn("Module "+this.name+": "+$)},deprecationNotice:function($,w){A.warn("DEPRECATED: "+$+" in module "+this.name+" is deprecated. Please use "+w+" instead")},createError:function($){return new Error("Error in Rangy "+this.name+" module: "+$)}};function de($,w,_){var F=new me($,w,function(L){if(!L.initialized){L.initialized=!0;try{_(A,L),L.supported=!0}catch(fe){var se="Module '"+$+"' failed to load: "+k(fe);E(se),fe.stack&&E(fe.stack)}}});return S[$]=F,F}A.createModule=function($){var w,_;arguments.length==2?(w=arguments[1],_=[]):(w=arguments[2],_=arguments[1]);var F=de($,_,w);A.initialized&&A.supported&&F.init()},A.createCoreModule=function($,w,_){de($,w,_)};function Se(){}A.RangePrototype=Se,A.rangePrototype=new Se;function je(){}A.selectionPrototype=new je,A.createCoreModule("DomUtil",[],function($,w){var _="undefined",F=$.util,L=F.getBody;F.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||w.fail("document missing a Node creation method"),F.isHostMethod(document,"getElementsByTagName")||w.fail("document missing getElementsByTagName method");var se=document.createElement("div");F.areHostMethods(se,["insertBefore","appendChild","cloneNode"])||w.fail("Incomplete Element implementation"),F.isHostProperty(se,"innerHTML")||w.fail("Element is missing innerHTML property");var fe=document.createTextNode("test");F.areHostMethods(fe,["splitText","deleteData","insertData","appendData","cloneNode"])||w.fail("Incomplete Text Node implementation");var Ne=function(Y,ue){for(var Xe=Y.length;Xe--;)if(Y[Xe]===ue)return!0;return!1};function ze(Y){var ue;return typeof Y.namespaceURI==_||(ue=Y.namespaceURI)===null||ue=="http://www.w3.org/1999/xhtml"}function rt(Y){var ue=Y.parentNode;return ue.nodeType==1?ue:null}function Ze(Y){for(var ue=0;Y=Y.previousSibling;)++ue;return ue}function at(Y){switch(Y.nodeType){case 7:case 10:return 0;case 3:case 8:return Y.length;default:return Y.childNodes.length}}function Ct(Y,ue){var Xe=[],Me;for(Me=Y;Me;Me=Me.parentNode)Xe.push(Me);for(Me=ue;Me;Me=Me.parentNode)if(Ne(Xe,Me))return Me;return null}function P(Y,ue,Xe){for(var Me=Xe?ue:ue.parentNode;Me;){if(Me===Y)return!0;Me=Me.parentNode}return!1}function I(Y,ue){return P(Y,ue,!0)}function j(Y,ue,Xe){for(var Me,Dt=Xe?Y:Y.parentNode;Dt;){if(Me=Dt.parentNode,Me===ue)return Dt;Dt=Me}return null}function q(Y){var ue=Y.nodeType;return ue==3||ue==4||ue==8}function H(Y){if(!Y)return!1;var ue=Y.nodeType;return ue==3||ue==8}function re(Y,ue){var Xe=ue.nextSibling,Me=ue.parentNode;return Xe?Me.insertBefore(Y,Xe):Me.appendChild(Y),Y}function te(Y,ue,Xe){var Me=Y.cloneNode(!1);if(Me.deleteData(0,ue),Y.deleteData(ue,Y.length-ue),re(Me,Y),Xe)for(var Dt=0,yt;yt=Xe[Dt++];)yt.node==Y&&yt.offset>ue?(yt.node=Me,yt.offset-=ue):yt.node==Y.parentNode&&yt.offset>Ze(Y)&&++yt.offset;return Me}function oe(Y){if(Y.nodeType==9)return Y;if(typeof Y.ownerDocument!=_)return Y.ownerDocument;if(typeof Y.document!=_)return Y.document;if(Y.parentNode)return oe(Y.parentNode);throw w.createError("getDocument: no document found for node")}function Le(Y){var ue=oe(Y);if(typeof ue.defaultView!=_)return ue.defaultView;if(typeof ue.parentWindow!=_)return ue.parentWindow;throw w.createError("Cannot get a window object for node")}function we(Y){if(typeof Y.contentDocument!=_)return Y.contentDocument;if(typeof Y.contentWindow!=_)return Y.contentWindow.document;throw w.createError("getIframeDocument: No Document object found for iframe element")}function ge(Y){if(typeof Y.contentWindow!=_)return Y.contentWindow;if(typeof Y.contentDocument!=_)return Y.contentDocument.defaultView;throw w.createError("getIframeWindow: No Window object found for iframe element")}function st(Y){return Y&&F.isHostMethod(Y,"setTimeout")&&F.isHostObject(Y,"document")}function et(Y,ue,Xe){var Me;if(Y?F.isHostProperty(Y,"nodeType")?Me=Y.nodeType==1&&Y.tagName.toLowerCase()=="iframe"?we(Y):oe(Y):st(Y)&&(Me=Y.document):Me=document,!Me)throw ue.createError(Xe+"(): Parameter must be a Window object or DOM node");return Me}function nt(Y){for(var ue;ue=Y.parentNode;)Y=ue;return Y}function en(Y,ue,Xe,Me){var Dt,yt,Tr,Un,xn;if(Y==Xe)return ue===Me?0:ue<Me?-1:1;if(Dt=j(Xe,Y,!0))return ue<=Ze(Dt)?-1:1;if(Dt=j(Y,Xe,!0))return Ze(Dt)<Me?-1:1;if(yt=Ct(Y,Xe),!yt)throw new Error("comparePoints error: nodes have no common ancestor");if(Tr=Y===yt?yt:j(Y,yt,!0),Un=Xe===yt?yt:j(Xe,yt,!0),Tr===Un)throw w.createError("comparePoints got to case 4 and childA and childB are the same!");for(xn=yt.firstChild;xn;){if(xn===Tr)return-1;if(xn===Un)return 1;xn=xn.nextSibling}}var ve=!1;function Ae(Y){var ue;try{return ue=Y.parentNode,!1}catch{return!0}}(function(){var Y=document.createElement("b");Y.innerHTML="1";var ue=Y.firstChild;Y.innerHTML="<br />",ve=Ae(ue),$.features.crashyTextNodes=ve})();function dt(Y){if(!Y)return"[No node]";if(ve&&Ae(Y))return"[Broken node]";if(q(Y))return'"'+Y.data+'"';if(Y.nodeType==1){var ue=Y.id?' id="'+Y.id+'"':"";return"<"+Y.nodeName+ue+">[index:"+Ze(Y)+",length:"+Y.childNodes.length+"]["+(Y.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return Y.nodeName}function wt(Y){for(var ue=oe(Y).createDocumentFragment(),Xe;Xe=Y.firstChild;)ue.appendChild(Xe);return ue}var $t;typeof window.getComputedStyle!=_?$t=function(Y,ue){return Le(Y).getComputedStyle(Y,null)[ue]}:typeof document.documentElement.currentStyle!=_?$t=function(Y,ue){return Y.currentStyle?Y.currentStyle[ue]:""}:w.fail("No means of obtaining computed style properties found");function Wn(Y,ue,Xe){var Me=L(Y),Dt=Y.createElement("div");Dt.contentEditable=""+!!Xe,ue&&(Dt.innerHTML=ue);var yt=Me.firstChild;return yt?Me.insertBefore(Dt,yt):Me.appendChild(Dt),Dt}function bn(Y){return Y.parentNode.removeChild(Y)}function tn(Y){this.root=Y,this._next=Y}tn.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var Y=this._current=this._next,ue,Xe;if(this._current)if(ue=Y.firstChild,ue)this._next=ue;else{for(Xe=null;Y!==this.root&&!(Xe=Y.nextSibling);)Y=Y.parentNode;this._next=Xe}return this._current},detach:function(){this._current=this._next=this.root=null}};function nn(Y){return new tn(Y)}function cn(Y,ue){this.node=Y,this.offset=ue}cn.prototype={equals:function(Y){return!!Y&&this.node===Y.node&&this.offset==Y.offset},inspect:function(){return"[DomPosition("+dt(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}};function Nn(Y){this.code=this[Y],this.codeName=Y,this.message="DOMException: "+this.codeName}Nn.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},Nn.prototype.toString=function(){return this.message},$.dom={arrayContains:Ne,isHtmlNamespace:ze,parentElement:rt,getNodeIndex:Ze,getNodeLength:at,getCommonAncestor:Ct,isAncestorOf:P,isOrIsAncestorOf:I,getClosestAncestorIn:j,isCharacterDataNode:q,isTextOrCommentNode:H,insertAfter:re,splitDataNode:te,getDocument:oe,getWindow:Le,getIframeWindow:ge,getIframeDocument:we,getBody:L,isWindow:st,getContentDocument:et,getRootContainer:nt,comparePoints:en,isBrokenNode:Ae,inspectNode:dt,getComputedStyleProperty:$t,createTestElement:Wn,removeNode:bn,fragmentFromNodeChildren:wt,createIterator:nn,DomPosition:cn},$.DOMException=Nn}),A.createCoreModule("DomRange",["DomUtil"],function($,w){var _=$.dom,F=$.util,L=_.DomPosition,se=$.DOMException,fe=_.isCharacterDataNode,Ne=_.getNodeIndex,ze=_.isOrIsAncestorOf,rt=_.getDocument,Ze=_.comparePoints,at=_.splitDataNode,Ct=_.getClosestAncestorIn,P=_.getNodeLength,I=_.arrayContains,j=_.getRootContainer,q=$.features.crashyTextNodes,H=_.removeNode;function re(D,z){return D.nodeType!=3&&(ze(D,z.startContainer)||ze(D,z.endContainer))}function te(D){return D.document||rt(D.startContainer)}function oe(D){return j(D.startContainer)}function Le(D){return new L(D.parentNode,Ne(D))}function we(D){return new L(D.parentNode,Ne(D)+1)}function ge(D,z,Q){var le=D.nodeType==11?D.firstChild:D;return fe(z)?Q==z.length?_.insertAfter(D,z):z.parentNode.insertBefore(D,Q==0?z:at(z,Q)):Q>=z.childNodes.length?z.appendChild(D):z.insertBefore(D,z.childNodes[Q]),le}function st(D,z,Q){if(xt(D),xt(z),te(z)!=te(D))throw new se("WRONG_DOCUMENT_ERR");var le=Ze(D.startContainer,D.startOffset,z.endContainer,z.endOffset),Oe=Ze(D.endContainer,D.endOffset,z.startContainer,z.startOffset);return Q?le<=0&&Oe>=0:le<0&&Oe>0}function et(D){for(var z,Q,le=te(D.range).createDocumentFragment(),Oe;Q=D.next();){if(z=D.isPartiallySelectedSubtree(),Q=Q.cloneNode(!z),z&&(Oe=D.getSubtreeIterator(),Q.appendChild(et(Oe)),Oe.detach()),Q.nodeType==10)throw new se("HIERARCHY_REQUEST_ERR");le.appendChild(Q)}return le}function nt(D,z,Q){var le,Oe;Q=Q||{stop:!1};for(var it,ae;it=D.next();)if(D.isPartiallySelectedSubtree()){if(z(it)===!1){Q.stop=!0;return}else if(ae=D.getSubtreeIterator(),nt(ae,z,Q),ae.detach(),Q.stop)return}else for(le=_.createIterator(it);Oe=le.next();)if(z(Oe)===!1){Q.stop=!0;return}}function en(D){for(var z;D.next();)D.isPartiallySelectedSubtree()?(z=D.getSubtreeIterator(),en(z),z.detach()):D.remove()}function ve(D){for(var z,Q=te(D.range).createDocumentFragment(),le;z=D.next();){if(D.isPartiallySelectedSubtree()?(z=z.cloneNode(!1),le=D.getSubtreeIterator(),z.appendChild(ve(le)),le.detach()):D.remove(),z.nodeType==10)throw new se("HIERARCHY_REQUEST_ERR");Q.appendChild(z)}return Q}function Ae(D,z,Q){var le=!!(z&&z.length),Oe,it=!!Q;le&&(Oe=new RegExp("^("+z.join("|")+")$"));var ae=[];return nt(new wt(D,!1),function(Ee){if(!(le&&!Oe.test(Ee.nodeType))&&!(it&&!Q(Ee))){var Ie=D.startContainer;if(!(Ee==Ie&&fe(Ie)&&D.startOffset==Ie.length)){var tt=D.endContainer;Ee==tt&&fe(tt)&&D.endOffset==0||ae.push(Ee)}}}),ae}function dt(D){var z=typeof D.getName>"u"?"Range":D.getName();return"["+z+"("+_.inspectNode(D.startContainer)+":"+D.startOffset+", "+_.inspectNode(D.endContainer)+":"+D.endOffset+")]"}function wt(D,z){if(this.range=D,this.clonePartiallySelectedTextNodes=z,!D.collapsed){this.sc=D.startContainer,this.so=D.startOffset,this.ec=D.endContainer,this.eo=D.endOffset;var Q=D.commonAncestorContainer;this.sc===this.ec&&fe(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc===Q&&!fe(this.sc)?this.sc.childNodes[this.so]:Ct(this.sc,Q,!0),this._last=this.ec===Q&&!fe(this.ec)?this.ec.childNodes[this.eo-1]:Ct(this.ec,Q,!0))}}wt.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var D=this._current=this._next;return D&&(this._next=D!==this._last?D.nextSibling:null,fe(D)&&this.clonePartiallySelectedTextNodes&&(D===this.ec&&(D=D.cloneNode(!0)).deleteData(this.eo,D.length-this.eo),this._current===this.sc&&(D=D.cloneNode(!0)).deleteData(0,this.so))),D},remove:function(){var D=this._current,z,Q;fe(D)&&(D===this.sc||D===this.ec)?(z=D===this.sc?this.so:0,Q=D===this.ec?this.eo:D.length,z!=Q&&D.deleteData(z,Q-z)):D.parentNode&&H(D)},isPartiallySelectedSubtree:function(){var D=this._current;return re(D,this.range)},getSubtreeIterator:function(){var D;if(this.isSingleCharacterDataNode)D=this.range.cloneRange(),D.collapse(!1);else{D=new Ht(te(this.range));var z=this._current,Q=z,le=0,Oe=z,it=P(z);ze(z,this.sc)&&(Q=this.sc,le=this.so),ze(z,this.ec)&&(Oe=this.ec,it=this.eo),ft(D,Q,le,Oe,it)}return new wt(D,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var $t=[1,3,4,5,7,8,10],Wn=[2,9,11],bn=[5,6,10,12],tn=[1,3,4,5,7,8,10,11],nn=[1,3,4,5,7,8];function cn(D){return function(z,Q){for(var le,Oe=Q?z:z.parentNode;Oe;){if(le=Oe.nodeType,I(D,le))return Oe;Oe=Oe.parentNode}return null}}var Nn=cn([9,11]),Y=cn(bn),ue=cn([6,10,12]),Xe=cn([1]);function Me(D,z){if(ue(D,z))throw new se("INVALID_NODE_TYPE_ERR")}function Dt(D,z){if(!I(z,D.nodeType))throw new se("INVALID_NODE_TYPE_ERR")}function yt(D,z){if(z<0||z>(fe(D)?D.length:D.childNodes.length))throw new se("INDEX_SIZE_ERR")}function Tr(D,z){if(Nn(D,!0)!==Nn(z,!0))throw new se("WRONG_DOCUMENT_ERR")}function Un(D){if(Y(D,!0))throw new se("NO_MODIFICATION_ALLOWED_ERR")}function xn(D,z){if(!D)throw new se(z)}function gs(D,z){return z<=(fe(D)?D.length:D.childNodes.length)}function io(D){return!!D.startContainer&&!!D.endContainer&&!(q&&(_.isBrokenNode(D.startContainer)||_.isBrokenNode(D.endContainer)))&&j(D.startContainer)==j(D.endContainer)&&gs(D.startContainer,D.startOffset)&&gs(D.endContainer,D.endOffset)}function xt(D){if(!io(D))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+D.inspect()+")")}var vs=document.createElement("style"),oi=!1;try{vs.innerHTML="<b>x</b>",oi=vs.firstChild.nodeType==3}catch{}$.features.htmlParsingConforms=oi;var ms=oi?function(D){var z=this.startContainer,Q=rt(z);if(!z)throw new se("INVALID_STATE_ERR");var le=null;return z.nodeType==1?le=z:fe(z)&&(le=_.parentElement(z)),le===null||le.nodeName=="HTML"&&_.isHtmlNamespace(rt(le).documentElement)&&_.isHtmlNamespace(le)?le=Q.createElement("body"):le=le.cloneNode(!1),le.innerHTML=D,_.fragmentFromNodeChildren(le)}:function(D){var z=te(this),Q=z.createElement("body");return Q.innerHTML=D,_.fragmentFromNodeChildren(Q)};function Qo(D,z){xt(D);var Q=D.startContainer,le=D.startOffset,Oe=D.endContainer,it=D.endOffset,ae=Q===Oe;fe(Oe)&&it>0&&it<Oe.length&&at(Oe,it,z),fe(Q)&&le>0&&le<Q.length&&(Q=at(Q,le,z),ae?(it-=le,Oe=Q):Oe==Q.parentNode&&it>=Ne(Q)&&it++,le=0),D.setStartAndEnd(Q,le,Oe,it)}function Ge(D){xt(D);var z=D.commonAncestorContainer.parentNode.cloneNode(!1);return z.appendChild(D.cloneContents()),z.innerHTML}var ea=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ta=0,oo=1,Qu=2,Pi=3,ao=0,ys=1,_s=2,na=3;F.extend($.rangePrototype,{compareBoundaryPoints:function(D,z){xt(this),Tr(this.startContainer,z.startContainer);var Q,le,Oe,it,ae=D==Pi||D==ta?"start":"end",Ee=D==oo||D==ta?"start":"end";return Q=this[ae+"Container"],le=this[ae+"Offset"],Oe=z[Ee+"Container"],it=z[Ee+"Offset"],Ze(Q,le,Oe,it)},insertNode:function(D){if(xt(this),Dt(D,tn),Un(this.startContainer),ze(D,this.startContainer))throw new se("HIERARCHY_REQUEST_ERR");var z=ge(D,this.startContainer,this.startOffset);this.setStartBefore(z)},cloneContents:function(){xt(this);var D,z;if(this.collapsed)return te(this).createDocumentFragment();if(this.startContainer===this.endContainer&&fe(this.startContainer))return D=this.startContainer.cloneNode(!0),D.data=D.data.slice(this.startOffset,this.endOffset),z=te(this).createDocumentFragment(),z.appendChild(D),z;var Q=new wt(this,!0);return D=et(Q),Q.detach(),D},canSurroundContents:function(){xt(this),Un(this.startContainer),Un(this.endContainer);var D=new wt(this,!0),z=D._first&&re(D._first,this)||D._last&&re(D._last,this);return D.detach(),!z},surroundContents:function(D){if(Dt(D,nn),!this.canSurroundContents())throw new se("INVALID_STATE_ERR");var z=this.extractContents();if(D.hasChildNodes())for(;D.lastChild;)D.removeChild(D.lastChild);ge(D,this.startContainer,this.startOffset),D.appendChild(z),this.selectNode(D)},cloneRange:function(){xt(this);for(var D=new Ht(te(this)),z=ea.length,Q;z--;)Q=ea[z],D[Q]=this[Q];return D},toString:function(){xt(this);var D=this.startContainer;if(D===this.endContainer&&fe(D))return D.nodeType==3||D.nodeType==4?D.data.slice(this.startOffset,this.endOffset):"";var z=[],Q=new wt(this,!0);return nt(Q,function(le){(le.nodeType==3||le.nodeType==4)&&z.push(le.data)}),Q.detach(),z.join("")},compareNode:function(D){xt(this);var z=D.parentNode,Q=Ne(D);if(!z)throw new se("NOT_FOUND_ERR");var le=this.comparePoint(z,Q),Oe=this.comparePoint(z,Q+1);return le<0?Oe>0?_s:ao:Oe>0?ys:na},comparePoint:function(D,z){return xt(this),xn(D,"HIERARCHY_REQUEST_ERR"),Tr(D,this.startContainer),Ze(D,z,this.startContainer,this.startOffset)<0?-1:Ze(D,z,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ms,toHtml:function(){return Ge(this)},intersectsNode:function(D,z){if(xt(this),j(D)!=oe(this))return!1;var Q=D.parentNode,le=Ne(D);if(!Q)return!0;var Oe=Ze(Q,le,this.endContainer,this.endOffset),it=Ze(Q,le+1,this.startContainer,this.startOffset);return z?Oe<=0&&it>=0:Oe<0&&it>0},isPointInRange:function(D,z){return xt(this),xn(D,"HIERARCHY_REQUEST_ERR"),Tr(D,this.startContainer),Ze(D,z,this.startContainer,this.startOffset)>=0&&Ze(D,z,this.endContainer,this.endOffset)<=0},intersectsRange:function(D){return st(this,D,!1)},intersectsOrTouchesRange:function(D){return st(this,D,!0)},intersection:function(D){if(this.intersectsRange(D)){var z=Ze(this.startContainer,this.startOffset,D.startContainer,D.startOffset),Q=Ze(this.endContainer,this.endOffset,D.endContainer,D.endOffset),le=this.cloneRange();return z==-1&&le.setStart(D.startContainer,D.startOffset),Q==1&&le.setEnd(D.endContainer,D.endOffset),le}return null},union:function(D){if(this.intersectsOrTouchesRange(D)){var z=this.cloneRange();return Ze(D.startContainer,D.startOffset,this.startContainer,this.startOffset)==-1&&z.setStart(D.startContainer,D.startOffset),Ze(D.endContainer,D.endOffset,this.endContainer,this.endOffset)==1&&z.setEnd(D.endContainer,D.endOffset),z}else throw new se("Ranges do not intersect")},containsNode:function(D,z){return z?this.intersectsNode(D,!1):this.compareNode(D)==na},containsNodeContents:function(D){return this.comparePoint(D,0)>=0&&this.comparePoint(D,P(D))<=0},containsRange:function(D){var z=this.intersection(D);return z!==null&&D.equals(z)},containsNodeText:function(D){var z=this.cloneRange();z.selectNode(D);var Q=z.getNodes([3]);if(Q.length>0){z.setStart(Q[0],0);var le=Q.pop();return z.setEnd(le,le.length),this.containsRange(z)}else return this.containsNodeContents(D)},getNodes:function(D,z){return xt(this),Ae(this,D,z)},getDocument:function(){return te(this)},collapseBefore:function(D){this.setEndBefore(D),this.collapse(!1)},collapseAfter:function(D){this.setStartAfter(D),this.collapse(!0)},getBookmark:function(D){var z=te(this),Q=$.createRange(z);D=D||_.getBody(z),Q.selectNodeContents(D);var le=this.intersection(Q),Oe=0,it=0;return le&&(Q.setEnd(le.startContainer,le.startOffset),Oe=Q.toString().length,it=Oe+le.toString().length),{start:Oe,end:it,containerNode:D}},moveToBookmark:function(D){var z=D.containerNode,Q=0;this.setStart(z,0),this.collapse(!0);for(var le=[z],Oe,it=!1,ae=!1,Ee,Ie,tt;!ae&&(Oe=le.pop());)if(Oe.nodeType==3)Ee=Q+Oe.length,!it&&D.start>=Q&&D.start<=Ee&&(this.setStart(Oe,D.start-Q),it=!0),it&&D.end>=Q&&D.end<=Ee&&(this.setEnd(Oe,D.end-Q),ae=!0),Q=Ee;else for(tt=Oe.childNodes,Ie=tt.length;Ie--;)le.push(tt[Ie])},getName:function(){return"DomRange"},equals:function(D){return Ht.rangesEqual(this,D)},isValid:function(){return io(this)},inspect:function(){return dt(this)},detach:function(){}});function M(D){D.START_TO_START=ta,D.START_TO_END=oo,D.END_TO_END=Qu,D.END_TO_START=Pi,D.NODE_BEFORE=ao,D.NODE_AFTER=ys,D.NODE_BEFORE_AND_AFTER=_s,D.NODE_INSIDE=na}function W(D){M(D),M(D.prototype)}function ne(D,z){return function(){xt(this);var Q=this.startContainer,le=this.startOffset,Oe=this.commonAncestorContainer,it=new wt(this,!0),ae,Ee;Q!==Oe&&(ae=Ct(Q,Oe,!0),Ee=we(ae),Q=Ee.node,le=Ee.offset),nt(it,Un),it.reset();var Ie=D(it);return it.detach(),z(this,Q,le,Q,le),Ie}}function ye(D,z){function Q(ae,Ee){return function(Ie){Dt(Ie,$t),Dt(j(Ie),Wn);var tt=(ae?Le:we)(Ie);(Ee?le:Oe)(this,tt.node,tt.offset)}}function le(ae,Ee,Ie){var tt=ae.endContainer,En=ae.endOffset;(Ee!==ae.startContainer||Ie!==ae.startOffset)&&((j(Ee)!=j(tt)||Ze(Ee,Ie,tt,En)==1)&&(tt=Ee,En=Ie),z(ae,Ee,Ie,tt,En))}function Oe(ae,Ee,Ie){var tt=ae.startContainer,En=ae.startOffset;(Ee!==ae.endContainer||Ie!==ae.endOffset)&&((j(Ee)!=j(tt)||Ze(Ee,Ie,tt,En)==-1)&&(tt=Ee,En=Ie),z(ae,tt,En,Ee,Ie))}var it=function(){};it.prototype=$.rangePrototype,D.prototype=new it,F.extend(D.prototype,{setStart:function(ae,Ee){Me(ae,!0),yt(ae,Ee),le(this,ae,Ee)},setEnd:function(ae,Ee){Me(ae,!0),yt(ae,Ee),Oe(this,ae,Ee)},setStartAndEnd:function(){var ae=arguments,Ee=ae[0],Ie=ae[1],tt=Ee,En=Ie;switch(ae.length){case 3:En=ae[2];break;case 4:tt=ae[2],En=ae[3];break}Me(Ee,!0),yt(Ee,Ie),Me(tt,!0),yt(tt,En),z(this,Ee,Ie,tt,En)},setBoundary:function(ae,Ee,Ie){this["set"+(Ie?"Start":"End")](ae,Ee)},setStartBefore:Q(!0,!0),setStartAfter:Q(!1,!0),setEndBefore:Q(!0,!1),setEndAfter:Q(!1,!1),collapse:function(ae){xt(this),ae?z(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):z(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(ae){Me(ae,!0),z(this,ae,0,ae,P(ae))},selectNode:function(ae){Me(ae,!1),Dt(ae,$t);var Ee=Le(ae),Ie=we(ae);z(this,Ee.node,Ee.offset,Ie.node,Ie.offset)},extractContents:ne(ve,z),deleteContents:ne(en,z),canSurroundContents:function(){xt(this),Un(this.startContainer),Un(this.endContainer);var ae=new wt(this,!0),Ee=ae._first&&re(ae._first,this)||ae._last&&re(ae._last,this);return ae.detach(),!Ee},splitBoundaries:function(){Qo(this)},splitBoundariesPreservingPositions:function(ae){Qo(this,ae)},normalizeBoundaries:function(){xt(this);var ae=this.startContainer,Ee=this.startOffset,Ie=this.endContainer,tt=this.endOffset,En=function(Mn){var Wr=Mn.nextSibling;Wr&&Wr.nodeType==Mn.nodeType&&(Ie=Mn,tt=Mn.length,Mn.appendData(Wr.data),H(Wr))},Vx=function(Mn){var Wr=Mn.previousSibling;if(Wr&&Wr.nodeType==Mn.nodeType){ae=Mn;var i9=Mn.length;if(Ee=Wr.length,Mn.insertData(0,Wr.data),H(Wr),ae==Ie)tt+=Ee,Ie=ae;else if(Ie==Mn.parentNode){var Xx=Ne(Mn);tt==Xx?(Ie=Mn,tt=i9):tt>Xx&&tt--}}},Vp=!0,sr;if(fe(Ie))tt==Ie.length?En(Ie):tt==0&&(sr=Ie.previousSibling,sr&&sr.nodeType==Ie.nodeType&&(tt=sr.length,ae==Ie&&(Vp=!1),sr.appendData(Ie.data),H(Ie),Ie=sr));else{if(tt>0){var Xp=Ie.childNodes[tt-1];Xp&&fe(Xp)&&En(Xp)}Vp=!this.collapsed}if(Vp){if(fe(ae))Ee==0?Vx(ae):Ee==ae.length&&(sr=ae.nextSibling,sr&&sr.nodeType==ae.nodeType&&(Ie==sr&&(Ie=ae,tt+=ae.length),ae.appendData(sr.data),H(sr)));else if(Ee<ae.childNodes.length){var Gp=ae.childNodes[Ee];Gp&&fe(Gp)&&Vx(Gp)}}else ae=Ie,Ee=tt;z(this,ae,Ee,Ie,tt)},collapseToPoint:function(ae,Ee){Me(ae,!0),yt(ae,Ee),this.setStartAndEnd(ae,Ee)},parentElement:function(){xt(this);var ae=this.commonAncestorContainer;return ae?Xe(this.commonAncestorContainer,!0):null}}),W(D)}function Fe(D){D.collapsed=D.startContainer===D.endContainer&&D.startOffset===D.endOffset,D.commonAncestorContainer=D.collapsed?D.startContainer:_.getCommonAncestor(D.startContainer,D.endContainer)}function ft(D,z,Q,le,Oe){D.startContainer=z,D.startOffset=Q,D.endContainer=le,D.endOffset=Oe,D.document=_.getDocument(z),Fe(D)}function Ht(D){ft(this,D,0,D,0)}ye(Ht,ft),F.extend(Ht,{rangeProperties:ea,RangeIterator:wt,copyComparisonConstants:W,createPrototypeRange:ye,inspect:dt,toHtml:Ge,getRangeDocument:te,rangesEqual:function(D,z){return D.startContainer===z.startContainer&&D.startOffset===z.startOffset&&D.endContainer===z.endContainer&&D.endOffset===z.endOffset}}),$.DomRange=Ht}),A.createCoreModule("WrappedRange",["DomRange"],function($,w){var _,F,L=$.dom,se=$.util,fe=L.DomPosition,Ne=$.DomRange,ze=L.getBody,rt=L.getContentDocument,Ze=L.isCharacterDataNode;if($.features.implementsDomRange&&function(){var H,re=Ne.rangeProperties;function te(ve){for(var Ae=re.length,dt;Ae--;)dt=re[Ae],ve[dt]=ve.nativeRange[dt];ve.collapsed=ve.startContainer===ve.endContainer&&ve.startOffset===ve.endOffset}function oe(ve,Ae,dt,wt,$t){var Wn=ve.startContainer!==Ae||ve.startOffset!=dt,bn=ve.endContainer!==wt||ve.endOffset!=$t,tn=!ve.equals(ve.nativeRange);(Wn||bn||tn)&&(ve.setEnd(wt,$t),ve.setStart(Ae,dt))}var Le;_=function(ve){if(!ve)throw w.createError("WrappedRange: Range must be specified");this.nativeRange=ve,te(this)},Ne.createPrototypeRange(_,oe),H=_.prototype,H.selectNode=function(ve){this.nativeRange.selectNode(ve),te(this)},H.cloneContents=function(){return this.nativeRange.cloneContents()},H.surroundContents=function(ve){this.nativeRange.surroundContents(ve),te(this)},H.collapse=function(ve){this.nativeRange.collapse(ve),te(this)},H.cloneRange=function(){return new _(this.nativeRange.cloneRange())},H.refresh=function(){te(this)},H.toString=function(){return this.nativeRange.toString()};var we=document.createTextNode("test");ze(document).appendChild(we);var ge=document.createRange();ge.setStart(we,0),ge.setEnd(we,0);try{ge.setStart(we,1),H.setStart=function(ve,Ae){this.nativeRange.setStart(ve,Ae),te(this)},H.setEnd=function(ve,Ae){this.nativeRange.setEnd(ve,Ae),te(this)},Le=function(ve){return function(Ae){this.nativeRange[ve](Ae),te(this)}}}catch{H.setStart=function(Ae,dt){try{this.nativeRange.setStart(Ae,dt)}catch{this.nativeRange.setEnd(Ae,dt),this.nativeRange.setStart(Ae,dt)}te(this)},H.setEnd=function(Ae,dt){try{this.nativeRange.setEnd(Ae,dt)}catch{this.nativeRange.setStart(Ae,dt),this.nativeRange.setEnd(Ae,dt)}te(this)},Le=function(Ae,dt){return function(wt){try{this.nativeRange[Ae](wt)}catch{this.nativeRange[dt](wt),this.nativeRange[Ae](wt)}te(this)}}}H.setStartBefore=Le("setStartBefore","setEndBefore"),H.setStartAfter=Le("setStartAfter","setEndAfter"),H.setEndBefore=Le("setEndBefore","setStartBefore"),H.setEndAfter=Le("setEndAfter","setStartAfter"),H.selectNodeContents=function(ve){this.setStartAndEnd(ve,0,L.getNodeLength(ve))},ge.selectNodeContents(we),ge.setEnd(we,3);var st=document.createRange();st.selectNodeContents(we),st.setEnd(we,4),st.setStart(we,2),ge.compareBoundaryPoints(ge.START_TO_END,st)==-1&&ge.compareBoundaryPoints(ge.END_TO_START,st)==1?H.compareBoundaryPoints=function(ve,Ae){return Ae=Ae.nativeRange||Ae,ve==Ae.START_TO_END?ve=Ae.END_TO_START:ve==Ae.END_TO_START&&(ve=Ae.START_TO_END),this.nativeRange.compareBoundaryPoints(ve,Ae)}:H.compareBoundaryPoints=function(ve,Ae){return this.nativeRange.compareBoundaryPoints(ve,Ae.nativeRange||Ae)};var et=document.createElement("div");et.innerHTML="123";var nt=et.firstChild,en=ze(document);en.appendChild(et),ge.setStart(nt,1),ge.setEnd(nt,2),ge.deleteContents(),nt.data=="13"&&(H.deleteContents=function(){this.nativeRange.deleteContents(),te(this)},H.extractContents=function(){var ve=this.nativeRange.extractContents();return te(this),ve}),en.removeChild(et),en=null,se.isHostMethod(ge,"createContextualFragment")&&(H.createContextualFragment=function(ve){return this.nativeRange.createContextualFragment(ve)}),ze(document).removeChild(we),H.getName=function(){return"WrappedRange"},$.WrappedRange=_,$.createNativeRange=function(ve){return ve=rt(ve,w,"createNativeRange"),ve.createRange()}}(),$.features.implementsTextRange){var at=function(H){var re=H.parentElement(),te=H.duplicate();te.collapse(!0);var oe=te.parentElement();te=H.duplicate(),te.collapse(!1);var Le=te.parentElement(),we=oe==Le?oe:L.getCommonAncestor(oe,Le);return we==re?we:L.getCommonAncestor(re,we)},Ct=function(H){return H.compareEndPoints("StartToEnd",H)==0},P=function(H,re,te,oe,Le){var we=H.duplicate();we.collapse(te);var ge=we.parentElement();if(L.isOrIsAncestorOf(re,ge)||(ge=re),!ge.canHaveHTML){var st=new fe(ge.parentNode,L.getNodeIndex(ge));return{boundaryPosition:st,nodeInfo:{nodeIndex:st.offset,containerElement:st.node}}}var et=L.getDocument(ge).createElement("span");et.parentNode&&L.removeNode(et);for(var nt,en=te?"StartToStart":"StartToEnd",ve,Ae,dt,wt,$t=Le&&Le.containerElement==ge?Le.nodeIndex:0,Wn=ge.childNodes.length,bn=Wn,tn=bn;tn==Wn?ge.appendChild(et):ge.insertBefore(et,ge.childNodes[tn]),we.moveToElementText(et),nt=we.compareEndPoints(en,H),!(nt==0||$t==bn);){if(nt==-1){if(bn==$t+1)break;$t=tn}else bn=bn==$t+1?$t:tn;tn=Math.floor(($t+bn)/2),ge.removeChild(et)}if(wt=et.nextSibling,nt==-1&&wt&&Ze(wt)){we.setEndPoint(te?"EndToStart":"EndToEnd",H);var nn;if(/[\r\n]/.test(wt.data)){var cn=we.duplicate(),Nn=cn.text.replace(/\r\n/g,"\r").length;for(nn=cn.moveStart("character",Nn);(nt=cn.compareEndPoints("StartToEnd",cn))==-1;)nn++,cn.moveStart("character",1)}else nn=we.text.length;dt=new fe(wt,nn)}else ve=(oe||!te)&&et.previousSibling,Ae=(oe||te)&&et.nextSibling,Ae&&Ze(Ae)?dt=new fe(Ae,0):ve&&Ze(ve)?dt=new fe(ve,ve.data.length):dt=new fe(ge,L.getNodeIndex(et));return L.removeNode(et),{boundaryPosition:dt,nodeInfo:{nodeIndex:tn,containerElement:ge}}},I=function(H,re){var te,oe,Le=H.offset,we=L.getDocument(H.node),ge,st,et=ze(we).createTextRange(),nt=Ze(H.node);return nt?(te=H.node,oe=te.parentNode):(st=H.node.childNodes,te=Le<st.length?st[Le]:null,oe=H.node),ge=we.createElement("span"),ge.innerHTML="&#feff;",te?oe.insertBefore(ge,te):oe.appendChild(ge),et.moveToElementText(ge),et.collapse(!re),oe.removeChild(ge),nt&&et[re?"moveStart":"moveEnd"]("character",Le),et};F=function(H){this.textRange=H,this.refresh()},F.prototype=new Ne(document),F.prototype.refresh=function(){var H,re,te,oe=at(this.textRange);Ct(this.textRange)?re=H=P(this.textRange,oe,!0,!0).boundaryPosition:(te=P(this.textRange,oe,!0,!1),H=te.boundaryPosition,re=P(this.textRange,oe,!1,!1,te.nodeInfo).boundaryPosition),this.setStart(H.node,H.offset),this.setEnd(re.node,re.offset)},F.prototype.getName=function(){return"WrappedTextRange"},Ne.copyComparisonConstants(F);var j=function(H){if(H.collapsed)return I(new fe(H.startContainer,H.startOffset),!0);var re=I(new fe(H.startContainer,H.startOffset),!0),te=I(new fe(H.endContainer,H.endOffset),!1),oe=ze(Ne.getRangeDocument(H)).createTextRange();return oe.setEndPoint("StartToStart",re),oe.setEndPoint("EndToEnd",te),oe};if(F.rangeToTextRange=j,F.prototype.toTextRange=function(){return j(this)},$.WrappedTextRange=F,!$.features.implementsDomRange||$.config.preferTextRange){var q=function(H){return H("return this;")()}(Function);typeof q.Range>"u"&&(q.Range=F),$.createNativeRange=function(H){return H=rt(H,w,"createNativeRange"),ze(H).createTextRange()},$.WrappedRange=F}}$.createRange=function(H){return H=rt(H,w,"createRange"),new $.WrappedRange($.createNativeRange(H))},$.createRangyRange=function(H){return H=rt(H,w,"createRangyRange"),new Ne(H)},se.createAliasForDeprecatedMethod($,"createIframeRange","createRange"),se.createAliasForDeprecatedMethod($,"createIframeRangyRange","createRangyRange"),$.addShimListener(function(H){var re=H.document;typeof re.createRange>"u"&&(re.createRange=function(){return $.createRange(re)}),re=H=null})}),A.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function($,w){$.config.checkSelectionRanges=!0;var _="boolean",F="number",L=$.dom,se=$.util,fe=se.isHostMethod,Ne=$.DomRange,ze=$.WrappedRange,rt=$.DOMException,Ze=L.DomPosition,at,Ct,P=$.features,I="Control",j=L.getDocument,q=L.getBody,H=Ne.rangesEqual;function re(M){return typeof M=="string"?/^backward(s)?$/i.test(M):!!M}function te(M,W){if(M){if(L.isWindow(M))return M;if(M instanceof xt)return M.win;var ne=L.getContentDocument(M,w,W);return L.getWindow(ne)}else return window}function oe(M){return te(M,"getWinSelection").getSelection()}function Le(M){return te(M,"getDocSelection").document.selection}function we(M){var W=!1;return M.anchorNode&&(W=L.comparePoints(M.anchorNode,M.anchorOffset,M.focusNode,M.focusOffset)==1),W}var ge=fe(window,"getSelection"),st=se.isHostObject(document,"selection");P.implementsWinGetSelection=ge,P.implementsDocSelection=st;var et=st&&(!ge||$.config.preferTextRange);if(et)at=Le,$.isSelectionValid=function(M){var W=te(M,"isSelectionValid").document,ne=W.selection;return ne.type!="None"||j(ne.createRange().parentElement())==W};else if(ge)at=oe,$.isSelectionValid=function(){return!0};else return w.fail("Neither document.selection or window.getSelection() detected."),!1;$.getNativeSelection=at;var nt=at();if(!nt)return w.fail("Native selection was null (possibly issue 138?)"),!1;var en=$.createNativeRange(document),ve=q(document),Ae=se.areHostProperties(nt,["anchorNode","focusNode","anchorOffset","focusOffset"]);P.selectionHasAnchorAndFocus=Ae;var dt=fe(nt,"extend");P.selectionHasExtend=dt;var wt=fe(nt,"setBaseAndExtent");P.selectionHasSetBaseAndExtent=wt;var $t=typeof nt.rangeCount==F;P.selectionHasRangeCount=$t;var Wn=!1,bn=!0,tn=dt?function(M,W){var ne=Ne.getRangeDocument(W),ye=$.createRange(ne);ye.collapseToPoint(W.endContainer,W.endOffset),M.addRange(Me(ye)),M.extend(W.startContainer,W.startOffset)}:null;se.areHostMethods(nt,["addRange","getRangeAt","removeAllRanges"])&&typeof nt.rangeCount==F&&P.implementsDomRange&&function(){var M=window.getSelection();if(M){for(var W=M.rangeCount,ne=W>1,ye=[],Fe=we(M),ft=0;ft<W;++ft)ye[ft]=M.getRangeAt(ft);var Ht=L.createTestElement(document,"",!1),D=Ht.appendChild(document.createTextNode(" ")),z=document.createRange();if(z.setStart(D,1),z.collapse(!0),M.removeAllRanges(),M.addRange(z),bn=M.rangeCount==1,M.removeAllRanges(),!ne){var Q=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(Q&&parseInt(Q[1])>=36)Wn=!1;else{var le=z.cloneRange();z.setStart(D,0),le.setEnd(D,3),le.setStart(D,2),M.addRange(z),M.addRange(le),Wn=M.rangeCount==2}}for(L.removeNode(Ht),M.removeAllRanges(),ft=0;ft<W;++ft)ft==0&&Fe?tn?tn(M,ye[ft]):($.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),M.addRange(ye[ft])):M.addRange(ye[ft])}}(),P.selectionSupportsMultipleRanges=Wn,P.collapsedNonEditableSelectionsSupported=bn;var nn=!1,cn;ve&&fe(ve,"createControlRange")&&(cn=ve.createControlRange(),se.areHostProperties(cn,["item","add"])&&(nn=!0)),P.implementsControlRange=nn,Ae?Ct=function(M){return M.anchorNode===M.focusNode&&M.anchorOffset===M.focusOffset}:Ct=function(M){return M.rangeCount?M.getRangeAt(M.rangeCount-1).collapsed:!1};function Nn(M,W,ne){var ye=ne?"end":"start",Fe=ne?"start":"end";M.anchorNode=W[ye+"Container"],M.anchorOffset=W[ye+"Offset"],M.focusNode=W[Fe+"Container"],M.focusOffset=W[Fe+"Offset"]}function Y(M){var W=M.nativeSelection;M.anchorNode=W.anchorNode,M.anchorOffset=W.anchorOffset,M.focusNode=W.focusNode,M.focusOffset=W.focusOffset}function ue(M){M.anchorNode=M.focusNode=null,M.anchorOffset=M.focusOffset=0,M.rangeCount=0,M.isCollapsed=!0,M._ranges.length=0,Xe(M)}function Xe(M){M.type=M.rangeCount==0?"None":Ct(M)?"Caret":"Range"}function Me(M){var W;return M instanceof Ne?(W=$.createNativeRange(M.getDocument()),W.setEnd(M.endContainer,M.endOffset),W.setStart(M.startContainer,M.startOffset)):M instanceof ze?W=M.nativeRange:P.implementsDomRange&&M instanceof L.getWindow(M.startContainer).Range&&(W=M),W}function Dt(M){if(!M.length||M[0].nodeType!=1)return!1;for(var W=1,ne=M.length;W<ne;++W)if(!L.isAncestorOf(M[0],M[W]))return!1;return!0}function yt(M){var W=M.getNodes();if(!Dt(W))throw w.createError("getSingleElementFromRange: range "+M.inspect()+" did not consist of a single element");return W[0]}function Tr(M){return!!M&&typeof M.text<"u"}function Un(M,W){var ne=new ze(W);M._ranges=[ne],Nn(M,ne,!1),M.rangeCount=1,M.isCollapsed=ne.collapsed,Xe(M)}function xn(M){if(M._ranges.length=0,M.docSelection.type=="None")ue(M);else{var W=M.docSelection.createRange();if(Tr(W))Un(M,W);else{M.rangeCount=W.length;for(var ne,ye=j(W.item(0)),Fe=0;Fe<M.rangeCount;++Fe)ne=$.createRange(ye),ne.selectNode(W.item(Fe)),M._ranges.push(ne);M.isCollapsed=M.rangeCount==1&&M._ranges[0].collapsed,Nn(M,M._ranges[M.rangeCount-1],!1),Xe(M)}}}function gs(M,W){for(var ne=M.docSelection.createRange(),ye=yt(W),Fe=j(ne.item(0)),ft=q(Fe).createControlRange(),Ht=0,D=ne.length;Ht<D;++Ht)ft.add(ne.item(Ht));try{ft.add(ye)}catch{throw w.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}ft.select(),xn(M)}var io;fe(nt,"getRangeAt")?io=function(M,W){try{return M.getRangeAt(W)}catch{return null}}:Ae&&(io=function(M){var W=j(M.anchorNode),ne=$.createRange(W);return ne.setStartAndEnd(M.anchorNode,M.anchorOffset,M.focusNode,M.focusOffset),ne.collapsed!==this.isCollapsed&&ne.setStartAndEnd(M.focusNode,M.focusOffset,M.anchorNode,M.anchorOffset),ne});function xt(M,W,ne){this.nativeSelection=M,this.docSelection=W,this._ranges=[],this.win=ne,this.refresh()}xt.prototype=$.selectionPrototype;function vs(M){M.win=M.anchorNode=M.focusNode=M._ranges=null,M.rangeCount=M.anchorOffset=M.focusOffset=0,M.detached=!0,Xe(M)}var oi=[];function ms(M,W){for(var ne=oi.length,ye,Fe;ne--;)if(ye=oi[ne],Fe=ye.selection,W=="deleteAll")vs(Fe);else if(ye.win==M)return W=="delete"?(oi.splice(ne,1),!0):Fe;return W=="deleteAll"&&(oi.length=0),null}var Qo=function(M){if(M&&M instanceof xt)return M.refresh(),M;M=te(M,"getNativeSelection");var W=ms(M),ne=at(M),ye=st?Le(M):null;return W?(W.nativeSelection=ne,W.docSelection=ye,W.refresh()):(W=new xt(ne,ye,M),oi.push({win:M,selection:W})),W};$.getSelection=Qo,se.createAliasForDeprecatedMethod($,"getIframeSelection","getSelection");var Ge=xt.prototype;function ea(M,W){for(var ne=j(W[0].startContainer),ye=q(ne).createControlRange(),Fe=0,ft,Ht=W.length;Fe<Ht;++Fe){ft=yt(W[Fe]);try{ye.add(ft)}catch{throw w.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}ye.select(),xn(M)}if(!et&&Ae&&se.areHostMethods(nt,["removeAllRanges","addRange"])){Ge.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),ue(this)};var ta=function(M,W){tn(M.nativeSelection,W),M.refresh()};$t?Ge.addRange=function(M,W){if(nn&&st&&this.docSelection.type==I)gs(this,M);else if(re(W)&&dt)ta(this,M);else{var ne;Wn?ne=this.rangeCount:(this.removeAllRanges(),ne=0);var ye=Me(M).cloneRange();try{this.nativeSelection.addRange(ye)}catch{}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==ne+1){if($.config.checkSelectionRanges){var Fe=io(this.nativeSelection,this.rangeCount-1);Fe&&!H(Fe,M)&&(M=new ze(Fe))}this._ranges[this.rangeCount-1]=M,Nn(this,M,Pi(this.nativeSelection)),this.isCollapsed=Ct(this),Xe(this)}else this.refresh()}}:Ge.addRange=function(M,W){re(W)&&dt?ta(this,M):(this.nativeSelection.addRange(Me(M)),this.refresh())},Ge.setRanges=function(M){if(nn&&st&&M.length>1)ea(this,M);else{this.removeAllRanges();for(var W=0,ne=M.length;W<ne;++W)this.addRange(M[W])}}}else if(fe(nt,"empty")&&fe(en,"select")&&nn&&et)Ge.removeAllRanges=function(){try{if(this.docSelection.empty(),this.docSelection.type!="None"){var M;if(this.anchorNode)M=j(this.anchorNode);else if(this.docSelection.type==I){var W=this.docSelection.createRange();W.length&&(M=j(W.item(0)))}if(M){var ne=q(M).createTextRange();ne.select(),this.docSelection.empty()}}}catch{}ue(this)},Ge.addRange=function(M){this.docSelection.type==I?gs(this,M):($.WrappedTextRange.rangeToTextRange(M).select(),this._ranges[0]=M,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,Nn(this,M,!1),Xe(this))},Ge.setRanges=function(M){this.removeAllRanges();var W=M.length;W>1?ea(this,M):W&&this.addRange(M[0])};else return w.fail("No means of selecting a Range or TextRange was found"),!1;Ge.getRangeAt=function(M){if(M<0||M>=this.rangeCount)throw new rt("INDEX_SIZE_ERR");return this._ranges[M].cloneRange()};var oo;if(et)oo=function(M){var W;$.isSelectionValid(M.win)?W=M.docSelection.createRange():(W=q(M.win.document).createTextRange(),W.collapse(!0)),M.docSelection.type==I?xn(M):Tr(W)?Un(M,W):ue(M)};else if(fe(nt,"getRangeAt")&&typeof nt.rangeCount==F)oo=function(M){if(nn&&st&&M.docSelection.type==I)xn(M);else if(M._ranges.length=M.rangeCount=M.nativeSelection.rangeCount,M.rangeCount){for(var W=0,ne=M.rangeCount;W<ne;++W)M._ranges[W]=new $.WrappedRange(M.nativeSelection.getRangeAt(W));Nn(M,M._ranges[M.rangeCount-1],Pi(M.nativeSelection)),M.isCollapsed=Ct(M),Xe(M)}else ue(M)};else if(Ae&&typeof nt.isCollapsed==_&&typeof en.collapsed==_&&P.implementsDomRange)oo=function(M){var W,ne=M.nativeSelection;ne.anchorNode?(W=io(ne,0),M._ranges=[W],M.rangeCount=1,Y(M),M.isCollapsed=Ct(M),Xe(M)):ue(M)};else return w.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;Ge.refresh=function(M){var W=M?this._ranges.slice(0):null,ne=this.anchorNode,ye=this.anchorOffset;if(oo(this),M){var Fe=W.length;if(Fe!=this._ranges.length||this.anchorNode!=ne||this.anchorOffset!=ye)return!0;for(;Fe--;)if(!H(W[Fe],this._ranges[Fe]))return!0;return!1}};var Qu=function(M,W){var ne=M.getAllRanges();M.removeAllRanges();for(var ye=0,Fe=ne.length;ye<Fe;++ye)H(W,ne[ye])||M.addRange(ne[ye]);M.rangeCount||ue(M)};nn&&st?Ge.removeRange=function(M){if(this.docSelection.type==I){for(var W=this.docSelection.createRange(),ne=yt(M),ye=j(W.item(0)),Fe=q(ye).createControlRange(),ft,Ht=!1,D=0,z=W.length;D<z;++D)ft=W.item(D),ft!==ne||Ht?Fe.add(W.item(D)):Ht=!0;Fe.select(),xn(this)}else Qu(this,M)}:Ge.removeRange=function(M){Qu(this,M)};var Pi;!et&&Ae&&P.implementsDomRange?(Pi=we,Ge.isBackward=function(){return Pi(this)}):Pi=Ge.isBackward=function(){return!1},Ge.isBackwards=Ge.isBackward,Ge.toString=function(){for(var M=[],W=0,ne=this.rangeCount;W<ne;++W)M[W]=""+this._ranges[W];return M.join("")};function ao(M,W){if(M.win.document!=j(W))throw new rt("WRONG_DOCUMENT_ERR")}function ys(M,W){if(W<0||W>(L.isCharacterDataNode(M)?M.length:M.childNodes.length))throw new rt("INDEX_SIZE_ERR")}Ge.collapse=function(M,W){ao(this,M);var ne=$.createRange(M);ne.collapseToPoint(M,W),this.setSingleRange(ne),this.isCollapsed=!0},Ge.collapseToStart=function(){if(this.rangeCount){var M=this._ranges[0];this.collapse(M.startContainer,M.startOffset)}else throw new rt("INVALID_STATE_ERR")},Ge.collapseToEnd=function(){if(this.rangeCount){var M=this._ranges[this.rangeCount-1];this.collapse(M.endContainer,M.endOffset)}else throw new rt("INVALID_STATE_ERR")},Ge.selectAllChildren=function(M){ao(this,M);var W=$.createRange(M);W.selectNodeContents(M),this.setSingleRange(W)},wt?Ge.setBaseAndExtent=function(M,W,ne,ye){this.nativeSelection.setBaseAndExtent(M,W,ne,ye),this.refresh()}:dt&&(Ge.setBaseAndExtent=function(M,W,ne,ye){ys(M,W),ys(ne,ye),ao(this,M),ao(this,ne);var Fe=$.createRange(node),ft=L.comparePoints(M,W,ne,ye)==-1;ft?Fe.setStartAndEnd(ne,ye,M,W):Fe.setStartAndEnd(M,W,ne,ye),this.setSingleRange(Fe,ft)}),Ge.deleteFromDocument=function(){if(nn&&st&&this.docSelection.type==I){for(var M=this.docSelection.createRange(),W;M.length;)W=M.item(0),M.remove(W),L.removeNode(W);this.refresh()}else if(this.rangeCount){var ne=this.getAllRanges();if(ne.length){this.removeAllRanges();for(var ye=0,Fe=ne.length;ye<Fe;++ye)ne[ye].deleteContents();this.addRange(ne[Fe-1])}}},Ge.eachRange=function(M,W){for(var ne=0,ye=this._ranges.length;ne<ye;++ne)if(M(this.getRangeAt(ne)))return W},Ge.getAllRanges=function(){var M=[];return this.eachRange(function(W){M.push(W)}),M},Ge.setSingleRange=function(M,W){this.removeAllRanges(),this.addRange(M,W)},Ge.callMethodOnEachRange=function(M,W){var ne=[];return this.eachRange(function(ye){ne.push(ye[M].apply(ye,W||[]))}),ne};function _s(M){return function(W,ne){var ye;this.rangeCount?(ye=this.getRangeAt(0),ye["set"+(M?"Start":"End")](W,ne)):(ye=$.createRange(this.win.document),ye.setStartAndEnd(W,ne)),this.setSingleRange(ye,this.isBackward())}}Ge.setStart=_s(!0),Ge.setEnd=_s(!1),$.rangePrototype.select=function(M){Qo(this.getDocument()).setSingleRange(this,M)},Ge.changeEachRange=function(M){var W=[],ne=this.isBackward();this.eachRange(function(ye){M(ye),W.push(ye)}),this.removeAllRanges(),ne&&W.length==1?this.addRange(W[0],"backward"):this.setRanges(W)},Ge.containsNode=function(M,W){return this.eachRange(function(ne){return ne.containsNode(M,W)},!0)||!1},Ge.getBookmark=function(M){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[M])}},Ge.moveToBookmark=function(M){for(var W=[],ne=0,ye,Fe;ye=M.rangeBookmarks[ne++];)Fe=$.createRange(this.win),Fe.moveToBookmark(ye),W.push(Fe);M.backward?this.setSingleRange(W[0],"backward"):this.setRanges(W)},Ge.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},Ge.restoreRanges=function(M){this.removeAllRanges();for(var W=0,ne;ne=M.ranges[W];++W)this.addRange(ne,M.backward&&W==0)},Ge.toHtml=function(){var M=[];return this.eachRange(function(W){M.push(Ne.toHtml(W))}),M.join("")},P.implementsTextRange&&(Ge.getNativeTextRange=function(){var M;if(M=this.docSelection){var W=M.createRange();if(Tr(W))return W;throw w.createError("getNativeTextRange: selection is a control selection")}else{if(this.rangeCount>0)return $.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw w.createError("getNativeTextRange: selection contains no range")}});function na(M){var W=[],ne=new Ze(M.anchorNode,M.anchorOffset),ye=new Ze(M.focusNode,M.focusOffset),Fe=typeof M.getName=="function"?M.getName():"Selection";if(typeof M.rangeCount<"u")for(var ft=0,Ht=M.rangeCount;ft<Ht;++ft)W[ft]=Ne.inspect(M.getRangeAt(ft));return"["+Fe+"(Ranges: "+W.join(", ")+")(anchor: "+ne.inspect()+", focus: "+ye.inspect()+"]"}Ge.getName=function(){return"WrappedSelection"},Ge.inspect=function(){return na(this)},Ge.detach=function(){ms(this.win,"delete"),vs(this)},xt.detachAll=function(){ms(null,"deleteAll")},xt.inspect=na,xt.isDirectionBackward=re,$.Selection=xt,$.selectionPrototype=Ge,$.addShimListener(function(M){typeof M.getSelection>"u"&&(M.getSelection=function(){return Qo(M)}),M=null})});var he=!1,Ve=function($){he||(he=!0,!A.initialized&&A.config.autoInitialize&&B())};return b&&(document.readyState=="complete"?Ve():(u(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",Ve,!1),J(window,"load",Ve))),A})}(yp)),yp.exports}var QF=V0();const X0=cl(QF);var _p={exports:{}},G0;function e5(){return G0||(G0=1,function(t,e){(function(n,r){t.exports=n(V0())})(function(n){return n.createModule("ClassApplier",["WrappedSelection"],function(r,i){var o=r.dom,a=o.DomPosition,s=o.arrayContains,l=r.util,u=l.forEach,c="span",d=l.isHostMethod(document,"createElementNS");function f(P,I){for(var j in P)if(P.hasOwnProperty(j)&&I(j,P[j])===!1)return!1;return!0}function h(P){return P.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function v(P,I){return!!P&&new RegExp("(?:^|\\s)"+I+"(?:\\s|$)").test(P)}function g(P,I){if(typeof P.classList=="object")return P.classList.contains(I);var j=typeof P.className=="string",q=j?P.className:P.getAttribute("class");return v(q,I)}function m(P,I){if(typeof P.classList=="object")P.classList.add(I);else{var j=typeof P.className=="string",q=j?P.className:P.getAttribute("class");q?v(q,I)||(q+=" "+I):q=I,j?P.className=q:P.setAttribute("class",q)}}var y=function(){function P(I,j,q){return j&&q?" ":""}return function(I,j){if(typeof I.classList=="object")I.classList.remove(j);else{var q=typeof I.className=="string",H=q?I.className:I.getAttribute("class");H=H.replace(new RegExp("(^|\\s)"+j+"(\\s|$)"),P),q?I.className=H:I.setAttribute("class",H)}}}();function x(P){var I=typeof P.className=="string";return I?P.className:P.getAttribute("class")}function S(P){return P&&P.split(/\s+/).sort().join(" ")}function b(P){return S(x(P))}function N(P,I){return b(P)==b(I)}function A(P,I){for(var j=I.split(/\s+/),q=0,H=j.length;q<H;++q)if(!g(P,h(j[q])))return!1;return!0}function E(P){var I=P.parentNode;return I&&I.nodeType==1&&!/^(textarea|style|script|select|iframe)$/i.test(I.nodeName)}function O(P,I,j,q,H){var re=P.node,te=P.offset,oe=re,Le=te;re==q&&te>H&&++Le,re==I&&(te==j||te==j+1)&&(oe=q,Le+=H-j),re==I&&te>j+1&&--Le,P.node=oe,P.offset=Le}function C(P,I,j){P.node==I&&P.offset>j&&--P.offset}function G(P,I,j,q){j==-1&&(j=I.childNodes.length);var H=P.parentNode,re=o.getNodeIndex(P);u(q,function(te){O(te,H,re,I,j)}),I.childNodes.length==j?I.appendChild(P):I.insertBefore(P,I.childNodes[j])}function K(P,I){var j=P.parentNode,q=o.getNodeIndex(P);u(I,function(H){C(H,j,q)}),o.removeNode(P)}function J(P,I,j,q,H){for(var re,te=[];re=P.firstChild;)G(re,I,j++,H),te.push(re);return K(P,H),te}function R(P,I){return J(P,P.parentNode,o.getNodeIndex(P),!0,I)}function k(P,I){var j=P.cloneRange();j.selectNodeContents(I);var q=j.intersection(P),H=q?q.toString():"";return H!=""}function B(P){for(var I=P.getNodes([3]),j=0,q;(q=I[j])&&!k(P,q);)++j;for(var H=I.length-1;(q=I[H])&&!k(P,q);)--H;return I.slice(j,H+1)}function Z(P,I){if(P.attributes.length!=I.attributes.length)return!1;for(var j=0,q=P.attributes.length,H,re,te;j<q;++j)if(H=P.attributes[j],te=H.name,te!="class"&&(re=I.attributes.getNamedItem(te),H===null!=(re===null)||H.specified!=re.specified||H.specified&&H.nodeValue!==re.nodeValue))return!1;return!0}function ee(P,I){for(var j=0,q=P.attributes.length,H;j<q;++j)if(H=P.attributes[j].name,!(I&&s(I,H))&&P.attributes[j].specified&&H!="class")return!0;return!1}var ce=o.getComputedStyleProperty,Be=function(){var P=document.createElement("div");return typeof P.isContentEditable=="boolean"?function(I){return I&&I.nodeType==1&&I.isContentEditable}:function(I){return!I||I.nodeType!=1||I.contentEditable=="false"?!1:I.contentEditable=="true"||Be(I.parentNode)}}();function me(P){var I;return P&&P.nodeType==1&&((I=P.parentNode)&&I.nodeType==9&&I.designMode=="on"||Be(P)&&!Be(P.parentNode))}function de(P){return(Be(P)||P.nodeType!=1&&Be(P.parentNode))&&!me(P)}var Se=/^inline(-block|-table)?$/i;function je(P){return P&&P.nodeType==1&&!Se.test(ce(P,"display"))}var he=/[^\r\n\t\f \u200B]/;function Ve(P){if(P.data.length==0)return!0;if(he.test(P.data))return!1;var I=ce(P.parentNode,"whiteSpace");switch(I){case"pre":case"pre-wrap":case"-moz-pre-wrap":return!1;case"pre-line":if(/[\r\n]/.test(P.data))return!1}return je(P.previousSibling)||je(P.nextSibling)}function $(P){var I=[],j,q;for(j=0;q=P[j++];)I.push(new a(q.startContainer,q.startOffset),new a(q.endContainer,q.endOffset));return I}function w(P,I){for(var j=0,q,H,re,te=P.length;j<te;++j)q=P[j],H=I[j*2],re=I[j*2+1],q.setStartAndEnd(H.node,H.offset,re.node,re.offset)}function _(P,I){return o.isCharacterDataNode(P)?I==0?!!P.previousSibling:I==P.length?!!P.nextSibling:!0:I>0&&I<P.childNodes.length}function F(P,I,j,q){var H,re,te=j==0;if(o.isAncestorOf(I,P))return P;if(o.isCharacterDataNode(I)){var oe=o.getNodeIndex(I);if(j==0)j=oe;else if(j==I.length)j=oe+1;else throw i.createError("splitNodeAt() should not be called with offset in the middle of a data node ("+j+" in "+I.data);I=I.parentNode}if(_(I,j)){H=I.cloneNode(!1),re=I.parentNode,H.id&&H.removeAttribute("id");for(var Le,we=0;Le=I.childNodes[j];)G(Le,H,we++,q);return G(H,re,o.getNodeIndex(I)+1,q),I==P?H:F(P,re,o.getNodeIndex(H),q)}else if(P!=I){H=I.parentNode;var ge=o.getNodeIndex(I);return te||ge++,F(P,H,ge,q)}return P}function L(P,I){return P.namespaceURI==I.namespaceURI&&P.tagName.toLowerCase()==I.tagName.toLowerCase()&&N(P,I)&&Z(P,I)&&ce(P,"display")=="inline"&&ce(I,"display")=="inline"}function se(P){var I=P?"nextSibling":"previousSibling";return function(j,q){var H=j.parentNode,re=j[I];if(re){if(re&&re.nodeType==3)return re}else if(q&&(re=H[I],re&&re.nodeType==1&&L(H,re))){var te=re[P?"firstChild":"lastChild"];if(te&&te.nodeType==3)return te}return null}}var fe=se(!1),Ne=se(!0);function ze(P){this.isElementMerge=P.nodeType==1,this.textNodes=[];var I=this.isElementMerge?P.lastChild:P;I&&(this.textNodes[0]=I)}ze.prototype={doMerge:function(P){var I=this.textNodes,j=I[0];if(I.length>1){var q=o.getNodeIndex(j),H=[],re=0,te;u(I,function(oe,Le){te=oe.parentNode,Le>0&&(te.removeChild(oe),te.hasChildNodes()||o.removeNode(te),P&&u(P,function(we){we.node==oe&&(we.node=j,we.offset+=re),we.node==te&&we.offset>q&&(--we.offset,we.offset==q+1&&Le<I.length-1&&(we.node=j,we.offset=re))})),H[Le]=oe.data,re+=oe.data.length}),j.data=H.join("")}return j.data},getLength:function(){for(var P=this.textNodes.length,I=0;P--;)I+=this.textNodes[P].length;return I},toString:function(){var P=[];return u(this.textNodes,function(I,j){P[j]="'"+I.data+"'"}),"[Merge("+P.join(",")+")]"}};var rt=["elementTagName","ignoreWhiteSpace","applyToEditableOnly","useExistingElements","removeEmptyElements","onElementCreate"],Ze={};function at(P,I,j){var q,H,re,te,oe=this;oe.cssClass=oe.className=P;var Le=null,we={};if(typeof I=="object"&&I!==null){for(typeof I.elementTagName<"u"&&(I.elementTagName=I.elementTagName.toLowerCase()),j=I.tagNames,Le=I.elementProperties,we=I.elementAttributes,H=0;te=rt[H++];)I.hasOwnProperty(te)&&(oe[te]=I[te]);q=I.normalize}else q=I;oe.normalize=typeof q>"u"?!0:q,oe.attrExceptions=[];var ge=document.createElement(oe.elementTagName);oe.elementProperties=oe.copyPropertiesToElement(Le,ge,!0),f(we,function(et,nt){oe.attrExceptions.push(et),we[et]=""+nt}),oe.elementAttributes=we,oe.elementSortedClassName=oe.elementProperties.hasOwnProperty("className")?S(oe.elementProperties.className+" "+P):P,oe.applyToAnyTagName=!1;var st=typeof j;if(st=="string")j=="*"?oe.applyToAnyTagName=!0:oe.tagNames=h(j.toLowerCase()).split(/\s*,\s*/);else if(st=="object"&&typeof j.length=="number")for(oe.tagNames=[],H=0,re=j.length;H<re;++H)j[H]=="*"?oe.applyToAnyTagName=!0:oe.tagNames.push(j[H].toLowerCase());else oe.tagNames=[oe.elementTagName]}at.prototype={elementTagName:c,elementProperties:{},elementAttributes:{},ignoreWhiteSpace:!0,applyToEditableOnly:!1,useExistingElements:!0,removeEmptyElements:!0,onElementCreate:null,copyPropertiesToElement:function(P,I,j){var q,H,re={},te,oe,Le,we;for(var ge in P)if(P.hasOwnProperty(ge))if(oe=P[ge],Le=I[ge],ge=="className")m(I,oe),m(I,this.className),I[ge]=S(I[ge]),j&&(re[ge]=oe);else if(ge=="style"){H=Le,j&&(re[ge]=te={});for(q in P[ge])P[ge].hasOwnProperty(q)&&(H[q]=oe[q],j&&(te[q]=H[q]));this.attrExceptions.push(ge)}else I[ge]=oe,j&&(re[ge]=I[ge],we=Ze.hasOwnProperty(ge)?Ze[ge]:ge,this.attrExceptions.push(we));return j?re:""},copyAttributesToElement:function(P,I){for(var j in P)P.hasOwnProperty(j)&&!/^class(?:Name)?$/i.test(j)&&I.setAttribute(j,P[j])},appliesToElement:function(P){return s(this.tagNames,P.tagName.toLowerCase())},getEmptyElements:function(P){var I=this;return P.getNodes([1],function(j){return I.appliesToElement(j)&&!j.hasChildNodes()})},hasClass:function(P){return P.nodeType==1&&(this.applyToAnyTagName||this.appliesToElement(P))&&g(P,this.className)},getSelfOrAncestorWithClass:function(P){for(;P;){if(this.hasClass(P))return P;P=P.parentNode}return null},isModifiable:function(P){return!this.applyToEditableOnly||de(P)},isIgnorableWhiteSpaceNode:function(P){return this.ignoreWhiteSpace&&P&&P.nodeType==3&&Ve(P)},postApply:function(P,I,j,q){var H=P[0],re=P[P.length-1],te=[],oe,Le=H,we=re,ge=0,st=re.length,et;u(P,function(Ae){et=fe(Ae,!q),et?(oe||(oe=new ze(et),te.push(oe)),oe.textNodes.push(Ae),Ae===H&&(Le=oe.textNodes[0],ge=Le.length),Ae===re&&(we=oe.textNodes[0],st=oe.getLength())):oe=null});var nt=Ne(re,!q);if(nt&&(oe||(oe=new ze(re),te.push(oe)),oe.textNodes.push(nt)),te.length){for(var en=0,ve=te.length;en<ve;++en)te[en].doMerge(j);I.setStartAndEnd(Le,ge,we,st)}},createContainer:function(P){var I=o.getDocument(P),j=d&&!o.isHtmlNamespace(P)&&P.namespaceURI?I.createElementNS(P.namespaceURI,this.elementTagName):I.createElement(this.elementTagName);return this.copyPropertiesToElement(this.elementProperties,j,!1),this.copyAttributesToElement(this.elementAttributes,j),m(j,this.className),this.onElementCreate&&this.onElementCreate(j,this),j},elementHasProperties:function(P,I){var j=this;return f(I,function(q,H){if(q=="className")return A(P,H);if(typeof H=="object"){if(!j.elementHasProperties(P[q],H))return!1}else if(P[q]!==H)return!1})},elementHasAttributes:function(P,I){return f(I,function(j,q){if(P.getAttribute(j)!==q)return!1})},applyToTextNode:function(P,I){if(E(P)){var j=P.parentNode;if(j.childNodes.length==1&&this.useExistingElements&&this.appliesToElement(j)&&this.elementHasProperties(j,this.elementProperties)&&this.elementHasAttributes(j,this.elementAttributes))m(j,this.className);else{var q=P.parentNode,H=this.createContainer(q);q.insertBefore(H,P),H.appendChild(P)}}},isRemovable:function(P){return P.tagName.toLowerCase()==this.elementTagName&&b(P)==this.elementSortedClassName&&this.elementHasProperties(P,this.elementProperties)&&!ee(P,this.attrExceptions)&&this.elementHasAttributes(P,this.elementAttributes)&&this.isModifiable(P)},isEmptyContainer:function(P){var I=P.childNodes.length;return P.nodeType==1&&this.isRemovable(P)&&(I==0||I==1&&this.isEmptyContainer(P.firstChild))},removeEmptyContainers:function(P){var I=this,j=P.getNodes([1],function(re){return I.isEmptyContainer(re)}),q=[P],H=$(q);u(j,function(re){K(re,H)}),w(q,H)},undoToTextNode:function(P,I,j,q){if(!I.containsNode(j)){var H=I.cloneRange();H.selectNode(j),H.isPointInRange(I.endContainer,I.endOffset)&&(F(j,I.endContainer,I.endOffset,q),I.setEndAfter(j)),H.isPointInRange(I.startContainer,I.startOffset)&&(j=F(j,I.startContainer,I.startOffset,q))}this.isRemovable(j)?R(j,q):y(j,this.className)},splitAncestorWithClass:function(P,I,j){var q=this.getSelfOrAncestorWithClass(P);q&&F(q,P,I,j)},undoToAncestor:function(P,I){this.isRemovable(P)?R(P,I):y(P,this.className)},applyToRange:function(P,I){var j=this;I=I||[];var q=$(I||[]);P.splitBoundariesPreservingPositions(q),j.removeEmptyElements&&j.removeEmptyContainers(P);var H=B(P);if(H.length){u(H,function(oe){!j.isIgnorableWhiteSpaceNode(oe)&&!j.getSelfOrAncestorWithClass(oe)&&j.isModifiable(oe)&&j.applyToTextNode(oe,q)});var re=H[H.length-1];P.setStartAndEnd(H[0],0,re,re.length),j.normalize&&j.postApply(H,P,q,!1),w(I,q)}var te=j.getEmptyElements(P);u(te,function(oe){m(oe,j.className)})},applyToRanges:function(P){for(var I=P.length;I--;)this.applyToRange(P[I],P);return P},applyToSelection:function(P){var I=r.getSelection(P);I.setRanges(this.applyToRanges(I.getAllRanges()))},undoToRange:function(P,I){var j=this;I=I||[];var q=$(I);P.splitBoundariesPreservingPositions(q),j.removeEmptyElements&&j.removeEmptyContainers(P,q);var H=B(P),re,te,oe=H[H.length-1];if(H.length){j.splitAncestorWithClass(P.endContainer,P.endOffset,q),j.splitAncestorWithClass(P.startContainer,P.startOffset,q);for(var Le=0,we=H.length;Le<we;++Le)re=H[Le],te=j.getSelfOrAncestorWithClass(re),te&&j.isModifiable(re)&&j.undoToAncestor(te,q);P.setStartAndEnd(H[0],0,oe,oe.length),j.normalize&&j.postApply(H,P,q,!0),w(I,q)}var ge=j.getEmptyElements(P);u(ge,function(st){y(st,j.className)})},undoToRanges:function(P){for(var I=P.length;I--;)this.undoToRange(P[I],P);return P},undoToSelection:function(P){var I=r.getSelection(P),j=r.getSelection(P).getAllRanges();this.undoToRanges(j),I.setRanges(j)},isAppliedToRange:function(P){if(P.collapsed||P.toString()=="")return!!this.getSelfOrAncestorWithClass(P.commonAncestorContainer);var I=P.getNodes([3]);if(I.length){for(var j=0,q;q=I[j++];)if(!this.isIgnorableWhiteSpaceNode(q)&&k(P,q)&&this.isModifiable(q)&&!this.getSelfOrAncestorWithClass(q))return!1}return!0},isAppliedToRanges:function(P){var I=P.length;if(I==0)return!1;for(;I--;)if(!this.isAppliedToRange(P[I]))return!1;return!0},isAppliedToSelection:function(P){var I=r.getSelection(P);return this.isAppliedToRanges(I.getAllRanges())},toggleRange:function(P){this.isAppliedToRange(P)?this.undoToRange(P):this.applyToRange(P)},toggleSelection:function(P){this.isAppliedToSelection(P)?this.undoToSelection(P):this.applyToSelection(P)},getElementsWithClassIntersectingRange:function(P){var I=[],j=this;return P.getNodes([3],function(q){var H=j.getSelfOrAncestorWithClass(q);H&&!s(I,H)&&I.push(H)}),I},detach:function(){}};function Ct(P,I,j){return new at(P,I,j)}at.util={hasClass:g,addClass:m,removeClass:y,getClass:x,hasSameClasses:N,hasAllClasses:A,replaceWithOwnChildren:R,elementsHaveSameNonClassAttributes:Z,elementHasNonClassAttributes:ee,splitNodeAt:F,isEditableElement:Be,isEditingHost:me,isEditable:de},r.CssClassApplier=r.ClassApplier=at,r.createClassApplier=Ct,l.createAliasForDeprecatedMethod(r,"createCssClassApplier","createClassApplier",i)}),n})}(_p)),_p.exports}e5();var Y0={toolbar:{allowMultiParagraphSelection:!0,buttons:["bold","colorpicker","italic","underline","strikethrough","quote","justifyLeft","justifyCenter","justifyRight","justifyFull","superscript","subscript","orderedlist","unorderedlist","pre","removeFormat","outdent","indent","h2","h3"],standardizeSelectionStart:!1,updateOnEmptySelection:!1},placeholder:{text:"请输入内容",hideOnClick:!0},disableEditing:!0};function K0(t){var e,n,r=((e=t==null?void 0:t.extensions)===null||e===void 0?void 0:e.button)||((n=t==null?void 0:t.extensions)===null||n===void 0?void 0:n.button),i=(t==null?void 0:t.Extension)||(t==null?void 0:t.Extension),o=r||i;return o?o.extend({name:"colorpicker",tagNames:["mark"],contentDefault:"<b>Color</b>",aria:"Color Picker",action:"colorPicker",init:function(){var a=this,s,l;try{X0.init()}catch{console.error("rangy.init failed")}try{(l=(s=r==null?void 0:r.prototype)===null||s===void 0?void 0:s.init)===null||l===void 0||l.call(this)}catch{console.error("ButtonBase.init failed")}this.colorPicker=new W0({parent:this.button||void 0,color:"#000",onDone:function(u){var c,d,f,h,v;try{a.coloredText&&(!((d=(c=a.coloredText).isAppliedToSelection)===null||d===void 0)&&d.call(c))&&a.coloredText.undoToSelection(),a.coloredText=X0.createClassApplier("colored",{elementTagName:"span",elementProperties:{style:{color:u.hex}},normalize:!0}),a.coloredText.toggleSelection(),(h=(f=a.base)===null||f===void 0?void 0:f.checkContentChanged)===null||h===void 0||h.call(f),(v=a.setInactive)===null||v===void 0||v.call(a)}catch{console.error("Picker.onDone failed")}}})},getButton:function(){return this.button},handleClick:function(){var a,s,l;(a=this.setActive)===null||a===void 0||a.call(this),(l=(s=this.colorPicker)===null||s===void 0?void 0:s.show)===null||l===void 0||l.call(s)},isAlreadyApplied:function(a){var s,l;return((l=(s=a==null?void 0:a.nodeName)===null||s===void 0?void 0:s.toLowerCase)===null||l===void 0?void 0:l.call(s))==="mark"},isActive:function(){var a,s;return(s=(a=this.button)===null||a===void 0?void 0:a.classList)===null||s===void 0?void 0:s.contains("medium-editor-button-active")},setInactive:function(){var a,s;(s=(a=this.button)===null||a===void 0?void 0:a.classList)===null||s===void 0||s.remove("medium-editor-button-active")},setActive:function(){var a,s;(s=(a=this.button)===null||a===void 0?void 0:a.classList)===null||s===void 0||s.add("medium-editor-button-active")}}):(console.warn("MediumEditor button/extension base not available; using noop extension"),function(){function a(){}return a}())}var t5=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),n5=function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},q0=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Z0=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};(function(t){t5(e,t);function e(n){var r=t.call(this,n)||this;r.labelMap=new Map;var i=n.lf,o=n.graphModel;return r.lf=i,r.graphModel=o,r.state={tick:0},r}return e.prototype.componentDidMount=function(){var n=this,r=this.props.graphModel;this.editor=new $u(".lf-label-editor",zi(Y0,{autoLink:!0,extensions:{colorPicker:new(K0($u))}})),r.eventCenter.on("text:update,node:mousemove,node:resize,node:rotate,node:drag,label:drop,node:drop",function(){}),r.eventCenter.on("node:properties-change,node:properties-delete",function(){n.setState({tick:n.state.tick+1})})},e.prototype.componentDidUpdate=function(){var n;this.editor&&this.editor.elements.length>0?this.editor.addElements(".lf-label-editor"):((n=this.editor)===null||n===void 0||n.destroy(),this.editor=new $u(".lf-label-editor",zi(Y0,{autoLink:!0,extensions:{colorPicker:new(K0($u))}})))},e.prototype.componentWillUnmount=function(){var n;(n=this.editor)===null||n===void 0||n.destroy()},e.prototype.getLabels=function(){var n=this,r=this.props,i=r.lf.extension,o=r.graphModel,a=Z0(Z0([],q0(o.nodes),!1),q0(o.edges),!1),s=i.label;if(s){var l=[];return gt(a,function(u){var c,d,f=u.getData(),h=(d=(c=f.properties)===null||c===void 0?void 0:c._label)!==null&&d!==void 0?d:[];gt(h,function(v){var g=n.labelMap,m=new WF(v,u,o);g.set(m.id,m),l.push(V(HF,{label:m,element:u,graphModel:o},m.id))})}),l}return null},e.prototype.render=function(){return V("foreignObject",{id:"lf-label-overlay",class:"lf-label-overlay",children:this.getLabels()})},e.toolName="label-edit-tool",e=n5([vn],e),e})(Qe);var J0=function(){return J0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},J0.apply(this,arguments)},Q0=function(){return Q0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Q0.apply(this,arguments)},ex=function(){return ex=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ex.apply(this,arguments)},tx=function(){return tx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},tx.apply(this,arguments)},bp=function(){return bp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},bp.apply(this,arguments)},xp=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ep=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Wu="lf:defaultNodeMenu",Uu="lf:defaultEdgeMenu",wp="lf:defaultGraphMenu",Vu="lf:defaultSelectionMenu",Sp={nodeMenu:Wu,edgeMenu:Uu,graphMenu:wp,selectionMenu:Vu},ii={nodeMenu:[],edgeMenu:[],graphMenu:[],selectionMenu:[]},r5=function(){function t(e){var n=e.lf,r=this;this.__currentData=null,this.__isSilentMode=!1,this.lf=n,this.__menuDOM=document.createElement("ul"),this.__isSilentMode=n.graphModel.editConfigModel.isSilentMode,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(i){r.setMenuConfig(i)},this.lf.addMenuConfig=function(i){r.addMenuConfig(i)},this.lf.setMenuByType=function(i){r.setMenuByType(i)},this.lf.changeMenuItemDisableStatus=function(i,o,a){r.changeMenuItemDisableStatus(i,o,a)},this.lf.getMenuConfig=function(i){return r.getMenuConfig(i)},this.lf.resetMenuConfigByType=function(i){r.resetMenuConfigByType(i)}}return t.prototype.init=function(){var e=this,n,r,i;ii.nodeMenu=[{text:"删除",callback:function(o){e.lf.deleteNode(o.id)}},{text:"编辑文本",callback:function(o){e.lf.graphModel.editText(o.id)}},{text:"复制",callback:function(o){e.lf.cloneNode(o.id)}}],(n=this.menuTypeMap)===null||n===void 0||n.set(Wu,ii.nodeMenu),ii.edgeMenu=[{text:"删除",callback:function(o){e.lf.deleteEdge(o.id)}},{text:"编辑文本",callback:function(o){e.lf.graphModel.editText(o.id)}}],(r=this.menuTypeMap)===null||r===void 0||r.set(Uu,ii.edgeMenu),ii.graphMenu=[],ii.selectionMenu=[{text:"删除",callback:function(o){e.lf.clearSelectElements(),o.edges.forEach(function(a){return e.lf.deleteEdge(a.id)}),o.nodes.forEach(function(a){return e.lf.deleteNode(a.id)})}}],(i=this.menuTypeMap)===null||i===void 0||i.set(Vu,ii.selectionMenu)},t.prototype.showMenu=function(e,n,r,i){if(!this.__isSilentMode&&!(!r||!r.length)){var o=this.__menuDOM;if(o){if(o.innerHTML="",o.append.apply(o,Ep([],xp(this.__getMenuDom(r)),!1)),!o.children.length)return;if(o.style.display="block",!i){o.style.top="".concat(n,"px"),o.style.left="".concat(e,"px");return}var a=i.width,s=i.height,l=i.clientX,u=i.clientY,c=this.lf.graphModel,d=o.offsetWidth,f=!0,h=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,v=h-l,g=c.rootEl.getBoundingClientRect(),m=g.left+g.width;m<h&&(v=m-l),v<d&&(f=!1),f?o.style.left="".concat(e,"px"):o.style.left="".concat(e-a,"px");var y=o.offsetHeight,x=!0,S=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,b=S-u,N=g.top+g.height;N<S&&(b=N-u),b<y&&(x=!1),x?o.style.top="".concat(n,"px"):o.style.top="".concat(n-s,"px")}}},t.prototype.processMenuConfig=function(e,n){var r=this;if(e){var i=["nodeMenu","edgeMenu","graphMenu","selectionMenu"];i.forEach(function(o){var a,s,l,u,c=e[o],d=Sp[o];if(c!==void 0){if(n==="set")(a=r.menuTypeMap)===null||a===void 0||a.set(d,c||[]);else if(n==="add"&&Array.isArray(c)){var f=(l=(s=r.menuTypeMap)===null||s===void 0?void 0:s.get(d))!==null&&l!==void 0?l:[];(u=r.menuTypeMap)===null||u===void 0||u.set(d,f.concat(c))}}})}},t.prototype.createImageElement=function(e,n){var r=document.createElement("img");return r.src=e,r.alt=n,r.style.width="16px",r.style.height="16px",r.style.objectFit="contain",r},t.prototype.isImageFile=function(e){var n=[".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"];return n.some(function(r){return e.toLowerCase().includes(r)})},t.prototype.processIcon=function(e,n,r){var i;if(typeof n=="string"){var o=n;if(o.startsWith("data:image/")){var a=this.createImageElement(o,r||"icon");e.appendChild(a);return}if(this.isImageFile(o)){var a=this.createImageElement(o,r||"icon");e.appendChild(a);return}if(o.includes("<")&&o.includes(">")){e.innerHTML=o;return}if(o.includes(" ")||o.startsWith(".")){var s=o.replace(/^\./,"").split(" ");(i=e.classList).add.apply(i,Ep([],xp(s),!1));return}e.classList.add(o)}},t.prototype.__getMenuDom=function(e){var n=this,r=[];return e&&e.length>0&&e.forEach(function(i){var o=document.createElement("li");if(i.className?o.className="lf-menu-item ".concat(i.disabled?"lf-menu-item__disabled":""," ").concat(i.className):o.className="lf-menu-item ".concat(i.disabled?"lf-menu-item__disabled":""),i.icon){var a=document.createElement("span");a.className="lf-menu-item-icon",n.processIcon(a,i.icon,i.text),o.appendChild(a)}var s=document.createElement("span");s.className="lf-menu-item-text",i.text&&(s.innerText=i.text),o.appendChild(s),i.disabled&&o.setAttribute("disabled","true"),o.onclickCallback=i.callback,r.push(o)}),r},t.prototype.updateMenuItemDOMStatus=function(e,n){if(!(!this.__menuDOM||this.__menuDOM.style.display==="none")){var r=Array.from(this.__menuDOM.querySelectorAll(".lf-menu-item")),i=r.find(function(a){var s=a.querySelector(".lf-menu-item-text");return(s==null?void 0:s.textContent)===e});if(i){var o=i;n?(o.classList.add("lf-menu-item__disabled"),o.setAttribute("disabled","true")):(o.classList.remove("lf-menu-item__disabled"),o.removeAttribute("disabled"))}}},t.prototype.setupSilentModeListener=function(){var e=this;this.__editConfigChangeHandler=function(n){var r=n.data,i=r.isSilentMode;i!==e.__isSilentMode&&(e.__isSilentMode=i,e.updateMenuVisibility(!i))},this.lf.on("editConfig:changed",this.__editConfigChangeHandler)},t.prototype.updateMenuVisibility=function(e){this.__menuDOM&&(e?this.__currentData&&(this.__menuDOM.style.display="block"):(this.__menuDOM.style.display="none",this.__currentData=null))},t.prototype.refreshCurrentMenu=function(){var e,n,r,i,o,a,s,l,u,c,d;if(!(!this.__menuDOM||this.__menuDOM.style.display==="none"||!this.__currentData)){var f=this.__menuDOM.style,h=f.left,v=f.top,g=[];if(this.__currentData&&typeof this.__currentData=="object")if("sourceNodeId"in this.__currentData&&"targetNodeId"in this.__currentData){var m=this.lf.graphModel.getEdgeModelById(this.__currentData.id);if(m){var y=(n=this.menuTypeMap)===null||n===void 0?void 0:n.get(m.type);m.menu&&Array.isArray(m.menu)?g=m.menu:y?g=y:g=(i=(r=this.menuTypeMap)===null||r===void 0?void 0:r.get(Uu))!==null&&i!==void 0?i:[]}}else if("id"in this.__currentData&&"type"in this.__currentData){var m=this.lf.graphModel.getNodeModelById(this.__currentData.id);if(m){var y=(o=this.menuTypeMap)===null||o===void 0?void 0:o.get(m.type);m.menu&&Array.isArray(m.menu)?g=m.menu:y?g=y:g=(s=(a=this.menuTypeMap)===null||a===void 0?void 0:a.get(Wu))!==null&&s!==void 0?s:[]}}else"nodes"in this.__currentData&&"edges"in this.__currentData?g=(u=(l=this.menuTypeMap)===null||l===void 0?void 0:l.get(Vu))!==null&&u!==void 0?u:[]:g=(d=(c=this.menuTypeMap)===null||c===void 0?void 0:c.get(wp))!==null&&d!==void 0?d:[];g&&g.length>0?(this.__menuDOM.innerHTML="",(e=this.__menuDOM).append.apply(e,Ep([],xp(this.__getMenuDom(g)),!1)),h&&(this.__menuDOM.style.left=h),v&&(this.__menuDOM.style.top=v)):(this.__menuDOM.style.display="none",this.__currentData=null)}},t.prototype.setMenuByType=function(e){var n,r=e.type,i=e.menu;!r||!i||((n=this.menuTypeMap)===null||n===void 0||n.set(r,i),this.refreshCurrentMenu())},t.prototype.getMenuConfig=function(e){var n,r;return(r=(n=this.menuTypeMap)===null||n===void 0?void 0:n.get(Sp[e]))!==null&&r!==void 0?r:[]},t.prototype.resetMenuConfigByType=function(e){var n;this.setMenuConfig((n={},n[e]=ii[e],n))},t.prototype.resetAllMenuConfig=function(){this.setMenuConfig(ii)},t.prototype.setMenuConfig=function(e){this.processMenuConfig(e,"set"),this.refreshCurrentMenu()},t.prototype.addMenuConfig=function(e){this.processMenuConfig(e,"add"),this.refreshCurrentMenu()},t.prototype.changeMenuItem=function(e,n){if(e==="add")this.addMenuConfig(n);else if(e==="reset")this.setMenuConfig(n);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},t.prototype.changeMenuItemDisableStatus=function(e,n,r){var i,o;if(!e||!n){console.warn("params is vaild");return}var a=(o=(i=this.menuTypeMap)===null||i===void 0?void 0:i.get(Sp[e]))!==null&&o!==void 0?o:[];if(!a.length){console.warn("menuMap: ".concat(e," is not exist"));return}var s=a.find(function(l){return l.text===n});if(!s){console.warn("menuItem: ".concat(n," is not exist"));return}s.disabled=r,this.updateMenuItemDOMStatus(n,r)},t.prototype.render=function(e,n){var r=this;e.graphModel.editConfigModel.isSilentMode||(this.__container=n,this.__currentData=null,this.setupSilentModeListener(),this.__menuDOM&&(this.__menuDOM.className="lf-menu",n.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(i){i.stopPropagation();for(var o=i.target;Array.from(o.classList).indexOf("lf-menu-item")===-1&&Array.from(o.classList).indexOf("lf-menu")===-1;)o=o==null?void 0:o.parentElement;Array.from(o.classList).indexOf("lf-menu-item__disabled")>-1||(Array.from(o.classList).indexOf("lf-menu-item")>-1?(o.onclickCallback(r.__currentData,o),r.__menuDOM&&(r.__menuDOM.style.display="none"),r.__currentData=null):console.warn("点击区域不在菜单项内,请检查代码!"))},!0)),this.lf.on("node:contextmenu",function(i){var o,a,s=i.data,l=i.position,u=i.e,c=l.domOverlayPosition,d=c.x,f=c.y,h=s.id,v=r.lf.graphModel.getNodeModelById(h);if(!(!v||r.__isSilentMode)){var g=[],m=(o=r.menuTypeMap)===null||o===void 0?void 0:o.get(v.type);v&&v.menu&&Array.isArray(v.menu)?g=v.menu:m?g=m:g=(a=r.menuTypeMap)===null||a===void 0?void 0:a.get(Wu),r.__currentData=s,r.showMenu(d,f,g,{width:v.width,height:v.height,clientX:u.clientX,clientY:u.clientY})}}),this.lf.on("edge:contextmenu",function(i){var o,a,s,l=i.data,u=i.position,c=i.e,d=u.domOverlayPosition,f=d.x,h=d.y,v=l.id,g=r.lf.graphModel.getEdgeModelById(v);if(!(!g||r.__isSilentMode)){var m=[],y=(o=r.menuTypeMap)===null||o===void 0?void 0:o.get(g.type);g&&g.menu&&Array.isArray(g.menu)?m=g.menu:y?m=y:m=(s=(a=r.menuTypeMap)===null||a===void 0?void 0:a.get(Uu))!==null&&s!==void 0?s:[],r.__currentData=l,r.showMenu(f,h,m,{width:g.width,height:g.height,clientX:c.clientX,clientY:c.clientY})}}),this.lf.on("blank:contextmenu",function(i){var o,a,s=i.position;if(!r.__isSilentMode){var l=(a=(o=r.menuTypeMap)===null||o===void 0?void 0:o.get(wp))!==null&&a!==void 0?a:[],u=s.domOverlayPosition,c=u.x,d=u.y;r.__currentData=bp({},s.canvasOverlayPosition),r.showMenu(c,d,l)}}),this.lf.on("selection:contextmenu",function(i){var o,a=i.data,s=i.position;if(!r.__isSilentMode){var l=(o=r.menuTypeMap)===null||o===void 0?void 0:o.get(Vu),u=s.domOverlayPosition,c=u.x,d=u.y;r.__currentData=a,r.showMenu(c,d,l)}}),this.lf.on("node:mousedown",function(){r.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){r.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){r.__menuDOM.style.display="none"}))},t.prototype.destroy=function(){var e;this.__editConfigChangeHandler&&this.lf.off("editConfig:changed",this.__editConfigChangeHandler),this.__menuDOM&&((e=this===null||this===void 0?void 0:this.__container)===null||e===void 0||e.removeChild(this.__menuDOM),this.__menuDOM=void 0)},t.pluginName="menu",t}(),i5=function(){function t(e){var n=e.lf,r=this;this.lf=n,this.lf.setPatternItems=function(i){r.setPatternItems(i)}}return t.prototype.render=function(e,n){var r=this;if(this.destroy(),!this.shapeList||this.shapeList.length===0){this.domContainer=n;return}this.panelEl=document.createElement("div"),this.panelEl.className="lf-dndpanel",this.shapeList.forEach(function(i){var o;(o=r.panelEl)===null||o===void 0||o.appendChild(r.createDndItem(i))}),n.appendChild(this.panelEl),this.domContainer=n},t.prototype.destroy=function(){this.domContainer&&this.panelEl&&this.domContainer.contains(this.panelEl)&&this.domContainer.removeChild(this.panelEl)},t.prototype.setPatternItems=function(e){this.shapeList=e,this.domContainer&&this.render(this.lf,this.domContainer)},t.prototype.createDndItem=function(e){var n=this,r=document.createElement("div");r.className=e.className?"lf-dnd-item ".concat(e.className):"lf-dnd-item";var i=document.createElement("div");if(i.className="lf-dnd-shape",e.icon&&(i.style.backgroundImage="url(".concat(e.icon,")")),r.appendChild(i),e.label){var o=document.createElement("div");o.innerText=e.label,o.className="lf-dnd-text",r.appendChild(o)}return e.disabled?(r.classList.add("disabled"),r.onmousedown=function(){e.callback&&e.callback(n.lf,n.domContainer)},r):(r.onmousedown=function(){e.type&&n.lf.dnd.startDrag({type:e.type,properties:e.properties,text:e.text}),e.callback&&e.callback(n.lf,n.domContainer)},r.ondblclick=function(a){n.lf.graphModel.eventCenter.emit("dnd:panel-dbclick",{e:a,data:e})},r.onclick=function(a){n.lf.graphModel.eventCenter.emit("dnd:panel-click",{e:a,data:e})},r.oncontextmenu=function(a){n.lf.graphModel.eventCenter.emit("dnd:panel-contextmenu",{e:a,data:e})},r)},t.pluginName="dndPanel",t}(),nx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},rx=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},o5=function(){function t(e){var n=e.lf,r=e.options,i=this,o;this.disabled=!0,this.isWholeNode=!0,this.isWholeEdge=!0,this.originStatusSaved=!1,this.exclusiveMode=!1,this.mouseDownInfo=null,this.originalStopMoveGraph=!1,this.handleBlankMouseDown=function(a){var s=a.e;i.handleMouseDown(s)},this.draw=function(a){var s=i.lf.getPointByClient(a.clientX,a.clientY).domOverlayPosition,l=s.x,u=s.y;if(i.endPoint={x:l,y:u},i.startPoint){var c=i.startPoint,d=c.x,f=c.y,h=d,v=f,g=l-d,m=u-f;l<d&&(h=l,g=d-l),u<f&&(v=u,m=f-u),i.wrapper&&(i.wrapper.style.left="".concat(h,"px"),i.wrapper.style.top="".concat(v,"px"),i.wrapper.style.width="".concat(g,"px"),i.wrapper.style.height="".concat(m,"px"))}},this.drawOff=function(a){if(i.lf.updateEditConfig({stopMoveGraph:i.originalStopMoveGraph}),i.originStatusSaved=!1,i.mouseDownInfo){var s=i.mouseDownInfo,l=s.x,u=s.y,c=s.time,d=Math.abs(a.clientX-l)<5&&Math.abs(a.clientY-u)<5&&Date.now()-c<200;if(d){i.lf.clearSelectElements(),i.cleanupSelectionState();return}}var f=Pe(i.startPoint),h=Pe(i.endPoint);if(document.removeEventListener("mousemove",i.draw),i.exclusiveMode||document.removeEventListener("mouseup",i.drawOff),f&&h){var l=f.x,u=f.y,v=h.x,g=h.y,m=[Math.min(l,v),Math.min(u,g)],y=[Math.max(l,v),Math.max(u,g)];if(i.lf.emit("selection:selected-area",{topLeft:m,bottomRight:y}),Math.abs(v-l)<10&&Math.abs(g-u)<10){i.wrapper&&(i.wrapper.oncontextmenu=null,i.container&&i.wrapper.parentNode===i.container&&i.container.removeChild(i.wrapper),i.wrapper=void 0);return}var x=i.lf.graphModel.getAreaElement(m,y,i.isWholeEdge,i.isWholeNode,!0),S=i.lf.graphModel,b=S.dynamicGroup,N=S.group,A=[],E=i.lf.getSelectElements(),O=new Set(rx(rx([],nx(E.nodes.map(function(K){return K.id})),!1),nx(E.edges.map(function(K){return K.id})),!1));x.forEach(function(K){if(N){var J=N.getNodeGroup(K.id);if(x.includes(J))return}if(b){var J=b.getGroupByNodeId(K.id);if(x.includes(J))return}if(i.exclusiveMode&&O.has(K.id)){i.lf.deselectElementById(K.id);return}i.lf.selectElementById(K.id,!0),A.push(K)}),i.startPoint=void 0,i.endPoint=void 0,A.length>0&&i.lf.emit("selection:drop",{e:a}),i.lf.emit("selection:selected",{elements:A,leftTopPoint:m,rightBottomPoint:y})}i.wrapper&&(i.wrapper.oncontextmenu=null,i.container&&i.wrapper.parentNode===i.container&&i.container.removeChild(i.wrapper),i.wrapper=void 0)},this.lf=n,this.exclusiveMode=(o=r==null?void 0:r.exclusiveMode)!==null&&o!==void 0?o:!1,n.openSelectionSelect=function(){i.openSelectionSelect()},n.closeSelectionSelect=function(){i.closeSelectionSelect()},n.setSelectionSelectMode=function(a){i.setExclusiveMode(a)},this.handleMouseDown=this.handleMouseDown.bind(this),this.draw=this.draw.bind(this),this.drawOff=this.drawOff.bind(this)}return t.prototype.render=function(e,n){this.container=n},t.prototype.cleanupSelectionState=function(){this.wrapper&&(this.wrapper.oncontextmenu=null,this.container&&this.wrapper.parentNode===this.container&&this.container.removeChild(this.wrapper),this.wrapper=void 0),this.startPoint=void 0,this.endPoint=void 0,this.mouseDownInfo=null,document.removeEventListener("mousemove",this.draw),document.removeEventListener("mouseup",this.drawOff)},t.prototype.setExclusiveMode=function(e){e===void 0&&(e=!1),this.exclusiveMode!==e&&(this.cleanupSelectionState(),this.exclusiveMode=e,this.container&&!this.disabled&&(this.removeEventListeners(),this.addEventListeners()))},t.prototype.addEventListeners=function(){this.container&&(this.exclusiveMode?(this.container.style.pointerEvents="auto",this.container.addEventListener("mousedown",this.handleMouseDown)):(this.container.style.pointerEvents="none",this.lf.on("blank:mousedown",this.handleBlankMouseDown)))},t.prototype.removeEventListeners=function(){this.container&&(this.container.style.pointerEvents="none",this.container.removeEventListener("mousedown",this.handleMouseDown)),this.lf.off("blank:mousedown",this.handleBlankMouseDown)},t.prototype.handleMouseDown=function(e){var n;if(!(!this.container||this.disabled)){var r=e.button===2;if(!r){this.cleanupSelectionState(),this.mouseDownInfo={x:e.clientX,y:e.clientY,time:Date.now()},this.originStatusSaved||(this.originalStopMoveGraph=this.lf.getEditConfig().stopMoveGraph,this.originStatusSaved=!0),this.lf.updateEditConfig({stopMoveGraph:!0});var i=this.lf.getPointByClient(e.clientX,e.clientY).domOverlayPosition,o=i.x,a=i.y;this.startPoint={x:o,y:a},this.endPoint={x:o,y:a};var s=document.createElement("div");s.className="lf-selection-select",s.oncontextmenu=function(u){u.preventDefault()},s.style.top="".concat(this.startPoint.y,"px"),s.style.left="".concat(this.startPoint.x,"px"),(n=this.container)===null||n===void 0||n.appendChild(s),this.wrapper=s,document.addEventListener("mousemove",this.draw),document.addEventListener("mouseup",this.drawOff)}}},t.prototype.setSelectionSense=function(e,n){e===void 0&&(e=!0),n===void 0&&(n=!0),this.isWholeEdge=e,this.isWholeNode=n},t.prototype.openSelectionSelect=function(){this.disabled||this.closeSelectionSelect(),this.container&&(this.cleanupSelectionState(),this.addEventListeners(),this.open())},t.prototype.closeSelectionSelect=function(){if(this.container){if(this.wrapper&&this.startPoint&&this.endPoint){var e=Pe(this.endPoint),n=new MouseEvent("mouseup",{clientX:e.x,clientY:e.y});this.drawOff(n)}this.cleanupSelectionState(),this.removeEventListeners(),this.close()}},t.prototype.open=function(){this.disabled=!1},t.prototype.close=function(){this.disabled=!0},t.pluginName="selectionSelect",t}(),ix=function(){return ix=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ix.apply(this,arguments)},ox=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zo=function(){return Zo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Zo.apply(this,arguments)},ds=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},a5={tr:"tl",lb:"tl",tl:"tr",rb:"tr",br:"bl",lt:"bl",bl:"br",rt:"br"};function s5(t){for(var e=t,n=1;n<e.length-1;){var r=ds(e[n-1],2),i=r[0],o=r[1],a=ds(e[n],2),s=a[0],l=a[1],u=ds(e[n+1],2),c=u[0],d=u[1];i===s&&s===c||o===l&&l===d?e.splice(n,1):n++}return e}function l5(t,e,n,r){var i=[t[0],t[1]],o=[t[0],t[1]];switch(n){case"tl":return e==="tr"?(i[1]+=r,o[0]+=r):e==="lb"&&(i[0]+=r,o[1]+=r),[i,o];case"tr":return e==="tl"?(i[1]+=r,o[0]-=r):e==="rb"&&(i[0]-=r,o[1]+=r),[i,o];case"bl":return e==="br"?(i[1]-=r,o[0]+=r):e==="lt"&&(i[0]+=r,o[1]-=r),[i,o];case"br":return e==="bl"?(i[1]-=r,o[0]-=r):e==="rt"&&(i[0]-=r,o[1]-=r),[i,o];default:return[]}}function u5(t,e,n,r){var i,o=1,a="",s="";Math.abs(t[0]-e[0])<=o?a=t[1]>e[1]?"t":"b":Math.abs(t[1]-e[1])<=o&&(a=t[0]>e[0]?"l":"r"),Math.abs(e[0]-n[0])<=o?s=e[1]>n[1]?"t":"b":Math.abs(e[1]-n[1])<=o&&(s=e[0]>n[0]?"l":"r");var l=Math.min(Math.hypot(e[0]-t[0],e[1]-t[1])/2,Math.hypot(n[0]-e[0],n[1]-e[1])/2,r)||1/5*r,u="".concat(a).concat(s),c=a5[u]||"-",d="L ".concat(t[0]," ").concat(t[1]);if(c==="-")d+="L ".concat(e[0]," ").concat(e[1]," L ").concat(n[0]," ").concat(n[1]);else{var f=ds(l5(e,u,c,l),2),h=f[0],v=f[1];h&&v&&(d+="L ".concat(h[0]," ").concat(h[1]," Q ").concat(e[0]," ").concat(e[1]," ").concat(v[0]," ").concat(v[1]),i=ds(v,2),e[0]=i[0],e[1]=i[1])}return d}function c5(t,e){var n=0,r="";if(t.length===2)r+="M".concat(t[n][0]," ").concat(t[n++][1]," L ").concat(t[n][0]," ").concat(t[n][1]);else{for(r+="M".concat(t[n][0]," ").concat(t[n++][1]);n+1<t.length;){var i=t[n-1],o=t[n],a=t[n+++1];r+=u5(i,o,a,e)}r+="L ".concat(t[n][0]," ").concat(t[n][1])}return r}(function(t){ox(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getEdge=function(){var n=this.props.model,r=n.points,i=n.isAnimation,o=n.arrowConfig,a=n.radius,s=a===void 0?5:a,l=n.getEdgeStyle(),u=n.getEdgeAnimationStyle(),c=s5(r.split(" ").map(function(h){return h.split(",").map(function(v){return+v})})),d=c5(c,s),f=Zo(Zo(Zo({style:i?u:{}},l),o),{fill:"none"});return Te("path",Zo({d},f))},e})(os),function(t){ox(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Ya);var ax=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xu=function(){return Xu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Xu.apply(this,arguments)},sx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},lx=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},d5=function(t){ax(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.id,i=n.x,o=n.y,a=n.width,s=n.height,l=n.properties,u=this.props.model.getNodeStyle();return Te("svg",{x:i-a/2,y:o-s/2,width:50,height:24,style:"z-index: 0; background: none; overflow: auto;"},[l.labelText?Te("text",{x:0,y:-5,fontSize:"16px",fill:u.stroke},l.labelText):"",l.disabledDelete?"":Te("text",{x:l.labelText?50:0,y:-5,fontSize:"24px",cursor:"pointer",fill:u.stroke,onclick:this.handleCustomDeleteIconClick.bind(this,r)},"x")])},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.id,l=this.props.model.getNodeStyle();return Te("g",{},[Te("rect",Xu(Xu({},l),{x:r-o/2,y:i-a/2,width:o,height:a,id:s})),this.getLabelShape()])},e.prototype.toFront=function(){},e.prototype.handleCustomDeleteIconClick=function(n){var r=this.props.graphModel;r.deleteNode(n)},e}(hu),f5=function(t){ax(e,t);function e(){var n=t.apply(this,lx([],sx(arguments),!1))||this;return n.d=10,n.isResize=!1,n}return e.prototype.initNodeData=function(n){n.text={value:"",x:n.x,y:n.y,draggable:!1,editable:!1},t.prototype.initNodeData.call(this,n),this.zIndex=0,this.draggable=!0},e.prototype.setAttributes=function(){var n=this,r;this.points=[],((r=this.properties)===null||r===void 0?void 0:r.node_selection_ids).length>1&&setTimeout(function(){var i;n.updatePointsByNodes(((i=n.properties)===null||i===void 0?void 0:i.node_selection_ids)||[])})},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this);return n.stroke=this.properties.strokeColor||"#008000",n.strokeDasharray="10 5",n},e.prototype.getDefaultAnchor=function(){return[]},e.prototype.updatePoints=function(n){this.points=n},e.prototype.updateCoordinate=function(n){var r=n.x,i=n.y;this.x=r,this.y=i},e.prototype.updatePointsByNodes=function(n){var r=this,i=[],o=1/0,a=1/0,s=-1/0,l=-1/0;n.forEach(function(u){var c=r.graphModel.getNodeModelById(u);if(c){var d=c.width,f=c.height,h=c.x,v=c.y;o=Math.min(o,h-d/2-r.d),a=Math.min(a,v-f/2-r.d),s=Math.max(s,h+d/2+r.d),l=Math.max(l,v+f/2+r.d)}}),i.push([o,a],[s,a],[s,l],[o,l]),![o,a,s,l].some(function(u){return Math.abs(u)===1/0})&&(this.updatePoints(i),this.updateCoordinate({x:(s+o)/2,y:(l+a)/2}))},e.prototype.resize=function(n){var r;this.isResize=!0;for(var i=n.width,o=n.height,a={x:i/this.width,y:o/this.height},s=(this.properties.node_selection_ids||[]).slice(),l=[],u=new Set;s.length;){var c=s.shift(),d=(r=this.graphModel.nodesMap[c])===null||r===void 0?void 0:r.model;if(d){if(!Gu(d)){l.push(d);continue}u.has(d.id)||(u.add(d.id),s.push.apply(s,lx([],sx(d.properties.node_selection_ids||[]),!1)))}}var f={x:this.x-this.width/2,y:this.y-this.height/2},h=t.prototype.resize.call(this,n),v={x:this.x-this.width/2,y:this.y-this.height/2};return l.forEach(function(g){g.width=g.width*a.x,g.height=g.height*a.y;var m=(g.x-f.x)*a.x+v.x-g.x,y=(g.y-f.y)*a.y+v.y-g.y;g.move(m,y,!0)}),this.isResize=!1,h},e}(su),Cp="node-selection";(function(){function t(e){var n=e.lf;this.selectNodes=[],this.d=10,this.lf=n,n.register({type:Cp,view:d5,model:f5})}return Object.defineProperty(t.prototype,"selectNodesIds",{get:function(){return this.selectNodes.map(function(e){return e.id})},enumerable:!1,configurable:!0}),t.prototype.addNodeSelection=function(){var e=this.lf.addNode({type:"node-selection",text:"",properties:{node_selection_ids:this.selectNodesIds},x:0,y:0});e.updatePointsByNodes(this.selectNodesIds)},t.prototype.updateNodeSelection=function(){var e,n=this.getNodeSelection();n&&(this.lf.setProperties(n.id,{node_selection_ids:this.selectNodesIds}),(e=this.lf.getNodeModelById(n.id))===null||e===void 0||e.updatePointsByNodes(this.selectNodesIds))},t.prototype.getNodeSelection=function(){var e=this,n=this.selectNodesIds,r=this.lf.getGraphRawData(),i=n.filter(function(o){return o!==e.currentClickNode.id});return r.nodes.find(function(o){if(o.type==="node-selection"){var a=ui(o,"properties.node_selection_ids",[]);return i.every(function(s){return a.includes(s)})}return!1})},t.prototype.onNodeChange=function(e,n){var r=e.graphModel.nodes.filter(function(i){if(!Gu(i))return!1;var o=i.properties.node_selection_ids||[];return o.includes(n.id)});Promise.resolve().then(function(){r.forEach(function(i){i.updatePointsByNodes(i.properties.node_selection_ids||[])})})},t.prototype.render=function(e){var n=this;this.lf=e,e.on("node:click",function(r){var i;if(!(!r.e.shiftKey||r.data.type===Cp)){n.currentClickNode=r.data;var o=!1;n.selectNodesIds.includes(r.data.id)&&((i=n.lf.getNodeModelById(r.data.id))===null||i===void 0||i.setSelected(!1),o=!0);var a=e.getSelectElements(!0).nodes;n.selectNodes=a,n.selectNodes.length===1?o?n.updateNodeSelection():n.addNodeSelection():n.selectNodes.length>1&&n.updateNodeSelection()}}),e.graphModel.addNodeMoveRules(function(r,i,o){if(n.onNodeChange(e,r),Gu(r)&&!r.isResize){var a=r.properties.node_selection_ids||[];return e.graphModel.moveNodes(a,i,o,!0),!0}return!0}),e.graphModel.addNodeResizeRules(function(r){return Gu(r)||n.onNodeChange(e,r),!0})},t.pluginName="node-selection",t})();var Gu=function(t){return!!(t&&t.type===Cp)},p5=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yu=function(){return Yu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Yu.apply(this,arguments)};(function(t){p5(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.properties;return Te("text",{x:r-o/2+5,y:i-a/2+16,fontSize:12,fill:"blue"},s.moreText)},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=this.props.model.getNodeStyle();return Te("g",{},[Te("rect",Yu(Yu({},s),{fill:"#FFFFFF",x:r-o/2,y:i-a/2})),this.getLabelShape()])},e})(Ji);var Ku=2,ux=.16,h5=.05,g5=.05,v5=.15,cx=5,dx=4,m5=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function fx(t){var e=t.r,n=t.g,r=t.b,i=SI(e,n,r);return{h:i.h*360,s:i.s,v:i.v}}function qu(t){var e=t.r,n=t.g,r=t.b;return"#".concat(AI(e,n,r))}function y5(t,e,n){var r=n/100,i={r:(e.r-t.r)*r+t.r,g:(e.g-t.g)*r+t.g,b:(e.b-t.b)*r+t.b};return i}function px(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-Ku*e:Math.round(t.h)+Ku*e:r=n?Math.round(t.h)+Ku*e:Math.round(t.h)-Ku*e,r<0?r+=360:r>=360&&(r-=360),r}function hx(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-ux*e:e===dx?r=t.s+ux:r=t.s+h5*e,r>1&&(r=1),n&&e===cx&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function gx(t,e,n){var r;return n?r=t.v+g5*e:r=t.v-v5*e,r>1&&(r=1),Number(r.toFixed(2))}function Ap(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=_a(t),i=cx;i>0;i-=1){var o=fx(r),a=qu(_a({h:px(o,i,!0),s:hx(o,i,!0),v:gx(o,i,!0)}));n.push(a)}n.push(qu(r));for(var s=1;s<=dx;s+=1){var l=fx(r),u=qu(_a({h:px(l,s),s:hx(l,s),v:gx(l,s)}));n.push(u)}return e.theme==="dark"?m5.map(function(c){var d=c.index,f=c.opacity,h=qu(y5(_a(e.backgroundColor||"#141414"),_a(n[d]),f*100));return h}):n}var Op={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Zu={},Tp={};Object.keys(Op).forEach(function(t){Zu[t]=Ap(Op[t]),Zu[t].primary=Zu[t][5],Tp[t]=Ap(Op[t],{theme:"dark",backgroundColor:"#141414"}),Tp[t].primary=Tp[t][5]});var _5=Zu.blue,b5=Symbol("iconContext"),vx=function(){return p.inject(b5,{prefixCls:p.ref("anticon"),rootClassName:p.ref(""),csp:p.ref()})};function Np(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function x5(t,e){return t&&t.contains?t.contains(e):!1}var mx="data-vc-order",E5="vc-icon-key",Mp=new Map;function yx(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):E5}function Dp(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function w5(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function _x(t){return Array.from((Mp.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function bx(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Np())return null;var n=e.csp,r=e.prepend,i=document.createElement("style");i.setAttribute(mx,w5(r)),n&&n.nonce&&(i.nonce=n.nonce),i.innerHTML=t;var o=Dp(e),a=o.firstChild;if(r){if(r==="queue"){var s=_x(o).filter(function(l){return["prepend","prependQueue"].includes(l.getAttribute(mx))});if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function S5(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Dp(e);return _x(n).find(function(r){return r.getAttribute(yx(e))===t})}function C5(t,e){var n=Mp.get(t);if(!n||!x5(document,n)){var r=bx("",e),i=r.parentNode;Mp.set(t,i),t.removeChild(r)}}function A5(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Dp(n);C5(r,n);var i=S5(e,n);if(i)return n.csp&&n.csp.nonce&&i.nonce!==n.csp.nonce&&(i.nonce=n.csp.nonce),i.innerHTML!==t&&(i.innerHTML=t),i;var o=bx(t,n);return o.setAttribute(yx(n),e),o}function xx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){O5(t,i,n[i])})}return t}function O5(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function T5(t,e){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(e))}function N5(t,e){T5(t,"[@ant-design/icons-vue] ".concat(e))}function Ex(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Pp(t,e,n){return n?p.h(t.tag,xx({key:e},n,t.attrs),(t.children||[]).map(function(r,i){return Pp(r,"".concat(e,"-").concat(t.tag,"-").concat(i))})):p.h(t.tag,xx({key:e},t.attrs),(t.children||[]).map(function(r,i){return Pp(r,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function wx(t){return Ap(t)[0]}function Sx(t){return t?Array.isArray(t)?t:[t]:[]}var M5=`
|
|
98
98
|
.anticon {
|
|
99
99
|
display: inline-block;
|
|
100
100
|
color: inherit;
|
|
@@ -150,7 +150,7 @@ The dependencies for this derivation are:
|
|
|
150
150
|
}
|
|
151
151
|
`;function Cx(t){return t&&t.getRootNode&&t.getRootNode()}function D5(t){return Np()?Cx(t)instanceof ShadowRoot:!1}function P5(t){return D5(t)?Cx(t):null}var R5=function(){var e=vx(),n=e.prefixCls,r=e.csp,i=p.getCurrentInstance(),o=M5;n&&(o=o.replace(/anticon/g,n.value)),p.nextTick(function(){if(Np()){var a=i.vnode.el,s=P5(a);A5(o,"@ant-design-vue-icons",{prepend:!0,csp:r.value,attachTo:s})}})},L5=["icon","primaryColor","secondaryColor"];function I5(t,e){if(t==null)return{};var n=k5(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function k5(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Ju(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){B5(t,i,n[i])})}return t}function B5(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var fs=p.reactive({primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1});function j5(t){var e=t.primaryColor,n=t.secondaryColor;fs.primaryColor=e,fs.secondaryColor=n||wx(e),fs.calculated=!!n}function F5(){return Ju({},fs)}var Di=function(e,n){var r=Ju({},e,n.attrs),i=r.icon,o=r.primaryColor,a=r.secondaryColor,s=I5(r,L5),l=fs;if(o&&(l={primaryColor:o,secondaryColor:a||wx(o)}),N5(Ex(i),"icon should be icon definiton, but got ".concat(i)),!Ex(i))return null;var u=i;return u&&typeof u.icon=="function"&&(u=Ju({},u,{icon:u.icon(l.primaryColor,l.secondaryColor)})),Pp(u.icon,"svg-".concat(u.name),Ju({},s,{"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};Di.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},Di.inheritAttrs=!1,Di.displayName="IconBase",Di.getTwoToneColors=F5,Di.setTwoToneColors=j5;function $5(t,e){return U5(t)||W5(t,e)||z5(t,e)||H5()}function H5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
152
152
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z5(t,e){if(t){if(typeof t=="string")return Ax(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ax(t,e)}}function Ax(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function W5(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function U5(t){if(Array.isArray(t))return t}function Ox(t){var e=Sx(t),n=$5(e,2),r=n[0],i=n[1];return Di.setTwoToneColors({primaryColor:r,secondaryColor:i})}function V5(){var t=Di.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var X5=p.defineComponent({name:"InsertStyles",setup:function(){return R5(),function(){return null}}}),G5=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Y5(t,e){return J5(t)||Z5(t,e)||q5(t,e)||K5()}function K5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
153
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q5(t,e){if(t){if(typeof t=="string")return Tx(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tx(t,e)}}function Tx(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Z5(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function J5(t){if(Array.isArray(t))return t}function Nx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){ps(t,i,n[i])})}return t}function ps(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q5(t,e){if(t==null)return{};var n=e$(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function e$(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}Ox(_5.primary);var Jo=function(e,n){var r,i=Nx({},e,n.attrs),o=i.class,a=i.icon,s=i.spin,l=i.rotate,u=i.tabindex,c=i.twoToneColor,d=i.onClick,f=Q5(i,G5),h=vx(),v=h.prefixCls,g=h.rootClassName,m=(r={},ps(r,g.value,!!g.value),ps(r,v.value,!0),ps(r,"".concat(v.value,"-").concat(a.name),!!a.name),ps(r,"".concat(v.value,"-spin"),!!s||a.name==="loading"),r),y=u;y===void 0&&d&&(y=-1);var x=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,S=Sx(c),b=Y5(S,2),N=b[0],A=b[1];return p.createVNode("span",Nx({role:"img","aria-label":a.name},f,{onClick:d,class:[m,o],tabindex:y}),[p.createVNode(Di,{icon:a,primaryColor:N,secondaryColor:A,style:x},null),p.createVNode(X5,null,null)])};Jo.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]},Jo.displayName="AntdIcon",Jo.inheritAttrs=!1,Jo.getTwoToneColor=V5,Jo.setTwoToneColor=Ox;var t$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};function Mx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){n$(t,i,n[i])})}return t}function n$(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rp=function(e,n){var r=Mx({},e,n.attrs);return p.createVNode(Jo,Mx({},r,{icon:t$}),null)};Rp.displayName="EditOutlined",Rp.inheritAttrs=!1;const r$=Qr(p.defineComponent({inheritAttrs:!1,__name:"index",props:p.mergeModels({dictType:{type:String,default:""},include:{type:[Array,String]},exclude:{type:Array},sort:{type:Boolean}},{dictMap:{type:Object},dictMapModifiers:{}}),emits:["update:dictMap"],setup(t){const e=t,n=p.useModel(t,"dictMap"),[r,{fetchDict:i,toList:o}]=eh(e.dictType,{immediate:!1}),a=p.computed(()=>{var l;const s=o(e.dictType);if(e.sort&&s.sort((u,c)=>parseFloat(u.value)-parseFloat(c.value)),e.include){const u=typeof e.include=="string"?e.include.split(","):e.include;return s.filter(c=>u.includes(c.value))}return(l=e.exclude)!=null&&l.length?s.filter(u=>{var c;return!((c=e.exclude)!=null&&c.includes(u.value))}):s});return e.dictType&&i(),p.watch(()=>r.value,()=>{if(n.value&&typeof n.value=="object")for(const s in r.value)n.value[s]=r.value}),(s,l)=>{const u=ie.Select;return p.openBlock(),p.createBlock(u,p.mergeProps({class:"dict-select",placeholder:s.$t("common.plsSelect"),showSearch:!1,options:p.unref(a),dropdownMatchSelectWidth:!1},s.$attrs),null,16,["placeholder","options"])}}}),[["__scopeId","data-v-f95bea24"]]),i$={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function o$(t,e){return p.openBlock(),p.createElementBlock("svg",i$,e[0]||(e[0]=[p.createElementVNode("path",{fill:"currentColor",d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372"},null,-1),p.createElementVNode("path",{fill:"currentColor",d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7c-21.2 8.1-39.2 22.3-52.1 40.9c-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0 1 30.9-44.8c59-22.7 97.1-74.7 97.1-132.5c.1-39.3-17.1-76-48.3-103.3M472 732a40 40 0 1 0 80 0a40 40 0 1 0-80 0"},null,-1)]))}const a$=p.markRaw({name:"ant-design-question-circle",render:o$}),s$={class:"wrapper"},l$={class:"mt-xs"},u$={class:"flex-sc"},c$={class:"mt-xs"},d$={style:{"max-width":"282px",overflow:"hidden","white-space":"break-spaces"}},f$=Qr(p.defineComponent({__name:"RuleConfig",props:{jsonStr:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const{t:n}=Dn.useI18n(),r=t,i=e,o=p.ref({});function a(d){const f=d.replace(/(false|true|\d+)(?=")/g,"$1,");return JSON.parse(`{${f}}`)}function s(d){if(typeof d=="string"&&(d.trim().startsWith("{")||d.trim().startsWith("[")))try{return JSON.parse(d),!0}catch{return!1}return!1}function l(){r.jsonStr?(s(r.jsonStr)?o.value=JSON.parse(r.jsonStr):o.value=a(r.jsonStr),o.value.fallbackFirstLinkStatus!==null&&o.value.fallbackFirstLinkStatus!==void 0&&(o.value.fallbackFirstLinkStatus=String(o.value.fallbackFirstLinkStatus))):o.value={revokeRule:!1,fallbackRule:!1,approverRemoveDuplicates:2,timeoutConfigSwitch:!1,timeoutPeriod:1,timeoutHandler:1,fallbackFirstLinkStatus:null}}function u(){Ht.Modal.destroyAll()}function c(){const d=o.value;if(d.timeoutConfigSwitch&&!d.timeoutPeriod){Ht.message.warning(n("bpmn.timeoutPeriodEmptyTip"));return}d.fallbackFirstLinkStatus&&(d.fallbackFirstLinkStatus=Number(d.fallbackFirstLinkStatus)),(d.fallbackFirstLinkStatus==null||d.fallbackFirstLinkStatus==null)&&delete d.fallbackFirstLinkStatus,i("submit",d),Ht.Modal.destroyAll()}return p.onMounted(()=>{l()}),(d,f)=>{const h=ie.Checkbox,v=ie.FormItem,g=ie.Radio,m=ie.RadioGroup,y=ie.InputNumber,x=a$,S=ie.Tooltip,b=r$,N=ie.Form,A=ie.Button,E=ie.Space;return p.openBlock(),p.createElementBlock("div",s$,[p.createVNode(N,{class:"my-nm","label-col":{span:9},"wrapper-col":{span:15},colon:!1,model:p.unref(o)},{default:p.withCtx(()=>[p.createVNode(v,{label:d.$t("bpmn.revertRule")},{default:p.withCtx(()=>[p.createVNode(h,{checked:p.unref(o).revokeRule,"onUpdate:checked":f[0]||(f[0]=O=>p.unref(o).revokeRule=O)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.revertRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),p.createVNode(v,{label:d.$t("bpmn.rollbackRule")},{default:p.withCtx(()=>[p.createVNode(h,{checked:p.unref(o).fallbackRule,"onUpdate:checked":f[1]||(f[1]=O=>p.unref(o).fallbackRule=O)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.rollbackRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),p.createVNode(v,{label:d.$t("bpmn.deduplicationApprovers")},{default:p.withCtx(()=>[p.createElementVNode("div",l$,p.toDisplayString(d.$t("bpmn.deduplicationApproversTxt")),1),p.createVNode(m,{value:p.unref(o).approverRemoveDuplicates,"onUpdate:value":f[2]||(f[2]=O=>p.unref(o).approverRemoveDuplicates=O)},{default:p.withCtx(()=>[p.createVNode(g,{value:0},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.deduplicationRadio0")),1)]),_:1}),p.createVNode(g,{value:1},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.deduplicationRadio1")),1)]),_:1}),p.createVNode(g,{value:2},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.deduplicationRadio2")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),p.createVNode(v,{label:d.$t("bpmn.timeoutRule")},{default:p.withCtx(()=>[p.createVNode(h,{checked:p.unref(o).timeoutConfigSwitch,"onUpdate:checked":f[3]||(f[3]=O=>p.unref(o).timeoutConfigSwitch=O)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.timeoutRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),p.unref(o).timeoutConfigSwitch?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[p.createVNode(v,{label:d.$t("wo_my.timeout")},{default:p.withCtx(()=>[p.createElementVNode("div",u$,[p.createTextVNode(p.toDisplayString(d.$t("bpmn.linkTimeoutTxt1"))+" ",1),p.createVNode(y,{class:"mx-xs",value:p.unref(o).timeoutPeriod,"onUpdate:value":f[4]||(f[4]=O=>p.unref(o).timeoutPeriod=O),min:1,max:1e4,precision:0},null,8,["value"]),p.createTextVNode(" "+p.toDisplayString(d.$t("bpmn.linkTimeoutTxt2")),1)])]),_:1},8,["label"]),p.createVNode(v,{label:d.$t("bpmn.timeoutHandle")},{default:p.withCtx(()=>[p.createElementVNode("div",c$,p.toDisplayString(d.$t("bpmn.timeoutHandleTxt")),1),p.createVNode(m,{value:p.unref(o).timeoutHandler,"onUpdate:value":f[5]||(f[5]=O=>p.unref(o).timeoutHandler=O)},{default:p.withCtx(()=>[p.createVNode(g,{value:0},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.timeoutHandleRadio0")),1)]),_:1}),p.createVNode(g,{value:1},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.timeoutHandleRadio1")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"])],64)):p.createCommentVNode("",!0),p.createVNode(v,null,{label:p.withCtx(()=>[p.createElementVNode("span",d$,p.toDisplayString(d.$t("bpmn.fallbackFirstLinkStatus")),1),p.createVNode(S,{overlayInnerStyle:{width:"600px"}},{title:p.withCtx(()=>[p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip1")),1),p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip2")),1),p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip3")),1),p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip4")),1),p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip5")),1),p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip6")),1)]),default:p.withCtx(()=>[p.createVNode(x)]),_:1})]),default:p.withCtx(()=>[p.createVNode(b,{"dict-type":"fallback_first_link_status",value:p.unref(o).fallbackFirstLinkStatus,"onUpdate:value":f[6]||(f[6]=O=>p.unref(o).fallbackFirstLinkStatus=O),placeholder:d.$t("common.plsSelect"),style:{width:"80%"}},null,8,["value","placeholder"])]),_:1})]),_:1},8,["model"]),p.createVNode(E,{class:"modal-btns"},{default:p.withCtx(()=>[p.createVNode(A,{onClick:u},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("common.btn_cancel1")),1)]),_:1}),p.createVNode(A,{type:"primary",onClick:c},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("common.btn_sure")),1)]),_:1})]),_:1})])}}}),[["__scopeId","data-v-27eaeb98"]]),p$={key:0},h$={key:1,style:{color:"#696868"}},g$=p.defineComponent({__name:"Process",props:p.mergeModels({isEdit:{type:Boolean}},{formState:{},formStateModifiers:{}}),emits:["update:formState"],setup(t){const{modal:e}=Ht.App.useApp(),{t:n}=Dn.useI18n(),r=p.useModel(t,"formState"),i=p.ref(["1","2","3","4","5","6"]);function o(){e.info({title:n("ruleModel.title"),content:p.h(f$,{jsonStr:r.value.jobPriority,onSubmit:a=>{r.value.jobPriority=JSON.stringify(a)}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:850,class:"modal-comp"})}return(a,s)=>{const l=ie.Input,u=ie.FormItem,c=ie.Form,d=ie.CollapsePanel,f=ie.Button,h=ie.Collapse;return p.openBlock(),p.createBlock(h,{activeKey:p.unref(i),"onUpdate:activeKey":s[3]||(s[3]=v=>p.isRef(i)?i.value=v:null)},{default:p.withCtx(()=>[p.createVNode(d,{key:"1",header:a.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(c,{layout:"vertical",model:r.value},{default:p.withCtx(()=>[p.createVNode(u,{label:a.$t("FLOW_CHART.Id"),extra:a.$t("FLOW_CHART.idTip")},{default:p.withCtx(()=>[p.createVNode(l,{value:r.value.id,"onUpdate:value":s[0]||(s[0]=v=>r.value.id=v),placeholder:a.$t("common.plsEnter"),readonly:t.isEdit},null,8,["value","placeholder","readonly"])]),_:1},8,["label","extra"]),p.createVNode(u,{label:a.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(l,{value:r.value.name,"onUpdate:value":s[1]||(s[1]=v=>r.value.name=v),placeholder:a.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(u,{label:a.$t("FLOW_CHART.Version Tag")},{default:p.withCtx(()=>[p.createVNode(l,{value:r.value.versionTag,"onUpdate:value":s[2]||(s[2]=v=>r.value.versionTag=v),disabled:""},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"]),p.createVNode(d,{key:"4",header:a.$t("FLOW_CHART.Job Configuration")},{default:p.withCtx(()=>[p.createVNode(c,{layout:"vertical",model:r.value},{default:p.withCtx(()=>[p.createVNode(u,{label:a.$t("FLOW_CHART.Job Priority")},{default:p.withCtx(()=>[p.createVNode(f,{onClick:o,style:{width:"100%"}},{default:p.withCtx(()=>[r.value.jobPriority?(p.openBlock(),p.createElementBlock("span",h$,[p.createTextVNode(p.toDisplayString(p.unref(n)("bpmn.has_config_rule"))+" ",1),p.createVNode(p.unref(Rp))])):(p.openBlock(),p.createElementBlock("span",p$,p.toDisplayString(p.unref(n)("bpmn.no_config_rule")),1))]),_:1})]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),v$=Qr(p.defineComponent({__name:"TemplateConfig",props:{data:{type:Object,default:()=>{}},templateList:{type:Array,default:()=>[]}},emits:["update:data"],setup(t,{emit:e}){const n=e,r=t,i=p.computed({get:()=>r.data,set:u=>{n("update:data",u)}}),o=p.computed(()=>r.templateList.filter(u=>{var c;return(c=u==null?void 0:u.type)==null?void 0:c.split(",").includes("1")}).map(u=>({label:u.name,value:u.id}))),a=p.computed(()=>r.templateList.filter(u=>{var c;return(c=u==null?void 0:u.type)==null?void 0:c.split(",").includes("2")}).map(u=>({label:u.name,value:u.id}))),s=p.computed(()=>r.templateList.filter(u=>{var c;return(c=u==null?void 0:u.type)==null?void 0:c.split(",").includes("3")}).map(u=>({label:u.name,value:u.id}))),l=(u,c)=>c.label.toLowerCase().indexOf(u.toLowerCase())>=0;return(u,c)=>{const d=ie.Select,f=ie.FormItem,h=ie.Form;return p.openBlock(),p.createElementBlock("div",null,[p.createVNode(h,{class:"form-query-select mx-nm mt-nm",layout:"vertical",model:i.value},{default:p.withCtx(()=>[p.createVNode(f,{label:u.$t("bpmn.todoHandle")},{default:p.withCtx(()=>[p.createVNode(d,{value:i.value[1],"onUpdate:value":c[0]||(c[0]=v=>i.value[1]=v),options:o.value,allowClear:"",placeholder:u.$t("common.plsSelect"),"show-search":"","filter-option":l},null,8,["value","options","placeholder"])]),_:1},8,["label"]),p.createVNode(f,{label:u.$t("bpmn.todoDetail")},{default:p.withCtx(()=>[p.createVNode(d,{value:i.value[2],"onUpdate:value":c[1]||(c[1]=v=>i.value[2]=v),options:a.value,allowClear:"",placeholder:u.$t("common.plsSelect"),"show-search":"","filter-option":l},null,8,["value","options","placeholder"])]),_:1},8,["label"]),p.createVNode(f,{label:u.$t("bpmn.AllDetail")},{default:p.withCtx(()=>[p.createVNode(d,{value:i.value[3],"onUpdate:value":c[2]||(c[2]=v=>i.value[3]=v),options:s.value,allowClear:"",placeholder:u.$t("common.plsSelect"),"show-search":"","filter-option":l},null,8,["value","options","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])])}}}),[["__scopeId","data-v-8a27c7e4"]]),m$={class:"modal-container"},y$=p.defineComponent({__name:"SelectLinkTask",props:{id:{type:String},componentInfo:{type:String,default:""},variable:{type:String,default:""},description:{type:String,default:""}},emits:["submit"],setup(t,{emit:e}){const{t:n}=Dn.useI18n(),r=t,i=e,o=p.ref({}),a=p.ref([{title:n("link.id"),dataIndex:"id"},{title:n("link.description"),dataIndex:"description"},{title:n("link.due"),dataIndex:"due"},{title:n("link.variable"),dataIndex:"variable"},{title:n("bpmn.action"),dataIndex:"action"}]),s=p.ref([]),l=p.ref();function u(k,B){s.value=k,l.value=B}const c=p.ref({1:void 0,2:void 0,3:void 0}),d=p.ref({}),f=p.ref(!1),h=p.ref(""),v=p.ref("");function g(){f.value=!1,h.value=m(c.value)}function m(k){return Object.entries(k).filter(([ee,ce])=>ce!==void 0).map(([ee,ce])=>`${ee}-${ce}`).join(",")}function y(k){if(typeof k!="string"||k.trim()==="")return{};const B=k.split(","),Z={};return B.forEach(ee=>{const[ce,...Be]=ee.split("-");if(ce&&Be.length>0){const me=Be.join("-");Z[ce]=me}}),Z}function x(){f.value=!1}function S(k){d.value=k,f.value=!0}const b=p.ref([]);async function N(){const{result:k}=await Gt.getTemplateList({pageNo:1,pageSize:1e3});b.value=(k==null?void 0:k.data)||[]}const A=p.ref([]);async function E(){const{result:k}=await Gt.getLinkList({pageNo:1,pageSize:1e3});A.value=(k==null?void 0:k.data)||[]}p.watchEffect(()=>{r.id&&(r.id.startsWith("common-approve-")||r.id.startsWith("common-handle-")?(v.value=r.id.slice(-4),s.value=[r.id.slice(0,-4)+"*"]):s.value=[r.id]),r.componentInfo&&(c.value=y(r.componentInfo))});function O(k){l.value=null;const B={...o.value};return Object.assign(B,k),Gt.getLinkList(B)}const C=p.ref(),G=()=>{C.value.refresh()},K=()=>{o.value={},G()};p.onMounted(()=>{K(),N(),E()});function J(){Ht.Modal.destroyAll()}function R(){var k,B;if((k=l.value)!=null&&k.length)i("submit",{...l.value[0],bindComponent:h.value,hasSuffix:""});else if((B=s.value)!=null&&B.length){const Z=A.value.find(ee=>ee.id===s.value[0]);i("submit",{...Z,id:r.id,bindComponent:h.value,hasSuffix:v.value})}Ht.Modal.destroyAll()}return(k,B)=>{const Z=ie.Input,ee=ie.FormItem,ce=ie.Button,Be=ie.Space,me=ie.Form,de=ie.Tooltip,Se=p.resolveComponent("a-table-ex"),je=ie.Modal;return p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createElementVNode("div",m$,[p.createVNode(me,{class:"form-query mx-nm mt-nm",layout:"vertical",model:p.unref(o)},{default:p.withCtx(()=>[p.createVNode(ee,{label:k.$t("link.id")},{default:p.withCtx(()=>[p.createVNode(Z,{value:p.unref(o).id,"onUpdate:value":B[0]||(B[0]=he=>p.unref(o).id=he),placeholder:k.$t("common.plsEnter"),onKeydown:p.withKeys(G,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(ee,{label:k.$t("link.description")},{default:p.withCtx(()=>[p.createVNode(Z,{value:p.unref(o).description,"onUpdate:value":B[1]||(B[1]=he=>p.unref(o).description=he),placeholder:k.$t("common.plsEnter"),onKeydown:p.withKeys(G,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(ee,{class:"form-btns"},{default:p.withCtx(()=>[p.createVNode(Be,null,{default:p.withCtx(()=>[p.createVNode(ce,{type:"primary",onClick:G},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(k.$t("common.btn_search")),1)]),_:1}),p.createVNode(ce,{onClick:K},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(k.$t("common.btn_reset")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),p.createVNode(Se,{ref_key:"tableEx",ref:C,class:"table-query bordered mx-nm",columns:p.unref(a),rowKey:"id","row-selection":{type:"radio",selectedRowKeys:p.unref(s),onChange:u},loadData:O},{bodyCell:p.withCtx(({record:he,column:Ve})=>[Ve.dataIndex==="action"?(p.openBlock(),p.createBlock(de,{key:0,placement:"top"},{title:p.withCtx(()=>[p.createElementVNode("span",null,p.toDisplayString(k.$t("bpmn.tempConfigTip")),1)]),default:p.withCtx(()=>[p.createVNode(ce,{type:"link",onClick:$=>S(he),style:{"padding-left":"0"},disabled:!p.unref(s).includes(he.id)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(k.$t("bpmn.tempConfig")),1)]),_:2},1032,["onClick","disabled"])]),_:2},1024)):p.createCommentVNode("",!0)]),_:1},8,["columns","row-selection"]),p.createVNode(Be,{class:"modal-btns"},{default:p.withCtx(()=>{var he;return[p.createVNode(ce,{onClick:J},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(k.$t("common.btn_cancel1")),1)]),_:1}),p.createVNode(ce,{type:"primary",disabled:!((he=p.unref(s))!=null&&he.length),onClick:R},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(k.$t("common.btn_sure")),1)]),_:1},8,["disabled"])]}),_:1})]),p.createVNode(je,{open:p.unref(f),"onUpdate:open":B[3]||(B[3]=he=>p.isRef(f)?f.value=he:null),title:k.$t("bpmn.tempConfig"),onOk:g,onCancel:x},{default:p.withCtx(()=>[p.createVNode(v$,{data:p.unref(c),"onUpdate:data":B[2]||(B[2]=he=>p.isRef(c)?c.value=he:null),"template-list":p.unref(b)},null,8,["data","template-list"])]),_:1},8,["open","title"])],64)}}}),_$={class:"modal-container"},b$=p.defineComponent({__name:"SelectUser",props:{userIds:{type:String||Array},branchId:{type:String},mode:{type:String,default:"default"}},emits:["submit"],setup(t,{emit:e}){const{t:n}=Dn.useI18n(),r=t,i=e,o=p.ref({}),a=p.ref([{title:n("user.user_name"),dataIndex:"userName"},{title:n("user.user_id"),dataIndex:"userCode"},{title:n("arrears.org"),dataIndex:"branchName"}]),s=p.ref([]),l=p.ref();function u(m,y){s.value=m,l.value=y}p.watchEffect(()=>{r.userIds&&(s.value=Array.isArray(r.userIds)?r.userIds:[r.userIds])});function c(m){l.value=null;const y={...o.value,branchId:r.branchId};return Object.assign(y,m),Gt.getUserList(y)}const d=p.ref(),f=()=>{d.value.refresh()},h=()=>{o.value={},f()};p.onMounted(()=>{h()});function v(){Ht.Modal.destroyAll()}function g(){var m;if((m=l.value)!=null&&m.length){const y=l.value;i("submit",r.mode==="multiple"?y:y[0])}Ht.Modal.destroyAll()}return(m,y)=>{const x=ie.Input,S=ie.FormItem,b=ie.Button,N=ie.Space,A=ie.Form,E=p.resolveComponent("a-table-ex");return p.openBlock(),p.createElementBlock("div",_$,[p.createVNode(A,{class:"form-query mx-nm mt-nm",layout:"vertical",model:p.unref(o)},{default:p.withCtx(()=>[p.createVNode(S,{label:m.$t("user.key")},{default:p.withCtx(()=>[p.createVNode(x,{value:p.unref(o).userName,"onUpdate:value":y[0]||(y[0]=O=>p.unref(o).userName=O),placeholder:m.$t("common.plsEnter"),onKeydown:p.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(S,{class:"form-btns"},{default:p.withCtx(()=>[p.createVNode(N,null,{default:p.withCtx(()=>[p.createVNode(b,{type:"primary",onClick:f},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_search")),1)]),_:1}),p.createVNode(b,{onClick:h},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_reset")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),p.createVNode(E,{ref_key:"tableEx",ref:d,class:"table-query bordered mx-nm",columns:p.unref(a),rowKey:"userId","row-selection":{type:t.mode==="multiple"?"checkbox":"radio",selectedRowKeys:p.unref(s),onChange:u},loadData:c},null,8,["columns","row-selection"]),p.createVNode(N,{class:"modal-btns"},{default:p.withCtx(()=>{var O;return[p.createVNode(b,{onClick:v},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_cancel1")),1)]),_:1}),p.createVNode(b,{type:"primary",disabled:!((O=p.unref(s))!=null&&O.length),onClick:g},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_sure")),1)]),_:1},8,["disabled"])]}),_:1})])}}}),x$=p.defineComponent({__name:"UserTask",props:{formState:{},formStateModifiers:{}},emits:p.mergeModels(["updateNodeName"],["update:formState"]),setup(t,{emit:e}){const{modal:n}=Ht.App.useApp(),{t:r}=Dn.useI18n(),i=p.inject("type"),o=p.inject("isApproval"),a=p.useModel(t,"formState"),s=p.ref(["1","2","3","4","5","6"]),l=p.ref([]),u=p.ref([]),c=p.ref([]),d=p.computed(()=>{var E;const A=a.value.assignee;return(E=String(A))==null?void 0:E.startsWith("${")});function f(){const A="abcdefghijklmnopqrstuvwxyz";let E="";for(let O=0;O<2;O++)E+=A.charAt(Math.floor(Math.random()*A.length));for(let O=0;O<2;O++)E+=Math.floor(Math.random()*10);return E}function h(){console.log(a.value,"formState.value"),n.info({title:r("link.select_link"),content:p.h(y$,{id:a.value.id,variable:a.value.assignee,description:a.value.name,componentInfo:a.value.bindComponent,onSubmit:A=>{let E=A.id;const O=E!==a.value.id;E.endsWith("*")&&(A.hasSuffix?E=E.substring(0,E.length-1)+A.hasSuffix:E=E.substring(0,E.length-1)+f()),Object.assign(a.value,{id:E,name:o?g(E):`bpmn.${i}_${E}`,assignee:"","camunda:assigneeName":"",priority:void 0,userArr:O?[]:a.value.userArr,roleArr:O?[]:a.value.roleArr,approveRank:"0"}),A.variable&&(a.value.assignee=`\${${A.variable}}`),a.value.bindComponent=A.bindComponent||void 0}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}function v(){n.info({title:r("user.select_user"),content:p.h(b$,{userIds:a.value.assignee,onSubmit:A=>{Object.assign(a.value,{assignee:A.userId,"camunda:assigneeName":A.userName})}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}function g(A){return A.includes("common-approve-")?`bpmn.${A.slice(0,-4)}0`:`bpmn.${A}`}function m(A){A==0?a.value.name=r("bpmn.common-approve-0"):a.value.name=r(`bpmn.${a.value.id.slice(0,-4)}${A}`)}function y(){Gt.getBranchTree().then(A=>{A.code===0&&(l.value=A.result||[])})}function x(){const A={pageNo:1,pageSize:1e3,branchId:a.value.priority||void 0};Gt.getUserList(A).then(E=>{var O,C;E.code===0&&(c.value=((C=(O=E.result)==null?void 0:O.data)==null?void 0:C.map(G=>({...G,label:G.userName,value:G.userId})))||[])})}function S(){const A={pageNo:1,pageSize:1e3,branchId:a.value.priority||void 0};Gt.getRoleList(A).then(E=>{var O,C;E.code===0&&(u.value=((C=(O=E.result)==null?void 0:O.data)==null?void 0:C.map(G=>({...G,label:G.roleName,value:G.roleId})))||[])})}function b(){Object.assign(a.value,{userArr:[],roleArr:[]}),x(),S()}function N(A){if(A!=null&&A.length){const E=c.value.find(O=>O.userId===A[0]);a.value.priority!==E.branchId&&(Object.assign(a.value,{priority:E.branchId,roleArr:[]}),x(),S())}}return p.onMounted(()=>{y(),x(),S()}),(A,E)=>{const O=ie.Input,C=ie.FormItem,G=ie.InputNumber,K=ie.TreeSelect,J=ie.Select,R=ie.Form,k=ie.CollapsePanel,B=ie.Radio,Z=ie.RadioGroup,ee=ie.Checkbox,ce=ie.CheckboxGroup,Be=ie.Collapse;return p.openBlock(),p.createBlock(Be,{activeKey:p.unref(s),"onUpdate:activeKey":E[10]||(E[10]=me=>p.isRef(s)?s.value=me:null)},{default:p.withCtx(()=>[p.createVNode(k,{key:"1",header:A.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(R,{layout:"vertical",model:a.value},{default:p.withCtx(()=>[p.createVNode(C,{label:A.$t("FLOW_CHART.Id")},{default:p.withCtx(()=>[p.createVNode(O,{value:a.value.id,"onUpdate:value":E[0]||(E[0]=me=>a.value.id=me),placeholder:A.$t("common.plsEnter"),readonly:"",onClick:h},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(C,{label:A.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(O,{value:A.$t(a.value.name),disabled:"",placeholder:A.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),a.value.id&&a.value.id.includes("common-approve-")?(p.openBlock(),p.createBlock(C,{key:0,label:A.$t("FLOW_CHART.approve-rank")},{default:p.withCtx(()=>[p.createVNode(G,{style:{width:"100%"},value:a.value.approveRank,"onUpdate:value":E[1]||(E[1]=me=>a.value.approveRank=me),min:0,max:10,placeholder:A.$t("common.plsEnter"),onChange:m},null,8,["value","placeholder"])]),_:1},8,["label"])):p.createCommentVNode("",!0),p.createVNode(C,{label:A.$t("FLOW_CHART.Assignee")},{default:p.withCtx(()=>[p.unref(d)?(p.openBlock(),p.createBlock(O,{key:0,value:a.value.assignee,"onUpdate:value":E[2]||(E[2]=me=>a.value.assignee=me),placeholder:A.$t("common.plsSelect"),disabled:""},null,8,["value","placeholder"])):(p.openBlock(),p.createBlock(O,{key:1,value:a.value["camunda:assigneeName"],"onUpdate:value":E[3]||(E[3]=me=>a.value["camunda:assigneeName"]=me),placeholder:A.$t("common.plsSelect"),readonly:"",onClick:v},null,8,["value","placeholder"]))]),_:1},8,["label"]),p.createVNode(C,{label:A.$t("FLOW_CHART.Priority")},{default:p.withCtx(()=>[p.createVNode(K,{value:a.value.priority,"onUpdate:value":E[4]||(E[4]=me=>a.value.priority=me),placeholder:A.$t("common.plsSelect"),"tree-data":p.unref(l),treeDefaultExpandAll:"",treeNodeFilterProp:"label","show-search":"","allow-clear":"",onChange:b},null,8,["value","placeholder","tree-data"])]),_:1},8,["label"]),p.createVNode(C,{label:A.$t("FLOW_CHART.Candidate Users")},{default:p.withCtx(()=>[p.createVNode(J,{value:a.value.userArr,"onUpdate:value":E[5]||(E[5]=me=>a.value.userArr=me),placeholder:A.$t("common.plsSelect"),mode:"multiple",maxTagCount:10,options:p.unref(c),optionFilterProp:"label",disabled:p.unref(d),onChange:N},null,8,["value","placeholder","options","disabled"])]),_:1},8,["label"]),p.createVNode(C,{label:A.$t("FLOW_CHART.Candidate Groups")},{default:p.withCtx(()=>[p.createVNode(J,{value:a.value.roleArr,"onUpdate:value":E[6]||(E[6]=me=>a.value.roleArr=me),placeholder:A.$t("common.plsSelect"),mode:"multiple",maxTagCount:10,options:p.unref(u),optionFilterProp:"label",disabled:p.unref(d)},null,8,["value","placeholder","options","disabled"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"]),p.unref(o)?p.createCommentVNode("",!0):(p.openBlock(),p.createBlock(k,{key:"2",header:A.$t("FLOW_CHART.isAllowRollback")},{default:p.withCtx(()=>[p.createVNode(Z,{value:a.value.rollback,"onUpdate:value":E[7]||(E[7]=me=>a.value.rollback=me)},{default:p.withCtx(()=>[p.createVNode(B,{value:"1"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.yes")),1)]),_:1}),p.createVNode(B,{value:"0"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.no")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"])),p.unref(o)?(p.openBlock(),p.createBlock(k,{key:"3",header:A.$t("FLOW_CHART.Approval Mode")},{default:p.withCtx(()=>[p.createVNode(Z,{value:a.value.approvalSign,"onUpdate:value":E[8]||(E[8]=me=>a.value.approvalSign=me)},{default:p.withCtx(()=>[p.createVNode(B,{value:"orSign"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.Or Sign")),1)]),_:1}),p.createVNode(B,{value:"countersign"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.countersign")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"])):p.createCommentVNode("",!0),p.unref(o)?(p.openBlock(),p.createBlock(k,{key:"4",header:A.$t("FLOW_CHART.Approval Required")},{default:p.withCtx(()=>[p.createVNode(ce,{value:a.value.approvalCheckbox,"onUpdate:value":E[9]||(E[9]=me=>a.value.approvalCheckbox=me)},{default:p.withCtx(()=>[p.createVNode(ee,{value:"advice"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.Comments Required")),1)]),_:1}),p.createVNode(ee,{value:"attachment"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.Attachment Required")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"])):p.createCommentVNode("",!0)]),_:1},8,["activeKey"])}}}),E$=p.defineComponent({__name:"ExclusiveGateway",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(t){const e=p.useModel(t,"formState"),n=p.ref(["1","2","3","4","5","6"]);return(r,i)=>{const o=ie.Input,a=ie.FormItem,s=ie.Form,l=ie.CollapsePanel,u=ie.Collapse;return p.openBlock(),p.createBlock(u,{activeKey:p.unref(n),"onUpdate:activeKey":i[2]||(i[2]=c=>p.isRef(n)?n.value=c:null)},{default:p.withCtx(()=>[p.createVNode(l,{key:"1",header:r.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(s,{layout:"vertical",model:e.value},{default:p.withCtx(()=>[p.createVNode(a,{label:r.$t("FLOW_CHART.Id")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.id,"onUpdate:value":i[0]||(i[0]=c=>e.value.id=c),placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(a,{label:r.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.name,"onUpdate:value":i[1]||(i[1]=c=>e.value.name=c),placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),w$=p.defineComponent({__name:"SequenceFlow",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(t){const e=p.useModel(t,"formState"),n=p.ref(["1","2","3","4","5","6"]);return(r,i)=>{const o=ie.Input,a=ie.FormItem,s=ie.SelectOption,l=ie.Select,u=ie.Form,c=ie.CollapsePanel,d=ie.Collapse;return p.openBlock(),p.createBlock(d,{activeKey:p.unref(n),"onUpdate:activeKey":i[4]||(i[4]=f=>p.isRef(n)?n.value=f:null)},{default:p.withCtx(()=>[p.createVNode(c,{key:"1",header:r.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(u,{layout:"vertical",model:e.value},{default:p.withCtx(()=>[p.createVNode(a,{label:r.$t("FLOW_CHART.Id")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.id,"onUpdate:value":i[0]||(i[0]=f=>e.value.id=f),placeholder:r.$t("common.plsEnter"),disabled:""},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(a,{label:r.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.name,"onUpdate:value":i[1]||(i[1]=f=>e.value.name=f),placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(a,{label:r.$t("FLOW_CHART.Condition Type")},{default:p.withCtx(()=>[p.createVNode(l,{value:e.value.condType,"onUpdate:value":i[2]||(i[2]=f=>e.value.condType=f),placeholder:r.$t("common.plsSelect"),allowClear:""},{default:p.withCtx(()=>[p.createVNode(s,{value:"bpmn:tFormalExpression"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(r.$t("FLOW_CHART.Expression")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"]),e.value.condType==="bpmn:tFormalExpression"?(p.openBlock(),p.createBlock(a,{key:0,label:r.$t("FLOW_CHART.Expression")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.condBody,"onUpdate:value":i[3]||(i[3]=f=>e.value.condBody=f),placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])):p.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),S$={class:"modal-container"},C$=p.defineComponent({__name:"SelectLink",props:{id:{type:String}},emits:["submit"],setup(t,{emit:e}){const{t:n}=Dn.useI18n(),r=t,i=e,o=p.ref({}),a=p.ref([{title:n("link.id"),dataIndex:"id"},{title:n("link.description"),dataIndex:"description"},{title:n("link.due"),dataIndex:"due"},{title:n("link.variable"),dataIndex:"variable"}]),s=p.ref([]),l=p.ref();function u(m,y){s.value=m,l.value=y}p.watchEffect(()=>{r.id&&(s.value=[r.id])});function c(m){l.value=null;const y={...o.value};return Object.assign(y,m),Gt.getLinkList(y)}const d=p.ref(),f=()=>{d.value.refresh()},h=()=>{o.value={},f()};p.onMounted(()=>{h()});function v(){Ht.Modal.destroyAll()}function g(){var m;(m=l.value)!=null&&m.length&&i("submit",l.value[0]),Ht.Modal.destroyAll()}return(m,y)=>{const x=ie.Input,S=ie.FormItem,b=ie.Button,N=ie.Space,A=ie.Form,E=p.resolveComponent("a-table-ex");return p.openBlock(),p.createElementBlock("div",S$,[p.createVNode(A,{class:"form-query mx-nm mt-nm",layout:"vertical",model:p.unref(o)},{default:p.withCtx(()=>[p.createVNode(S,{label:m.$t("link.id")},{default:p.withCtx(()=>[p.createVNode(x,{value:p.unref(o).id,"onUpdate:value":y[0]||(y[0]=O=>p.unref(o).id=O),placeholder:m.$t("common.plsEnter"),onKeydown:p.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(S,{label:m.$t("link.description")},{default:p.withCtx(()=>[p.createVNode(x,{value:p.unref(o).description,"onUpdate:value":y[1]||(y[1]=O=>p.unref(o).description=O),placeholder:m.$t("common.plsEnter"),onKeydown:p.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(S,{class:"form-btns"},{default:p.withCtx(()=>[p.createVNode(N,null,{default:p.withCtx(()=>[p.createVNode(b,{type:"primary",onClick:f},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_search")),1)]),_:1}),p.createVNode(b,{onClick:h},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_reset")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),p.createVNode(E,{ref_key:"tableEx",ref:d,class:"table-query bordered mx-nm",columns:p.unref(a),rowKey:"id","row-selection":{type:"radio",selectedRowKeys:p.unref(s),onChange:u},loadData:c},null,8,["columns","row-selection"]),p.createVNode(N,{class:"modal-btns"},{default:p.withCtx(()=>{var O;return[p.createVNode(b,{onClick:v},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_cancel1")),1)]),_:1}),p.createVNode(b,{type:"primary",disabled:!((O=p.unref(s))!=null&&O.length),onClick:g},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_sure")),1)]),_:1},8,["disabled"])]}),_:1})])}}}),A$=p.defineComponent({__name:"EndEvent",props:{formState:{},formStateModifiers:{}},emits:p.mergeModels(["updateNodeName"],["update:formState"]),setup(t,{emit:e}){const{modal:n}=Ht.App.useApp(),{t:r}=Dn.useI18n(),i=p.useModel(t,"formState"),o=p.ref(["1","2","3","4","5","6"]);function a(){const c="abcdefghijklmnopqrstuvwxyz";let d="";for(let f=0;f<2;f++)d+=c.charAt(Math.floor(Math.random()*c.length));for(let f=0;f<2;f++)d+=Math.floor(Math.random()*10);return d}const s=e;function l(){s("updateNodeName",i.value.id,i.value.name)}function u(){n.info({title:r("link.select_link"),content:p.h(C$,{id:i.value.id,onSubmit:c=>{let d=c.id;d.endsWith("*")&&(d=d.substring(0,d.length-1)+a()),Object.assign(i.value,{id:d,name:"bpmn.endName"})}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}return(c,d)=>{const f=ie.Input,h=ie.FormItem,v=ie.Form,g=ie.CollapsePanel,m=ie.Collapse;return p.openBlock(),p.createBlock(m,{activeKey:p.unref(o),"onUpdate:activeKey":d[1]||(d[1]=y=>p.isRef(o)?o.value=y:null)},{default:p.withCtx(()=>[p.createVNode(g,{key:"1",header:c.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(v,{layout:"vertical",model:i.value},{default:p.withCtx(()=>[p.createVNode(h,{label:c.$t("FLOW_CHART.Id")},{default:p.withCtx(()=>[p.createVNode(f,{value:i.value.id,"onUpdate:value":d[0]||(d[0]=y=>i.value.id=y),placeholder:c.$t("common.plsEnter"),readonly:"",onClick:u},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(h,{label:c.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(f,{value:c.$t(i.value.name),disabled:"",placeholder:c.$t("common.plsEnter"),onChange:l},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),O$=p.defineComponent({__name:"Other",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(t){const e=p.useModel(t,"formState"),n=p.ref(["1","2","3","4","5","6"]);return(r,i)=>{const o=ie.Input,a=ie.FormItem,s=ie.Form,l=ie.CollapsePanel,u=ie.Collapse;return p.openBlock(),p.createBlock(u,{activeKey:p.unref(n),"onUpdate:activeKey":i[2]||(i[2]=c=>p.isRef(n)?n.value=c:null)},{default:p.withCtx(()=>[p.createVNode(l,{key:"1",header:r.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(s,{layout:"vertical",model:e.value},{default:p.withCtx(()=>[p.createVNode(a,{label:r.$t("FLOW_CHART.Id")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.id,"onUpdate:value":i[0]||(i[0]=c=>e.value.id=c),placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(a,{label:r.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.name,"onUpdate:value":i[1]||(i[1]=c=>e.value.name=c),disabled:"",placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),T$={class:"properties-panel"},N$=Qr(p.defineComponent({__name:"BpmnPropertiesPanel",props:{lfRef:{type:Object},isEdit:{type:Boolean},processAttrs:{type:Object}},emits:["changeProcess"],setup(t,{emit:e}){const{t:n}=Dn.useI18n(),r=e,i=t,o=p.ref(""),a=p.ref({}),s=p.ref({});let l;p.watch(()=>i.lfRef,()=>{i.lfRef&&(s.value=i.lfRef,u())}),p.watch(a,(h,v)=>{h===v&&d()},{deep:!0});function u(){s.value.on("node:click",({data:h,e:v,position:g})=>{c(h)}),s.value.on("edge:click",({data:h,e:v,position:g})=>{c(h)}),s.value.on("blank:click",({e:h})=>{o.value="bpmn:process",a.value={id:i.processAttrs.id||"Process_1",name:i.processAttrs.name,jobPriority:i.processAttrs["camunda:jobPriority"]}})}function c(h){var m;if(!h||l===h)return;l=h;const v=h.type;o.value="",p.nextTick(()=>{o.value=v});const g={...h.properties,id:h.id,name:((m=h.text)==null?void 0:m.value)||""};v==="bpmn:userTask"?(Object.assign(g,{rollback:g["camunda:rollback"]==1?"1":"0",approvalCheckbox:[]}),Object.assign(g,{approvalSign:g["camunda:countersign"]==!0?"countersign":"orSign",approvalCheckbox:[]}),g["camunda:assignee"]&&(g.assignee=g["camunda:assignee"]),g["camunda:priority"]&&(g.priority=g["camunda:priority"]),g["camunda:advice"]==!0&&g.approvalCheckbox.push("advice"),g["camunda:attachment"]==!0&&g.approvalCheckbox.push("attachment"),g["camunda:bindComponent"]&&(g.bindComponent=g["camunda:bindComponent"]),g.hasOwnProperty("camunda:approveRank")?g.approveRank=g["camunda:approveRank"]:g.id.includes("common-approve-")&&(g.approveRank=0),typeof g["camunda:candidateUsers"]=="number"?g.userArr=[g["camunda:candidateUsers"].toString()]:typeof g["camunda:candidateUsers"]=="string"?g.userArr=(g["camunda:candidateUsers"]||"").split(",").filter(y=>y):g.userArr=[],typeof g["camunda:candidateGroups"]=="number"?g.roleArr=[g["camunda:candidateGroups"].toString()]:typeof g["camunda:candidateGroups"]=="string"?g.roleArr=(g["camunda:candidateGroups"]||"").split(",").filter(y=>y):g.roleArr=[]):v==="bpmn:sequenceFlow"&&(console.log("data.properties",h.properties,h.properties["bpmn:conditionExpression"]),h.properties["bpmn:conditionExpression"]&&Object.assign(g,{condType:h.properties["bpmn:conditionExpression"]["xsi:type"],condBody:h.properties["bpmn:conditionExpression"]["#text"].replace(/\s+/g,"")})),a.value=g}function d(){var g,m;const h=a.value,v={id:h.id,name:h.name};if(console.log("bpmnType.value",o.value),o.value==="bpmn:process")h.jobPriority&&Object.assign(v,{"camunda:jobPriority":h.jobPriority}),r("changeProcess",v);else if(o.value==="bpmn:userTask"){Object.assign(v,{"camunda:orSign":h.approvalSign==="orSign","camunda:rollback":h.rollback==1?"1":"0","camunda:countersign":h.approvalSign==="countersign","camunda:advice":h.approvalCheckbox.includes("advice"),"camunda:attachment":h.approvalCheckbox.includes("attachment"),"camunda:assignee":h.assignee||"","camunda:assigneeName":h["camunda:assigneeName"]||"","camunda:priority":h.priority||"","camunda:candidateUsers":((g=h.userArr)==null?void 0:g.join())||"","camunda:candidateGroups":((m=h.roleArr)==null?void 0:m.join())||"","camunda:bindComponent":h.bindComponent||"","camunda:approveRank":h.approveRank,"camunda:transName":h.name,name:n(h.name)}),console.log("activeNode.id, attrs",l.id,v);const{id:y}=l,{id:x}=h;if(x&&y!==x)if(!s.value.getNodeModelById(x))s.value.changeNodeId(y,x);else{Ht.message.warning(n("bpmn.repeat_id_tip"));const{eventCenter:b}=s.value.graphModel;b.emit("blank:click",{});return}p.nextTick(()=>{s.value.getNodeModelById(x).setProperties(v),s.value.updateText(x,n(h.name))})}else o.value==="bpmn:sequenceFlow"&&(h.condType?v["bpmn:conditionExpression"]={"#text":h.condBody,"xsi:type":h.condType}:v["bpmn:conditionExpression"]=null,s.value.getEdgeModelById(l.id).setProperties(v))}function f(h,v){l.id&&(s.value.setProperties(l.id,{name:v}),s.value.updateText(l.id,v))}return(h,v)=>{const g=zm;return p.openBlock(),p.createElementBlock("div",T$,[p.createVNode(g,null,{default:p.withCtx(()=>[p.unref(o)==="bpmn:process"?(p.openBlock(),p.createBlock(g$,{key:0,formState:p.unref(a),"onUpdate:formState":v[0]||(v[0]=m=>p.isRef(a)?a.value=m:null),isEdit:t.isEdit},null,8,["formState","isEdit"])):p.unref(o)==="bpmn:userTask"?(p.openBlock(),p.createBlock(x$,{key:1,formState:p.unref(a),"onUpdate:formState":v[1]||(v[1]=m=>p.isRef(a)?a.value=m:null),onUpdateNodeName:f},null,8,["formState"])):p.unref(o)==="bpmn:exclusiveGateway"?(p.openBlock(),p.createBlock(E$,{key:2,formState:p.unref(a),"onUpdate:formState":v[2]||(v[2]=m=>p.isRef(a)?a.value=m:null)},null,8,["formState"])):p.unref(o)==="bpmn:sequenceFlow"?(p.openBlock(),p.createBlock(w$,{key:3,formState:p.unref(a),"onUpdate:formState":v[3]||(v[3]=m=>p.isRef(a)?a.value=m:null)},null,8,["formState"])):p.unref(o)==="bpmn:endEvent"?(p.openBlock(),p.createBlock(A$,{key:4,formState:p.unref(a),"onUpdate:formState":v[4]||(v[4]=m=>p.isRef(a)?a.value=m:null),onUpdateNodeName:f},null,8,["formState"])):p.unref(o)?(p.openBlock(),p.createBlock(O$,{key:5,formState:p.unref(a),"onUpdate:formState":v[5]||(v[5]=m=>p.isRef(a)?a.value=m:null)},null,8,["formState"])):p.createCommentVNode("",!0)]),_:1})])}}}),[["__scopeId","data-v-238a0ab5"]]),Lp="menu-common",Dx=200,M$=100;class Px{constructor({lf:e}){Yp(this,"setContextMenuByType",(e,n)=>{this.menuTypeMap.set(e,n)});Yp(this,"listenDelete",()=>{this.hideContextMenu()});this.menuTypeMap=new Map,this.lf=e,this.__menuDOM=document.createElement("div"),this.__menuDOM.className="lf-inner-context",this.menuTypeMap.set(Lp,[])}render(e,n){this.container=n,e.on("node:click",({data:r})=>{this._activeData=r,this.createContextMenu(),console.log(r)}),e.on("edge:click",({data:r})=>{this._activeData=r,this.createContextMenu()}),e.on("blank:click",()=>{this.hideContextMenu()})}hideContextMenu(){this.__menuDOM.innerHTML="",this.__menuDOM.style.display="none",this.isShow&&this.container.removeChild(this.__menuDOM),this.lf.off("node:delete,edge:delete,node:drag,graph:transform",this.listenDelete),this.isShow=!1}showContextMenu(e){if(!e||!e.id){console.warn("请检查传入的参数");return}this._activeData=e,this.createContextMenu()}setContextMenuItems(e){this.menuTypeMap.set(Lp,e)}getContextMenuPosition(){const e=this._activeData,n=this.lf.graphModel.getElement(e.id);if(!n){console.warn(`找不到元素${e.id}`);return}let r,i;if(n.BaseType==="edge"){r=Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER;const o=n.getData();r=Math.max(o.startPoint.x,r),i=Math.min(o.startPoint.y,i),r=Math.max(o.endPoint.x,r),i=Math.min(o.endPoint.y,i),o.pointsList&&o.pointsList.forEach(a=>{r=Math.max(a.x,r),i=Math.min(a.y,i)})}return n.BaseType==="node"&&(r=e.x+n.width/2,i=e.y-n.height/2),this.lf.graphModel.transformModel.CanvasPointToHtmlPoint([r,i])}createContextMenu(){const{isSilentMode:e}=this.lf.options;if(e)return;let n=this.menuTypeMap.get(this._activeData.type)||[];n=n.concat(this.menuTypeMap.get(Lp));const r=document.createDocumentFragment();n.forEach(i=>{const o=document.createElement("div");o.className="lf-context-item";const a=document.createElement("img");a.src=i.icon,a.className="lf-context-img",i.className&&(o.className=`${o.className} ${i.className}`),a.addEventListener("click",()=>{this.hideContextMenu(),i.callback?i.callback(this._activeData):this.addNode({sourceId:this._activeData.id,x:this._activeData.x,y:this._activeData.y,properties:i.properties,type:i.type,text:i.text||""})}),o.appendChild(a),r.appendChild(o)}),this.__menuDOM.innerHTML="",this.__menuDOM.appendChild(r),this.showMenu()}addNode(e,n){const r=n!==void 0;n===void 0&&(n=e.y);const i=this.lf.getNodeModelById(e.sourceId),o=e.x-100+Dx,a=n-e.y/2-20,s=e.x+100+Dx,l=n+e.y/2+20,u=this.lf.getAreaElement([o,a],[s,l]);if(console.log(u),u.length){n=n+M$,this.addNode(e,n);return}const c=this.lf.addNode({type:e.type,x:e.x+200,y:n,properties:e.properties,text:e.text});let d,f;r&&(d={x:e.x,y:e.y+i.height/2},f={x:c.x-c.width/2,y:c.y}),this.lf.addEdge({sourceNodeId:e.sourceId,targetNodeId:c.id,startPoint:d,endPoint:f})}showMenu(){const[e,n]=this.getContextMenuPosition();this.__menuDOM.style.display="flex",this.__menuDOM.style.top=`${n}px`,this.__menuDOM.style.left=`${e+10}px`,this.container.appendChild(this.__menuDOM),!this.isShow&&this.lf.on("node:delete,edge:delete,node:drag,graph:transform",this.listenDelete),this.isShow=!0}}Px.pluginName="contextPad";const D$=(t,e)=>{const n={type:"bpmn:userTask",label:e("bpmn.userTaskName"),text:e("bpmn.userTaskName"),properties:{"camunda:transName":"bpmn.userTaskName"},icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAp1JREFUWEftlj9oE2EYxp/3IkSckotOpqDgl5ZWcLBgxcVBdBL8gw66iCg2lxrBzcl0qpPS1lyQKm5uiuBUHBztoAjVVtOLRDA46Z06VAvmXkkwQWLS3PudQwn54KY8z/v8eO7uvRA2+KENzoc+YNg71PsNxm6VYxStnibwIQCnAF4kptcMv+RWjSlk1VqYFkM1mLCLx5jpJoh2doD4zoQpL61u6EJqA5oF5zwY9wIFE3JuWk0G0raItAATd8r7uPprQRRoYMQdV8siD6C3ZkzbeQ5gTBLGwGPPUsclnppW3GCs8HaHwZvK0iAAq5sj37Z9ujS6KvGKARP5lXNMdF8S0tT6fNidSD2VeMWAcfv9OMEvSEKaWo2XRQwYm3UOGhE80wEk5pNfMqlHEq8YMFEobmc2KpKQhpZR3eNZQ4sSrxiwNty0Sw8BPiEJAujDlp/R4crVgR8Snxagzm1m8FnPSj2QwGmtmUaAaTtzAC4ECWTCNd3PnVaDDahEoZRl5ul1ITVWy9/zQgHWBsULpQPw+QwIw2CM1IcTlsBYZgN3v6bVqyAtd9KEBgwTHsTb+4DmnJPEGgZgIAlCst4KowIfFUTx0b2otHZmo11xg+ZtZz8iGAPjCFC/gpx5EOZRxYI7oWr/hAKfQIBb7XeDDOMKMx1tthQ4okXIqBDxE4I//dkaKnYb0xXQzBdzoEgW4Hi3YbLfyQNXZ9zMYG4937qApu28Af6sDlm6RL3kWmq3eM3EbecFAXslSbpaBl56lhpt52/bYNxemSHQZd1AHR+DZz0rlW31tgfMOw4RdukE6XqYUfIySgUCNG2HdYPC+FxL/VNY2wb7gB1q7qEG68vZuB7meRJ72Z9st7S7fknEQf/Z0AcMW2i/wbAN/gbA1dYpL5kz5gAAAABJRU5ErkJggg==",properties:{actived:!0}},r={type:"bpmn:serviceTask",label:e("bpmn.serviceTaskName"),text:e("bpmn.serviceTaskName"),properties:{"camunda:transName":"bpmn.serviceTaskName"},icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAz9JREFUWEfVmEtoE1EUhv8zqaBgwUwi+K5CJqkoumhBxY11IVTBhaBUUNCFtplQRRSrK+vKVrTgYyZUF7qRigV3dqFg3YhdtAsLapIJKK2vRToRqgtpM0cmtTVJE3IzyWKcXTL/+c83c+/cc+4luPwil/OhKsCVWjJgEVqZM75iD8rk+co08/xHePMnpy/CMaANlyE2RBJbNLvJKaRjQF/UuMaMSyKAROiZCiuXRbSFGseAsp4cALhNLCk9NtXAUTFtvqoKQOMNgJ2CSUdMVdklqM2TlQRc1ze57NfS38eJM2uY+GlabRzPjZR14xuAVYJJv5uqsjpX69Vj24jpECRpAoQRs0N5X8yrKKCsJdeDeBDAjvkgBl5JzHdm6+itlEEfAQcF4eZkRENShs4xZbZaRJ0E7MmJfwemVjMSmBSag7KWvAXiMxUBVCtmum1GAmfLAvq1ZItF/LLafE7iJaa9qUhgODd20RDL0eQzMO93kqDqGKIhMxw4UBJQ1uKnQNK9yhPxFwYZEjhmEc0SEAIoBOYNFXuxddqMhO7Pxy28wfr+uH9JRnoNIFiJKTGfnIoEHxaL8WqJi0TUW4kfgMSMx9o93R5KZb+t+WBZNw4DeFKJmUgJ8+vJJgs8WokvE46lw8qjfEAt3g2SrogaSaDmlBoYE9GviH7YKHHdRxFtVsPWVTMS6s4DtH94dWOUgKZyRszclY4Er5fT5d73aYkTTPSgfAyPm2pw+6I5aP/h743VW8ulfhCVrptEE2Y40FA+0WKFrCc+A7S2ZCzzgPTTak91NU4XBVyYj1r8PEi6UdSI8MIMK/ucAHp1Y7iggvyzYeuCGQndLPQtWYtLmTHhbjqsdDoB9OmJKIM6CmPtMppWlZZinv8noOzWIXb9R+LqZUZ2+0Lt+lLn+mbBXoNc3W4tVBE3N6zZeuz2ln9uqF28afoLWHLbyR6Kwco2tlsqqcfMSHqI2pithqq3nXZigY27abeQgpBpU1XkXG1VG3eRpKJVJ9sgA2NpVWkW8RVut8qZybphD7O9jxG5Bk1VOSIirBmgTzd6GOgSSUpA75SqCB3V1QzQ9QeY9pO6+ghYZGhroXF8gFmL5CIefwB0scE4DheJlAAAAABJRU5ErkJggg==",cls:"import_icon"},i={type:"bpmn:exclusiveGateway",label:e("bpmn.exclusiveGatewayName"),properties:{"camunda:transName":"bpmn.exclusiveGatewayName"},icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAAHeEJUAAAAABGdBTUEAALGPC/xhBQAAAvVJREFUOBGNVEFrE0EU/mY3bQoiFlOkaUJrQUQoWMGePLX24EH0IIoHKQiCV0G8iE1covgLiqA/QTzVm1JPogc9tIJYFaQtlhQxqYjSpunu+L7JvmUTU3AgmTfvffPNN++9WSA1DO182f6xwILzD5btfAoQmwL5KJEwiQyVbSVZ0IgRyV6PTpIJ81E5ZvqfHQR0HUOBHW4L5Et2kQ6Zf7iAOhTFAA8s0pEP7AXO1uAA52SbqGk6h/6J45LaLhO64ByfcUzM39V7ZiAdS2yCePPEIQYvTUHqM/n7dgQNfBKWPjpF4ISk8q3J4nB11qw6X8l+FsF3EhlkEMfrjIer3wJTLwS2aCNcj4DbGxXTw00JmAuO+Ni6bBxVUCvS5d9aa04+so4pHW5jLTywuXAL7jJ+D06sl82Sgl2JuVBQn498zkc2bGKxULHjCnSMadBKYDYYHAtsby1EQ5lNGrQd4Y3v4Zo0XdGEmDno46yCM9Tk+RiJmUYHS/aXHPNTcjxcbTFna000PFJHIVZ5lFRqRpJWk9/+QtlOUYJj9HG5pVFEU7zqIYDVsw2s+AJaD8wTd2umgSCCyUxgGsS1Y6TBwXQQTFuZaHcd8gAGioE90hlsY+wMcs30RduYtxanjMGal8H5dMW67dmT1JFtYUEe8LiQLRsPZ6IIc7A4J5tqco3T0pnv/4u0kyzrYUq7gASuEyI8VXKvB9Odytv6jS/PNaZBln0nioJG/AVQRZvApOdhjj3Jt8QC8Im09SafwdBdvIpztpxWxpeKCC+EsFdS8DCyuCn2munFpL7ctHKp+Xc5cMybeIyMAN33SPL3ZR9QV1XVwLyzHm6Iv0/yeUuUb7PPlZC4D4HZkeu6dpF4v9j9MreGtMbxMMRLIcjJic9yHi7WQ3yVKzZVWUr5UrViJvn1FfUlwe/KYVfYyWRLSGNu16hR01U9IacajXPei0wx/5BqgInvJN+MMNtNme7ReU9SBbgntovn0kKHpFg7UogZvaZiOue/q1SBo9ktHzQAAAAASUVORK5CYII="},o={type:"bpmn:endEvent",label:e("bpmn.endName"),text:e("bpmn.endName"),properties:{"camunda:transName":"bpmn.endName"},icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAA1BJREFUOBFtVE1IVUEYPXOf+tq40Y3vPcmFIdSjIorWoRG0ERWUgnb5FwVhYQSl72oUoZAboxKNFtWiwKRN0M+jpfSzqJAQclHo001tKkjl3emc8V69igP3znzfnO/M9zcDcKT67azmjYWTwl9Vn7Vumeqzj1DVb6cleQY4oAVnIOPb+mKAGxQmKI5CWNJ2aLPatxWa3aB9K7/fB+/Z0jUF6TmMlFLQqrkECWQzOZxYGjTlOl8eeKaIY5yHnFn486xBustDjWT6dG7pmjHOJd+33t0iitTPkK6tEvjxq4h2MozQ6WFSX/LkDUGfFwfhEZj1Auz/U4pyAi5Sznd7uKzznXeVHlI/Aywmk6j7fsUsEuCGADrWARXXwjxWQsUbIupDHJI7kF5dRktg0eN81IbiZXiTESic50iwS+t1oJgL83jAiBupLDCQqwziaWSoAFSeIR3P5Xv5az00wyIn35QRYTwdSYbz8pH8fxUUAtxnFvYmEmgI0wYXUXcCCSpeEVpXlsRhBnCEATxWylL9+EKCAYhe1NGstUa6356kS9NVvt3DU2fd+Wtbm/+lSbylJqsqkSm9CRhvoJVlvKPvF1RKY/FcPn5j4UfIMLn8D4UYb54BNsilTDXKnF4CfTobA0FpoW/LSp306wkXM+XaOJhZaFkcNM82ASNAWMrhrUbRfmyeI1FvRBTpN06WKxa9BK0o2E4Pd3zfBBEwPsv9sQBnmLVbLEIZ/Xe9LYwJu/Er17W6HYVBc7vmuk0xUQ+pqxdom5Fnp55SiytXLPYoMXNM4u4SNSCFWnrVIzKG3EGyMXo6n/BQOe+bX3FClY4PwydVhthOZ9NnS+ntiLh0fxtlUJHAuGaFoVmttpVMeum0p3WEXbcll94l1wM/gZ0Ccczop77VvN2I7TlsZCsuXf1WHvWEhjO8DPtyOVg2/mvK9QqboEth+7pD6NUQC1HN/TwvydGBARi9MZSzLE4b8Ru3XhX2PBxf8E1er2A6516o0w4sIA+lwURhAON82Kwe2iDAC1Watq4XHaGQ7skLcFOtI5lDxuM2gZe6WFIotPAhbaeYlU4to5cuarF1QrcZ/lwrLaCJl66JBocYZnrNlvm2+MBCTmUymPrYZVbjdlr/BxlMjmNmNI3SAAAAAElFTkSuQmCC"},a={icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAUpJREFUWEftVzuywjAMlKgDPV2g4RYPuAnfDs7w4AzQ8b0Jn1vQQDp6SI0YFwFPSMC2EiYZnDLZldYrybERGI/XLs4Aofc2BMHcXV37pmnQlOh1SwMgmijxEYfu4jJVwoZARgKPXeevQLjTSXhDqlcX/l6HI7APgaeOM0LCulIAhDIA1JSwT9ABCM4qHELaVZb+6FUg4L9KgLQxBDTOqUDVEqdsYWSJU85pHN5oio2zGRDzK/DUchpYwI3BorUpdKNmZe1vo4ixDlqBkl2JOCiCaNfuDUFun0QEustrogPldYoU6P9dgWKQ5CoGkxj3XsZ+xcG4JOEdIKo9rEBRLuugfKIOb1mcPuJwwzqUf3U6jW4FCps5LnC4tsRc962D1sGgBziTyOHaHsxUD2b+wMq5RH3lwJopgZm/dnLc+sRN5Nr5KQnne64F3gEyDFZHJCakvQAAAABJRU5ErkJggg==",callback:s=>{t.deleteElement(s.id),t.extension.contextPad.hideContextMenu()}};t.extension.contextPad.setContextMenuItems([a]),t.extension.contextPad.setContextMenuByType("bpmn:startEvent",[n,r,i]),t.extension.contextPad.setContextMenuByType("bpmn:userTask",[n,r,i,o]),t.extension.contextPad.setContextMenuByType("bpmn:serviceTask",[n,r,i,o]),t.extension.contextPad.setContextMenuByType("bpmn:exclusiveGateway",[n,r])};var Ip={};const Rx=MI(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Lx;function P$(){return Lx||(Lx=1,function(t){(function(e){e.parser=function(w,_){return new r(w,_)},e.SAXParser=r,e.SAXStream=c,e.createStream=u,e.MAX_BUFFER_LENGTH=64*1024;var n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function r(w,_){if(!(this instanceof r))return new r(w,_);var F=this;o(F),F.q=F.c="",F.bufferCheckPosition=e.MAX_BUFFER_LENGTH,F.opt=_||{},F.opt.lowercase=F.opt.lowercase||F.opt.lowercasetags,F.looseCase=F.opt.lowercase?"toLowerCase":"toUpperCase",F.tags=[],F.closed=F.closedRoot=F.sawRoot=!1,F.tag=F.error=null,F.strict=!!w,F.noscript=!!(w||F.opt.noscript),F.state=C.BEGIN,F.strictEntities=F.opt.strictEntities,F.ENTITIES=F.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),F.attribList=[],F.opt.xmlns&&(F.ns=Object.create(g)),F.opt.unquotedAttributeValues===void 0&&(F.opt.unquotedAttributeValues=!w),F.trackPosition=F.opt.position!==!1,F.trackPosition&&(F.position=F.line=F.column=0),K(F,"onready")}Object.create||(Object.create=function(w){function _(){}_.prototype=w;var F=new _;return F}),Object.keys||(Object.keys=function(w){var _=[];for(var F in w)w.hasOwnProperty(F)&&_.push(F);return _});function i(w){for(var _=Math.max(e.MAX_BUFFER_LENGTH,10),F=0,L=0,se=n.length;L<se;L++){var fe=w[n[L]].length;if(fe>_)switch(n[L]){case"textNode":R(w);break;case"cdata":J(w,"oncdata",w.cdata),w.cdata="";break;case"script":J(w,"onscript",w.script),w.script="";break;default:B(w,"Max buffer length exceeded: "+n[L])}F=Math.max(F,fe)}var Ne=e.MAX_BUFFER_LENGTH-F;w.bufferCheckPosition=Ne+w.position}function o(w){for(var _=0,F=n.length;_<F;_++)w[n[_]]=""}function a(w){R(w),w.cdata!==""&&(J(w,"oncdata",w.cdata),w.cdata=""),w.script!==""&&(J(w,"onscript",w.script),w.script="")}r.prototype={end:function(){Z(this)},write:$,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){a(this)}};var s;try{s=Rx.Stream}catch{s=function(){}}s||(s=function(){});var l=e.EVENTS.filter(function(w){return w!=="error"&&w!=="end"});function u(w,_){return new c(w,_)}function c(w,_){if(!(this instanceof c))return new c(w,_);s.apply(this),this._parser=new r(w,_),this.writable=!0,this.readable=!0;var F=this;this._parser.onend=function(){F.emit("end")},this._parser.onerror=function(L){F.emit("error",L),F._parser.error=null},this._decoder=null,l.forEach(function(L){Object.defineProperty(F,"on"+L,{get:function(){return F._parser["on"+L]},set:function(se){if(!se)return F.removeAllListeners(L),F._parser["on"+L]=se,se;F.on(L,se)},enumerable:!0,configurable:!1})})}c.prototype=Object.create(s.prototype,{constructor:{value:c}}),c.prototype.write=function(w){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(w)){if(!this._decoder){var _=Rx.StringDecoder;this._decoder=new _("utf8")}w=this._decoder.write(w)}return this._parser.write(w.toString()),this.emit("data",w),!0},c.prototype.end=function(w){return w&&w.length&&this.write(w),this._parser.end(),!0},c.prototype.on=function(w,_){var F=this;return!F._parser["on"+w]&&l.indexOf(w)!==-1&&(F._parser["on"+w]=function(){var L=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);L.splice(0,0,w),F.emit.apply(F,L)}),s.prototype.on.call(F,w,_)};var d="[CDATA[",f="DOCTYPE",h="http://www.w3.org/XML/1998/namespace",v="http://www.w3.org/2000/xmlns/",g={xml:h,xmlns:v},m=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,x=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,S=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function b(w){return w===" "||w===`
|
|
153
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q5(t,e){if(t){if(typeof t=="string")return Tx(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tx(t,e)}}function Tx(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Z5(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function J5(t){if(Array.isArray(t))return t}function Nx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){ps(t,i,n[i])})}return t}function ps(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q5(t,e){if(t==null)return{};var n=e$(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function e$(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}Ox(_5.primary);var Jo=function(e,n){var r,i=Nx({},e,n.attrs),o=i.class,a=i.icon,s=i.spin,l=i.rotate,u=i.tabindex,c=i.twoToneColor,d=i.onClick,f=Q5(i,G5),h=vx(),v=h.prefixCls,g=h.rootClassName,m=(r={},ps(r,g.value,!!g.value),ps(r,v.value,!0),ps(r,"".concat(v.value,"-").concat(a.name),!!a.name),ps(r,"".concat(v.value,"-spin"),!!s||a.name==="loading"),r),y=u;y===void 0&&d&&(y=-1);var x=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,S=Sx(c),b=Y5(S,2),N=b[0],A=b[1];return p.createVNode("span",Nx({role:"img","aria-label":a.name},f,{onClick:d,class:[m,o],tabindex:y}),[p.createVNode(Di,{icon:a,primaryColor:N,secondaryColor:A,style:x},null),p.createVNode(X5,null,null)])};Jo.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]},Jo.displayName="AntdIcon",Jo.inheritAttrs=!1,Jo.getTwoToneColor=V5,Jo.setTwoToneColor=Ox;var t$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};function Mx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){n$(t,i,n[i])})}return t}function n$(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rp=function(e,n){var r=Mx({},e,n.attrs);return p.createVNode(Jo,Mx({},r,{icon:t$}),null)};Rp.displayName="EditOutlined",Rp.inheritAttrs=!1;const r$=Qr(p.defineComponent({inheritAttrs:!1,__name:"index",props:p.mergeModels({dictType:{type:String,default:""},include:{type:[Array,String]},exclude:{type:Array},sort:{type:Boolean}},{dictMap:{type:Object},dictMapModifiers:{}}),emits:["update:dictMap"],setup(t){const e=t,n=p.useModel(t,"dictMap"),[r,{fetchDict:i,toList:o}]=eh(e.dictType,{immediate:!1}),a=p.computed(()=>{var l;const s=o(e.dictType);if(e.sort&&s.sort((u,c)=>parseFloat(u.value)-parseFloat(c.value)),e.include){const u=typeof e.include=="string"?e.include.split(","):e.include;return s.filter(c=>u.includes(c.value))}return(l=e.exclude)!=null&&l.length?s.filter(u=>{var c;return!((c=e.exclude)!=null&&c.includes(u.value))}):s});return e.dictType&&i(),p.watch(()=>r.value,()=>{if(n.value&&typeof n.value=="object")for(const s in r.value)n.value[s]=r.value}),(s,l)=>{const u=ie.Select;return p.openBlock(),p.createBlock(u,p.mergeProps({class:"dict-select",placeholder:s.$t("common.plsSelect"),showSearch:!1,options:p.unref(a),dropdownMatchSelectWidth:!1},s.$attrs),null,16,["placeholder","options"])}}}),[["__scopeId","data-v-f95bea24"]]),i$={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function o$(t,e){return p.openBlock(),p.createElementBlock("svg",i$,e[0]||(e[0]=[p.createElementVNode("path",{fill:"currentColor",d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372"},null,-1),p.createElementVNode("path",{fill:"currentColor",d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7c-21.2 8.1-39.2 22.3-52.1 40.9c-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0 1 30.9-44.8c59-22.7 97.1-74.7 97.1-132.5c.1-39.3-17.1-76-48.3-103.3M472 732a40 40 0 1 0 80 0a40 40 0 1 0-80 0"},null,-1)]))}const a$=p.markRaw({name:"ant-design-question-circle",render:o$}),s$={class:"wrapper"},l$={class:"mt-xs"},u$={class:"flex-sc"},c$={class:"mt-xs"},d$={style:{"max-width":"282px",overflow:"hidden","white-space":"break-spaces"}},f$=Qr(p.defineComponent({__name:"RuleConfig",props:{jsonStr:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const{t:n}=Dn.useI18n(),r=t,i=e,o=p.ref({});function a(d){const f=d.replace(/(false|true|\d+)(?=")/g,"$1,");return JSON.parse(`{${f}}`)}function s(d){if(typeof d=="string"&&(d.trim().startsWith("{")||d.trim().startsWith("[")))try{return JSON.parse(d),!0}catch{return!1}return!1}function l(){r.jsonStr?(s(r.jsonStr)?o.value=JSON.parse(r.jsonStr):o.value=a(r.jsonStr),o.value.fallbackFirstLinkStatus!==null&&o.value.fallbackFirstLinkStatus!==void 0&&(o.value.fallbackFirstLinkStatus=String(o.value.fallbackFirstLinkStatus))):o.value={revokeRule:!1,fallbackRule:!1,approverRemoveDuplicates:2,timeoutConfigSwitch:!1,timeoutPeriod:1,timeoutHandler:1,fallbackFirstLinkStatus:null}}function u(){Ft.Modal.destroyAll()}function c(){const d=o.value;if(d.timeoutConfigSwitch&&!d.timeoutPeriod){Ft.message.warning(n("bpmn.timeoutPeriodEmptyTip"));return}d.fallbackFirstLinkStatus&&(d.fallbackFirstLinkStatus=Number(d.fallbackFirstLinkStatus)),(d.fallbackFirstLinkStatus==null||d.fallbackFirstLinkStatus==null)&&delete d.fallbackFirstLinkStatus,i("submit",d),Ft.Modal.destroyAll()}return p.onMounted(()=>{l()}),(d,f)=>{const h=ie.Checkbox,v=ie.FormItem,g=ie.Radio,m=ie.RadioGroup,y=ie.InputNumber,x=a$,S=ie.Tooltip,b=r$,N=ie.Form,A=ie.Button,E=ie.Space;return p.openBlock(),p.createElementBlock("div",s$,[p.createVNode(N,{class:"my-nm","label-col":{span:9},"wrapper-col":{span:15},colon:!1,model:p.unref(o)},{default:p.withCtx(()=>[p.createVNode(v,{label:d.$t("bpmn.revertRule")},{default:p.withCtx(()=>[p.createVNode(h,{checked:p.unref(o).revokeRule,"onUpdate:checked":f[0]||(f[0]=O=>p.unref(o).revokeRule=O)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.revertRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),p.createVNode(v,{label:d.$t("bpmn.rollbackRule")},{default:p.withCtx(()=>[p.createVNode(h,{checked:p.unref(o).fallbackRule,"onUpdate:checked":f[1]||(f[1]=O=>p.unref(o).fallbackRule=O)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.rollbackRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),p.createVNode(v,{label:d.$t("bpmn.deduplicationApprovers")},{default:p.withCtx(()=>[p.createElementVNode("div",l$,p.toDisplayString(d.$t("bpmn.deduplicationApproversTxt")),1),p.createVNode(m,{value:p.unref(o).approverRemoveDuplicates,"onUpdate:value":f[2]||(f[2]=O=>p.unref(o).approverRemoveDuplicates=O)},{default:p.withCtx(()=>[p.createVNode(g,{value:0},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.deduplicationRadio0")),1)]),_:1}),p.createVNode(g,{value:1},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.deduplicationRadio1")),1)]),_:1}),p.createVNode(g,{value:2},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.deduplicationRadio2")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),p.createVNode(v,{label:d.$t("bpmn.timeoutRule")},{default:p.withCtx(()=>[p.createVNode(h,{checked:p.unref(o).timeoutConfigSwitch,"onUpdate:checked":f[3]||(f[3]=O=>p.unref(o).timeoutConfigSwitch=O)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.timeoutRuleTxt")),1)]),_:1},8,["checked"])]),_:1},8,["label"]),p.unref(o).timeoutConfigSwitch?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[p.createVNode(v,{label:d.$t("wo_my.timeout")},{default:p.withCtx(()=>[p.createElementVNode("div",u$,[p.createTextVNode(p.toDisplayString(d.$t("bpmn.linkTimeoutTxt1"))+" ",1),p.createVNode(y,{class:"mx-xs",value:p.unref(o).timeoutPeriod,"onUpdate:value":f[4]||(f[4]=O=>p.unref(o).timeoutPeriod=O),min:1,max:1e4,precision:0},null,8,["value"]),p.createTextVNode(" "+p.toDisplayString(d.$t("bpmn.linkTimeoutTxt2")),1)])]),_:1},8,["label"]),p.createVNode(v,{label:d.$t("bpmn.timeoutHandle")},{default:p.withCtx(()=>[p.createElementVNode("div",c$,p.toDisplayString(d.$t("bpmn.timeoutHandleTxt")),1),p.createVNode(m,{value:p.unref(o).timeoutHandler,"onUpdate:value":f[5]||(f[5]=O=>p.unref(o).timeoutHandler=O)},{default:p.withCtx(()=>[p.createVNode(g,{value:0},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.timeoutHandleRadio0")),1)]),_:1}),p.createVNode(g,{value:1},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("bpmn.timeoutHandleRadio1")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"])],64)):p.createCommentVNode("",!0),p.createVNode(v,null,{label:p.withCtx(()=>[p.createElementVNode("span",d$,p.toDisplayString(d.$t("bpmn.fallbackFirstLinkStatus")),1),p.createVNode(S,{overlayInnerStyle:{width:"600px"}},{title:p.withCtx(()=>[p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip1")),1),p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip2")),1),p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip3")),1),p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip4")),1),p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip5")),1),p.createElementVNode("div",null,p.toDisplayString(d.$t("bpmn.rollbackTooltip6")),1)]),default:p.withCtx(()=>[p.createVNode(x)]),_:1})]),default:p.withCtx(()=>[p.createVNode(b,{"dict-type":"fallback_first_link_status",value:p.unref(o).fallbackFirstLinkStatus,"onUpdate:value":f[6]||(f[6]=O=>p.unref(o).fallbackFirstLinkStatus=O),placeholder:d.$t("common.plsSelect"),style:{width:"80%"}},null,8,["value","placeholder"])]),_:1})]),_:1},8,["model"]),p.createVNode(E,{class:"modal-btns"},{default:p.withCtx(()=>[p.createVNode(A,{onClick:u},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("common.btn_cancel1")),1)]),_:1}),p.createVNode(A,{type:"primary",onClick:c},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(d.$t("common.btn_sure")),1)]),_:1})]),_:1})])}}}),[["__scopeId","data-v-27eaeb98"]]),p$={key:0},h$={key:1,style:{color:"#696868"}},g$=p.defineComponent({__name:"Process",props:p.mergeModels({isEdit:{type:Boolean}},{formState:{},formStateModifiers:{}}),emits:["update:formState"],setup(t){const{modal:e}=Ft.App.useApp(),{t:n}=Dn.useI18n(),r=p.useModel(t,"formState"),i=p.ref(["1","2","3","4","5","6"]);function o(){e.info({title:n("ruleModel.title"),content:p.h(f$,{jsonStr:r.value.jobPriority,onSubmit:a=>{r.value.jobPriority=JSON.stringify(a)}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:850,class:"modal-comp"})}return(a,s)=>{const l=ie.Input,u=ie.FormItem,c=ie.Form,d=ie.CollapsePanel,f=ie.Button,h=ie.Collapse;return p.openBlock(),p.createBlock(h,{activeKey:p.unref(i),"onUpdate:activeKey":s[3]||(s[3]=v=>p.isRef(i)?i.value=v:null)},{default:p.withCtx(()=>[p.createVNode(d,{key:"1",header:a.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(c,{layout:"vertical",model:r.value},{default:p.withCtx(()=>[p.createVNode(u,{label:a.$t("FLOW_CHART.Id"),extra:a.$t("FLOW_CHART.idTip")},{default:p.withCtx(()=>[p.createVNode(l,{value:r.value.id,"onUpdate:value":s[0]||(s[0]=v=>r.value.id=v),placeholder:a.$t("common.plsEnter"),readonly:t.isEdit},null,8,["value","placeholder","readonly"])]),_:1},8,["label","extra"]),p.createVNode(u,{label:a.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(l,{value:r.value.name,"onUpdate:value":s[1]||(s[1]=v=>r.value.name=v),placeholder:a.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(u,{label:a.$t("FLOW_CHART.Version Tag")},{default:p.withCtx(()=>[p.createVNode(l,{value:r.value.versionTag,"onUpdate:value":s[2]||(s[2]=v=>r.value.versionTag=v),disabled:""},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"]),p.createVNode(d,{key:"4",header:a.$t("FLOW_CHART.Job Configuration")},{default:p.withCtx(()=>[p.createVNode(c,{layout:"vertical",model:r.value},{default:p.withCtx(()=>[p.createVNode(u,{label:a.$t("FLOW_CHART.Job Priority")},{default:p.withCtx(()=>[p.createVNode(f,{onClick:o,style:{width:"100%"}},{default:p.withCtx(()=>[r.value.jobPriority?(p.openBlock(),p.createElementBlock("span",h$,[p.createTextVNode(p.toDisplayString(p.unref(n)("bpmn.has_config_rule"))+" ",1),p.createVNode(p.unref(Rp))])):(p.openBlock(),p.createElementBlock("span",p$,p.toDisplayString(p.unref(n)("bpmn.no_config_rule")),1))]),_:1})]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),v$=Qr(p.defineComponent({__name:"TemplateConfig",props:{data:{type:Object,default:()=>{}},templateList:{type:Array,default:()=>[]}},emits:["update:data"],setup(t,{emit:e}){const n=e,r=t,i=p.computed({get:()=>r.data,set:u=>{n("update:data",u)}}),o=p.computed(()=>r.templateList.filter(u=>{var c;return(c=u==null?void 0:u.type)==null?void 0:c.split(",").includes("1")}).map(u=>({label:u.name,value:u.id}))),a=p.computed(()=>r.templateList.filter(u=>{var c;return(c=u==null?void 0:u.type)==null?void 0:c.split(",").includes("2")}).map(u=>({label:u.name,value:u.id}))),s=p.computed(()=>r.templateList.filter(u=>{var c;return(c=u==null?void 0:u.type)==null?void 0:c.split(",").includes("3")}).map(u=>({label:u.name,value:u.id}))),l=(u,c)=>c.label.toLowerCase().indexOf(u.toLowerCase())>=0;return(u,c)=>{const d=ie.Select,f=ie.FormItem,h=ie.Form;return p.openBlock(),p.createElementBlock("div",null,[p.createVNode(h,{class:"form-query-select mx-nm mt-nm",layout:"vertical",model:i.value},{default:p.withCtx(()=>[p.createVNode(f,{label:u.$t("bpmn.todoHandle")},{default:p.withCtx(()=>[p.createVNode(d,{value:i.value[1],"onUpdate:value":c[0]||(c[0]=v=>i.value[1]=v),options:o.value,allowClear:"",placeholder:u.$t("common.plsSelect"),"show-search":"","filter-option":l},null,8,["value","options","placeholder"])]),_:1},8,["label"]),p.createVNode(f,{label:u.$t("bpmn.todoDetail")},{default:p.withCtx(()=>[p.createVNode(d,{value:i.value[2],"onUpdate:value":c[1]||(c[1]=v=>i.value[2]=v),options:a.value,allowClear:"",placeholder:u.$t("common.plsSelect"),"show-search":"","filter-option":l},null,8,["value","options","placeholder"])]),_:1},8,["label"]),p.createVNode(f,{label:u.$t("bpmn.AllDetail")},{default:p.withCtx(()=>[p.createVNode(d,{value:i.value[3],"onUpdate:value":c[2]||(c[2]=v=>i.value[3]=v),options:s.value,allowClear:"",placeholder:u.$t("common.plsSelect"),"show-search":"","filter-option":l},null,8,["value","options","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])])}}}),[["__scopeId","data-v-8a27c7e4"]]),m$={class:"modal-container"},y$=p.defineComponent({__name:"SelectLinkTask",props:{id:{type:String},componentInfo:{type:String,default:""},variable:{type:String,default:""},description:{type:String,default:""}},emits:["submit"],setup(t,{emit:e}){const{t:n}=Dn.useI18n(),r=t,i=e,o=p.ref({}),a=p.ref([{title:n("link.id"),dataIndex:"id"},{title:n("link.description"),dataIndex:"description"},{title:n("link.due"),dataIndex:"due"},{title:n("link.variable"),dataIndex:"variable"},{title:n("bpmn.action"),dataIndex:"action"}]),s=p.ref([]),l=p.ref();function u(k,B){s.value=k,l.value=B}const c=p.ref({1:void 0,2:void 0,3:void 0}),d=p.ref({}),f=p.ref(!1),h=p.ref(""),v=p.ref("");function g(){f.value=!1,h.value=m(c.value)}function m(k){return Object.entries(k).filter(([ee,ce])=>ce!==void 0).map(([ee,ce])=>`${ee}-${ce}`).join(",")}function y(k){if(typeof k!="string"||k.trim()==="")return{};const B=k.split(","),Z={};return B.forEach(ee=>{const[ce,...Be]=ee.split("-");if(ce&&Be.length>0){const me=Be.join("-");Z[ce]=me}}),Z}function x(){f.value=!1}function S(k){d.value=k,f.value=!0}const b=p.ref([]);async function N(){const{result:k}=await Gt.getTemplateList({pageNo:1,pageSize:1e3});b.value=(k==null?void 0:k.data)||[]}const A=p.ref([]);async function E(){const{result:k}=await Gt.getLinkList({pageNo:1,pageSize:1e3});A.value=(k==null?void 0:k.data)||[]}p.watchEffect(()=>{r.id&&(r.id.startsWith("common-approve-")||r.id.startsWith("common-handle-")?(v.value=r.id.slice(-4),s.value=[r.id.slice(0,-4)+"*"]):s.value=[r.id]),r.componentInfo&&(c.value=y(r.componentInfo))});function O(k){l.value=null;const B={...o.value};return Object.assign(B,k),Gt.getLinkList(B)}const C=p.ref(),G=()=>{C.value.refresh()},K=()=>{o.value={},G()};p.onMounted(()=>{K(),N(),E()});function J(){Ft.Modal.destroyAll()}function R(){var k,B;if((k=l.value)!=null&&k.length)i("submit",{...l.value[0],bindComponent:h.value,hasSuffix:""});else if((B=s.value)!=null&&B.length){const Z=A.value.find(ee=>ee.id===s.value[0]);i("submit",{...Z,id:r.id,bindComponent:h.value,hasSuffix:v.value})}Ft.Modal.destroyAll()}return(k,B)=>{const Z=ie.Input,ee=ie.FormItem,ce=ie.Button,Be=ie.Space,me=ie.Form,de=ie.Tooltip,Se=p.resolveComponent("a-table-ex"),je=ie.Modal;return p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createElementVNode("div",m$,[p.createVNode(me,{class:"form-query mx-nm mt-nm",layout:"vertical",model:p.unref(o)},{default:p.withCtx(()=>[p.createVNode(ee,{label:k.$t("link.id")},{default:p.withCtx(()=>[p.createVNode(Z,{value:p.unref(o).id,"onUpdate:value":B[0]||(B[0]=he=>p.unref(o).id=he),placeholder:k.$t("common.plsEnter"),onKeydown:p.withKeys(G,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(ee,{label:k.$t("link.description")},{default:p.withCtx(()=>[p.createVNode(Z,{value:p.unref(o).description,"onUpdate:value":B[1]||(B[1]=he=>p.unref(o).description=he),placeholder:k.$t("common.plsEnter"),onKeydown:p.withKeys(G,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(ee,{class:"form-btns"},{default:p.withCtx(()=>[p.createVNode(Be,null,{default:p.withCtx(()=>[p.createVNode(ce,{type:"primary",onClick:G},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(k.$t("common.btn_search")),1)]),_:1}),p.createVNode(ce,{onClick:K},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(k.$t("common.btn_reset")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),p.createVNode(Se,{ref_key:"tableEx",ref:C,class:"table-query bordered mx-nm",columns:p.unref(a),rowKey:"id","row-selection":{type:"radio",selectedRowKeys:p.unref(s),onChange:u},loadData:O},{bodyCell:p.withCtx(({record:he,column:Ve})=>[Ve.dataIndex==="action"?(p.openBlock(),p.createBlock(de,{key:0,placement:"top"},{title:p.withCtx(()=>[p.createElementVNode("span",null,p.toDisplayString(k.$t("bpmn.tempConfigTip")),1)]),default:p.withCtx(()=>[p.createVNode(ce,{type:"link",onClick:$=>S(he),style:{"padding-left":"0"},disabled:!p.unref(s).includes(he.id)},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(k.$t("bpmn.tempConfig")),1)]),_:2},1032,["onClick","disabled"])]),_:2},1024)):p.createCommentVNode("",!0)]),_:1},8,["columns","row-selection"]),p.createVNode(Be,{class:"modal-btns"},{default:p.withCtx(()=>{var he;return[p.createVNode(ce,{onClick:J},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(k.$t("common.btn_cancel1")),1)]),_:1}),p.createVNode(ce,{type:"primary",disabled:!((he=p.unref(s))!=null&&he.length),onClick:R},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(k.$t("common.btn_sure")),1)]),_:1},8,["disabled"])]}),_:1})]),p.createVNode(je,{open:p.unref(f),"onUpdate:open":B[3]||(B[3]=he=>p.isRef(f)?f.value=he:null),title:k.$t("bpmn.tempConfig"),onOk:g,onCancel:x},{default:p.withCtx(()=>[p.createVNode(v$,{data:p.unref(c),"onUpdate:data":B[2]||(B[2]=he=>p.isRef(c)?c.value=he:null),"template-list":p.unref(b)},null,8,["data","template-list"])]),_:1},8,["open","title"])],64)}}}),_$={class:"modal-container"},b$=p.defineComponent({__name:"SelectUser",props:{userIds:{type:String||Array},branchId:{type:String},mode:{type:String,default:"default"}},emits:["submit"],setup(t,{emit:e}){const{t:n}=Dn.useI18n(),r=t,i=e,o=p.ref({}),a=p.ref([{title:n("user.user_name"),dataIndex:"userName"},{title:n("user.user_id"),dataIndex:"userCode"},{title:n("arrears.org"),dataIndex:"branchName"}]),s=p.ref([]),l=p.ref();function u(m,y){s.value=m,l.value=y}p.watchEffect(()=>{r.userIds&&(s.value=Array.isArray(r.userIds)?r.userIds:[r.userIds])});function c(m){l.value=null;const y={...o.value,branchId:r.branchId};return Object.assign(y,m),Gt.getUserList(y)}const d=p.ref(),f=()=>{d.value.refresh()},h=()=>{o.value={},f()};p.onMounted(()=>{h()});function v(){Ft.Modal.destroyAll()}function g(){var m;if((m=l.value)!=null&&m.length){const y=l.value;i("submit",r.mode==="multiple"?y:y[0])}Ft.Modal.destroyAll()}return(m,y)=>{const x=ie.Input,S=ie.FormItem,b=ie.Button,N=ie.Space,A=ie.Form,E=p.resolveComponent("a-table-ex");return p.openBlock(),p.createElementBlock("div",_$,[p.createVNode(A,{class:"form-query mx-nm mt-nm",layout:"vertical",model:p.unref(o)},{default:p.withCtx(()=>[p.createVNode(S,{label:m.$t("user.key")},{default:p.withCtx(()=>[p.createVNode(x,{value:p.unref(o).userName,"onUpdate:value":y[0]||(y[0]=O=>p.unref(o).userName=O),placeholder:m.$t("common.plsEnter"),onKeydown:p.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(S,{class:"form-btns"},{default:p.withCtx(()=>[p.createVNode(N,null,{default:p.withCtx(()=>[p.createVNode(b,{type:"primary",onClick:f},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_search")),1)]),_:1}),p.createVNode(b,{onClick:h},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_reset")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),p.createVNode(E,{ref_key:"tableEx",ref:d,class:"table-query bordered mx-nm",columns:p.unref(a),rowKey:"userId","row-selection":{type:t.mode==="multiple"?"checkbox":"radio",selectedRowKeys:p.unref(s),onChange:u},loadData:c},null,8,["columns","row-selection"]),p.createVNode(N,{class:"modal-btns"},{default:p.withCtx(()=>{var O;return[p.createVNode(b,{onClick:v},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_cancel1")),1)]),_:1}),p.createVNode(b,{type:"primary",disabled:!((O=p.unref(s))!=null&&O.length),onClick:g},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_sure")),1)]),_:1},8,["disabled"])]}),_:1})])}}}),x$=p.defineComponent({__name:"UserTask",props:{formState:{},formStateModifiers:{}},emits:p.mergeModels(["updateNodeName"],["update:formState"]),setup(t,{emit:e}){const{modal:n}=Ft.App.useApp(),{t:r}=Dn.useI18n(),i=p.inject("type"),o=p.inject("isApproval"),a=p.useModel(t,"formState"),s=p.ref(["1","2","3","4","5","6"]),l=p.ref([]),u=p.ref([]),c=p.ref([]),d=p.computed(()=>{var E;const A=a.value.assignee;return(E=String(A))==null?void 0:E.startsWith("${")});function f(){const A="abcdefghijklmnopqrstuvwxyz";let E="";for(let O=0;O<2;O++)E+=A.charAt(Math.floor(Math.random()*A.length));for(let O=0;O<2;O++)E+=Math.floor(Math.random()*10);return E}function h(){console.log(a.value,"formState.value"),n.info({title:r("link.select_link"),content:p.h(y$,{id:a.value.id,variable:a.value.assignee,description:a.value.name,componentInfo:a.value.bindComponent,onSubmit:A=>{let E=A.id;const O=E!==a.value.id;E.endsWith("*")&&(A.hasSuffix?E=E.substring(0,E.length-1)+A.hasSuffix:E=E.substring(0,E.length-1)+f()),Object.assign(a.value,{id:E,name:o?g(E):`bpmn.${i}_${E}`,assignee:"","camunda:assigneeName":"",priority:void 0,userArr:O?[]:a.value.userArr,roleArr:O?[]:a.value.roleArr,approveRank:"0"}),A.variable&&(a.value.assignee=`\${${A.variable}}`),a.value.bindComponent=A.bindComponent||void 0}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}function v(){n.info({title:r("user.select_user"),content:p.h(b$,{userIds:a.value.assignee,onSubmit:A=>{Object.assign(a.value,{assignee:A.userId,"camunda:assigneeName":A.userName})}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}function g(A){return A.includes("common-approve-")?`bpmn.${A.slice(0,-4)}0`:`bpmn.${A}`}function m(A){A==0?a.value.name=r("bpmn.common-approve-0"):a.value.name=r(`bpmn.${a.value.id.slice(0,-4)}${A}`)}function y(){Gt.getBranchTree().then(A=>{A.code===0&&(l.value=A.result||[])})}function x(){const A={pageNo:1,pageSize:1e3,branchId:a.value.priority||void 0};Gt.getUserList(A).then(E=>{var O,C;E.code===0&&(c.value=((C=(O=E.result)==null?void 0:O.data)==null?void 0:C.map(G=>({...G,label:G.userName,value:G.userId})))||[])})}function S(){const A={pageNo:1,pageSize:1e3,branchId:a.value.priority||void 0};Gt.getRoleList(A).then(E=>{var O,C;E.code===0&&(u.value=((C=(O=E.result)==null?void 0:O.data)==null?void 0:C.map(G=>({...G,label:G.roleName,value:G.roleId})))||[])})}function b(){Object.assign(a.value,{userArr:[],roleArr:[]}),x(),S()}function N(A){if(A!=null&&A.length){const E=c.value.find(O=>O.userId===A[0]);a.value.priority!==E.branchId&&(Object.assign(a.value,{priority:E.branchId,roleArr:[]}),x(),S())}}return p.onMounted(()=>{y(),x(),S()}),(A,E)=>{const O=ie.Input,C=ie.FormItem,G=ie.InputNumber,K=ie.TreeSelect,J=ie.Select,R=ie.Form,k=ie.CollapsePanel,B=ie.Radio,Z=ie.RadioGroup,ee=ie.Checkbox,ce=ie.CheckboxGroup,Be=ie.Collapse;return p.openBlock(),p.createBlock(Be,{activeKey:p.unref(s),"onUpdate:activeKey":E[10]||(E[10]=me=>p.isRef(s)?s.value=me:null)},{default:p.withCtx(()=>[p.createVNode(k,{key:"1",header:A.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(R,{layout:"vertical",model:a.value},{default:p.withCtx(()=>[p.createVNode(C,{label:A.$t("FLOW_CHART.Id")},{default:p.withCtx(()=>[p.createVNode(O,{value:a.value.id,"onUpdate:value":E[0]||(E[0]=me=>a.value.id=me),placeholder:A.$t("common.plsEnter"),readonly:"",onClick:h},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(C,{label:A.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(O,{value:A.$t(a.value.name),disabled:"",placeholder:A.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),a.value.id&&a.value.id.includes("common-approve-")?(p.openBlock(),p.createBlock(C,{key:0,label:A.$t("FLOW_CHART.approve-rank")},{default:p.withCtx(()=>[p.createVNode(G,{style:{width:"100%"},value:a.value.approveRank,"onUpdate:value":E[1]||(E[1]=me=>a.value.approveRank=me),min:0,max:10,placeholder:A.$t("common.plsEnter"),onChange:m},null,8,["value","placeholder"])]),_:1},8,["label"])):p.createCommentVNode("",!0),p.createVNode(C,{label:A.$t("FLOW_CHART.Assignee")},{default:p.withCtx(()=>[p.unref(d)?(p.openBlock(),p.createBlock(O,{key:0,value:a.value.assignee,"onUpdate:value":E[2]||(E[2]=me=>a.value.assignee=me),placeholder:A.$t("common.plsSelect"),disabled:""},null,8,["value","placeholder"])):(p.openBlock(),p.createBlock(O,{key:1,value:a.value["camunda:assigneeName"],"onUpdate:value":E[3]||(E[3]=me=>a.value["camunda:assigneeName"]=me),placeholder:A.$t("common.plsSelect"),readonly:"",onClick:v},null,8,["value","placeholder"]))]),_:1},8,["label"]),p.createVNode(C,{label:A.$t("FLOW_CHART.Priority")},{default:p.withCtx(()=>[p.createVNode(K,{value:a.value.priority,"onUpdate:value":E[4]||(E[4]=me=>a.value.priority=me),placeholder:A.$t("common.plsSelect"),"tree-data":p.unref(l),treeDefaultExpandAll:"",treeNodeFilterProp:"label","show-search":"","allow-clear":"",onChange:b},null,8,["value","placeholder","tree-data"])]),_:1},8,["label"]),p.createVNode(C,{label:A.$t("FLOW_CHART.Candidate Users")},{default:p.withCtx(()=>[p.createVNode(J,{value:a.value.userArr,"onUpdate:value":E[5]||(E[5]=me=>a.value.userArr=me),placeholder:A.$t("common.plsSelect"),mode:"multiple",maxTagCount:10,options:p.unref(c),optionFilterProp:"label",disabled:p.unref(d),onChange:N},null,8,["value","placeholder","options","disabled"])]),_:1},8,["label"]),p.createVNode(C,{label:A.$t("FLOW_CHART.Candidate Groups")},{default:p.withCtx(()=>[p.createVNode(J,{value:a.value.roleArr,"onUpdate:value":E[6]||(E[6]=me=>a.value.roleArr=me),placeholder:A.$t("common.plsSelect"),mode:"multiple",maxTagCount:10,options:p.unref(u),optionFilterProp:"label",disabled:p.unref(d)},null,8,["value","placeholder","options","disabled"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"]),p.unref(o)?p.createCommentVNode("",!0):(p.openBlock(),p.createBlock(k,{key:"2",header:A.$t("FLOW_CHART.isAllowRollback")},{default:p.withCtx(()=>[p.createVNode(Z,{value:a.value.rollback,"onUpdate:value":E[7]||(E[7]=me=>a.value.rollback=me)},{default:p.withCtx(()=>[p.createVNode(B,{value:"1"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.yes")),1)]),_:1}),p.createVNode(B,{value:"0"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.no")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"])),p.unref(o)?(p.openBlock(),p.createBlock(k,{key:"3",header:A.$t("FLOW_CHART.Approval Mode")},{default:p.withCtx(()=>[p.createVNode(Z,{value:a.value.approvalSign,"onUpdate:value":E[8]||(E[8]=me=>a.value.approvalSign=me)},{default:p.withCtx(()=>[p.createVNode(B,{value:"orSign"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.Or Sign")),1)]),_:1}),p.createVNode(B,{value:"countersign"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.countersign")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"])):p.createCommentVNode("",!0),p.unref(o)?(p.openBlock(),p.createBlock(k,{key:"4",header:A.$t("FLOW_CHART.Approval Required")},{default:p.withCtx(()=>[p.createVNode(ce,{value:a.value.approvalCheckbox,"onUpdate:value":E[9]||(E[9]=me=>a.value.approvalCheckbox=me)},{default:p.withCtx(()=>[p.createVNode(ee,{value:"advice"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.Comments Required")),1)]),_:1}),p.createVNode(ee,{value:"attachment"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(A.$t("FLOW_CHART.Attachment Required")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["header"])):p.createCommentVNode("",!0)]),_:1},8,["activeKey"])}}}),E$=p.defineComponent({__name:"ExclusiveGateway",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(t){const e=p.useModel(t,"formState"),n=p.ref(["1","2","3","4","5","6"]);return(r,i)=>{const o=ie.Input,a=ie.FormItem,s=ie.Form,l=ie.CollapsePanel,u=ie.Collapse;return p.openBlock(),p.createBlock(u,{activeKey:p.unref(n),"onUpdate:activeKey":i[2]||(i[2]=c=>p.isRef(n)?n.value=c:null)},{default:p.withCtx(()=>[p.createVNode(l,{key:"1",header:r.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(s,{layout:"vertical",model:e.value},{default:p.withCtx(()=>[p.createVNode(a,{label:r.$t("FLOW_CHART.Id")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.id,"onUpdate:value":i[0]||(i[0]=c=>e.value.id=c),placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(a,{label:r.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.name,"onUpdate:value":i[1]||(i[1]=c=>e.value.name=c),placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),w$=p.defineComponent({__name:"SequenceFlow",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(t){const e=p.useModel(t,"formState"),n=p.ref(["1","2","3","4","5","6"]);return(r,i)=>{const o=ie.Input,a=ie.FormItem,s=ie.SelectOption,l=ie.Select,u=ie.Form,c=ie.CollapsePanel,d=ie.Collapse;return p.openBlock(),p.createBlock(d,{activeKey:p.unref(n),"onUpdate:activeKey":i[4]||(i[4]=f=>p.isRef(n)?n.value=f:null)},{default:p.withCtx(()=>[p.createVNode(c,{key:"1",header:r.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(u,{layout:"vertical",model:e.value},{default:p.withCtx(()=>[p.createVNode(a,{label:r.$t("FLOW_CHART.Id")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.id,"onUpdate:value":i[0]||(i[0]=f=>e.value.id=f),placeholder:r.$t("common.plsEnter"),disabled:""},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(a,{label:r.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.name,"onUpdate:value":i[1]||(i[1]=f=>e.value.name=f),placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(a,{label:r.$t("FLOW_CHART.Condition Type")},{default:p.withCtx(()=>[p.createVNode(l,{value:e.value.condType,"onUpdate:value":i[2]||(i[2]=f=>e.value.condType=f),placeholder:r.$t("common.plsSelect"),allowClear:""},{default:p.withCtx(()=>[p.createVNode(s,{value:"bpmn:tFormalExpression"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(r.$t("FLOW_CHART.Expression")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"]),e.value.condType==="bpmn:tFormalExpression"?(p.openBlock(),p.createBlock(a,{key:0,label:r.$t("FLOW_CHART.Expression")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.condBody,"onUpdate:value":i[3]||(i[3]=f=>e.value.condBody=f),placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])):p.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),S$={class:"modal-container"},C$=p.defineComponent({__name:"SelectLink",props:{id:{type:String}},emits:["submit"],setup(t,{emit:e}){const{t:n}=Dn.useI18n(),r=t,i=e,o=p.ref({}),a=p.ref([{title:n("link.id"),dataIndex:"id"},{title:n("link.description"),dataIndex:"description"},{title:n("link.due"),dataIndex:"due"},{title:n("link.variable"),dataIndex:"variable"}]),s=p.ref([]),l=p.ref();function u(m,y){s.value=m,l.value=y}p.watchEffect(()=>{r.id&&(s.value=[r.id])});function c(m){l.value=null;const y={...o.value};return Object.assign(y,m),Gt.getLinkList(y)}const d=p.ref(),f=()=>{d.value.refresh()},h=()=>{o.value={},f()};p.onMounted(()=>{h()});function v(){Ft.Modal.destroyAll()}function g(){var m;(m=l.value)!=null&&m.length&&i("submit",l.value[0]),Ft.Modal.destroyAll()}return(m,y)=>{const x=ie.Input,S=ie.FormItem,b=ie.Button,N=ie.Space,A=ie.Form,E=p.resolveComponent("a-table-ex");return p.openBlock(),p.createElementBlock("div",S$,[p.createVNode(A,{class:"form-query mx-nm mt-nm",layout:"vertical",model:p.unref(o)},{default:p.withCtx(()=>[p.createVNode(S,{label:m.$t("link.id")},{default:p.withCtx(()=>[p.createVNode(x,{value:p.unref(o).id,"onUpdate:value":y[0]||(y[0]=O=>p.unref(o).id=O),placeholder:m.$t("common.plsEnter"),onKeydown:p.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(S,{label:m.$t("link.description")},{default:p.withCtx(()=>[p.createVNode(x,{value:p.unref(o).description,"onUpdate:value":y[1]||(y[1]=O=>p.unref(o).description=O),placeholder:m.$t("common.plsEnter"),onKeydown:p.withKeys(f,["enter"])},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(S,{class:"form-btns"},{default:p.withCtx(()=>[p.createVNode(N,null,{default:p.withCtx(()=>[p.createVNode(b,{type:"primary",onClick:f},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_search")),1)]),_:1}),p.createVNode(b,{onClick:h},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_reset")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),p.createVNode(E,{ref_key:"tableEx",ref:d,class:"table-query bordered mx-nm",columns:p.unref(a),rowKey:"id","row-selection":{type:"radio",selectedRowKeys:p.unref(s),onChange:u},loadData:c},null,8,["columns","row-selection"]),p.createVNode(N,{class:"modal-btns"},{default:p.withCtx(()=>{var O;return[p.createVNode(b,{onClick:v},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_cancel1")),1)]),_:1}),p.createVNode(b,{type:"primary",disabled:!((O=p.unref(s))!=null&&O.length),onClick:g},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(m.$t("common.btn_sure")),1)]),_:1},8,["disabled"])]}),_:1})])}}}),A$=p.defineComponent({__name:"EndEvent",props:{formState:{},formStateModifiers:{}},emits:p.mergeModels(["updateNodeName"],["update:formState"]),setup(t,{emit:e}){const{modal:n}=Ft.App.useApp(),{t:r}=Dn.useI18n(),i=p.useModel(t,"formState"),o=p.ref(["1","2","3","4","5","6"]);function a(){const c="abcdefghijklmnopqrstuvwxyz";let d="";for(let f=0;f<2;f++)d+=c.charAt(Math.floor(Math.random()*c.length));for(let f=0;f<2;f++)d+=Math.floor(Math.random()*10);return d}const s=e;function l(){s("updateNodeName",i.value.id,i.value.name)}function u(){n.info({title:r("link.select_link"),content:p.h(C$,{id:i.value.id,onSubmit:c=>{let d=c.id;d.endsWith("*")&&(d=d.substring(0,d.length-1)+a()),Object.assign(i.value,{id:d,name:"bpmn.endName"})}}),centered:!0,icon:null,footer:null,closable:!0,maskClosable:!0,width:800,class:"modal-comp"})}return(c,d)=>{const f=ie.Input,h=ie.FormItem,v=ie.Form,g=ie.CollapsePanel,m=ie.Collapse;return p.openBlock(),p.createBlock(m,{activeKey:p.unref(o),"onUpdate:activeKey":d[1]||(d[1]=y=>p.isRef(o)?o.value=y:null)},{default:p.withCtx(()=>[p.createVNode(g,{key:"1",header:c.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(v,{layout:"vertical",model:i.value},{default:p.withCtx(()=>[p.createVNode(h,{label:c.$t("FLOW_CHART.Id")},{default:p.withCtx(()=>[p.createVNode(f,{value:i.value.id,"onUpdate:value":d[0]||(d[0]=y=>i.value.id=y),placeholder:c.$t("common.plsEnter"),readonly:"",onClick:u},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(h,{label:c.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(f,{value:c.$t(i.value.name),disabled:"",placeholder:c.$t("common.plsEnter"),onChange:l},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),O$=p.defineComponent({__name:"Other",props:{formState:{},formStateModifiers:{}},emits:["update:formState"],setup(t){const e=p.useModel(t,"formState"),n=p.ref(["1","2","3","4","5","6"]);return(r,i)=>{const o=ie.Input,a=ie.FormItem,s=ie.Form,l=ie.CollapsePanel,u=ie.Collapse;return p.openBlock(),p.createBlock(u,{activeKey:p.unref(n),"onUpdate:activeKey":i[2]||(i[2]=c=>p.isRef(n)?n.value=c:null)},{default:p.withCtx(()=>[p.createVNode(l,{key:"1",header:r.$t("FLOW_CHART.General")},{default:p.withCtx(()=>[p.createVNode(s,{layout:"vertical",model:e.value},{default:p.withCtx(()=>[p.createVNode(a,{label:r.$t("FLOW_CHART.Id")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.id,"onUpdate:value":i[0]||(i[0]=c=>e.value.id=c),placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"]),p.createVNode(a,{label:r.$t("FLOW_CHART.Name")},{default:p.withCtx(()=>[p.createVNode(o,{value:e.value.name,"onUpdate:value":i[1]||(i[1]=c=>e.value.name=c),disabled:"",placeholder:r.$t("common.plsEnter")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["header"])]),_:1},8,["activeKey"])}}}),T$={class:"properties-panel"},N$=Qr(p.defineComponent({__name:"BpmnPropertiesPanel",props:{lfRef:{type:Object},isEdit:{type:Boolean},processAttrs:{type:Object}},emits:["changeProcess"],setup(t,{emit:e}){const{t:n}=Dn.useI18n(),r=e,i=t,o=p.ref(""),a=p.ref({}),s=p.ref({});let l;p.watch(()=>i.lfRef,()=>{i.lfRef&&(s.value=i.lfRef,u())}),p.watch(a,(h,v)=>{h===v&&d()},{deep:!0});function u(){s.value.on("node:click",({data:h,e:v,position:g})=>{c(h)}),s.value.on("edge:click",({data:h,e:v,position:g})=>{c(h)}),s.value.on("blank:click",({e:h})=>{o.value="bpmn:process",a.value={id:i.processAttrs.id||"Process_1",name:i.processAttrs.name,jobPriority:i.processAttrs["camunda:jobPriority"]}})}function c(h){var m;if(!h||l===h)return;l=h;const v=h.type;o.value="",p.nextTick(()=>{o.value=v});const g={...h.properties,id:h.id,name:((m=h.text)==null?void 0:m.value)||""};v==="bpmn:userTask"?(Object.assign(g,{rollback:g["camunda:rollback"]==1?"1":"0",approvalCheckbox:[]}),Object.assign(g,{approvalSign:g["camunda:countersign"]==!0?"countersign":"orSign",approvalCheckbox:[]}),g["camunda:assignee"]&&(g.assignee=g["camunda:assignee"]),g["camunda:priority"]&&(g.priority=g["camunda:priority"]),g["camunda:advice"]==!0&&g.approvalCheckbox.push("advice"),g["camunda:attachment"]==!0&&g.approvalCheckbox.push("attachment"),g["camunda:bindComponent"]&&(g.bindComponent=g["camunda:bindComponent"]),g.hasOwnProperty("camunda:approveRank")?g.approveRank=g["camunda:approveRank"]:g.id.includes("common-approve-")&&(g.approveRank=0),typeof g["camunda:candidateUsers"]=="number"?g.userArr=[g["camunda:candidateUsers"].toString()]:typeof g["camunda:candidateUsers"]=="string"?g.userArr=(g["camunda:candidateUsers"]||"").split(",").filter(y=>y):g.userArr=[],typeof g["camunda:candidateGroups"]=="number"?g.roleArr=[g["camunda:candidateGroups"].toString()]:typeof g["camunda:candidateGroups"]=="string"?g.roleArr=(g["camunda:candidateGroups"]||"").split(",").filter(y=>y):g.roleArr=[]):v==="bpmn:sequenceFlow"&&(console.log("data.properties",h.properties,h.properties["bpmn:conditionExpression"]),h.properties["bpmn:conditionExpression"]&&Object.assign(g,{condType:h.properties["bpmn:conditionExpression"]["xsi:type"],condBody:h.properties["bpmn:conditionExpression"]["#text"].replace(/\s+/g,"")})),a.value=g}function d(){var g,m;const h=a.value,v={id:h.id,name:h.name};if(console.log("bpmnType.value",o.value),o.value==="bpmn:process")h.jobPriority&&Object.assign(v,{"camunda:jobPriority":h.jobPriority}),r("changeProcess",v);else if(o.value==="bpmn:userTask"){Object.assign(v,{"camunda:orSign":h.approvalSign==="orSign","camunda:rollback":h.rollback==1?"1":"0","camunda:countersign":h.approvalSign==="countersign","camunda:advice":h.approvalCheckbox.includes("advice"),"camunda:attachment":h.approvalCheckbox.includes("attachment"),"camunda:assignee":h.assignee||"","camunda:assigneeName":h["camunda:assigneeName"]||"","camunda:priority":h.priority||"","camunda:candidateUsers":((g=h.userArr)==null?void 0:g.join())||"","camunda:candidateGroups":((m=h.roleArr)==null?void 0:m.join())||"","camunda:bindComponent":h.bindComponent||"","camunda:approveRank":h.approveRank,"camunda:transName":h.name,name:n(h.name)}),console.log("activeNode.id, attrs",l.id,v);const{id:y}=l,{id:x}=h;if(x&&y!==x)if(!s.value.getNodeModelById(x))s.value.changeNodeId(y,x);else{Ft.message.warning(n("bpmn.repeat_id_tip"));const{eventCenter:b}=s.value.graphModel;b.emit("blank:click",{});return}p.nextTick(()=>{s.value.getNodeModelById(x).setProperties(v),s.value.updateText(x,n(h.name))})}else if(o.value==="bpmn:sequenceFlow")h.condType?v["bpmn:conditionExpression"]={"#text":h.condBody,"xsi:type":h.condType}:v["bpmn:conditionExpression"]=null,s.value.getEdgeModelById(l.id).setProperties(v);else if(o.value==="bpmn:endEvent"){const{id:y}=l,{id:x}=h;if(x&&y!==x)if(!s.value.getNodeModelById(x))s.value.changeNodeId(y,x);else{Ft.message.warning(n("bpmn.repeat_id_tip"));const{eventCenter:b}=s.value.graphModel;b.emit("blank:click",{});return}}}function f(h,v){l.id&&(s.value.setProperties(l.id,{name:v}),s.value.updateText(l.id,v))}return(h,v)=>{const g=zm;return p.openBlock(),p.createElementBlock("div",T$,[p.createVNode(g,null,{default:p.withCtx(()=>[p.unref(o)==="bpmn:process"?(p.openBlock(),p.createBlock(g$,{key:0,formState:p.unref(a),"onUpdate:formState":v[0]||(v[0]=m=>p.isRef(a)?a.value=m:null),isEdit:t.isEdit},null,8,["formState","isEdit"])):p.unref(o)==="bpmn:userTask"?(p.openBlock(),p.createBlock(x$,{key:1,formState:p.unref(a),"onUpdate:formState":v[1]||(v[1]=m=>p.isRef(a)?a.value=m:null),onUpdateNodeName:f},null,8,["formState"])):p.unref(o)==="bpmn:exclusiveGateway"?(p.openBlock(),p.createBlock(E$,{key:2,formState:p.unref(a),"onUpdate:formState":v[2]||(v[2]=m=>p.isRef(a)?a.value=m:null)},null,8,["formState"])):p.unref(o)==="bpmn:sequenceFlow"?(p.openBlock(),p.createBlock(w$,{key:3,formState:p.unref(a),"onUpdate:formState":v[3]||(v[3]=m=>p.isRef(a)?a.value=m:null)},null,8,["formState"])):p.unref(o)==="bpmn:endEvent"?(p.openBlock(),p.createBlock(A$,{key:4,formState:p.unref(a),"onUpdate:formState":v[4]||(v[4]=m=>p.isRef(a)?a.value=m:null),onUpdateNodeName:f},null,8,["formState"])):p.unref(o)?(p.openBlock(),p.createBlock(O$,{key:5,formState:p.unref(a),"onUpdate:formState":v[5]||(v[5]=m=>p.isRef(a)?a.value=m:null)},null,8,["formState"])):p.createCommentVNode("",!0)]),_:1})])}}}),[["__scopeId","data-v-919c1f57"]]),Lp="menu-common",Dx=200,M$=100;class Px{constructor({lf:e}){Yp(this,"setContextMenuByType",(e,n)=>{this.menuTypeMap.set(e,n)});Yp(this,"listenDelete",()=>{this.hideContextMenu()});this.menuTypeMap=new Map,this.lf=e,this.__menuDOM=document.createElement("div"),this.__menuDOM.className="lf-inner-context",this.menuTypeMap.set(Lp,[])}render(e,n){this.container=n,e.on("node:click",({data:r})=>{this._activeData=r,this.createContextMenu(),console.log(r)}),e.on("edge:click",({data:r})=>{this._activeData=r,this.createContextMenu()}),e.on("blank:click",()=>{this.hideContextMenu()})}hideContextMenu(){this.__menuDOM.innerHTML="",this.__menuDOM.style.display="none",this.isShow&&this.container.removeChild(this.__menuDOM),this.lf.off("node:delete,edge:delete,node:drag,graph:transform",this.listenDelete),this.isShow=!1}showContextMenu(e){if(!e||!e.id){console.warn("请检查传入的参数");return}this._activeData=e,this.createContextMenu()}setContextMenuItems(e){this.menuTypeMap.set(Lp,e)}getContextMenuPosition(){const e=this._activeData,n=this.lf.graphModel.getElement(e.id);if(!n){console.warn(`找不到元素${e.id}`);return}let r,i;if(n.BaseType==="edge"){r=Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER;const o=n.getData();r=Math.max(o.startPoint.x,r),i=Math.min(o.startPoint.y,i),r=Math.max(o.endPoint.x,r),i=Math.min(o.endPoint.y,i),o.pointsList&&o.pointsList.forEach(a=>{r=Math.max(a.x,r),i=Math.min(a.y,i)})}return n.BaseType==="node"&&(r=e.x+n.width/2,i=e.y-n.height/2),this.lf.graphModel.transformModel.CanvasPointToHtmlPoint([r,i])}createContextMenu(){const{isSilentMode:e}=this.lf.options;if(e)return;let n=this.menuTypeMap.get(this._activeData.type)||[];n=n.concat(this.menuTypeMap.get(Lp));const r=document.createDocumentFragment();n.forEach(i=>{const o=document.createElement("div");o.className="lf-context-item";const a=document.createElement("img");a.src=i.icon,a.className="lf-context-img",i.className&&(o.className=`${o.className} ${i.className}`),a.addEventListener("click",()=>{this.hideContextMenu(),i.callback?i.callback(this._activeData):this.addNode({sourceId:this._activeData.id,x:this._activeData.x,y:this._activeData.y,properties:i.properties,type:i.type,text:i.text||""})}),o.appendChild(a),r.appendChild(o)}),this.__menuDOM.innerHTML="",this.__menuDOM.appendChild(r),this.showMenu()}addNode(e,n){const r=n!==void 0;n===void 0&&(n=e.y);const i=this.lf.getNodeModelById(e.sourceId),o=e.x-100+Dx,a=n-e.y/2-20,s=e.x+100+Dx,l=n+e.y/2+20,u=this.lf.getAreaElement([o,a],[s,l]);if(console.log(u),u.length){n=n+M$,this.addNode(e,n);return}const c=this.lf.addNode({type:e.type,x:e.x+200,y:n,properties:e.properties,text:e.text});let d,f;r&&(d={x:e.x,y:e.y+i.height/2},f={x:c.x-c.width/2,y:c.y}),this.lf.addEdge({sourceNodeId:e.sourceId,targetNodeId:c.id,startPoint:d,endPoint:f})}showMenu(){const[e,n]=this.getContextMenuPosition();this.__menuDOM.style.display="flex",this.__menuDOM.style.top=`${n}px`,this.__menuDOM.style.left=`${e+10}px`,this.container.appendChild(this.__menuDOM),!this.isShow&&this.lf.on("node:delete,edge:delete,node:drag,graph:transform",this.listenDelete),this.isShow=!0}}Px.pluginName="contextPad";const D$=(t,e)=>{const n={type:"bpmn:userTask",label:e("bpmn.userTaskName"),text:e("bpmn.userTaskName"),properties:{"camunda:transName":"bpmn.userTaskName"},icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAp1JREFUWEftlj9oE2EYxp/3IkSckotOpqDgl5ZWcLBgxcVBdBL8gw66iCg2lxrBzcl0qpPS1lyQKm5uiuBUHBztoAjVVtOLRDA46Z06VAvmXkkwQWLS3PudQwn54KY8z/v8eO7uvRA2+KENzoc+YNg71PsNxm6VYxStnibwIQCnAF4kptcMv+RWjSlk1VqYFkM1mLCLx5jpJoh2doD4zoQpL61u6EJqA5oF5zwY9wIFE3JuWk0G0raItAATd8r7uPprQRRoYMQdV8siD6C3ZkzbeQ5gTBLGwGPPUsclnppW3GCs8HaHwZvK0iAAq5sj37Z9ujS6KvGKARP5lXNMdF8S0tT6fNidSD2VeMWAcfv9OMEvSEKaWo2XRQwYm3UOGhE80wEk5pNfMqlHEq8YMFEobmc2KpKQhpZR3eNZQ4sSrxiwNty0Sw8BPiEJAujDlp/R4crVgR8Snxagzm1m8FnPSj2QwGmtmUaAaTtzAC4ECWTCNd3PnVaDDahEoZRl5ul1ITVWy9/zQgHWBsULpQPw+QwIw2CM1IcTlsBYZgN3v6bVqyAtd9KEBgwTHsTb+4DmnJPEGgZgIAlCst4KowIfFUTx0b2otHZmo11xg+ZtZz8iGAPjCFC/gpx5EOZRxYI7oWr/hAKfQIBb7XeDDOMKMx1tthQ4okXIqBDxE4I//dkaKnYb0xXQzBdzoEgW4Hi3YbLfyQNXZ9zMYG4937qApu28Af6sDlm6RL3kWmq3eM3EbecFAXslSbpaBl56lhpt52/bYNxemSHQZd1AHR+DZz0rlW31tgfMOw4RdukE6XqYUfIySgUCNG2HdYPC+FxL/VNY2wb7gB1q7qEG68vZuB7meRJ72Z9st7S7fknEQf/Z0AcMW2i/wbAN/gbA1dYpL5kz5gAAAABJRU5ErkJggg==",properties:{actived:!0}},r={type:"bpmn:serviceTask",label:e("bpmn.serviceTaskName"),text:e("bpmn.serviceTaskName"),properties:{"camunda:transName":"bpmn.serviceTaskName"},icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAz9JREFUWEfVmEtoE1EUhv8zqaBgwUwi+K5CJqkoumhBxY11IVTBhaBUUNCFtplQRRSrK+vKVrTgYyZUF7qRigV3dqFg3YhdtAsLapIJKK2vRToRqgtpM0cmtTVJE3IzyWKcXTL/+c83c+/cc+4luPwil/OhKsCVWjJgEVqZM75iD8rk+co08/xHePMnpy/CMaANlyE2RBJbNLvJKaRjQF/UuMaMSyKAROiZCiuXRbSFGseAsp4cALhNLCk9NtXAUTFtvqoKQOMNgJ2CSUdMVdklqM2TlQRc1ze57NfS38eJM2uY+GlabRzPjZR14xuAVYJJv5uqsjpX69Vj24jpECRpAoQRs0N5X8yrKKCsJdeDeBDAjvkgBl5JzHdm6+itlEEfAQcF4eZkRENShs4xZbZaRJ0E7MmJfwemVjMSmBSag7KWvAXiMxUBVCtmum1GAmfLAvq1ZItF/LLafE7iJaa9qUhgODd20RDL0eQzMO93kqDqGKIhMxw4UBJQ1uKnQNK9yhPxFwYZEjhmEc0SEAIoBOYNFXuxddqMhO7Pxy28wfr+uH9JRnoNIFiJKTGfnIoEHxaL8WqJi0TUW4kfgMSMx9o93R5KZb+t+WBZNw4DeFKJmUgJ8+vJJgs8WokvE46lw8qjfEAt3g2SrogaSaDmlBoYE9GviH7YKHHdRxFtVsPWVTMS6s4DtH94dWOUgKZyRszclY4Er5fT5d73aYkTTPSgfAyPm2pw+6I5aP/h743VW8ulfhCVrptEE2Y40FA+0WKFrCc+A7S2ZCzzgPTTak91NU4XBVyYj1r8PEi6UdSI8MIMK/ucAHp1Y7iggvyzYeuCGQndLPQtWYtLmTHhbjqsdDoB9OmJKIM6CmPtMppWlZZinv8noOzWIXb9R+LqZUZ2+0Lt+lLn+mbBXoNc3W4tVBE3N6zZeuz2ln9uqF28afoLWHLbyR6Kwco2tlsqqcfMSHqI2pithqq3nXZigY27abeQgpBpU1XkXG1VG3eRpKJVJ9sgA2NpVWkW8RVut8qZybphD7O9jxG5Bk1VOSIirBmgTzd6GOgSSUpA75SqCB3V1QzQ9QeY9pO6+ghYZGhroXF8gFmL5CIefwB0scE4DheJlAAAAABJRU5ErkJggg==",cls:"import_icon"},i={type:"bpmn:exclusiveGateway",label:e("bpmn.exclusiveGatewayName"),properties:{"camunda:transName":"bpmn.exclusiveGatewayName"},icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAAHeEJUAAAAABGdBTUEAALGPC/xhBQAAAvVJREFUOBGNVEFrE0EU/mY3bQoiFlOkaUJrQUQoWMGePLX24EH0IIoHKQiCV0G8iE1covgLiqA/QTzVm1JPogc9tIJYFaQtlhQxqYjSpunu+L7JvmUTU3AgmTfvffPNN++9WSA1DO182f6xwILzD5btfAoQmwL5KJEwiQyVbSVZ0IgRyV6PTpIJ81E5ZvqfHQR0HUOBHW4L5Et2kQ6Zf7iAOhTFAA8s0pEP7AXO1uAA52SbqGk6h/6J45LaLhO64ByfcUzM39V7ZiAdS2yCePPEIQYvTUHqM/n7dgQNfBKWPjpF4ISk8q3J4nB11qw6X8l+FsF3EhlkEMfrjIer3wJTLwS2aCNcj4DbGxXTw00JmAuO+Ni6bBxVUCvS5d9aa04+so4pHW5jLTywuXAL7jJ+D06sl82Sgl2JuVBQn498zkc2bGKxULHjCnSMadBKYDYYHAtsby1EQ5lNGrQd4Y3v4Zo0XdGEmDno46yCM9Tk+RiJmUYHS/aXHPNTcjxcbTFna000PFJHIVZ5lFRqRpJWk9/+QtlOUYJj9HG5pVFEU7zqIYDVsw2s+AJaD8wTd2umgSCCyUxgGsS1Y6TBwXQQTFuZaHcd8gAGioE90hlsY+wMcs30RduYtxanjMGal8H5dMW67dmT1JFtYUEe8LiQLRsPZ6IIc7A4J5tqco3T0pnv/4u0kyzrYUq7gASuEyI8VXKvB9Odytv6jS/PNaZBln0nioJG/AVQRZvApOdhjj3Jt8QC8Im09SafwdBdvIpztpxWxpeKCC+EsFdS8DCyuCn2munFpL7ctHKp+Xc5cMybeIyMAN33SPL3ZR9QV1XVwLyzHm6Iv0/yeUuUb7PPlZC4D4HZkeu6dpF4v9j9MreGtMbxMMRLIcjJic9yHi7WQ3yVKzZVWUr5UrViJvn1FfUlwe/KYVfYyWRLSGNu16hR01U9IacajXPei0wx/5BqgInvJN+MMNtNme7ReU9SBbgntovn0kKHpFg7UogZvaZiOue/q1SBo9ktHzQAAAAASUVORK5CYII="},o={type:"bpmn:endEvent",label:e("bpmn.endName"),text:e("bpmn.endName"),properties:{"camunda:transName":"bpmn.endName"},icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAA1BJREFUOBFtVE1IVUEYPXOf+tq40Y3vPcmFIdSjIorWoRG0ERWUgnb5FwVhYQSl72oUoZAboxKNFtWiwKRN0M+jpfSzqJAQclHo001tKkjl3emc8V69igP3znzfnO/M9zcDcKT67azmjYWTwl9Vn7Vumeqzj1DVb6cleQY4oAVnIOPb+mKAGxQmKI5CWNJ2aLPatxWa3aB9K7/fB+/Z0jUF6TmMlFLQqrkECWQzOZxYGjTlOl8eeKaIY5yHnFn486xBustDjWT6dG7pmjHOJd+33t0iitTPkK6tEvjxq4h2MozQ6WFSX/LkDUGfFwfhEZj1Auz/U4pyAi5Sznd7uKzznXeVHlI/Aywmk6j7fsUsEuCGADrWARXXwjxWQsUbIupDHJI7kF5dRktg0eN81IbiZXiTESic50iwS+t1oJgL83jAiBupLDCQqwziaWSoAFSeIR3P5Xv5az00wyIn35QRYTwdSYbz8pH8fxUUAtxnFvYmEmgI0wYXUXcCCSpeEVpXlsRhBnCEATxWylL9+EKCAYhe1NGstUa6356kS9NVvt3DU2fd+Wtbm/+lSbylJqsqkSm9CRhvoJVlvKPvF1RKY/FcPn5j4UfIMLn8D4UYb54BNsilTDXKnF4CfTobA0FpoW/LSp306wkXM+XaOJhZaFkcNM82ASNAWMrhrUbRfmyeI1FvRBTpN06WKxa9BK0o2E4Pd3zfBBEwPsv9sQBnmLVbLEIZ/Xe9LYwJu/Er17W6HYVBc7vmuk0xUQ+pqxdom5Fnp55SiytXLPYoMXNM4u4SNSCFWnrVIzKG3EGyMXo6n/BQOe+bX3FClY4PwydVhthOZ9NnS+ntiLh0fxtlUJHAuGaFoVmttpVMeum0p3WEXbcll94l1wM/gZ0Ccczop77VvN2I7TlsZCsuXf1WHvWEhjO8DPtyOVg2/mvK9QqboEth+7pD6NUQC1HN/TwvydGBARi9MZSzLE4b8Ru3XhX2PBxf8E1er2A6516o0w4sIA+lwURhAON82Kwe2iDAC1Watq4XHaGQ7skLcFOtI5lDxuM2gZe6WFIotPAhbaeYlU4to5cuarF1QrcZ/lwrLaCJl66JBocYZnrNlvm2+MBCTmUymPrYZVbjdlr/BxlMjmNmNI3SAAAAAElFTkSuQmCC"},a={icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAUpJREFUWEftVzuywjAMlKgDPV2g4RYPuAnfDs7w4AzQ8b0Jn1vQQDp6SI0YFwFPSMC2EiYZnDLZldYrybERGI/XLs4Aofc2BMHcXV37pmnQlOh1SwMgmijxEYfu4jJVwoZARgKPXeevQLjTSXhDqlcX/l6HI7APgaeOM0LCulIAhDIA1JSwT9ABCM4qHELaVZb+6FUg4L9KgLQxBDTOqUDVEqdsYWSJU85pHN5oio2zGRDzK/DUchpYwI3BorUpdKNmZe1vo4ixDlqBkl2JOCiCaNfuDUFun0QEustrogPldYoU6P9dgWKQ5CoGkxj3XsZ+xcG4JOEdIKo9rEBRLuugfKIOb1mcPuJwwzqUf3U6jW4FCps5LnC4tsRc962D1sGgBziTyOHaHsxUD2b+wMq5RH3lwJopgZm/dnLc+sRN5Nr5KQnne64F3gEyDFZHJCakvQAAAABJRU5ErkJggg==",callback:s=>{t.deleteElement(s.id),t.extension.contextPad.hideContextMenu()}};t.extension.contextPad.setContextMenuItems([a]),t.extension.contextPad.setContextMenuByType("bpmn:startEvent",[n,r,i]),t.extension.contextPad.setContextMenuByType("bpmn:userTask",[n,r,i,o]),t.extension.contextPad.setContextMenuByType("bpmn:serviceTask",[n,r,i,o]),t.extension.contextPad.setContextMenuByType("bpmn:exclusiveGateway",[n,r])};var Ip={};const Rx=MI(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Lx;function P$(){return Lx||(Lx=1,function(t){(function(e){e.parser=function(w,_){return new r(w,_)},e.SAXParser=r,e.SAXStream=c,e.createStream=u,e.MAX_BUFFER_LENGTH=64*1024;var n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function r(w,_){if(!(this instanceof r))return new r(w,_);var F=this;o(F),F.q=F.c="",F.bufferCheckPosition=e.MAX_BUFFER_LENGTH,F.opt=_||{},F.opt.lowercase=F.opt.lowercase||F.opt.lowercasetags,F.looseCase=F.opt.lowercase?"toLowerCase":"toUpperCase",F.tags=[],F.closed=F.closedRoot=F.sawRoot=!1,F.tag=F.error=null,F.strict=!!w,F.noscript=!!(w||F.opt.noscript),F.state=C.BEGIN,F.strictEntities=F.opt.strictEntities,F.ENTITIES=F.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),F.attribList=[],F.opt.xmlns&&(F.ns=Object.create(g)),F.opt.unquotedAttributeValues===void 0&&(F.opt.unquotedAttributeValues=!w),F.trackPosition=F.opt.position!==!1,F.trackPosition&&(F.position=F.line=F.column=0),K(F,"onready")}Object.create||(Object.create=function(w){function _(){}_.prototype=w;var F=new _;return F}),Object.keys||(Object.keys=function(w){var _=[];for(var F in w)w.hasOwnProperty(F)&&_.push(F);return _});function i(w){for(var _=Math.max(e.MAX_BUFFER_LENGTH,10),F=0,L=0,se=n.length;L<se;L++){var fe=w[n[L]].length;if(fe>_)switch(n[L]){case"textNode":R(w);break;case"cdata":J(w,"oncdata",w.cdata),w.cdata="";break;case"script":J(w,"onscript",w.script),w.script="";break;default:B(w,"Max buffer length exceeded: "+n[L])}F=Math.max(F,fe)}var Ne=e.MAX_BUFFER_LENGTH-F;w.bufferCheckPosition=Ne+w.position}function o(w){for(var _=0,F=n.length;_<F;_++)w[n[_]]=""}function a(w){R(w),w.cdata!==""&&(J(w,"oncdata",w.cdata),w.cdata=""),w.script!==""&&(J(w,"onscript",w.script),w.script="")}r.prototype={end:function(){Z(this)},write:$,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){a(this)}};var s;try{s=Rx.Stream}catch{s=function(){}}s||(s=function(){});var l=e.EVENTS.filter(function(w){return w!=="error"&&w!=="end"});function u(w,_){return new c(w,_)}function c(w,_){if(!(this instanceof c))return new c(w,_);s.apply(this),this._parser=new r(w,_),this.writable=!0,this.readable=!0;var F=this;this._parser.onend=function(){F.emit("end")},this._parser.onerror=function(L){F.emit("error",L),F._parser.error=null},this._decoder=null,l.forEach(function(L){Object.defineProperty(F,"on"+L,{get:function(){return F._parser["on"+L]},set:function(se){if(!se)return F.removeAllListeners(L),F._parser["on"+L]=se,se;F.on(L,se)},enumerable:!0,configurable:!1})})}c.prototype=Object.create(s.prototype,{constructor:{value:c}}),c.prototype.write=function(w){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(w)){if(!this._decoder){var _=Rx.StringDecoder;this._decoder=new _("utf8")}w=this._decoder.write(w)}return this._parser.write(w.toString()),this.emit("data",w),!0},c.prototype.end=function(w){return w&&w.length&&this.write(w),this._parser.end(),!0},c.prototype.on=function(w,_){var F=this;return!F._parser["on"+w]&&l.indexOf(w)!==-1&&(F._parser["on"+w]=function(){var L=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);L.splice(0,0,w),F.emit.apply(F,L)}),s.prototype.on.call(F,w,_)};var d="[CDATA[",f="DOCTYPE",h="http://www.w3.org/XML/1998/namespace",v="http://www.w3.org/2000/xmlns/",g={xml:h,xmlns:v},m=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,x=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,S=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function b(w){return w===" "||w===`
|
|
154
154
|
`||w==="\r"||w===" "}function N(w){return w==='"'||w==="'"}function A(w){return w===">"||b(w)}function E(w,_){return w.test(_)}function O(w,_){return!E(w,_)}var C=0;e.STATE={BEGIN:C++,BEGIN_WHITESPACE:C++,TEXT:C++,TEXT_ENTITY:C++,OPEN_WAKA:C++,SGML_DECL:C++,SGML_DECL_QUOTED:C++,DOCTYPE:C++,DOCTYPE_QUOTED:C++,DOCTYPE_DTD:C++,DOCTYPE_DTD_QUOTED:C++,COMMENT_STARTING:C++,COMMENT:C++,COMMENT_ENDING:C++,COMMENT_ENDED:C++,CDATA:C++,CDATA_ENDING:C++,CDATA_ENDING_2:C++,PROC_INST:C++,PROC_INST_BODY:C++,PROC_INST_ENDING:C++,OPEN_TAG:C++,OPEN_TAG_SLASH:C++,ATTRIB:C++,ATTRIB_NAME:C++,ATTRIB_NAME_SAW_WHITE:C++,ATTRIB_VALUE:C++,ATTRIB_VALUE_QUOTED:C++,ATTRIB_VALUE_CLOSED:C++,ATTRIB_VALUE_UNQUOTED:C++,ATTRIB_VALUE_ENTITY_Q:C++,ATTRIB_VALUE_ENTITY_U:C++,CLOSE_TAG:C++,CLOSE_TAG_SAW_WHITE:C++,SCRIPT:C++,SCRIPT_ENDING:C++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(w){var _=e.ENTITIES[w],F=typeof _=="number"?String.fromCharCode(_):_;e.ENTITIES[w]=F});for(var G in e.STATE)e.STATE[e.STATE[G]]=G;C=e.STATE;function K(w,_,F){w[_]&&w[_](F)}function J(w,_,F){w.textNode&&R(w),K(w,_,F)}function R(w){w.textNode=k(w.opt,w.textNode),w.textNode&&K(w,"ontext",w.textNode),w.textNode=""}function k(w,_){return w.trim&&(_=_.trim()),w.normalize&&(_=_.replace(/\s+/g," ")),_}function B(w,_){return R(w),w.trackPosition&&(_+=`
|
|
155
155
|
Line: `+w.line+`
|
|
156
156
|
Column: `+w.column+`
|