@oneclick.dev/cms-kit 0.0.78 → 0.0.79
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/dist/cms-kit.cjs +1 -1
- package/dist/cms-kit.js +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.css +1 -1
- package/dist/components.js +2 -2
- package/dist/{composables-5bC_Q9lr.cjs → composables-06ksd6f5.cjs} +1 -1
- package/dist/composables-Bg9pCX9M.js +1 -0
- package/dist/index.css +1 -1
- package/package.json +1 -1
- package/dist/composables-DbMqzcwK.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),t=require("@vue-flow/core"),n=require("nuxt/app");let r=1;const o=new class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:t,...n}=e,o="number"==typeof e.id||e.id&&e.id?.length>0?e.id:r++,i=this.toasts.find(e=>e.id===o),a=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(n=>n.id===o?(this.publish({...n,...e,id:o,title:t}),{...n,...e,id:o,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:o}),o};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:"default"});error=(e,t)=>this.create({...t,type:"error",message:e});success=(e,t)=>this.create({...t,type:"success",message:e});info=(e,t)=>this.create({...t,type:"info",message:e});warning=(e,t)=>this.create({...t,type:"warning",message:e});loading=(e,t)=>this.create({...t,type:"loading",message:e});promise=(t,n)=>{if(!n)return;let r;void 0!==n.loading&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:"function"!=typeof n.description?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a,s=void 0!==r;const u=o.then(async t=>{a=["resolve",t];if(e.isVNode(t))s=!1,this.create({id:r,type:"default",message:t});else if(i(t)&&!t.ok){s=!1;const o="function"==typeof n.error?await n.error(`HTTP error! status: ${t.status}`):n.error,i="function"==typeof n.description?await n.description(`HTTP error! status: ${t.status}`):n.description,a="object"==typeof o&&!e.isVNode(o)?o:{message:o||"",id:r||""};this.create({id:r,type:"error",description:i,...a})}else if(t instanceof Error){s=!1;const o="function"==typeof n.error?await n.error(t):n.error,i="function"==typeof n.description?await n.description(t):n.description,a="object"==typeof o&&!e.isVNode(o)?o:{message:o||"",id:r||""};this.create({id:r,type:"error",description:i,...a})}else if(void 0!==n.success){s=!1;const o="function"==typeof n.success?await n.success(t):n.success,i="function"==typeof n.description?await n.description(t):n.description,a="object"==typeof o&&!e.isVNode(o)?o:{message:o||"",id:r||""};this.create({id:r,type:"success",description:i,...a})}}).catch(async t=>{if(a=["reject",t],void 0!==n.error){s=!1;const o="function"==typeof n.error?await n.error(t):n.error,i="function"==typeof n.description?await n.description(t):n.description,a="object"==typeof o&&!e.isVNode(o)?o:{message:o||"",id:r||""};this.create({id:r,type:"error",description:i,...a})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally?.()}),c=()=>new Promise((e,t)=>u.then(()=>"reject"===a[0]?t(a[1]):e(a[1])).catch(t));return"string"!=typeof r&&"number"!=typeof r?{unwrap:c}:Object.assign(r,{unwrap:c})};custom=(e,t)=>{const n=t?.id||r++,o=this.toasts.find(e=>e.id===n),i=void 0===t?.dismissible||t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),o?this.toasts=this.toasts.map(r=>r.id===n?(this.publish({...r,component:e,dismissible:i,id:n,...t}),{...r,component:e,dismissible:i,id:n,...t}):r):this.addToast({component:e,dismissible:i,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};const i=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,a=function(e,t){const n=t?.id||r++;return o.create({message:e,id:n,type:"default",...t}),n},s=Object.assign(a,{success:o.success,info:o.info,warning:o.warning,error:o.error,custom:o.custom,message:o.message,promise:o.promise,dismiss:o.dismiss,loading:o.loading},{getHistory:()=>o.toasts,getToasts:()=>o.getActiveToasts()});function u(e){return void 0!==e.label}const c="24px",l="16px";function f(...e){return e.filter(Boolean).join(" ")}function d(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,o=r?"--mobile-offset":"--offset",i=r?l:c;function a(e){["top","right","bottom","left"].forEach(t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?a(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${o}-${t}`]=i:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):a(i)}),n}const h=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded","data-testid"],p=["aria-label","data-disabled"];var v=e.defineComponent({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(t,{emit:n}){const r=t,o=n,i=e.ref(null),a=e.ref(null),s=e.ref(!1),c=e.ref(!1),l=e.ref(!1),d=e.ref(!1),v=e.ref(!1),g=e.ref(0),m=e.ref(0),y=e.ref(r.toast.duration||r.duration||4e3),b=e.ref(null),w=e.ref(null),_=e.computed(()=>0===r.index),E=e.computed(()=>r.index+1<=r.visibleToasts),k=e.computed(()=>r.toast.type),j=e.computed(()=>!1!==r.toast.dismissible),O=e.computed(()=>r.toast.class||""),x=e.computed(()=>r.descriptionClass||""),N=e.computed(()=>{const e=r.toast.position||r.position,t=r.heights.filter(t=>t.position===e).findIndex(e=>e.toastId===r.toast.id);return t>=0?t:0}),C=e.computed(()=>{const e=r.toast.position||r.position;return r.heights.filter(t=>t.position===e).reduce((e,t,n)=>n>=N.value?e:e+t.height,0)}),I=e.computed(()=>N.value*r.gap+C.value||0),B=e.computed(()=>r.toast.closeButton??r.closeButton),S=e.computed(()=>r.toast.duration||r.duration||4e3),M=e.ref(0),T=e.ref(0),P=e.ref(null),A=e.computed(()=>r.position.split("-")),L=e.computed(()=>A.value[0]),D=e.computed(()=>A.value[1]),F=e.computed(()=>"string"!=typeof r.toast.title),R=e.computed(()=>"string"!=typeof r.toast.description),{isDocumentHidden:z}=function(){const t=e.ref(!1);return e.watchEffect(()=>{const e=()=>{t.value=document.hidden};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)}),{isDocumentHidden:t}}(),V=e.computed(()=>k.value&&"loading"===k.value);function $(){c.value=!0,g.value=I.value,setTimeout(()=>{o("removeToast",r.toast)},200)}function G(){if(V.value||!j.value)return{};$(),r.toast.onDismiss?.(r.toast)}function U(e){2!==e.button&&!V.value&&j.value&&(b.value=new Date,g.value=I.value,e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(l.value=!0,P.value={x:e.clientX,y:e.clientY}))}function q(){if(d.value||!j.value)return;P.value=null;const e=Number(w.value?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),t=Number(w.value?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),n=(new Date).getTime()-(b.value?.getTime()||0),o="x"===i.value?e:t,s=Math.abs(o)/n;if(Math.abs(o)>=45||s>.11)return g.value=I.value,r.toast.onDismiss?.(r.toast),"x"===i.value?a.value=e>0?"right":"left":a.value=t>0?"down":"up",$(),void(d.value=!0);w.value?.style.setProperty("--swipe-amount-x","0px"),w.value?.style.setProperty("--swipe-amount-y","0px"),v.value=!1,l.value=!1,i.value=null}function W(e){if(!P.value||!j.value)return;if(window?.getSelection()?.toString()?.length??!1)return;const t=e.clientY-P.value.y,n=e.clientX-P.value.x,o=r.swipeDirections??function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(r.position);!i.value&&(Math.abs(n)>1||Math.abs(t)>1)&&(i.value=Math.abs(n)>Math.abs(t)?"x":"y");let a={x:0,y:0};const s=e=>1/(1.5+Math.abs(e)/20);if("y"===i.value){if(o.includes("top")||o.includes("bottom"))if(o.includes("top")&&t<0||o.includes("bottom")&&t>0)a.y=t;else{const e=t*s(t);a.y=Math.abs(e)<Math.abs(t)?e:t}}else if("x"===i.value&&(o.includes("left")||o.includes("right")))if(o.includes("left")&&n<0||o.includes("right")&&n>0)a.x=n;else{const e=n*s(n);a.x=Math.abs(e)<Math.abs(n)?e:n}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&(v.value=!0),w.value?.style.setProperty("--swipe-amount-x",`${a.x}px`),w.value?.style.setProperty("--swipe-amount-y",`${a.y}px`)}function Y(){l.value=!1,i.value=null,P.value=null}return e.onMounted(()=>{s.value=!0,y.value=S.value}),e.watchEffect(async()=>{if(!s.value||!w.value)return;await e.nextTick();const t=w.value,n=t.style.height;t.style.height="auto";const i=t.getBoundingClientRect().height;t.style.height=n,m.value=i,o("update:height",{toastId:r.toast.id,height:i,position:r.toast.position||r.position})}),e.onMounted(()=>{if(s.value=!0,!w.value)return;const e=w.value.getBoundingClientRect().height;m.value=e;const t=[{toastId:r.toast.id,height:e,position:r.toast.position},...r.heights];o("update:heights",t)}),e.onBeforeUnmount(()=>{w.value&&o("removeToast",r.toast)}),e.watchEffect(e=>{if(r.toast.promise&&"loading"===k.value||r.toast.duration===1/0||"loading"===r.toast.type)return;let t;r.expanded||r.interacting||z.value?(()=>{if(T.value<M.value){const e=(new Date).getTime()-M.value;y.value=y.value-e}T.value=(new Date).getTime()})():y.value!==1/0&&(M.value=(new Date).getTime(),t=setTimeout(()=>{r.toast.onAutoClose?.(r.toast),$()},y.value)),e(()=>{clearTimeout(t)})}),e.watch(()=>r.toast.delete,e=>{void 0!==e&&e&&($(),r.toast.onDismiss?.(r.toast))},{deep:!0}),(t,n)=>(e.openBlock(),e.createElementBlock("li",{tabindex:"0",ref_key:"toastRef",ref:w,class:e.normalizeClass(e.unref(f)(r.class,O.value,t.classes?.toast,t.toast.classes?.toast,t.classes?.[k.value],t.toast?.classes?.[k.value])),"data-sonner-toast":"","data-rich-colors":t.toast.richColors??t.defaultRichColors,"data-styled":!Boolean(t.toast.component||t.toast?.unstyled||t.unstyled),"data-mounted":s.value,"data-promise":Boolean(t.toast.promise),"data-swiped":v.value,"data-removed":c.value,"data-visible":E.value,"data-y-position":L.value,"data-x-position":D.value,"data-index":t.index,"data-front":_.value,"data-swiping":l.value,"data-dismissible":j.value,"data-type":k.value,"data-invert":t.toast.invert||t.invert,"data-swipe-out":d.value,"data-swipe-direction":a.value,"data-expanded":Boolean(t.expanded||t.expandByDefault&&s.value),"data-testid":t.toast.testId,style:e.normalizeStyle({"--index":t.index,"--toasts-before":t.index,"--z-index":t.toasts.length-t.index,"--offset":`${c.value?g.value:I.value}px`,"--initial-height":t.expandByDefault?"auto":`${m.value}px`,...t.style,...r.toast.style}),onDragend:Y,onPointerdown:U,onPointerup:q,onPointermove:W},[B.value&&!t.toast.component&&"loading"!==k.value?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":t.closeButtonAriaLabel||"Close toast","data-disabled":V.value,"data-close-button":"true",class:e.normalizeClass(e.unref(f)(t.classes?.closeButton,t.toast?.classes?.closeButton)),onClick:G},[t.icons?.close?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icons?.close),{key:0})):e.renderSlot(t.$slots,"close-icon",{key:1})],10,p)):e.createCommentVNode("v-if",!0),t.toast.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.toast.component),e.mergeProps({key:1},t.toast.componentProps,{onCloseToast:G}),null,16)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},["default"!==k.value||t.toast.icon||t.toast.promise?(e.openBlock(),e.createElementBlock("div",{key:0,"data-icon":"",class:e.normalizeClass(e.unref(f)(t.classes?.icon,t.toast?.classes?.icon))},[t.toast.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.toast.icon),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},["loading"===k.value?e.renderSlot(t.$slots,"loading-icon",{key:0}):"success"===k.value?e.renderSlot(t.$slots,"success-icon",{key:1}):"error"===k.value?e.renderSlot(t.$slots,"error-icon",{key:2}):"warning"===k.value?e.renderSlot(t.$slots,"warning-icon",{key:3}):"info"===k.value?e.renderSlot(t.$slots,"info-icon",{key:4}):e.createCommentVNode("v-if",!0)],64))],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{"data-content":"",class:e.normalizeClass(e.unref(f)(t.classes?.content,t.toast?.classes?.content))},[e.createElementVNode("div",{"data-title":"",class:e.normalizeClass(e.unref(f)(t.classes?.title,t.toast.classes?.title))},[F.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.toast.title),e.normalizeProps(e.mergeProps({key:0},t.toast.componentProps)),null,16)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.toast.title),1)],64))],2),t.toast.description?(e.openBlock(),e.createElementBlock("div",{key:0,"data-description":"",class:e.normalizeClass(e.unref(f)(t.descriptionClass,x.value,t.classes?.description,t.toast.classes?.description))},[R.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.toast.description),e.normalizeProps(e.mergeProps({key:0},t.toast.componentProps)),null,16)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.toast.description),1)],64))],2)):e.createCommentVNode("v-if",!0)],2),t.toast.cancel?(e.openBlock(),e.createElementBlock("button",{key:1,style:e.normalizeStyle(t.toast.cancelButtonStyle||t.cancelButtonStyle),class:e.normalizeClass(e.unref(f)(t.classes?.cancelButton,t.toast.classes?.cancelButton)),"data-button":"","data-cancel":"",onClick:n[0]||(n[0]=n=>{e.unref(u)(t.toast.cancel)&&j.value&&(t.toast.cancel.onClick?.(n),$())})},e.toDisplayString(e.unref(u)(t.toast.cancel)?t.toast.cancel?.label:t.toast.cancel),7)):e.createCommentVNode("v-if",!0),t.toast.action?(e.openBlock(),e.createElementBlock("button",{key:2,style:e.normalizeStyle(t.toast.actionButtonStyle||t.actionButtonStyle),class:e.normalizeClass(e.unref(f)(t.classes?.actionButton,t.toast.classes?.actionButton)),"data-button":"","data-action":"",onClick:n[1]||(n[1]=n=>{e.unref(u)(t.toast.action)&&(t.toast.action.onClick?.(n),n.defaultPrevented||$())})},e.toDisplayString(e.unref(u)(t.toast.action)?t.toast.action?.label:t.toast.action),7)):e.createCommentVNode("v-if",!0)],64))],46,h))}}),g=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};const m={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};var y=g({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("svg",m,n[0]||(n[0]=[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}]]);const b=["data-visible"],w={class:"sonner-spinner"};var _=e.defineComponent({__name:"Loader",props:{visible:{type:Boolean}},setup(t){const n=Array(12).fill(0);return(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:"sonner-loading-wrapper","data-visible":t.visible},[e.createElementVNode("div",w,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),t=>(e.openBlock(),e.createElementBlock("div",{key:`spinner-bar-${t}`,class:"sonner-loading-bar"}))),128))])],8,b))}});const E={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};var k=g({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("svg",E,n[0]||(n[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}]]);const j={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};var O=g({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("svg",j,n[0]||(n[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}]]);const x={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};var N=g({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("svg",x,n[0]||(n[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}]]);const C={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};var I=g({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("svg",C,n[0]||(n[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}]]);const B=["aria-label"],S=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position"],M="undefined"!=typeof window&&"undefined"!=typeof document;function T(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}var P=e.defineComponent({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{id:{},invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:14},visibleToasts:{default:3},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c},mobileOffset:{default:l},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(t){const n=t,r=e.useAttrs(),i=e.ref([]),a=e.computed(()=>n.id?i.value.filter(e=>e.toasterId===n.id):i.value.filter(e=>!e.toasterId));function s(e,t){return a.value.filter(n=>!n.position&&0===t||n.position===e)}const u=e.computed(()=>{const e=a.value.filter(e=>e.position).map(e=>e.position);return e.length>0?Array.from(new Set([n.position].concat(e))):[n.position]}),c=e.computed(()=>{const e={};return u.value.forEach(t=>{e[t]=i.value.filter(e=>e.position===t)}),e}),l=e.ref([]),f=e.ref({}),h=e.ref(!1);e.watchEffect(()=>{u.value.forEach(e=>{e in f.value||(f.value[e]=!1)})});const p=e.ref("system"!==n.theme?n.theme:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),g=e.ref(null),m=e.ref(null),b=e.ref(!1),w=n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function E(e){i.value.find(t=>t.id===e.id)?.delete||o.dismiss(e.id),i.value=i.value.filter(({id:t})=>t!==e.id),setTimeout(()=>{i.value.find(t=>t.id===e.id)||(l.value=l.value.filter(t=>t.toastId!==e.id))},250)}function j(e){b.value&&!e.currentTarget?.contains?.(e.relatedTarget)&&(b.value=!1,m.value&&(m.value.focus({preventScroll:!0}),m.value=null))}function x(e){e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||b.value||(b.value=!0,m.value=e.relatedTarget)}function C(e){if(e.target){if(e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible)return}h.value=!0}function P(e){const t=e.currentTarget,n=t.getAttribute("data-y-position")+"-"+t.getAttribute("data-x-position");f.value[n]=!0}function A(e){if(!h.value){const t=e.currentTarget,n=t.getAttribute("data-y-position")+"-"+t.getAttribute("data-x-position");f.value[n]=!1}}function L(){Object.keys(f.value).forEach(e=>{f.value[e]=!1})}function D(){h.value=!1}function F(e){l.value=e}function R(e){const t=l.value.findIndex(t=>t.toastId===e.toastId);if(-1!==t)l.value[t]=e;else{const t=l.value.findIndex(t=>t.position===e.position);-1!==t?l.value.splice(t,0,e):l.value.unshift(e)}}return e.watchEffect(t=>{t(o.subscribe(t=>{t.dismiss?requestAnimationFrame(()=>{i.value=i.value.map(e=>e.id===t.id?{...e,delete:!0}:e)}):e.nextTick(()=>{const e=i.value.findIndex(e=>e.id===t.id);i.value=-1!==e?[...i.value.slice(0,e),{...i.value[e],...t},...i.value.slice(e+1)]:[t,...i.value]})}))}),e.watchEffect(e=>{if("undefined"==typeof window)return;if("system"!==n.theme)return void(p.value=n.theme);const t=window.matchMedia("(prefers-color-scheme: dark)"),r=e=>{p.value=e?"dark":"light"};r(t.matches);const o=e=>{r(e.matches)};try{t.addEventListener("change",o)}catch{t.addListener(o)}e(()=>{try{t.removeEventListener("change",o)}catch{t.removeListener(o)}})}),e.watchEffect(()=>{g.value&&m.value&&(m.value.focus({preventScroll:!0}),m.value=null,b.value=!1)}),e.watchEffect(()=>{i.value.length<=1&&Object.keys(f.value).forEach(e=>{f.value[e]=!1})}),e.watchEffect(e=>{function t(e){const t=n.hotkey.every(t=>e[t]||e.code===t),r=Array.isArray(g.value)?g.value[0]:g.value;t&&(u.value.forEach(e=>{f.value[e]=!0}),r?.focus());const o=document.activeElement===g.value||r?.contains(document.activeElement);"Escape"===e.code&&o&&u.value.forEach(e=>{f.value[e]=!1})}M&&(document.addEventListener("keydown",t),e(()=>{document.removeEventListener("keydown",t)}))}),(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" Remove item from normal navigation flow, only available via hotkey "),e.createElementVNode("section",{"aria-label":`${t.containerAriaLabel} ${e.unref(w)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(o,i)=>(e.openBlock(),e.createElementBlock("ol",e.mergeProps({key:o,ref_for:!0,ref_key:"listRef",ref:g,"data-sonner-toaster":"","data-sonner-theme":p.value,class:n.class,dir:"auto"===t.dir?T():t.dir,tabIndex:-1,"data-theme":t.theme,"data-rich-colors":t.richColors,"data-y-position":o.split("-")[0],"data-x-position":o.split("-")[1],style:{"--front-toast-height":`${l.value[0]?.height||0}px`,"--width":`${e.unref(356)}px`,"--gap":`${t.gap}px`,...t.style,...e.unref(r).style,...e.unref(d)(t.offset,t.mobileOffset)}},{ref_for:!0},t.$attrs,{onBlur:j,onFocus:x,onMouseenter:P,onMousemove:P,onMouseleave:A,onDragend:L,onPointerdown:C,onPointerup:D}),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s(o,i),(r,i)=>(e.openBlock(),e.createBlock(v,{key:r.id,heights:l.value,icons:t.icons,index:i,toast:r,defaultRichColors:t.richColors,duration:t.toastOptions?.duration??t.duration,class:e.normalizeClass(t.toastOptions?.class??""),descriptionClass:t.toastOptions?.descriptionClass,invert:t.invert,visibleToasts:t.visibleToasts,closeButton:t.toastOptions?.closeButton??t.closeButton,interacting:h.value,position:o,style:e.normalizeStyle(t.toastOptions?.style),unstyled:t.toastOptions?.unstyled,classes:t.toastOptions?.classes,cancelButtonStyle:t.toastOptions?.cancelButtonStyle,actionButtonStyle:t.toastOptions?.actionButtonStyle,"close-button-aria-label":t.toastOptions?.closeButtonAriaLabel,toasts:c.value[o],expandByDefault:t.expand,gap:t.gap,expanded:f.value[o]||!1,swipeDirections:n.swipeDirections,"onUpdate:heights":F,"onUpdate:height":R,onRemoveToast:E},{"close-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"close-icon",{},()=>[e.createVNode(y)])]),"loading-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"loading-icon",{},()=>[e.createVNode(_,{visible:"loading"===r.type},null,8,["visible"])])]),"success-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"success-icon",{},()=>[e.createVNode(k)])]),"error-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"error-icon",{},()=>[e.createVNode(I)])]),"warning-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"warning-icon",{},()=>[e.createVNode(N)])]),"info-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"info-icon",{},()=>[e.createVNode(O)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"]))),128))],16,S))),128))],8,B)],2112))}});function A(e,t){if(!e)return"";return function(e,t,n="text"){const r=e.match(/^\s*\{\{\s*([\s\S]+?)\s*\}\}\s*$/);return r?L(r[1].trim(),t):e.replace(/\{\{\s*([\s\S]+?)\s*\}\}/g,(e,r)=>{const o=L(String(r).trim(),t);if("js"===n){if(null==o)return"null";if("string"==typeof o)return JSON.stringify(o);if("number"==typeof o||"boolean"==typeof o)return String(o);try{return JSON.stringify(o)}catch{return"null"}}if(null==o)return"";if("string"==typeof o)return o;if("number"==typeof o||"boolean"==typeof o)return String(o);try{return JSON.stringify(o)}catch{return String(o)}})}(e,function(e){const t=["__proto__","constructor","prototype"],n=e=>{if(Array.isArray(e))return e.map(n);if(e&&"object"==typeof e){const r={};for(const o in e)!t.includes(o)&&D(o)&&(r[o]=n(e[o]));return r}return e};return n(e)}(t?.reduce((e,t)=>(e[t.name]=t.value,e),{})??{}))}function L(e,t){if(!e)return"";const n=function(e){const t=e.match(/\b[a-zA-Z_][a-zA-Z0-9_]*\b/g)||[],n=new Set(["true","false","null","undefined","return","if","else","try","catch","typeof"]);return[...new Set(t.filter(e=>!n.has(e)))]}(e),r={...t};for(const s of n)s in r||(r[s]=void 0);const o=Object.keys(r),i=Object.values(r);try{return new Function(...o,`'use strict'; return (${e})`)(...i)}catch(a){return void console.warn(`Interpolation failed for expression: "${e}"`,a)}}function D(e){return/^[$A-Z_][0-9A-Z_$]*$/i.test(e)}function F(e,t,n,r,o=8e3){const i=crypto.randomUUID();return new Promise((a,s)=>{const u=e=>{const t=e.data;t&&"response"===t.type&&t.id===i&&(l(),a(t.payload))},c=setTimeout(()=>{l(),s(new Error("Timed out waiting for response"))},o),l=()=>{clearTimeout(c),window.removeEventListener("message",u)};window.addEventListener("message",u),e.postMessage({type:t,id:i,payload:JSON.stringify(n)},r)})}const R={"api-request":async(e,{node:t})=>{try{let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=A(t.data.url,n),o=A(t.data.method,n).toUpperCase(),i=t.data.body?.map(e=>({key:A(e.key,n),value:A(e.value,n)}))||[],a=t.data.headers?.map(e=>({key:A(e.key,n),value:A(e.value,n)}))||[],s=t.data.cookies?.map(e=>({key:A(e.key,n),value:A(e.value,n)}))||[];const u=(t.data.urlParameters?.map(e=>({key:A(e.key,n),value:A(e.value,n)}))||[]).filter(e=>e.key).map(e=>`${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`).join("&"),c=u?`${r}?${u}`:r,l={};if(a.forEach(({key:e,value:t})=>{e&&(l[e]=t)}),s.length>0){const e=s.map(({key:e,value:t})=>`${e}=${t}`).join("; ");l.Cookie=e}let f=null;if(["POST","PUT","PATCH"].includes(o)){const e={};i.forEach(({key:t,value:n})=>{t&&(e[t]=n)}),f=JSON.stringify(e),l["Content-Type"]||="application/json"}const d=await fetch(c,{method:o,headers:l,body:f,credentials:"include"});if(d.status>=400)return{result:{success:!1,status:d.status}};let h;const p=d.headers.get("content-type");return h=p?.includes("application/json")?await d.json():await d.text(),{result:{success:!0,data:h,status:d.status}}}catch(n){return{result:{success:!1,status:n.status||500}}}},conditional:async(e,{node:t})=>({conditionMet:!!z(t.data.condition,e)}),"integration-action":async(e,{node:t})=>{console.log("Integration action task handler",t,e);const{$useIntegrationActions:r}=n.useNuxtApp(),{fireAction:o}=r(t.data.action.integration);return console.log("Firing integration action",t.data.action,e),{result:await o(t.data.action,e)}},"show-toast":async(e,{node:t})=>{console.log("Show toast",e,t);let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=A(t.data.title,n),o=A(t.data.message,n);return"true"===document.documentElement.dataset.moduleOverlayMode?(window.parent.postMessage({type:"toast:show",payload:{title:r,description:o}},"*"),{shown:!0}):(s(r,{description:o}),{shown:!0})},"finish-flow":async(e,{node:t,onFinish:n})=>{if(t.data.returnData){console.log("Finish flow with data",e,t);let r=z(t.data.transform,e);console.log("Finish flow return value",r),n(r)}else n();return{finished:!0}},confetti:async(e,{node:t})=>{const{$confetti:r}=n.useNuxtApp();return r(),{confetti:!0}},confirm:async(e,{node:t})=>{const{$useConfirmation:r}=n.useNuxtApp(),{confirm:o}=r();if(o){let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=A(t.data.title,n),i=A(t.data.message,n),a=A(t.data.confirmText,n);if("true"===document.documentElement.dataset.moduleOverlayMode){return{confirmed:(await F(window.parent,"confirmation-modal:show",{message:i,title:r,confirmText:a},"*")).confirmed}}return{confirmed:await o(i,r,a)}}return{confirmed:!1}},"set-variable":async(e,{node:t,localVariables:n})=>{console.log("Set variable",e,t,n);let r=Object.keys(e).map(t=>({name:t,value:e[t]})),o={};for(const i of t.data.updateActions??[]){const e=n.value.find(e=>e.id===i.variableId),t=A(i.value,r);console.log("skibi",i.value,r,t),e&&("element"===e.type?(e.value.value=t,o[e.name]={value:t}):(e.value=t,o[e.name]=t)),window.dispatchEvent(new CustomEvent("flow-update-form-variable",{detail:{id:i.variableId,value:t}}))}return{set:!0,...o}},"transform-data":async(e,{node:t})=>({transformed:!0,value:z(t.data.transform,e)}),"visit-url":async(e,{node:t})=>{let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=A(t.data.url,n);return t.data.newTab?window.open(r,"_blank"):window.location.href=r,{visited:!0}},"show-dialog":async(e,{node:t,flowBuilderExtensions:r})=>{const{$useCustomDialog:o}=n.useNuxtApp(),{openCustomDialog:i}=o();let a=Object.keys(e).map(t=>({name:t,value:e[t]}));if("true"===document.documentElement.dataset.moduleOverlayMode){return await F(window.parent,"dialog:show",{layout:t.data.layout,variables:a,formBuilderExtensions:[],flowBuilderExtensions:r},"*")}const s=await i(t.data.layout,a,[],r);return console.log("Dialog result",s),s},"show-module":async(e,{node:t})=>{console.log("Show module",e,t);const{$useModuleOverlay:r}=n.useNuxtApp(),{openInOverlay:o}=r();let i=Object.keys(e).map(t=>({name:t,value:e[t]}));const a={};if(t.data.moduleData?.forEach(e=>{a[A(e.key,i)]=A(e.value,i)}),console.log("mowauka aaa",t.data.moduleData,a),"true"===document.documentElement.dataset.moduleOverlayMode){return await F(window.parent,"module-overlay:show",{moduleId:t.data.moduleId,params:a},"*")}const s=await o(t.data.moduleId,a);return console.log("Overlay result",s),s},"wait-delay":async(e,{node:t})=>{console.log("Wait / delay",e,t);let n=parseInt(t.data.delayMs)||0;return await new Promise(e=>setTimeout(e,n)),{waited:!0}}},z=(e,t={})=>{var n=document.createElement("iframe");document.body.appendChild(n);var r=n.contentWindow.Function;return document.body.removeChild(n),r(...Object.keys(t),"'use strict';"+e)(...Object.values(t))},V={ERROR:"error",SKIPPED:"skipped",CANCELLED:"cancelled",FINISHED:"finished",RUNNING:"running"};var $,G,U,q,W,Y,H,J,K,X,Q,Z,ee,te,ne,re,oe,ie,ae,se,ue,ce,le,fe,de,he,pe,ve,ge,me,ye,be,we,_e,Ee,ke,je,Oe,xe,Ne,Ce,Ie,Be,Se,Me,Te,Pe,Ae,Le,De,Fe,Re,ze,Ve,$e,Ge,Ue,qe,We,Ye,He,Je,Ke,Xe,Qe,Ze,et,tt,nt,rt,ot,it,at,st,ut,ct,lt,ft,dt,ht,pt,vt,gt,mt,yt,bt,wt,_t,Et,kt,jt,Ot,xt,Nt,Ct="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function It(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Bt(){if(G)return $;G=1;var e="\0";function t(e,t){e[t]?e[t]++:e[t]=1}function n(e,t){--e[t]||delete e[t]}function r(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}return o+""+i+""+(void 0===r?"\0":r)}function o(e,t){return r(e,t.v,t.w,t.name)}return $=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(t){t&&(this._isDirected=!Object.hasOwn(t,"directed")||t.directed,this._isMultigraph=!!Object.hasOwn(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.hasOwn(t,"compound")&&t.compound),this._isCompound&&(this._parent={},this._children={},this._children[e]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var n=arguments,r=this;return e.forEach(function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(t,n){return Object.hasOwn(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=e,this._children[t]={},this._children[e][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===n)n=e;else{for(var r=n+="";void 0!==r;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(t){if(this._isCompound){var n=this._parent[t];if(n!==e)return n}}children(t=e){if(this._isCompound){var n=this._children[t];if(n)return Object.keys(n)}else{if(t===e)return this.nodes();if(this.hasNode(t))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){const r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,r]){e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function o(e){var i=n.parent(e);return void 0===i||t.hasNode(i)?(r[e]=i,i):i in r?r[i]:o(i)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,o(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce(function(e,o){return r.length>1?n.setEdge(e,o,t):n.setEdge(e,o),o}),this}setEdge(){var e,n,o,i,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,n=s.w,o=s.name,2===arguments.length&&(i=arguments[1],a=!0)):(e=s,n=arguments[1],o=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,n=""+n,void 0!==o&&(o=""+o);var u=r(this._isDirected,e,n,o);if(Object.hasOwn(this._edgeLabels,u))return a&&(this._edgeLabels[u]=i),this;if(void 0!==o&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(n),this._edgeLabels[u]=a?i:this._defaultEdgeLabelFn(e,n,o);var c=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};r&&(s.name=r);return s}(this._isDirected,e,n,o);return e=c.v,n=c.w,Object.freeze(c),this._edgeObjs[u]=c,t(this._preds[n],e),t(this._sucs[e],n),this._in[n][u]=c,this._out[e][u]=c,this._edgeCount++,this}edge(e,t,n){var i=1===arguments.length?o(this._isDirected,arguments[0]):r(this._isDirected,e,t,n);return this._edgeLabels[i]}edgeAsObj(){const e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,n){var i=1===arguments.length?o(this._isDirected,arguments[0]):r(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,i)}removeEdge(e,t,i){var a=1===arguments.length?o(this._isDirected,arguments[0]):r(this._isDirected,e,t,i),s=this._edgeObjs[a];return s&&(e=s.v,t=s.w,delete this._edgeLabels[a],delete this._edgeObjs[a],n(this._preds[t],e),n(this._sucs[e],t),delete this._in[t][a],delete this._out[e][a],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.v===t):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.w===t):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},$}function St(){if(J)return H;J=1;var e=Bt();function t(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),o={v:t};return void 0!==n&&(o.value=n),void 0!==r&&(o.parent=r),o})}function n(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return void 0!==t.name&&(r.name=t.name),void 0!==n&&(r.value=n),r})}return H={write:function(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:t(e),edges:n(e)};void 0!==e.graph()&&(r.value=structuredClone(e.graph()));return r},read:function(t){var n=new e(t.options).setGraph(t.value);return t.nodes.forEach(function(e){n.setNode(e.v,e.value),e.parent&&n.setParent(e.v,e.parent)}),t.edges.forEach(function(e){n.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),n}}}function Mt(){if(X)return K;return X=1,K=function(e){var t,n={},r=[];function o(r){Object.hasOwn(n,r)||(n[r]=!0,t.push(r),e.successors(r).forEach(o),e.predecessors(r).forEach(o))}return e.nodes().forEach(function(e){t=[],o(e),t.length&&r.push(t)}),r}}function Tt(){if(Z)return Q;Z=1;return Q=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,o=r.length;return n[e]=o,r.push({key:e,priority:t}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))}_decrease(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t}_swap(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}}}function Pt(){if(te)return ee;te=1;var e=Tt();ee=function(n,r,o,i){return function(t,n,r,o){var i,a,s={},u=new e,c=function(e){var t=e.v!==i?e.v:e.w,n=s[t],o=r(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<n.distance&&(n.distance=c,n.predecessor=i,u.decrease(t,c))};t.nodes().forEach(function(e){var t=e===n?0:Number.POSITIVE_INFINITY;s[e]={distance:t},u.add(e,t)});for(;u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)o(i).forEach(c);return s}(n,String(r),o||t,i||function(e){return n.outEdges(e)})};var t=()=>1;return ee}function At(){if(re)return ne;re=1;var e=Pt();return ne=function(t,n,r){return t.nodes().reduce(function(o,i){return o[i]=e(t,i,n,r),o},{})}}function Lt(){if(ie)return oe;return ie=1,oe=function(e){var t=0,n=[],r={},o=[];function i(a){var s=r[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),e.successors(a).forEach(function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(i(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))}),s.lowlink===s.index){var u,c=[];do{u=n.pop(),r[u].onStack=!1,c.push(u)}while(a!==u);o.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(r,e)||i(e)}),o}}function Dt(){if(se)return ae;se=1;var e=Lt();return ae=function(t){return e(t).filter(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}}function Ft(){if(ce)return ue;ce=1,ue=function(t,n,r){return function(e,t,n){var r={},o=e.nodes();return o.forEach(function(e){r[e]={},r[e][e]={distance:0},o.forEach(function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}})}),o.forEach(function(e){var t=r[e];o.forEach(function(n){var i=r[n];o.forEach(function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)})})}),r}(t,n||e,r||function(e){return t.outEdges(e)})};var e=()=>1;return ue}function Rt(){if(fe)return le;function e(e){var n={},r={},o=[];if(e.sinks().forEach(function i(a){if(Object.hasOwn(r,a))throw new t;Object.hasOwn(n,a)||(r[a]=!0,n[a]=!0,e.predecessors(a).forEach(i),delete r[a],o.push(a))}),Object.keys(n).length!==e.nodeCount())throw new t;return o}fe=1;class t extends Error{constructor(){super(...arguments)}}return le=e,e.CycleException=t,le}function zt(){if(he)return de;he=1;var e=Rt();return de=function(t){try{e(t)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}}function Vt(){if(ve)return pe;function e(e,t,r,o){for(var i=[[e,!1]];i.length>0;){var a=i.pop();a[1]?o.push(a[0]):Object.hasOwn(r,a[0])||(r[a[0]]=!0,i.push([a[0],!0]),n(t(a[0]),e=>i.push([e,!1])))}}function t(e,t,r,o){for(var i=[e];i.length>0;){var a=i.pop();Object.hasOwn(r,a)||(r[a]=!0,o.push(a),n(t(a),e=>i.push(e)))}}function n(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}return ve=1,pe=function(n,r,o){Array.isArray(r)||(r=[r]);var i=n.isDirected()?e=>n.successors(e):e=>n.neighbors(e),a="post"===o?e:t,s=[],u={};return r.forEach(e=>{if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);a(e,i,u,s)}),s}}function $t(){if(me)return ge;me=1;var e=Vt();return ge=function(t,n){return e(t,n,"post")}}function Gt(){if(be)return ye;be=1;var e=Vt();return ye=function(t,n){return e(t,n,"pre")}}function Ut(){if(_e)return we;_e=1;var e=Bt(),t=Tt();return we=function(n,r){var o,i=new e,a={},s=new t;function u(e){var t=e.v===o?e.w:e.v,n=s.priority(t);if(void 0!==n){var i=r(e);i<n&&(a[t]=o,s.decrease(t,i))}}if(0===n.nodeCount())return i;n.nodes().forEach(function(e){s.add(e,Number.POSITIVE_INFINITY),i.setNode(e)}),s.decrease(n.nodes()[0],0);var c=!1;for(;s.size()>0;){if(o=s.removeMin(),Object.hasOwn(a,o))i.setEdge(o,a[o]);else{if(c)throw new Error("Input graph is not connected: "+n);c=!0}n.nodeEdges(o).forEach(u)}return i}}function qt(){if(Oe)return je;Oe=1;var e=Y?W:(Y=1,W={Graph:Bt(),version:q?U:(q=1,U="2.2.4")});return je={Graph:e.Graph,json:St(),alg:ke?Ee:(ke=1,Ee={components:Mt(),dijkstra:Pt(),dijkstraAll:At(),findCycles:Dt(),floydWarshall:Ft(),isAcyclic:zt(),postorder:$t(),preorder:Gt(),prim:Ut(),tarjan:Lt(),topsort:Rt()}),version:e.version}}function Wt(){if(Ie)return Ce;Ie=1;let e=qt().Graph,t=function(){if(Ne)return xe;function e(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function t(e,t){if("_next"!==e&&"_prev"!==e)return t}return Ne=1,xe=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return e(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&e(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let e=[],n=this._sentinel,r=n._prev;for(;r!==n;)e.push(JSON.stringify(r,t)),r=r._prev;return"["+e.join(", ")+"]"}}}();Ce=function(i,a){if(i.nodeCount()<=1)return[];let s=function(n,r){let i=new e,a=0,s=0;n.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),n.edges().forEach(e=>{let t=i.edge(e.v,e.w)||0,n=r(e),o=t+n;i.setEdge(e.v,e.w,o),s=Math.max(s,i.node(e.v).out+=n),a=Math.max(a,i.node(e.w).in+=n)});let u=function(e){const t=[];for(let n=0;n<e;n++)t.push(n);return t}(s+a+3).map(()=>new t),c=a+1;return i.nodes().forEach(e=>{o(u,c,i.node(e))}),{graph:i,buckets:u,zeroIdx:c}}(i,a||n);return function(e,t,n){let o,i=[],a=t[t.length-1],s=t[0];for(;e.nodeCount();){for(;o=s.dequeue();)r(e,t,n,o);for(;o=a.dequeue();)r(e,t,n,o);if(e.nodeCount())for(let a=t.length-2;a>0;--a)if(o=t[a].dequeue(),o){i=i.concat(r(e,t,n,o,!0));break}}return i}(s.graph,s.buckets,s.zeroIdx).flatMap(e=>i.outEdges(e.v,e.w))};let n=()=>1;function r(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let s=e.edge(r),u=e.node(r.v);i&&a.push({v:r.v,w:r.w}),u.out-=s,o(t,n,u)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=r.w,s=e.node(a);s.in-=i,o(t,n,s)}),e.removeNode(r.v),a}function o(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}return Ce}function Yt(){if(Se)return Be;Se=1;let e=qt().Graph;function t(e,t,n,r){for(var o=r;e.hasNode(o);)o=a(r);return n.dummy=t,e.setNode(o,n),o}Be={addBorderNode:function(e,n,r,o){let i={width:0,height:0};arguments.length>=4&&(i.rank=r,i.order=o);return t(e,"border",i,n)},addDummyNode:t,applyWithChunking:r,asNonCompoundGraph:function(t){let n=new e({multigraph:t.isMultigraph()}).setGraph(t.graph());return t.nodes().forEach(e=>{t.children(e).length||n.setNode(e,t.node(e))}),t.edges().forEach(e=>{n.setEdge(e,t.edge(e))}),n},buildLayerMatrix:function(e){let t=s(o(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),o=r.rank;void 0!==o&&(t[o][r.order]=n)}),t},intersectRect:function(e,t){let n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a);return{x:o+n,y:i+r}},mapValues:function(e,t){let n=t;"string"==typeof t&&(n=e=>e[t]);return Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})},maxRank:o,normalizeRanks:function(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return void 0===n?Number.MAX_VALUE:n}),n=r(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,"rank")&&(r.rank-=n)})},notime:function(e,t){return t()},partition:function(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n},pick:function(e,t){const n={};for(const r of t)void 0!==e[r]&&(n[r]=e[r]);return n},predecessorWeights:function(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return u(e.nodes(),t)},range:s,removeEmptyRanks:function(e){let t=e.nodes().map(t=>e.node(t).rank),n=r(Math.min,t),o=[];e.nodes().forEach(t=>{let r=e.node(t).rank-n;o[r]||(o[r]=[]),o[r].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(o).forEach((t,n)=>{void 0===t&&n%a!==0?--i:void 0!==t&&i&&t.forEach(t=>e.node(t).rank+=i)})},simplify:function(t){let n=(new e).setGraph(t.graph());return t.nodes().forEach(e=>n.setNode(e,t.node(e))),t.edges().forEach(e=>{let r=n.edge(e.v,e.w)||{weight:0,minlen:1},o=t.edge(e);n.setEdge(e.v,e.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),n},successorWeights:function(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return u(e.nodes(),t)},time:function(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}},uniqueId:a,zipObject:u};const n=65535;function r(e,t){if(t.length>n){const r=function(e,t=n){const r=[];for(let n=0;n<e.length;n+=t){const o=e.slice(n,n+t);r.push(o)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}return e.apply(null,t)}function o(e){const t=e.nodes().map(t=>{let n=e.node(t).rank;return void 0===n?Number.MIN_VALUE:n});return r(Math.max,t)}let i=0;function a(e){return e+""+ ++i}function s(e,t,n=1){null==t&&(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);const o=[];for(let i=e;r(i);i+=n)o.push(i);return o}function u(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}return Be}function Ht(){if(Te)return Me;Te=1;let e=Wt(),t=Yt().uniqueId;return Me={run:function(n){("greedy"===n.graph().acyclicer?e(n,(r=n,e=>r.edge(e).weight)):function(e){let t=[],n={},r={};function o(i){Object.hasOwn(r,i)||(r[i]=!0,n[i]=!0,e.outEdges(i).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):o(e.w)}),delete n[i])}return e.nodes().forEach(o),t}(n)).forEach(e=>{let r=n.edge(e);n.removeEdge(e),r.forwardName=e.name,r.reversed=!0,n.setEdge(e.w,e.v,r,t("rev"))});var r},undo:function(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}}}function Jt(){if(Ae)return Pe;Ae=1;let e=Yt();return Pe={run:function(t){t.graph().dummyChains=[],t.edges().forEach(n=>function(t,n){let r,o,i,a=n.v,s=t.node(a).rank,u=n.w,c=t.node(u).rank,l=n.name,f=t.edge(n),d=f.labelRank;if(c===s+1)return;for(t.removeEdge(n),i=0,++s;s<c;++i,++s)f.points=[],o={width:0,height:0,edgeLabel:f,edgeObj:n,rank:s},r=e.addDummyNode(t,"edge",o,"_d"),s===d&&(o.width=f.width,o.height=f.height,o.dummy="edge-label",o.labelpos=f.labelpos),t.setEdge(a,r,{weight:f.weight},l),0===i&&t.graph().dummyChains.push(r),a=r;t.setEdge(a,u,{weight:f.weight},l)}(t,n))},undo:function(e){e.graph().dummyChains.forEach(t=>{let n,r=e.node(t),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),t=n,r=e.node(t)})}}}function Kt(){if(De)return Le;De=1;const{applyWithChunking:e}=Yt();return Le={longestPath:function(t){var n={};t.sources().forEach(function r(o){var i=t.node(o);if(Object.hasOwn(n,o))return i.rank;n[o]=!0;let a=t.outEdges(o).map(e=>null==e?Number.POSITIVE_INFINITY:r(e.w)-t.edge(e).minlen);var s=e(Math.min,a);return s===Number.POSITIVE_INFINITY&&(s=0),i.rank=s})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}}function Xt(){if(Re)return Fe;Re=1;var e=qt().Graph,t=Kt().slack;function n(e,n){return e.nodes().forEach(function r(o){n.nodeEdges(o).forEach(i=>{var a=i.v,s=o===a?i.w:a;e.hasNode(s)||t(n,i)||(e.setNode(s,{}),e.setEdge(o,s,{}),r(s))})}),e.nodeCount()}function r(e,n){return n.edges().reduce((r,o)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(i=t(n,o)),i<r[0]?[i,o]:r},[Number.POSITIVE_INFINITY,null])[1]}function o(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}return Fe=function(i){var a,s,u=new e({directed:!1}),c=i.nodes()[0],l=i.nodeCount();u.setNode(c,{});for(;n(u,i)<l;)a=r(u,i),s=u.hasNode(a.v)?t(i,a):-t(i,a),o(u,i,s);return u}}function Qt(){if(Ve)return ze;Ve=1;var e=Xt(),t=Kt().slack,n=Kt().longestPath,r=qt().alg.preorder,o=qt().alg.postorder,i=Yt().simplify;function a(t){t=i(t),n(t);var r,o=e(t);for(c(o),s(o,t);r=f(o);)h(o,t,r,d(o,t,r))}function s(e,t){var n=o(e,e.nodes());(n=n.slice(0,n.length-1)).forEach(n=>function(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=u(e,t,n)}(e,t,n))}function u(e,t,n){var r=e.node(n).parent,o=!0,i=t.edge(n,r),a=0;return i||(o=!1,i=t.edge(r,n)),a=i.weight,t.nodeEdges(n).forEach(i=>{var s,u,c=i.v===n,l=c?i.w:i.v;if(l!==r){var f=c===o,d=t.edge(i).weight;if(a+=f?d:-d,s=n,u=l,e.hasEdge(s,u)){var h=e.edge(n,l).cutvalue;a+=f?-h:h}}}),a}function c(e,t){arguments.length<2&&(t=e.nodes()[0]),l(e,{},1,t)}function l(e,t,n,r,o){var i=n,a=e.node(r);return t[r]=!0,e.neighbors(r).forEach(o=>{Object.hasOwn(t,o)||(n=l(e,t,n,o,r))}),a.low=i,a.lim=n++,o?a.parent=o:delete a.parent,n}function f(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function d(e,n,r){var o=r.v,i=r.w;n.hasEdge(o,i)||(o=r.w,i=r.v);var a=e.node(o),s=e.node(i),u=a,c=!1;return a.lim>s.lim&&(u=s,c=!0),n.edges().filter(t=>c===p(e,e.node(t.v),u)&&c!==p(e,e.node(t.w),u)).reduce((e,r)=>t(n,r)<t(n,e)?r:e)}function h(e,t,n,o){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(o.v,o.w,{}),c(e),s(e,t),function(e,t){var n=e.nodes().find(e=>!t.node(e).parent),o=r(e,n);(o=o.slice(1)).forEach(n=>{var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)})}(e,t)}function p(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}return ze=a,a.initLowLimValues=c,a.initCutValues=s,a.calcCutValue=u,a.leaveEdge=f,a.enterEdge=d,a.exchangeEdges=h,ze}function Zt(){if(Ge)return $e;Ge=1;var e=Kt().longestPath,t=Xt(),n=Qt();$e=function(n){var i=n.graph().ranker;if(i instanceof Function)return i(n);switch(n.graph().ranker){case"network-simplex":default:o(n);break;case"tight-tree":!function(n){e(n),t(n)}(n);break;case"longest-path":r(n);case"none":}};var r=e;function o(e){n(e)}return $e}function en(){if(qe)return Ue;return qe=1,Ue=function(e){let t=function(e){let t={},n=0;function r(o){let i=n;e.children(o).forEach(r),t[o]={low:i,lim:n++}}return e.children().forEach(r),t}(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),o=r.edgeObj,i=function(e,t,n,r){let o,i,a=[],s=[],u=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,s=i.lca,u=0,c=a[u],l=!0;for(;n!==o.w;){if(r=e.node(n),l){for(;(c=a[u])!==s&&e.node(c).maxRank<r.rank;)u++;c===s&&(l=!1)}if(!l){for(;u<a.length-1&&e.node(c=a[u+1]).minRank<=r.rank;)u++;c=a[u]}e.setParent(n,c),n=e.successors(n)[0]}})}}function tn(){if(Ye)return We;Ye=1;let e=Yt();function t(n,r,o,i,a,s,u){let c=n.children(u);if(!c.length)return void(u!==r&&n.setEdge(r,u,{weight:0,minlen:o}));let l=e.addBorderNode(n,"_bt"),f=e.addBorderNode(n,"_bb"),d=n.node(u);n.setParent(l,u),d.borderTop=l,n.setParent(f,u),d.borderBottom=f,c.forEach(e=>{t(n,r,o,i,a,s,e);let c=n.node(e),d=c.borderTop?c.borderTop:e,h=c.borderBottom?c.borderBottom:e,p=c.borderTop?i:2*i,v=d!==h?1:a-s[u]+1;n.setEdge(l,d,{weight:p,minlen:v,nestingEdge:!0}),n.setEdge(h,f,{weight:p,minlen:v,nestingEdge:!0})}),n.parent(u)||n.setEdge(r,l,{weight:0,minlen:a+s[u]})}return We={run:function(n){let r=e.addDummyNode(n,"root",{},"_root"),o=function(e){var t={};function n(r,o){var i=e.children(r);i&&i.length&&i.forEach(e=>n(e,o+1)),t[r]=o}return e.children().forEach(e=>n(e,1)),t}(n),i=Object.values(o),a=e.applyWithChunking(Math.max,i)-1,s=2*a+1;n.graph().nestingRoot=r,n.edges().forEach(e=>n.edge(e).minlen*=s);let u=function(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}(n)+1;n.children().forEach(e=>t(n,r,s,u,a,o,e)),n.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}}function nn(){if(Xe)return Ke;function e(e){e.nodes().forEach(n=>t(e.node(n))),e.edges().forEach(n=>t(e.edge(n)))}function t(e){let t=e.width;e.width=e.height,e.height=t}function n(e){e.y=-e.y}function r(e){let t=e.x;e.x=e.y,e.y=t}return Xe=1,Ke={adjust:function(t){let n=t.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||e(t)},undo:function(t){let o=t.graph().rankdir.toLowerCase();"bt"!==o&&"rl"!==o||function(e){e.nodes().forEach(t=>n(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(n),Object.hasOwn(r,"y")&&n(r)})}(t);"lr"!==o&&"rl"!==o||(!function(e){e.nodes().forEach(t=>r(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(r),Object.hasOwn(n,"x")&&r(n)})}(t),e(t))}}}function rn(){if(it)return ot;it=1;let e=Yt();return ot=function(t,n){let r={};return t.forEach((e,t)=>{let n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(n.barycenter=e.barycenter,n.weight=e.weight)}),n.edges().forEach(e=>{let t=r[e.v],n=r[e.w];void 0!==t&&void 0!==n&&(n.indegree++,t.out.push(r[e.w]))}),function(t){let n=[];function r(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function o(e){return n=>{n.in.push(e),0===--n.indegree&&t.push(n)}}for(;t.length;){let e=t.pop();n.push(e),e.in.reverse().forEach(r(e)),e.out.forEach(o(e))}return n.filter(e=>!e.merged).map(t=>e.pick(t,["vs","i","barycenter","weight"]))}(Object.values(r).filter(e=>!e.indegree))}}function on(){if(ct)return ut;ct=1;let e=rt?nt:(rt=1,nt=function(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce((t,n)=>{let r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}),t=rn(),n=function(){if(st)return at;st=1;let e=Yt();function t(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}return at=function(n,r){let o=e.partition(n,e=>Object.hasOwn(e,"barycenter")),i=o.lhs,a=o.rhs.sort((e,t)=>t.i-e.i),s=[],u=0,c=0,l=0;var f;i.sort((f=!!r,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:f?t.i-e.i:e.i-t.i)),l=t(s,a,l),i.forEach(e=>{l+=e.vs.length,s.push(e.vs),u+=e.barycenter*e.weight,c+=e.weight,l=t(s,a,l)});let d={vs:s.flat(!0)};return c&&(d.barycenter=u/c,d.weight=c),d}}();return ut=function r(o,i,a,s){let u=o.children(i),c=o.node(i),l=c?c.borderLeft:void 0,f=c?c.borderRight:void 0,d={};l&&(u=u.filter(e=>e!==l&&e!==f));let h=e(o,u);h.forEach(e=>{if(o.children(e.v).length){let i=r(o,e.v,a,s);d[e.v]=i,Object.hasOwn(i,"barycenter")&&(n=i,void 0!==(t=e).barycenter?(t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight):(t.barycenter=n.barycenter,t.weight=n.weight))}var t,n});let p=t(h,a);!function(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}(p,d);let v=n(p,s);if(l&&(v.vs=[l,v.vs,f].flat(!0),o.predecessors(l).length)){let e=o.node(o.predecessors(l)[0]),t=o.node(o.predecessors(f)[0]);Object.hasOwn(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+e.order+t.order)/(v.weight+2),v.weight+=2}return v},ut}function an(){if(ft)return lt;ft=1;let e=qt().Graph,t=Yt();return lt=function(n,r,o,i){i||(i=n.nodes());let a=function(e){var n;for(;e.hasNode(n=t.uniqueId("_root")););return n}(n),s=new e({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(e=>n.node(e));return i.forEach(e=>{let t=n.node(e),i=n.parent(e);(t.rank===r||t.minRank<=r&&r<=t.maxRank)&&(s.setNode(e),s.setParent(e,i||a),n[o](e).forEach(t=>{let r=t.v===e?t.w:t.v,o=s.edge(r,e),i=void 0!==o?o.weight:0;s.setEdge(r,e,{weight:n.edge(t).weight+i})}),Object.hasOwn(t,"minRank")&&s.setNode(e,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]}))}),s}}function sn(){if(vt)return pt;vt=1;let e=function(){if(Ze)return Qe;Ze=1;let e=Yt();return Qe=function(t){let n={},r=t.nodes().filter(e=>!t.children(e).length),o=r.map(e=>t.node(e).rank),i=e.applyWithChunking(Math.max,o),a=e.range(i+1).map(()=>[]);return r.sort((e,n)=>t.node(e).rank-t.node(n).rank).forEach(function e(r){if(n[r])return;n[r]=!0;let o=t.node(r);a[o.rank].push(r),t.successors(r).forEach(e)}),a}}(),t=function(){if(tt)return et;tt=1;let e=Yt().zipObject;function t(t,n,r){let o=e(r,r.map((e,t)=>t)),i=n.flatMap(e=>t.outEdges(e).map(e=>({pos:o[e.w],weight:t.edge(e).weight})).sort((e,t)=>e.pos-t.pos)),a=1;for(;a<r.length;)a<<=1;let s=2*a-1;a-=1;let u=new Array(s).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;u[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=u[t+1]),t=t-1>>1,u[t]+=e.weight;c+=e.weight*n}),c}return et=function(e,n){let r=0;for(let o=1;o<n.length;++o)r+=t(e,n[o-1],n[o]);return r}}(),n=on(),r=an(),o=ht?dt:(ht=1,dt=function(e,t,n){let r,o={};n.forEach(n=>{let i,a,s=e.parent(n);for(;s;){if(i=e.parent(s),i?(a=o[i],o[i]=s):(a=r,r=s),a&&a!==s)return void t.setEdge(a,s);s=i}})}),i=qt().Graph,a=Yt();function s(e,t,n){const o=new Map,i=(e,t)=>{o.has(e)||o.set(e,[]),o.get(e).push(t)};for(const r of e.nodes()){const t=e.node(r);if("number"==typeof t.rank&&i(t.rank,r),"number"==typeof t.minRank&&"number"==typeof t.maxRank)for(let e=t.minRank;e<=t.maxRank;e++)e!==t.rank&&i(e,r)}return t.map(function(t){return r(e,t,n,o.get(t)||[])})}function u(e,t){let r=new i;e.forEach(function(e){let i=e.graph().root,a=n(e,i,r,t);a.vs.forEach((t,n)=>e.node(t).order=n),o(e,r,a.vs)})}function c(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}return pt=function n(r,o){if(o&&"function"==typeof o.customOrder)return void o.customOrder(r,n);let i=a.maxRank(r),l=s(r,a.range(1,i+1),"inEdges"),f=s(r,a.range(i-1,-1,-1),"outEdges"),d=e(r);if(c(r,d),o&&o.disableOptimalOrderHeuristic)return;let h,p=Number.POSITIVE_INFINITY;for(let e=0,s=0;s<4;++e,++s){u(e%2?l:f,e%4>=2),d=a.buildLayerMatrix(r);let n=t(r,d);n<p&&(s=0,h=Object.assign({},d),p=n)}c(r,h)},pt}function un(){if(mt)return gt;mt=1;let e=qt().Graph,t=Yt();function n(e,t){let n={};return t.length&&t.reduce(function(t,r){let i=0,a=0,s=t.length,u=r[r.length-1];return r.forEach((t,c)=>{let l=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),f=l?e.node(l).order:s;(l||t===u)&&(r.slice(a,c+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),s=a.order;!(s<i||f<s)||a.dummy&&e.node(t).dummy||o(n,r,t)})}),a=c+1,i=f)}),r}),n}function r(e,n){let r={};function i(n,i,a,s,u){let c;t.range(i,a).forEach(t=>{c=n[t],e.node(c).dummy&&e.predecessors(c).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<s||n.order>u)&&o(r,t,c)})})}return n.length&&n.reduce(function(t,n){let r,o=-1,a=0;return n.forEach((s,u)=>{if("border"===e.node(s).dummy){let t=e.predecessors(s);t.length&&(r=e.node(t[0]).order,i(n,a,u,o,r),a=u,o=r)}i(n,a,n.length,r,t.length)}),n}),r}function o(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function i(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function a(e,t,n,r){let o={},a={},s={};return t.forEach(e=>{e.forEach((e,t)=>{o[e]=e,a[e]=e,s[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let u=r(e);if(u.length){u=u.sort((e,t)=>s[e]-s[t]);let r=(u.length-1)/2;for(let c=Math.floor(r),l=Math.ceil(r);c<=l;++c){let r=u[c];a[e]===e&&t<s[r]&&!i(n,e,r)&&(a[r]=e,a[e]=o[e]=o[r],t=s[r])}}})}),{root:o,align:a}}function s(t,n,r,o,i){let a={},s=function(t,n,r,o){let i=new e,a=t.graph(),s=function(e,t,n){return(r,o,i)=>{let a,s=r.node(o),u=r.node(i),c=0;if(c+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(c+=n?a:-a),a=0,c+=(s.dummy?t:e)/2,c+=(u.dummy?t:e)/2,c+=u.width/2,Object.hasOwn(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=u.width/2;break;case"r":a=-u.width/2}return a&&(c+=n?a:-a),a=0,c}}(a.nodesep,a.edgesep,o);return n.forEach(e=>{let n;e.forEach(e=>{let o=r[e];if(i.setNode(o),n){var a=r[n],u=i.edge(a,o);i.setEdge(a,o,Math.max(s(t,e,n),u||0))}n=e})}),i}(t,n,r,i),u=i?"borderLeft":"borderRight";function c(e,t){let n=s.nodes(),r=n.pop(),o={};for(;r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return c(function(e){a[e]=s.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+s.edge(t)),0)},s.predecessors.bind(s)),c(function(e){let n=s.outEdges(e).reduce((e,t)=>Math.min(e,a[t.w]-s.edge(t)),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(a[e]=Math.max(a[e],n))},s.successors.bind(s)),Object.keys(o).forEach(e=>a[e]=a[r[e]]),a}function u(e,t){return Object.values(t).reduce((t,n)=>{let r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;Object.entries(n).forEach(([t,n])=>{let i=function(e,t){return e.node(t).width}(e,t)/2;r=Math.max(n+i,r),o=Math.min(n-i,o)});const i=r-o;return i<t[0]&&(t=[i,n]),t},[Number.POSITIVE_INFINITY,null])[1]}function c(e,n){let r=Object.values(n),o=t.applyWithChunking(Math.min,r),i=t.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(a=>{let s=r+a,u=e[s];if(u===n)return;let c=Object.values(u),l=o-t.applyWithChunking(Math.min,c);"l"!==a&&(l=i-t.applyWithChunking(Math.max,c)),l&&(e[s]=t.mapValues(u,e=>e+l))})})}function l(e,n){return t.mapValues(e.ul,(t,r)=>{if(n)return e[n.toLowerCase()][r];{let t=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}return gt={positionX:function(e){let o,i=t.buildLayerMatrix(e),f=Object.assign(n(e,i),r(e,i)),d={};["u","d"].forEach(n=>{o="u"===n?i:Object.values(i).reverse(),["l","r"].forEach(r=>{"r"===r&&(o=o.map(e=>Object.values(e).reverse()));let i=("u"===n?e.predecessors:e.successors).bind(e),u=a(e,o,f,i),c=s(e,o,u.root,u.align,"r"===r);"r"===r&&(c=t.mapValues(c,e=>-e)),d[n+r]=c})});let h=u(e,d);return c(d,h),l(d,e.graph().align)},findType1Conflicts:n,findType2Conflicts:r,addConflict:o,hasConflict:i,verticalAlignment:a,horizontalCompaction:s,alignCoordinates:c,findSmallestWidthAlignment:u,balance:l}}function cn(){if(bt)return yt;bt=1;let e=Yt(),t=un().positionX;return yt=function(n){(function(t){let n=e.buildLayerMatrix(t),r=t.graph().ranksep,o=0;n.forEach(e=>{const n=e.reduce((e,n)=>{const r=t.node(n).height;return e>r?e:r},0);e.forEach(e=>t.node(e).y=o+n/2),o+=n+r})})(n=e.asNonCompoundGraph(n)),Object.entries(t(n)).forEach(([e,t])=>n.node(e).x=t)}}function ln(){if(_t)return wt;_t=1;let e=Ht(),t=Jt(),n=Zt(),r=Yt().normalizeRanks,o=en(),i=Yt().removeEmptyRanks,a=tn(),s=function(){if(Je)return He;Je=1;let e=Yt();function t(t,n,r,o,i,a){let s={width:0,height:0,rank:a,borderType:n},u=i[n][a-1],c=e.addDummyNode(t,"border",s,r);i[n][a]=c,t.setParent(c,o),u&&t.setEdge(u,c,{weight:1})}return He=function(e){e.children().forEach(function n(r){let o=e.children(r),i=e.node(r);if(o.length&&o.forEach(n),Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let n=i.minRank,o=i.maxRank+1;n<o;++n)t(e,"borderLeft","_bl",r,i,n),t(e,"borderRight","_br",r,i,n)}})}}(),u=nn(),c=sn(),l=cn(),f=Yt(),d=qt().Graph;wt=function(k,j){let O=j&&j.debugTiming?f.time:f.notime;O("layout",()=>{let x=O(" buildLayoutGraph",()=>function(e){let t=new d({multigraph:!0,compound:!0}),n=E(e.graph());return t.setGraph(Object.assign({},p,_(n,h),f.pick(n,v))),e.nodes().forEach(n=>{const r=_(E(e.node(n)),g);Object.keys(m).forEach(e=>{void 0===r[e]&&(r[e]=m[e])}),t.setNode(n,r),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let r=E(e.edge(n));t.setEdge(n,Object.assign({},b,_(r,y),f.pick(r,w)))}),t}(k));O(" runLayout",()=>function(d,h,p){h(" makeSpaceForEdgeLabels",()=>function(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(d)),h(" removeSelfEdges",()=>function(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}(d)),h(" acyclic",()=>e.run(d)),h(" nestingGraph.run",()=>a.run(d)),h(" rank",()=>n(f.asNonCompoundGraph(d))),h(" injectEdgeLabelProxies",()=>function(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};f.addDummyNode(e,"edge-proxy",r,"_ep")}})}(d)),h(" removeEmptyRanks",()=>i(d)),h(" nestingGraph.cleanup",()=>a.cleanup(d)),h(" normalizeRanks",()=>r(d)),h(" assignRankMinMax",()=>function(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}(d)),h(" removeEdgeLabelProxies",()=>function(e){e.nodes().forEach(t=>{let n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}(d)),h(" normalize.run",()=>t.run(d)),h(" parentDummyChains",()=>o(d)),h(" addBorderSegments",()=>s(d)),h(" order",()=>c(d,p)),h(" insertSelfEdges",()=>function(e){var t=f.buildLayerMatrix(e);t.forEach(t=>{var n=0;t.forEach((t,r)=>{var o=e.node(t);o.order=r+n,(o.selfEdges||[]).forEach(t=>{f.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:r+ ++n,e:t.e,label:t.label},"_se")}),delete o.selfEdges})})}(d)),h(" adjustCoordinateSystem",()=>u.adjust(d)),h(" position",()=>l(d)),h(" positionSelfEdges",()=>function(e){e.nodes().forEach(t=>{var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}})}(d)),h(" removeBorderNodes",()=>function(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),o=e.node(n.borderBottom),i=e.node(n.borderLeft[n.borderLeft.length-1]),a=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(a.x-i.x),n.height=Math.abs(o.y-r.y),n.x=i.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{"border"===e.node(t).dummy&&e.removeNode(t)})}(d)),h(" normalize.undo",()=>t.undo(d)),h(" fixupEdgeLabelCoords",()=>function(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(d)),h(" undoCoordinateSystem",()=>u.undo(d)),h(" translateGraph",()=>function(e){let t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,s=i.marginy||0;function u(e){let i=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,i-s/2),n=Math.max(n,i+s/2),r=Math.min(r,a-u/2),o=Math.max(o,a+u/2)}e.nodes().forEach(t=>u(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,"x")&&u(n)}),t-=a,r-=s,e.nodes().forEach(n=>{let o=e.node(n);o.x-=t,o.y-=r}),e.edges().forEach(n=>{let o=e.edge(n);o.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(o,"x")&&(o.x-=t),Object.hasOwn(o,"y")&&(o.y-=r)}),i.width=n-t+a,i.height=o-r+s}(d)),h(" assignNodeIntersects",()=>function(e){e.edges().forEach(t=>{let n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(f.intersectRect(i,n)),o.points.push(f.intersectRect(a,r))})}(d)),h(" reversePoints",()=>function(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}(d)),h(" acyclic.undo",()=>e.undo(d))}(x,O,j)),O(" updateInputGraph",()=>function(e,t){e.nodes().forEach(n=>{let r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,r.rank=o.rank,t.children(n).length&&(r.width=o.width,r.height=o.height))}),e.edges().forEach(n=>{let r=e.edge(n),o=t.edge(n);r.points=o.points,Object.hasOwn(o,"x")&&(r.x=o.x,r.y=o.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(k,x))})};let h=["nodesep","edgesep","ranksep","marginx","marginy"],p={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},v=["acyclicer","ranker","rankdir","align"],g=["width","height","rank"],m={width:0,height:0},y=["minlen","weight","width","height","labeloffset"],b={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},w=["labelpos"];function _(e,t){return f.mapValues(f.pick(e,t),Number)}function E(e){var t={};return e&&Object.entries(e).forEach(([e,n])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=n}),t}return wt}function fn(){if(kt)return Et;kt=1;let e=Yt(),t=qt().Graph;return Et={debugOrdering:function(n){let r=e.buildLayerMatrix(n),o=new t({compound:!0,multigraph:!0}).setGraph({});return n.nodes().forEach(e=>{o.setNode(e,{label:e}),o.setParent(e,"layer"+n.node(e).rank)}),n.edges().forEach(e=>o.setEdge(e.v,e.w,{},e.name)),r.forEach((e,t)=>{let n="layer"+t;o.setNode(n,{rank:"same"}),e.reduce((e,t)=>(o.setEdge(e,t,{style:"invis"}),t))}),o}}}const dn=It(Nt?xt:(Nt=1,xt={graphlib:qt(),layout:ln(),debug:fn(),util:{time:Yt().time,notime:Yt().notime},version:Ot?jt:(Ot=1,jt="1.1.8")}));var hn,pn,vn,gn,mn,yn,bn,wn,_n,En,kn,jn,On,xn,Nn,Cn,In,Bn,Sn,Mn,Tn,Pn,An,Ln,Dn,Fn,Rn,zn,Vn,$n,Gn,Un,qn,Wn,Yn,Hn,Jn,Kn,Xn,Qn,Zn,er,tr,nr,rr,or,ir,ar,sr,ur,cr,lr,fr,dr,hr,pr,vr,gr,mr,yr,br,wr,_r,Er,kr,jr,Or,xr,Nr,Cr,Ir,Br,Sr,Mr,Tr,Pr,Ar,Lr,Dr,Fr,Rr,zr,Vr,$r,Gr,Ur,qr,Wr,Yr,Hr,Jr,Kr,Xr,Qr,Zr,eo,to,no,ro,oo,io,ao,so,uo,co,lo,fo,ho;function po(){if(gn)return vn;return gn=1,vn=function(e,t){return e===t||e!=e&&t!=t}}function vo(){if(yn)return mn;yn=1;var e=po();return mn=function(t,n){for(var r=t.length;r--;)if(e(t[r][0],n))return r;return-1}}function go(){if(Cn)return Nn;Cn=1;var e=pn?hn:(pn=1,hn=function(){this.__data__=[],this.size=0}),t=function(){if(wn)return bn;wn=1;var e=vo(),t=Array.prototype.splice;return bn=function(n){var r=this.__data__,o=e(r,n);return!(o<0||(o==r.length-1?r.pop():t.call(r,o,1),--this.size,0))}}(),n=function(){if(En)return _n;En=1;var e=vo();return _n=function(t){var n=this.__data__,r=e(n,t);return r<0?void 0:n[r][1]}}(),r=function(){if(jn)return kn;jn=1;var e=vo();return kn=function(t){return e(this.__data__,t)>-1}}(),o=function(){if(xn)return On;xn=1;var e=vo();return On=function(t,n){var r=this.__data__,o=e(r,t);return o<0?(++this.size,r.push([t,n])):r[o][1]=n,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Nn=i}function mo(){if(Fn)return Dn;Fn=1;var e="object"==typeof Ct&&Ct&&Ct.Object===Object&&Ct;return Dn=e}function yo(){if(zn)return Rn;zn=1;var e=mo(),t="object"==typeof self&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Rn=n}function bo(){if($n)return Vn;$n=1;var e=yo().Symbol;return Vn=e}function wo(){if(Hn)return Yn;Hn=1;var e=bo(),t=function(){if(Un)return Gn;Un=1;var e=bo(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;return Gn=function(e){var t=n.call(e,o),i=e[o];try{e[o]=void 0;var a=!0}catch(u){}var s=r.call(e);return a&&(t?e[o]=i:delete e[o]),s}}(),n=function(){if(Wn)return qn;Wn=1;var e=Object.prototype.toString;return qn=function(t){return e.call(t)}}(),r=e?e.toStringTag:void 0;return Yn=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):n(e)}}function _o(){if(Kn)return Jn;return Kn=1,Jn=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function Eo(){if(Qn)return Xn;Qn=1;var e=wo(),t=_o();return Xn=function(n){if(!t(n))return!1;var r=e(n);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function ko(){if(nr)return tr;nr=1;var e,t=function(){if(er)return Zn;er=1;var e=yo()["__core-js_shared__"];return Zn=e}(),n=(e=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";return tr=function(e){return!!n&&n in e}}function jo(){if(or)return rr;or=1;var e=Function.prototype.toString;return rr=function(t){if(null!=t){try{return e.call(t)}catch(n){}try{return t+""}catch(n){}}return""}}function Oo(){if(lr)return cr;lr=1;var e=function(){if(ar)return ir;ar=1;var e=Eo(),t=ko(),n=_o(),r=jo(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,c=RegExp("^"+s.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return ir=function(i){return!(!n(i)||t(i))&&(e(i)?c:o).test(r(i))}}(),t=ur?sr:(ur=1,sr=function(e,t){return null==e?void 0:e[t]});return cr=function(n,r){var o=t(n,r);return e(o)?o:void 0}}function xo(){if(dr)return fr;dr=1;var e=Oo()(yo(),"Map");return fr=e}function No(){if(pr)return hr;pr=1;var e=Oo()(Object,"create");return hr=e}function Co(){if(xr)return Or;xr=1;var e=function(){if(gr)return vr;gr=1;var e=No();return vr=function(){this.__data__=e?e(null):{},this.size=0}}(),t=yr?mr:(yr=1,mr=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}),n=function(){if(wr)return br;wr=1;var e=No(),t=Object.prototype.hasOwnProperty;return br=function(n){var r=this.__data__;if(e){var o=r[n];return"__lodash_hash_undefined__"===o?void 0:o}return t.call(r,n)?r[n]:void 0}}(),r=function(){if(Er)return _r;Er=1;var e=No(),t=Object.prototype.hasOwnProperty;return _r=function(n){var r=this.__data__;return e?void 0!==r[n]:t.call(r,n)}}(),o=function(){if(jr)return kr;jr=1;var e=No();return kr=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=e&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Or=i}function Io(){if(Mr)return Sr;Mr=1;var e=Br?Ir:(Br=1,Ir=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e});return Sr=function(t,n){var r=t.__data__;return e(n)?r["string"==typeof n?"string":"hash"]:r.map}}function Bo(){if($r)return Vr;$r=1;var e=function(){if(Cr)return Nr;Cr=1;var e=Co(),t=go(),n=xo();return Nr=function(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}}(),t=function(){if(Pr)return Tr;Pr=1;var e=Io();return Tr=function(t){var n=e(this,t).delete(t);return this.size-=n?1:0,n}}(),n=function(){if(Lr)return Ar;Lr=1;var e=Io();return Ar=function(t){return e(this,t).get(t)}}(),r=function(){if(Fr)return Dr;Fr=1;var e=Io();return Dr=function(t){return e(this,t).has(t)}}(),o=function(){if(zr)return Rr;zr=1;var e=Io();return Rr=function(t,n){var r=e(this,t),o=r.size;return r.set(t,n),this.size+=r.size==o?0:1,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Vr=i}function So(){if(Wr)return qr;Wr=1;var e=go(),t=function(){if(Bn)return In;Bn=1;var e=go();return In=function(){this.__data__=new e,this.size=0}}(),n=Mn?Sn:(Mn=1,Sn=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}),r=Pn?Tn:(Pn=1,Tn=function(e){return this.__data__.get(e)}),o=Ln?An:(Ln=1,An=function(e){return this.__data__.has(e)}),i=function(){if(Ur)return Gr;Ur=1;var e=go(),t=xo(),n=Bo();return Gr=function(r,o){var i=this.__data__;if(i instanceof e){var a=i.__data__;if(!t||a.length<199)return a.push([r,o]),this.size=++i.size,this;i=this.__data__=new n(a)}return i.set(r,o),this.size=i.size,this}}();function a(t){var n=this.__data__=new e(t);this.size=n.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,qr=a}function Mo(){if(Hr)return Yr;return Hr=1,Yr=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function To(){if(Kr)return Jr;Kr=1;var e=Oo(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(n){}}();return Jr=t}function Po(){if(Qr)return Xr;Qr=1;var e=To();return Xr=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function Ao(){if(eo)return Zr;eo=1;var e=Po(),t=po(),n=Object.prototype.hasOwnProperty;return Zr=function(r,o,i){var a=r[o];n.call(r,o)&&t(a,i)&&(void 0!==i||o in r)||e(r,o,i)}}function Lo(){if(no)return to;no=1;var e=Ao(),t=Po();return to=function(n,r,o,i){var a=!o;o||(o={});for(var s=-1,u=r.length;++s<u;){var c=r[s],l=i?i(o[c],n[c],c,o,n):void 0;void 0===l&&(l=n[c]),a?t(o,c,l):e(o,c,l)}return o}}function Do(){if(ao)return io;return ao=1,io=function(e){return null!=e&&"object"==typeof e}}function Fo(){if(lo)return co;lo=1;var e=function(){if(uo)return so;uo=1;var e=wo(),t=Do();return so=function(n){return t(n)&&"[object Arguments]"==e(n)}}(),t=Do(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return co=i}function Ro(){if(ho)return fo;ho=1;var e=Array.isArray;return fo=e}var zo,Vo,$o,Go,Uo,qo,Wo,Yo,Ho,Jo,Ko,Xo={exports:{}};function Qo(){return $o||($o=1,e=Xo,t=Xo.exports,n=yo(),r=Vo?zo:(Vo=1,zo=function(){return!1}),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r,e.exports=s),Xo.exports;var e,t,n,r,o,i,a,s}function Zo(){if(Uo)return Go;Uo=1;var e=/^(?:0|[1-9]\d*)$/;return Go=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function ei(){if(Wo)return qo;Wo=1;return qo=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function ti(){if(Ko)return Jo;return Ko=1,Jo=function(e){return function(t){return e(t)}}}var ni,ri,oi,ii,ai,si,ui,ci,li,fi,di,hi,pi,vi,gi,mi,yi,bi,wi,_i,Ei,ki,ji,Oi,xi,Ni,Ci,Ii={exports:{}};function Bi(){return ni||(ni=1,e=Ii,t=Ii.exports,n=mo(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(t){}}(),e.exports=a),Ii.exports;var e,t,n,r,o,i,a}function Si(){if(oi)return ri;oi=1;var e=function(){if(Ho)return Yo;Ho=1;var e=wo(),t=ei(),n=Do(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Yo=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}(),t=ti(),n=Bi(),r=n&&n.isTypedArray,o=r?t(r):e;return ri=o}function Mi(){if(ai)return ii;ai=1;var e=oo?ro:(oo=1,ro=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}),t=Fo(),n=Ro(),r=Qo(),o=Zo(),i=Si(),a=Object.prototype.hasOwnProperty;return ii=function(s,u){var c=n(s),l=!c&&t(s),f=!c&&!l&&r(s),d=!c&&!l&&!f&&i(s),h=c||l||f||d,p=h?e(s.length,String):[],v=p.length;for(var g in s)!u&&!a.call(s,g)||h&&("length"==g||f&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,v))||p.push(g);return p}}function Ti(){if(ui)return si;ui=1;var e=Object.prototype;return si=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function Pi(){if(li)return ci;return li=1,ci=function(e,t){return function(n){return e(t(n))}}}function Ai(){if(pi)return hi;pi=1;var e=Ti(),t=function(){if(di)return fi;di=1;var e=Pi()(Object.keys,Object);return fi=e}(),n=Object.prototype.hasOwnProperty;return hi=function(r){if(!e(r))return t(r);var o=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&o.push(i);return o}}function Li(){if(gi)return vi;gi=1;var e=Eo(),t=ei();return vi=function(n){return null!=n&&t(n.length)&&!e(n)}}function Di(){if(yi)return mi;yi=1;var e=Mi(),t=Ai(),n=Li();return mi=function(r){return n(r)?e(r):t(r)}}function Fi(){if(ji)return ki;ji=1;var e=_o(),t=Ti(),n=Ei?_i:(Ei=1,_i=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}),r=Object.prototype.hasOwnProperty;return ki=function(o){if(!e(o))return n(o);var i=t(o),a=[];for(var s in o)("constructor"!=s||!i&&r.call(o,s))&&a.push(s);return a}}function Ri(){if(xi)return Oi;xi=1;var e=Mi(),t=Fi(),n=Li();return Oi=function(r){return n(r)?e(r,!0):t(r)}}var zi,Vi,$i,Gi,Ui,qi,Wi,Yi,Hi,Ji,Ki,Xi,Qi,Zi,ea,ta,na,ra,oa,ia,aa,sa,ua,ca,la,fa,da,ha,pa,va,ga,ma,ya,ba,wa,_a,Ea,ka,ja,Oa,xa,Na,Ca,Ia,Ba,Sa,Ma,Ta,Pa,Aa,La,Da,Fa,Ra,za,Va,$a,Ga,Ua,qa,Wa,Ya,Ha,Ja,Ka,Xa,Qa,Za,es,ts,ns,rs,os,is,as,ss,us,cs,ls,fs,ds,hs,ps,vs,gs,ms,ys,bs,ws,_s,Es,ks,js,Os,xs,Ns,Cs,Is,Bs,Ss,Ms,Ts,Ps,As,Ls,Ds,Fs,Rs,zs,Vs,$s,Gs,Us,qs,Ws,Ys,Hs,Js,Ks,Xs,Qs,Zs,eu,tu,nu,ru,ou,iu,au,su,uu,cu,lu,fu,du,hu,pu,vu,gu,mu,yu,bu,wu,_u,Eu,ku,ju,Ou,xu,Nu,Cu,Iu,Bu,Su,Mu,Tu,Pu,Au,Lu,Du,Fu,Ru,zu,Vu,$u,Gu,Uu,qu,Wu,Yu,Hu,Ju,Ku,Xu,Qu,Zu,ec,tc,nc,rc,oc,ic,ac,sc,uc,cc,lc,fc,dc,hc,pc,vc,gc,mc,yc,bc,wc,_c,Ec,kc,jc,Oc,xc,Nc,Cc,Ic,Bc,Sc,Mc,Tc,Pc,Ac,Lc,Dc,Fc,Rc,zc,Vc,$c,Gc,Uc,qc,Wc,Yc,Hc,Jc,Kc,Xc,Qc,Zc,el,tl,nl,rl,ol,il,al,sl,ul,cl,ll,fl,dl,hl,pl,vl,gl,ml,yl,bl,wl,_l,El,kl,jl,Ol,xl,Nl,Cl,Il,Bl,Sl,Ml,Tl,Pl,Al,Ll,Dl,Fl,Rl,zl,Vl,$l,Gl,Ul,ql,Wl,Yl,Hl,Jl={exports:{}};function Kl(){if(Ui)return Gi;return Ui=1,Gi=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}}function Xl(){if(Wi)return qi;return Wi=1,qi=function(){return[]}}function Ql(){if(Hi)return Yi;Hi=1;var e=Kl(),t=Xl(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Yi=r?function(t){return null==t?[]:(t=Object(t),e(r(t),function(e){return n.call(t,e)}))}:t}function Zl(){if(Qi)return Xi;return Qi=1,Xi=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function ef(){if(ea)return Zi;ea=1;var e=Pi()(Object.getPrototypeOf,Object);return Zi=e}function tf(){if(na)return ta;na=1;var e=Zl(),t=ef(),n=Ql(),r=Xl(),o=Object.getOwnPropertySymbols;return ta=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function nf(){if(aa)return ia;aa=1;var e=Zl(),t=Ro();return ia=function(n,r,o){var i=r(n);return t(n)?i:e(i,o(n))}}function rf(){if(ua)return sa;ua=1;var e=nf(),t=Ql(),n=Di();return sa=function(r){return e(r,n,t)}}function of(){if(ga)return va;ga=1;var e=Oo()(yo(),"Set");return va=e}function af(){if(wa)return ba;wa=1;var e=function(){if(da)return fa;da=1;var e=Oo()(yo(),"DataView");return fa=e}(),t=xo(),n=function(){if(pa)return ha;pa=1;var e=Oo()(yo(),"Promise");return ha=e}(),r=of(),o=function(){if(ya)return ma;ya=1;var e=Oo()(yo(),"WeakMap");return ma=e}(),i=wo(),a=jo(),s="[object Map]",u="[object Promise]",c="[object Set]",l="[object WeakMap]",f="[object DataView]",d=a(e),h=a(t),p=a(n),v=a(r),g=a(o),m=i;return(e&&m(new e(new ArrayBuffer(1)))!=f||t&&m(new t)!=s||n&&m(n.resolve())!=u||r&&m(new r)!=c||o&&m(new o)!=l)&&(m=function(e){var t=i(e),n="[object Object]"==t?e.constructor:void 0,r=n?a(n):"";if(r)switch(r){case d:return f;case h:return s;case p:return u;case v:return c;case g:return l}return t}),ba=m}function sf(){if(ja)return ka;ja=1;var e=yo().Uint8Array;return ka=e}function uf(){if(xa)return Oa;xa=1;var e=sf();return Oa=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function cf(){if(La)return Aa;La=1;var e=uf(),t=function(){if(Ca)return Na;Ca=1;var e=uf();return Na=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}(),n=function(){if(Ba)return Ia;Ba=1;var e=/\w*$/;return Ia=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}(),r=function(){if(Ma)return Sa;Ma=1;var e=bo(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return Sa=function(e){return n?Object(n.call(e)):{}}}(),o=function(){if(Pa)return Ta;Pa=1;var e=uf();return Ta=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}();return Aa=function(i,a,s){var u=i.constructor;switch(a){case"[object ArrayBuffer]":return e(i);case"[object Boolean]":case"[object Date]":return new u(+i);case"[object DataView]":return t(i,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,s);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(i);case"[object RegExp]":return n(i);case"[object Symbol]":return r(i)}}}function lf(){if(Fa)return Da;Fa=1;var e=_o(),t=Object.create;return Da=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function ff(){if(Ua)return Ga;Ua=1;var e=function(){if($a)return Va;$a=1;var e=af(),t=Do();return Va=function(n){return t(n)&&"[object Map]"==e(n)}}(),t=ti(),n=Bi(),r=n&&n.isMap,o=r?t(r):e;return Ga=o}function df(){if(Ha)return Ya;Ha=1;var e=function(){if(Wa)return qa;Wa=1;var e=af(),t=Do();return qa=function(n){return t(n)&&"[object Set]"==e(n)}}(),t=ti(),n=Bi(),r=n&&n.isSet,o=r?t(r):e;return Ya=o}function hf(){if(Ka)return Ja;Ka=1;var e,t,n,r,o,i,a,s=So(),u=Mo(),c=Ao(),l=function(){if(wi)return bi;wi=1;var e=Lo(),t=Di();return bi=function(n,r){return n&&e(r,t(r),n)}}(),f=function(){if(Ci)return Ni;Ci=1;var e=Lo(),t=Ri();return Ni=function(n,r){return n&&e(r,t(r),n)}}(),d=(zi||(zi=1,e=Jl,t=Jl.exports,n=yo(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}),Jl.exports),h=$i?Vi:($i=1,Vi=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}),p=function(){if(Ki)return Ji;Ki=1;var e=Lo(),t=Ql();return Ji=function(n,r){return e(n,t(n),r)}}(),v=function(){if(oa)return ra;oa=1;var e=Lo(),t=tf();return ra=function(n,r){return e(n,t(n),r)}}(),g=rf(),m=function(){if(la)return ca;la=1;var e=nf(),t=tf(),n=Ri();return ca=function(r){return e(r,n,t)}}(),y=af(),b=function(){if(Ea)return _a;Ea=1;var e=Object.prototype.hasOwnProperty;return _a=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}(),w=cf(),_=function(){if(za)return Ra;za=1;var e=lf(),t=ef(),n=Ti();return Ra=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}(),E=Ro(),k=Qo(),j=ff(),O=_o(),x=df(),N=Di(),C=Ri(),I="[object Arguments]",B="[object Function]",S="[object Object]",M={};return M[I]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object DataView]"]=M["[object Boolean]"]=M["[object Date]"]=M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Map]"]=M["[object Number]"]=M[S]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object Symbol]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Error]"]=M[B]=M["[object WeakMap]"]=!1,Ja=function e(t,n,r,o,i,a){var T,P=1&n,A=2&n,L=4&n;if(r&&(T=i?r(t,o,i,a):r(t)),void 0!==T)return T;if(!O(t))return t;var D=E(t);if(D){if(T=b(t),!P)return h(t,T)}else{var F=y(t),R=F==B||"[object GeneratorFunction]"==F;if(k(t))return d(t,P);if(F==S||F==I||R&&!i){if(T=A||R?{}:_(t),!P)return A?v(t,f(T,t)):p(t,l(T,t))}else{if(!M[F])return i?t:{};T=w(t,F,P)}}a||(a=new s);var z=a.get(t);if(z)return z;a.set(t,T),x(t)?t.forEach(function(o){T.add(e(o,n,r,o,t,a))}):j(t)&&t.forEach(function(o,i){T.set(i,e(o,n,r,i,t,a))});var V=D?void 0:(L?A?m:g:A?C:N)(t);return u(V||t,function(o,i){V&&(o=t[i=o]),c(T,i,e(o,n,r,i,t,a))}),T},Ja}function pf(){if(Qa)return Xa;Qa=1;var e=hf();return Xa=function(t){return e(t,4)}}function vf(){if(es)return Za;return es=1,Za=function(e){return function(){return e}}}function gf(){if(os)return rs;os=1;var e=(ns?ts:(ns=1,ts=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}))();return rs=e}function mf(){if(as)return is;as=1;var e=gf(),t=Di();return is=function(n,r){return n&&e(n,r,t)}}function yf(){if(ls)return cs;ls=1;var e=mf(),t=function(){if(us)return ss;us=1;var e=Li();return ss=function(t,n){return function(r,o){if(null==r)return r;if(!e(r))return t(r,o);for(var i=r.length,a=n?i:-1,s=Object(r);(n?a--:++a<i)&&!1!==o(s[a],a,s););return r}}}()(e);return cs=t}function bf(){if(ds)return fs;return ds=1,fs=function(e){return e}}function wf(){if(gs)return vs;gs=1;var e=Mo(),t=yf(),n=function(){if(ps)return hs;ps=1;var e=bf();return hs=function(t){return"function"==typeof t?t:e}}(),r=Ro();return vs=function(o,i){return(r(o)?e:t)(o,n(i))}}function _f(){if(xs)return Os;xs=1;var e=Bo(),t=Es?_s:(Es=1,_s=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}),n=js?ks:(js=1,ks=function(e){return this.__data__.has(e)});function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Os=r}function Ef(){if(Bs)return Is;return Bs=1,Is=function(e,t){return e.has(t)}}function kf(){if(Ms)return Ss;Ms=1;var e=_f(),t=Cs?Ns:(Cs=1,Ns=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}),n=Ef();return Ss=function(r,o,i,a,s,u){var c=1&i,l=r.length,f=o.length;if(l!=f&&!(c&&f>l))return!1;var d=u.get(r),h=u.get(o);if(d&&h)return d==o&&h==r;var p=-1,v=!0,g=2&i?new e:void 0;for(u.set(r,o),u.set(o,r);++p<l;){var m=r[p],y=o[p];if(a)var b=c?a(y,m,p,o,r,u):a(m,y,p,r,o,u);if(void 0!==b){if(b)continue;v=!1;break}if(g){if(!t(o,function(e,t){if(!n(g,t)&&(m===e||s(m,e,i,a,u)))return g.push(t)})){v=!1;break}}else if(m!==y&&!s(m,y,i,a,u)){v=!1;break}}return u.delete(r),u.delete(o),v}}function jf(){if(Ls)return As;return Ls=1,As=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}}function Of(){if(Fs)return Ds;Fs=1;var e=bo(),t=sf(),n=po(),r=kf(),o=Ps?Ts:(Ps=1,Ts=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}),i=jf(),a=e?e.prototype:void 0,s=a?a.valueOf:void 0;return Ds=function(e,a,u,c,l,f,d){switch(u){case"[object DataView]":if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=a.byteLength||!f(new t(e),new t(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+a);case"[object Error]":return e.name==a.name&&e.message==a.message;case"[object RegExp]":case"[object String]":return e==a+"";case"[object Map]":var h=o;case"[object Set]":var p=1&c;if(h||(h=i),e.size!=a.size&&!p)return!1;var v=d.get(e);if(v)return v==a;c|=2,d.set(e,a);var g=r(h(e),h(a),c,l,f,d);return d.delete(e),g;case"[object Symbol]":if(s)return s.call(e)==s.call(a)}return!1}}function xf(){if($s)return Vs;$s=1;var e=So(),t=kf(),n=Of(),r=function(){if(zs)return Rs;zs=1;var e=rf(),t=Object.prototype.hasOwnProperty;return Rs=function(n,r,o,i,a,s){var u=1&o,c=e(n),l=c.length;if(l!=e(r).length&&!u)return!1;for(var f=l;f--;){var d=c[f];if(!(u?d in r:t.call(r,d)))return!1}var h=s.get(n),p=s.get(r);if(h&&p)return h==r&&p==n;var v=!0;s.set(n,r),s.set(r,n);for(var g=u;++f<l;){var m=n[d=c[f]],y=r[d];if(i)var b=u?i(y,m,d,r,n,s):i(m,y,d,n,r,s);if(!(void 0===b?m===y||a(m,y,o,i,s):b)){v=!1;break}g||(g="constructor"==d)}if(v&&!g){var w=n.constructor,_=r.constructor;w==_||!("constructor"in n)||!("constructor"in r)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(v=!1)}return s.delete(n),s.delete(r),v}}(),o=af(),i=Ro(),a=Qo(),s=Si(),u="[object Arguments]",c="[object Array]",l="[object Object]",f=Object.prototype.hasOwnProperty;return Vs=function(d,h,p,v,g,m){var y=i(d),b=i(h),w=y?c:o(d),_=b?c:o(h),E=(w=w==u?l:w)==l,k=(_=_==u?l:_)==l,j=w==_;if(j&&a(d)){if(!a(h))return!1;y=!0,E=!1}if(j&&!E)return m||(m=new e),y||s(d)?t(d,h,p,v,g,m):n(d,h,w,p,v,g,m);if(!(1&p)){var O=E&&f.call(d,"__wrapped__"),x=k&&f.call(h,"__wrapped__");if(O||x){var N=O?d.value():d,C=x?h.value():h;return m||(m=new e),g(N,C,p,v,m)}}return!!j&&(m||(m=new e),r(d,h,p,v,g,m))}}function Nf(){if(Us)return Gs;Us=1;var e=xf(),t=Do();return Gs=function n(r,o,i,a,s){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,i,a,n,s))},Gs}function Cf(){if(Hs)return Ys;Hs=1;var e=_o();return Ys=function(t){return t==t&&!e(t)}}function If(){if(Qs)return Xs;return Qs=1,Xs=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function Bf(){if(eu)return Zs;eu=1;var e=function(){if(Ws)return qs;Ws=1;var e=So(),t=Nf();return qs=function(n,r,o,i){var a=o.length,s=a,u=!i;if(null==n)return!s;for(n=Object(n);a--;){var c=o[a];if(u&&c[2]?c[1]!==n[c[0]]:!(c[0]in n))return!1}for(;++a<s;){var l=(c=o[a])[0],f=n[l],d=c[1];if(u&&c[2]){if(void 0===f&&!(l in n))return!1}else{var h=new e;if(i)var p=i(f,d,l,n,r,h);if(!(void 0===p?t(d,f,3,i,h):p))return!1}}return!0}}(),t=function(){if(Ks)return Js;Ks=1;var e=Cf(),t=Di();return Js=function(n){for(var r=t(n),o=r.length;o--;){var i=r[o],a=n[i];r[o]=[i,a,e(a)]}return r}}(),n=If();return Zs=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function Sf(){if(nu)return tu;nu=1;var e=wo(),t=Do();return tu=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}function Mf(){if(ou)return ru;ou=1;var e=Ro(),t=Sf(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return ru=function(o,i){if(e(o))return!1;var a=typeof o;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=o&&!t(o))||(r.test(o)||!n.test(o)||null!=i&&o in Object(i))}}function Tf(){if(uu)return su;uu=1;var e=function(){if(au)return iu;au=1;var e=Bo();function t(n,r){if("function"!=typeof n||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var o=function(){var e=arguments,t=r?r.apply(this,e):e[0],i=o.cache;if(i.has(t))return i.get(t);var a=n.apply(this,e);return o.cache=i.set(t,a)||i,a};return o.cache=new(t.Cache||e),o}return t.Cache=e,iu=t}();return su=function(t){var n=e(t,function(e){return 500===r.size&&r.clear(),e}),r=n.cache;return n}}function Pf(){if(du)return fu;return du=1,fu=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}}function Af(){if(gu)return vu;gu=1;var e=function(){if(pu)return hu;pu=1;var e=bo(),t=Pf(),n=Ro(),r=Sf(),o=e?e.prototype:void 0,i=o?o.toString:void 0;return hu=function e(o){if("string"==typeof o)return o;if(n(o))return t(o,e)+"";if(r(o))return i?i.call(o):"";var a=o+"";return"0"==a&&1/o==-1/0?"-0":a},hu}();return vu=function(t){return null==t?"":e(t)}}function Lf(){if(yu)return mu;yu=1;var e=Ro(),t=Mf(),n=function(){if(lu)return cu;lu=1;var e=Tf(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(e){var r=[];return 46===e.charCodeAt(0)&&r.push(""),e.replace(t,function(e,t,o,i){r.push(o?i.replace(n,"$1"):t||e)}),r});return cu=r}(),r=Af();return mu=function(o,i){return e(o)?o:t(o,i)?[o]:n(r(o))}}function Df(){if(wu)return bu;wu=1;var e=Sf();return bu=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}}function Ff(){if(Eu)return _u;Eu=1;var e=Lf(),t=Df();return _u=function(n,r){for(var o=0,i=(r=e(r,n)).length;null!=n&&o<i;)n=n[t(r[o++])];return o&&o==i?n:void 0}}function Rf(){if(Cu)return Nu;Cu=1;var e=Lf(),t=Fo(),n=Ro(),r=Zo(),o=ei(),i=Df();return Nu=function(a,s,u){for(var c=-1,l=(s=e(s,a)).length,f=!1;++c<l;){var d=i(s[c]);if(!(f=null!=a&&u(a,d)))break;a=a[d]}return f||++c!=l?f:!!(l=null==a?0:a.length)&&o(l)&&r(d,l)&&(n(a)||t(a))}}function zf(){if(Bu)return Iu;Bu=1;var e=xu?Ou:(xu=1,Ou=function(e,t){return null!=e&&t in Object(e)}),t=Rf();return Iu=function(n,r){return null!=n&&t(n,r,e)}}function Vf(){if(Mu)return Su;Mu=1;var e=Nf(),t=function(){if(ju)return ku;ju=1;var e=Ff();return ku=function(t,n,r){var o=null==t?void 0:e(t,n);return void 0===o?r:o}}(),n=zf(),r=Mf(),o=Cf(),i=If(),a=Df();return Su=function(s,u){return r(s)&&o(u)?i(a(s),u):function(r){var o=t(r,s);return void 0===o&&o===u?n(r,s):e(u,o,3)}}}function $f(){if(Pu)return Tu;return Pu=1,Tu=function(e){return function(t){return null==t?void 0:t[e]}}}function Gf(){if(Fu)return Du;Fu=1;var e=$f(),t=function(){if(Lu)return Au;Lu=1;var e=Ff();return Au=function(t){return function(n){return e(n,t)}}}(),n=Mf(),r=Df();return Du=function(o){return n(o)?e(r(o)):t(o)}}function Uf(){if(zu)return Ru;zu=1;var e=Bf(),t=Vf(),n=bf(),r=Ro(),o=Gf();return Ru=function(i){return"function"==typeof i?i:null==i?n:"object"==typeof i?r(i)?t(i[0],i[1]):e(i):o(i)}}function qf(){if($u)return Vu;$u=1;var e=Kl(),t=function(){if(ws)return bs;ws=1;var e=yf();return bs=function(t,n){var r=[];return e(t,function(e,t,o){n(e,t,o)&&r.push(e)}),r}}(),n=Uf(),r=Ro();return Vu=function(o,i){return(r(o)?e:t)(o,n(i,3))}}function Wf(){if(Wu)return qu;Wu=1;var e=function(){if(Uu)return Gu;Uu=1;var e=Object.prototype.hasOwnProperty;return Gu=function(t,n){return null!=t&&e.call(t,n)}}(),t=Rf();return qu=function(n,r){return null!=n&&t(n,r,e)}}function Yf(){if(Hu)return Yu;Hu=1;var e=Ai(),t=af(),n=Fo(),r=Ro(),o=Li(),i=Qo(),a=Ti(),s=Si(),u=Object.prototype.hasOwnProperty;return Yu=function(c){if(null==c)return!0;if(o(c)&&(r(c)||"string"==typeof c||"function"==typeof c.splice||i(c)||s(c)||n(c)))return!c.length;var l=t(c);if("[object Map]"==l||"[object Set]"==l)return!c.size;if(a(c))return!e(c).length;for(var f in c)if(u.call(c,f))return!1;return!0}}function Hf(){if(Ku)return Ju;return Ku=1,Ju=function(e){return void 0===e}}function Jf(){if(ec)return Zu;ec=1;var e=Pf(),t=Uf(),n=function(){if(Qu)return Xu;Qu=1;var e=yf(),t=Li();return Xu=function(n,r){var o=-1,i=t(n)?Array(n.length):[];return e(n,function(e,t,n){i[++o]=r(e,t,n)}),i}}(),r=Ro();return Zu=function(o,i){return(r(o)?e:n)(o,t(i,3))}}function Kf(){if(ac)return ic;ac=1;var e=nc?tc:(nc=1,tc=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}),t=yf(),n=Uf(),r=oc?rc:(oc=1,rc=function(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}),o=Ro();return ic=function(i,a,s){var u=o(i)?e:r,c=arguments.length<3;return u(i,n(a,4),s,c,t)},ic}function Xf(){if(gc)return vc;gc=1;var e=function(){if(lc)return cc;lc=1;var e=$f()("length");return cc=e}(),t=function(){if(dc)return fc;dc=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return fc=function(t){return e.test(t)}}(),n=function(){if(pc)return hc;pc=1;var e="\\ud800-\\udfff",t="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+n+"|"+r+")?",u="[\\ufe0e\\ufe0f]?",c=u+s+"(?:\\u200d(?:"+[o,i,a].join("|")+")"+u+s+")*",l="(?:"+[o+n+"?",n,i,a,t].join("|")+")",f=RegExp(r+"(?="+r+")|"+l+c,"g");return hc=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}}();return vc=function(r){return t(r)?n(r):e(r)}}function Qf(){if(yc)return mc;yc=1;var e=Ai(),t=af(),n=Li(),r=function(){if(uc)return sc;uc=1;var e=wo(),t=Ro(),n=Do();return sc=function(r){return"string"==typeof r||!t(r)&&n(r)&&"[object String]"==e(r)}}(),o=Xf();return mc=function(i){if(null==i)return 0;if(n(i))return r(i)?o(i):i.length;var a=t(i);return"[object Map]"==a||"[object Set]"==a?i.size:e(i).length}}function Zf(){if(wc)return bc;wc=1;var e=Mo(),t=lf(),n=mf(),r=Uf(),o=ef(),i=Ro(),a=Qo(),s=Eo(),u=_o(),c=Si();return bc=function(l,f,d){var h=i(l),p=h||a(l)||c(l);if(f=r(f,4),null==d){var v=l&&l.constructor;d=p?h?new v:[]:u(l)&&s(v)?t(o(l)):{}}return(p?e:n)(l,function(e,t,n){return f(d,e,t,n)}),d}}function ed(){if(jc)return kc;jc=1;var e=Zl(),t=function(){if(Ec)return _c;Ec=1;var e=bo(),t=Fo(),n=Ro(),r=e?e.isConcatSpreadable:void 0;return _c=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}();return kc=function n(r,o,i,a,s){var u=-1,c=r.length;for(i||(i=t),s||(s=[]);++u<c;){var l=r[u];o>0&&i(l)?o>1?n(l,o-1,i,a,s):e(s,l):a||(s[s.length]=l)}return s},kc}function td(){if(Cc)return Nc;Cc=1;var e=xc?Oc:(xc=1,Oc=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}),t=Math.max;return Nc=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var i=arguments,a=-1,s=t(i.length-r,0),u=Array(s);++a<s;)u[a]=i[r+a];a=-1;for(var c=Array(r+1);++a<r;)c[a]=i[a];return c[r]=o(u),e(n,this,c)}},Nc}function nd(){if(Pc)return Tc;Pc=1;var e=function(){if(Bc)return Ic;Bc=1;var e=vf(),t=To(),n=bf();return Ic=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}(),t=function(){if(Mc)return Sc;Mc=1;var e=Date.now;return Sc=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},Sc}(),n=t(e);return Tc=n}function rd(){if(Uc)return Gc;Uc=1;var e=Fc?Dc:(Fc=1,Dc=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}),t=zc?Rc:(zc=1,Rc=function(e){return e!=e}),n=$c?Vc:($c=1,Vc=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1});return Gc=function(r,o,i){return o==o?n(r,o,i):e(r,t,i)}}function od(){if(Qc)return Xc;Qc=1;var e=of(),t=Kc?Jc:(Kc=1,Jc=function(){}),n=jf(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Xc=r}function id(){if(el)return Zc;el=1;var e=_f(),t=function(){if(Wc)return qc;Wc=1;var e=rd();return qc=function(t,n){return!(null==t||!t.length)&&e(t,n,0)>-1}}(),n=Hc?Yc:(Hc=1,Yc=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}),r=Ef(),o=od(),i=jf();return Zc=function(a,s,u){var c=-1,l=t,f=a.length,d=!0,h=[],p=h;if(u)d=!1,l=n;else if(f>=200){var v=s?null:o(a);if(v)return i(v);d=!1,l=r,p=new e}else p=s?[]:h;e:for(;++c<f;){var g=a[c],m=s?s(g):g;if(g=u||0!==g?g:0,d&&m==m){for(var y=p.length;y--;)if(p[y]===m)continue e;s&&p.push(m),h.push(g)}else l(p,m,u)||(p!==h&&p.push(m),h.push(g))}return h}}function ad(){if(ol)return rl;ol=1;var e=ed(),t=function(){if(Lc)return Ac;Lc=1;var e=bf(),t=td(),n=nd();return Ac=function(r,o){return n(t(r,o,e),r+"")}}(),n=id(),r=function(){if(nl)return tl;nl=1;var e=Li(),t=Do();return tl=function(n){return t(n)&&e(n)}}(),o=t(function(t){return n(e(t,1,r,!0))});return rl=o}function sd(){if(ul)return sl;ul=1;var e=function(){if(al)return il;al=1;var e=Pf();return il=function(t,n){return e(n,function(e){return t[e]})}}(),t=Di();return sl=function(n){return null==n?[]:e(n,t(n))}}function ud(){if(ll)return cl;var e;ll=1;try{e={clone:pf(),constant:vf(),each:ys?ms:(ys=1,ms=wf()),filter:qf(),has:Wf(),isArray:Ro(),isEmpty:Yf(),isFunction:Eo(),isUndefined:Hf(),keys:Di(),map:Jf(),reduce:Kf(),size:Qf(),transform:Zf(),union:ad(),values:sd()}}catch(t){}return e||(e=window._),cl=e}function cd(){if(dl)return fl;dl=1;var e=ud();fl=n;var t="\0";function n(n){this._isDirected=!e.has(n,"directed")||n.directed,this._isMultigraph=!!e.has(n,"multigraph")&&n.multigraph,this._isCompound=!!e.has(n,"compound")&&n.compound,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[t]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function r(e,t){e[t]?e[t]++:e[t]=1}function o(e,t){--e[t]||delete e[t]}function i(t,n,r,o){var i=""+n,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+""+a+""+(e.isUndefined(o)?"\0":o)}function a(e,t){return i(e,t.v,t.w,t.name)}return n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(e){return this._label=e,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(t){return e.isFunction(t)||(t=e.constant(t)),this._defaultNodeLabelFn=t,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return e.keys(this._nodes)},n.prototype.sources=function(){var t=this;return e.filter(this.nodes(),function(n){return e.isEmpty(t._in[n])})},n.prototype.sinks=function(){var t=this;return e.filter(this.nodes(),function(n){return e.isEmpty(t._out[n])})},n.prototype.setNodes=function(t,n){var r=arguments,o=this;return e.each(t,function(e){r.length>1?o.setNode(e,n):o.setNode(e)}),this},n.prototype.setNode=function(n,r){return e.has(this._nodes,n)?(arguments.length>1&&(this._nodes[n]=r),this):(this._nodes[n]=arguments.length>1?r:this._defaultNodeLabelFn(n),this._isCompound&&(this._parent[n]=t,this._children[n]={},this._children[t][n]=!0),this._in[n]={},this._preds[n]={},this._out[n]={},this._sucs[n]={},++this._nodeCount,this)},n.prototype.node=function(e){return this._nodes[e]},n.prototype.hasNode=function(t){return e.has(this._nodes,t)},n.prototype.removeNode=function(t){var n=this;if(e.has(this._nodes,t)){var r=function(e){n.removeEdge(n._edgeObjs[e])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],e.each(this.children(t),function(e){n.setParent(e)}),delete this._children[t]),e.each(e.keys(this._in[t]),r),delete this._in[t],delete this._preds[t],e.each(e.keys(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},n.prototype.setParent=function(n,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(r))r=t;else{for(var o=r+="";!e.isUndefined(o);o=this.parent(o))if(o===n)throw new Error("Setting "+r+" as parent of "+n+" would create a cycle");this.setNode(r)}return this.setNode(n),this._removeFromParentsChildList(n),this._parent[n]=r,this._children[r][n]=!0,this},n.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},n.prototype.parent=function(e){if(this._isCompound){var n=this._parent[e];if(n!==t)return n}},n.prototype.children=function(n){if(e.isUndefined(n)&&(n=t),this._isCompound){var r=this._children[n];if(r)return e.keys(r)}else{if(n===t)return this.nodes();if(this.hasNode(n))return[]}},n.prototype.predecessors=function(t){var n=this._preds[t];if(n)return e.keys(n)},n.prototype.successors=function(t){var n=this._sucs[t];if(n)return e.keys(n)},n.prototype.neighbors=function(t){var n=this.predecessors(t);if(n)return e.union(n,this.successors(t))},n.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},n.prototype.filterNodes=function(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;e.each(this._nodes,function(e,r){t(r)&&n.setNode(r,e)}),e.each(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,r.edge(e))});var o={};function i(e){var t=r.parent(e);return void 0===t||n.hasNode(t)?(o[e]=t,t):t in o?o[t]:i(t)}return this._isCompound&&e.each(n.nodes(),function(e){n.setParent(e,i(e))}),n},n.prototype.setDefaultEdgeLabel=function(t){return e.isFunction(t)||(t=e.constant(t)),this._defaultEdgeLabelFn=t,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return e.values(this._edgeObjs)},n.prototype.setPath=function(t,n){var r=this,o=arguments;return e.reduce(t,function(e,t){return o.length>1?r.setEdge(e,t,n):r.setEdge(e,t),t}),this},n.prototype.setEdge=function(){var t,n,o,a,s=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(t=u.v,n=u.w,o=u.name,2===arguments.length&&(a=arguments[1],s=!0)):(t=u,n=arguments[1],o=arguments[3],arguments.length>2&&(a=arguments[2],s=!0)),t=""+t,n=""+n,e.isUndefined(o)||(o=""+o);var c=i(this._isDirected,t,n,o);if(e.has(this._edgeLabels,c))return s&&(this._edgeLabels[c]=a),this;if(!e.isUndefined(o)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[c]=s?a:this._defaultEdgeLabelFn(t,n,o);var l=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};r&&(s.name=r);return s}(this._isDirected,t,n,o);return t=l.v,n=l.w,Object.freeze(l),this._edgeObjs[c]=l,r(this._preds[n],t),r(this._sucs[t],n),this._in[n][c]=l,this._out[t][c]=l,this._edgeCount++,this},n.prototype.edge=function(e,t,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):i(this._isDirected,e,t,n);return this._edgeLabels[r]},n.prototype.hasEdge=function(t,n,r){var o=1===arguments.length?a(this._isDirected,arguments[0]):i(this._isDirected,t,n,r);return e.has(this._edgeLabels,o)},n.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):i(this._isDirected,e,t,n),s=this._edgeObjs[r];return s&&(e=s.v,t=s.w,delete this._edgeLabels[r],delete this._edgeObjs[r],o(this._preds[t],e),o(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},n.prototype.inEdges=function(t,n){var r=this._in[t];if(r){var o=e.values(r);return n?e.filter(o,function(e){return e.v===n}):o}},n.prototype.outEdges=function(t,n){var r=this._out[t];if(r){var o=e.values(r);return n?e.filter(o,function(e){return e.w===n}):o}},n.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))},fl}function ld(){if(yl)return ml;yl=1;var e=ud(),t=cd();function n(t){return e.map(t.nodes(),function(n){var r=t.node(n),o=t.parent(n),i={v:n};return e.isUndefined(r)||(i.value=r),e.isUndefined(o)||(i.parent=o),i})}function r(t){return e.map(t.edges(),function(n){var r=t.edge(n),o={v:n.v,w:n.w};return e.isUndefined(n.name)||(o.name=n.name),e.isUndefined(r)||(o.value=r),o})}return ml={write:function(t){var o={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:n(t),edges:r(t)};e.isUndefined(t.graph())||(o.value=e.clone(t.graph()));return o},read:function(n){var r=new t(n.options).setGraph(n.value);return e.each(n.nodes,function(e){r.setNode(e.v,e.value),e.parent&&r.setParent(e.v,e.parent)}),e.each(n.edges,function(e){r.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),r}}}function fd(){if(wl)return bl;wl=1;var e=ud();return bl=function(t){var n,r={},o=[];function i(o){e.has(r,o)||(r[o]=!0,n.push(o),e.each(t.successors(o),i),e.each(t.predecessors(o),i))}return e.each(t.nodes(),function(e){n=[],i(e),n.length&&o.push(n)}),o}}function dd(){if(El)return _l;El=1;var e=ud();function t(){this._arr=[],this._keyIndices={}}return _l=t,t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(e){return e.key})},t.prototype.has=function(t){return e.has(this._keyIndices,t)},t.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},t.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(t,n){var r=this._keyIndices;if(t=String(t),!e.has(r,t)){var o=this._arr,i=o.length;return r[t]=i,o.push({key:t,priority:n}),this._decrease(i),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},t.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},t.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},t.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},t.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t},_l}function hd(){if(jl)return kl;jl=1;var e=ud(),t=dd();kl=function(e,r,o,i){return function(e,n,r,o){var i,a,s={},u=new t,c=function(e){var t=e.v!==i?e.v:e.w,n=s[t],o=r(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<n.distance&&(n.distance=c,n.predecessor=i,u.decrease(t,c))};e.nodes().forEach(function(e){var t=e===n?0:Number.POSITIVE_INFINITY;s[e]={distance:t},u.add(e,t)});for(;u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)o(i).forEach(c);return s}(e,String(r),o||n,i||function(t){return e.outEdges(t)})};var n=e.constant(1);return kl}function pd(){if(xl)return Ol;xl=1;var e=hd(),t=ud();return Ol=function(n,r,o){return t.transform(n.nodes(),function(t,i){t[i]=e(n,i,r,o)},{})}}function vd(){if(Cl)return Nl;Cl=1;var e=ud();return Nl=function(t){var n=0,r=[],o={},i=[];function a(s){var u=o[s]={onStack:!0,lowlink:n,index:n++};if(r.push(s),t.successors(s).forEach(function(t){e.has(o,t)?o[t].onStack&&(u.lowlink=Math.min(u.lowlink,o[t].index)):(a(t),u.lowlink=Math.min(u.lowlink,o[t].lowlink))}),u.lowlink===u.index){var c,l=[];do{c=r.pop(),o[c].onStack=!1,l.push(c)}while(s!==c);i.push(l)}}return t.nodes().forEach(function(t){e.has(o,t)||a(t)}),i}}function gd(){if(Bl)return Il;Bl=1;var e=ud(),t=vd();return Il=function(n){return e.filter(t(n),function(e){return e.length>1||1===e.length&&n.hasEdge(e[0],e[0])})}}function md(){if(Ml)return Sl;Ml=1;var e=ud();Sl=function(e,n,r){return function(e,t,n){var r={},o=e.nodes();return o.forEach(function(e){r[e]={},r[e][e]={distance:0},o.forEach(function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}})}),o.forEach(function(e){var t=r[e];o.forEach(function(n){var i=r[n];o.forEach(function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)})})}),r}(e,n||t,r||function(t){return e.outEdges(t)})};var t=e.constant(1);return Sl}function yd(){if(Pl)return Tl;Pl=1;var e=ud();function t(t){var r={},o={},i=[];if(e.each(t.sinks(),function a(s){if(e.has(o,s))throw new n;e.has(r,s)||(o[s]=!0,r[s]=!0,e.each(t.predecessors(s),a),delete o[s],i.push(s))}),e.size(r)!==t.nodeCount())throw new n;return i}function n(){}return Tl=t,t.CycleException=n,n.prototype=new Error,Tl}function bd(){if(Ll)return Al;Ll=1;var e=yd();return Al=function(t){try{e(t)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}}function wd(){if(Fl)return Dl;Fl=1;var e=ud();function t(n,r,o,i,a,s){e.has(i,r)||(i[r]=!0,o||s.push(r),e.each(a(r),function(e){t(n,e,o,i,a,s)}),o&&s.push(r))}return Dl=function(n,r,o){e.isArray(r)||(r=[r]);var i=(n.isDirected()?n.successors:n.neighbors).bind(n),a=[],s={};return e.each(r,function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);t(n,e,"post"===o,s,i,a)}),a}}function _d(){if(zl)return Rl;zl=1;var e=wd();return Rl=function(t,n){return e(t,n,"post")}}function Ed(){if($l)return Vl;$l=1;var e=wd();return Vl=function(t,n){return e(t,n,"pre")}}function kd(){if(Ul)return Gl;Ul=1;var e=ud(),t=cd(),n=dd();return Gl=function(r,o){var i,a=new t,s={},u=new n;function c(e){var t=e.v===i?e.w:e.v,n=u.priority(t);if(void 0!==n){var r=o(e);r<n&&(s[t]=i,u.decrease(t,r))}}if(0===r.nodeCount())return a;e.each(r.nodes(),function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)}),u.decrease(r.nodes()[0],0);var l=!1;for(;u.size()>0;){if(i=u.removeMin(),e.has(s,i))a.setEdge(i,s[i]);else{if(l)throw new Error("Input graph is not connected: "+r);l=!0}r.nodeEdges(i).forEach(c)}return a}}var jd=function(){if(Hl)return Yl;Hl=1;var e=gl?vl:(gl=1,vl={Graph:cd(),version:pl?hl:(pl=1,hl="2.1.8")});return Yl={Graph:e.Graph,json:ld(),alg:Wl?ql:(Wl=1,ql={components:fd(),dijkstra:hd(),dijkstraAll:pd(),findCycles:gd(),floydWarshall:md(),isAcyclic:bd(),postorder:_d(),preorder:Ed(),prim:kd(),tarjan:vd(),topsort:yd()}),version:e.version}}();const Od={};function xd(t){if(Od[t])return Od[t];const n=e.inject(t,null);if(!n){console.warn(`[whitelabel-modules] Missing injected composable: ${t}. Will retry on next call.`);const n=(...n)=>{const r=e.inject(t,null);if(!r)throw new Error(`[whitelabel-modules] ${t} still not provided.`);return Od[t]=r,r(...n)};return Od[t]=n,n}return Od[t]=n,n}exports.ProcessStatus=V,exports.Toaster_default=P,exports.getDefaultExportFromCjs=It,exports.interpolateTemplateFromVariableContext=A,exports.useConfirmation=()=>xd("cms-useConfirmation")(),exports.useCustomDialog=()=>xd("cms-useCustomDialog")(),exports.useFirebaseIntegration=e=>xd("cms-useFirebaseIntegration")(e),exports.useFlowBuilder=()=>xd("cms-useFlowBuilder")(),exports.useFormBuilder=()=>xd("cms-useFormBuilder")(),exports.useIntegrationActionBuilder=()=>xd("cms-useIntegrationActionBuilder")(),exports.useIntegrationActions=e=>xd("cms-useIntegrationActions")(e),exports.useIntegrations=()=>xd("cms-useIntegrations")(),exports.useLayout=function(){const{findNode:n}=t.useVueFlow(),r=e.ref(new jd.Graph({directed:!0}));return{graph:r,layout:function(e,o,i="TB"){const a=new dn.graphlib.Graph;a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:i});const s="LR"===i;for(const t of e){const e=n(t.id);a.setNode(t.id,{width:e?.dimensions.width||150,height:e?.dimensions.height||50})}for(const t of o)a.setEdge(t.source,t.target);dn.layout(a);const u=new jd.Graph({directed:!0});for(const t of e)u.setNode(t.id);for(const t of o)u.setEdge(t.source,t.target);return r.value=u,e.map(e=>{const n=a.node(e.id);return{...e,targetPosition:s?t.Position.Left:t.Position.Top,sourcePosition:s?t.Position.Right:t.Position.Bottom,position:{x:n.x,y:n.y}}})}}},exports.useLogs=()=>xd("cms-useLogs")(),exports.useMailer=e=>xd("cms-useMailer")(e),exports.useMediaLibrary=()=>xd("cms-useMediaLibrary")(),exports.useModule=()=>xd("cms-useModule")(),exports.useModuleBreadcrumbs=e=>xd("cms-useModuleBreadcrumbs")(e),exports.useModuleOverlay=()=>xd("cms-useModuleOverlay")(),exports.useModulePermissions=()=>xd("cms-useModulePermissions")(),exports.useModuleRoute=()=>xd("cms-useModuleRoute")(),exports.useModuleStorage=()=>xd("cms-useModuleStorage")(),exports.useOverlayStack=()=>xd("cms-useOverlayStack")(),exports.useProjectService=()=>xd("cms-useProjectService")(),exports.useProjectSettings=()=>xd("cms-useProjectSettings")(),exports.useQueryBuilder=()=>xd("cms-useQueryBuilder")(),exports.useRoute=()=>xd("cms-useRoute")(),exports.useRouter=()=>xd("cms-useRouter")(),exports.useRunProcess=function({graph:n,cancelOnError:r=!0,nodes:o=[],edges:i=[],variables:a=[],computedVariables:s=[],onFinish:u,flowBuilderExtensions:c=[]}){const{updateNodeData:l,getConnectedEdges:f,findNode:d}=t.useVueFlow(),h=new Map,p=new Map(o.map(e=>[e.id,e])),v=e.toRef(()=>e.toValue(n)),g=e.ref(!1),m=new Map,y=new Set,b=new Set,w=e.ref(a?JSON.parse(JSON.stringify(a.map(e=>({...e,value:Object.keys(e).includes("defaultValue")?e.defaultValue:e.value??null})))):[]);async function _(t,n=!1){if(n&&"START"!==t||y.has(t))return;b.add(t);const o=f(t).filter(e=>e.target===t);if(await Promise.all(o.map(e=>async function(e){return new Promise(t=>{const n=setInterval(()=>{e()&&(clearInterval(n),t(!0))},100)})}(()=>!e.data?.isAnimating))),b.clear(),g.value){y.add(t),O(t,V.RUNNING);try{const e=v.value.predecessors(t)||[],n=Object.assign({},...e.map(e=>h.get(e)??{})),r={...Object.fromEntries(w.value.map(e=>[e.name,e.value])),...n},o=p?.size>0?p.get(t):d(t),a=function(e){const t={};return e.forEach(e=>{e.type?.value&&"function"==typeof e.processFunction&&(t[e.type.value]=e.processFunction)}),t}(c);console.log("processFunctions from extensions",a,"from",c);const s={...R,...a}[o.data.taskType??o.type];console.log("Running task:",o.data.taskType,s,c);const l=s?await s(r,{node:o,graph:v.value,onFinish:u,localVariables:w,flowBuilderExtensions:c}):{};h.set(t,l?JSON.parse(JSON.stringify(l)):{}),O(t,V.FINISHED);const f=i.filter(e=>e.source===t),g=f.some(e=>e.sourceHandle);for(const t of f){const{source:e,sourceHandle:n}=t,r=p.get(e).type,o="start"===r||"confirm"===r&&"success"===n&&!0===l.confirmed||"confirm"===r&&"error"===n&&!1===l.confirmed||"integration-action"===r&&"success"===n&&!0===l.result?.success||"integration-action"===r&&"error"===n&&!1===l.result?.success||"api-request"===r&&"success"===n&&!0===l.result?.success||"api-request"===r&&"error"===n&&!1===l.result?.success||"conditional"===r&&"success"===n&&!0===l.conditionMet||"conditional"===r&&"error"===n&&!1===l.conditionMet||!["confirm","integration-action","api-request","conditional"].includes(r)&&"success"===n;console.log("should run",o,r,n,l,g),o&&await _(t.target)}}catch(a){console.error(`Error in node ${t}:`,a),O(t,V.ERROR),e.toValue(r)&&await k(t)}}}function E(e){j();for(const t of e)O(t.id,null)}async function k(e){const t=v.value.successors(e)||[];for(const n of t)O(n,V.SKIPPED),await k(n)}function j(){g.value=!1,y.clear(),m.clear()}function O(e,t){l(e,{status:t})}return{run:async function(e){if(g.value)return;E(e),g.value=!0;const t=e.filter(e=>0===v.value.predecessors(e.id)?.length);await Promise.all(t.map(e=>_(e.id,!0))),j()},stop:async function(){g.value=!1;for(const e of b)clearTimeout(m.get(e)),m.delete(e),O(e,V.CANCELLED),await k(e);for(const[e,t]of m)clearTimeout(t),m.delete(e),O(e,V.CANCELLED),await k(e);y.clear(),b.clear()},reset:E,isRunning:g}},exports.useUtilsService=()=>xd("cms-useUtilsService")();
|
|
1
|
+
"use strict";const e=require("vue"),t=require("@vue-flow/core"),n=require("nuxt/app");let r=1;const o=new class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:t,...n}=e,o="number"==typeof e.id||e.id&&e.id?.length>0?e.id:r++,i=this.toasts.find(e=>e.id===o),a=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(n=>n.id===o?(this.publish({...n,...e,id:o,title:t}),{...n,...e,id:o,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:o}),o};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:"default"});error=(e,t)=>this.create({...t,type:"error",message:e});success=(e,t)=>this.create({...t,type:"success",message:e});info=(e,t)=>this.create({...t,type:"info",message:e});warning=(e,t)=>this.create({...t,type:"warning",message:e});loading=(e,t)=>this.create({...t,type:"loading",message:e});promise=(t,n)=>{if(!n)return;let r;void 0!==n.loading&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:"function"!=typeof n.description?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a,s=void 0!==r;const u=o.then(async t=>{a=["resolve",t];if(e.isVNode(t))s=!1,this.create({id:r,type:"default",message:t});else if(i(t)&&!t.ok){s=!1;const o="function"==typeof n.error?await n.error(`HTTP error! status: ${t.status}`):n.error,i="function"==typeof n.description?await n.description(`HTTP error! status: ${t.status}`):n.description,a="object"==typeof o&&!e.isVNode(o)?o:{message:o||"",id:r||""};this.create({id:r,type:"error",description:i,...a})}else if(t instanceof Error){s=!1;const o="function"==typeof n.error?await n.error(t):n.error,i="function"==typeof n.description?await n.description(t):n.description,a="object"==typeof o&&!e.isVNode(o)?o:{message:o||"",id:r||""};this.create({id:r,type:"error",description:i,...a})}else if(void 0!==n.success){s=!1;const o="function"==typeof n.success?await n.success(t):n.success,i="function"==typeof n.description?await n.description(t):n.description,a="object"==typeof o&&!e.isVNode(o)?o:{message:o||"",id:r||""};this.create({id:r,type:"success",description:i,...a})}}).catch(async t=>{if(a=["reject",t],void 0!==n.error){s=!1;const o="function"==typeof n.error?await n.error(t):n.error,i="function"==typeof n.description?await n.description(t):n.description,a="object"==typeof o&&!e.isVNode(o)?o:{message:o||"",id:r||""};this.create({id:r,type:"error",description:i,...a})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally?.()}),c=()=>new Promise((e,t)=>u.then(()=>"reject"===a[0]?t(a[1]):e(a[1])).catch(t));return"string"!=typeof r&&"number"!=typeof r?{unwrap:c}:Object.assign(r,{unwrap:c})};custom=(e,t)=>{const n=t?.id||r++,o=this.toasts.find(e=>e.id===n),i=void 0===t?.dismissible||t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),o?this.toasts=this.toasts.map(r=>r.id===n?(this.publish({...r,component:e,dismissible:i,id:n,...t}),{...r,component:e,dismissible:i,id:n,...t}):r):this.addToast({component:e,dismissible:i,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};const i=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,a=function(e,t){const n=t?.id||r++;return o.create({message:e,id:n,type:"default",...t}),n},s=Object.assign(a,{success:o.success,info:o.info,warning:o.warning,error:o.error,custom:o.custom,message:o.message,promise:o.promise,dismiss:o.dismiss,loading:o.loading},{getHistory:()=>o.toasts,getToasts:()=>o.getActiveToasts()});function u(e){return void 0!==e.label}const c="24px",l="16px";function f(...e){return e.filter(Boolean).join(" ")}function d(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,o=r?"--mobile-offset":"--offset",i=r?l:c;function a(e){["top","right","bottom","left"].forEach(t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?a(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${o}-${t}`]=i:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):a(i)}),n}const h=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded","data-testid"],p=["aria-label","data-disabled"];var v=e.defineComponent({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(t,{emit:n}){const r=t,o=n,i=e.ref(null),a=e.ref(null),s=e.ref(!1),c=e.ref(!1),l=e.ref(!1),d=e.ref(!1),v=e.ref(!1),g=e.ref(0),m=e.ref(0),y=e.ref(r.toast.duration||r.duration||4e3),b=e.ref(null),w=e.ref(null),_=e.computed(()=>0===r.index),E=e.computed(()=>r.index+1<=r.visibleToasts),k=e.computed(()=>r.toast.type),j=e.computed(()=>!1!==r.toast.dismissible),O=e.computed(()=>r.toast.class||""),x=e.computed(()=>r.descriptionClass||""),N=e.computed(()=>{const e=r.toast.position||r.position,t=r.heights.filter(t=>t.position===e).findIndex(e=>e.toastId===r.toast.id);return t>=0?t:0}),C=e.computed(()=>{const e=r.toast.position||r.position;return r.heights.filter(t=>t.position===e).reduce((e,t,n)=>n>=N.value?e:e+t.height,0)}),I=e.computed(()=>N.value*r.gap+C.value||0),B=e.computed(()=>r.toast.closeButton??r.closeButton),S=e.computed(()=>r.toast.duration||r.duration||4e3),M=e.ref(0),T=e.ref(0),P=e.ref(null),A=e.computed(()=>r.position.split("-")),L=e.computed(()=>A.value[0]),D=e.computed(()=>A.value[1]),F=e.computed(()=>"string"!=typeof r.toast.title),R=e.computed(()=>"string"!=typeof r.toast.description),{isDocumentHidden:z}=function(){const t=e.ref(!1);return e.watchEffect(()=>{const e=()=>{t.value=document.hidden};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)}),{isDocumentHidden:t}}(),V=e.computed(()=>k.value&&"loading"===k.value);function $(){c.value=!0,g.value=I.value,setTimeout(()=>{o("removeToast",r.toast)},200)}function G(){if(V.value||!j.value)return{};$(),r.toast.onDismiss?.(r.toast)}function U(e){2!==e.button&&!V.value&&j.value&&(b.value=new Date,g.value=I.value,e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(l.value=!0,P.value={x:e.clientX,y:e.clientY}))}function q(){if(d.value||!j.value)return;P.value=null;const e=Number(w.value?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),t=Number(w.value?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),n=(new Date).getTime()-(b.value?.getTime()||0),o="x"===i.value?e:t,s=Math.abs(o)/n;if(Math.abs(o)>=45||s>.11)return g.value=I.value,r.toast.onDismiss?.(r.toast),"x"===i.value?a.value=e>0?"right":"left":a.value=t>0?"down":"up",$(),void(d.value=!0);w.value?.style.setProperty("--swipe-amount-x","0px"),w.value?.style.setProperty("--swipe-amount-y","0px"),v.value=!1,l.value=!1,i.value=null}function W(e){if(!P.value||!j.value)return;if(window?.getSelection()?.toString()?.length??!1)return;const t=e.clientY-P.value.y,n=e.clientX-P.value.x,o=r.swipeDirections??function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(r.position);!i.value&&(Math.abs(n)>1||Math.abs(t)>1)&&(i.value=Math.abs(n)>Math.abs(t)?"x":"y");let a={x:0,y:0};const s=e=>1/(1.5+Math.abs(e)/20);if("y"===i.value){if(o.includes("top")||o.includes("bottom"))if(o.includes("top")&&t<0||o.includes("bottom")&&t>0)a.y=t;else{const e=t*s(t);a.y=Math.abs(e)<Math.abs(t)?e:t}}else if("x"===i.value&&(o.includes("left")||o.includes("right")))if(o.includes("left")&&n<0||o.includes("right")&&n>0)a.x=n;else{const e=n*s(n);a.x=Math.abs(e)<Math.abs(n)?e:n}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&(v.value=!0),w.value?.style.setProperty("--swipe-amount-x",`${a.x}px`),w.value?.style.setProperty("--swipe-amount-y",`${a.y}px`)}function Y(){l.value=!1,i.value=null,P.value=null}return e.onMounted(()=>{s.value=!0,y.value=S.value}),e.watchEffect(async()=>{if(!s.value||!w.value)return;await e.nextTick();const t=w.value,n=t.style.height;t.style.height="auto";const i=t.getBoundingClientRect().height;t.style.height=n,m.value=i,o("update:height",{toastId:r.toast.id,height:i,position:r.toast.position||r.position})}),e.onMounted(()=>{if(s.value=!0,!w.value)return;const e=w.value.getBoundingClientRect().height;m.value=e;const t=[{toastId:r.toast.id,height:e,position:r.toast.position},...r.heights];o("update:heights",t)}),e.onBeforeUnmount(()=>{w.value&&o("removeToast",r.toast)}),e.watchEffect(e=>{if(r.toast.promise&&"loading"===k.value||r.toast.duration===1/0||"loading"===r.toast.type)return;let t;r.expanded||r.interacting||z.value?(()=>{if(T.value<M.value){const e=(new Date).getTime()-M.value;y.value=y.value-e}T.value=(new Date).getTime()})():y.value!==1/0&&(M.value=(new Date).getTime(),t=setTimeout(()=>{r.toast.onAutoClose?.(r.toast),$()},y.value)),e(()=>{clearTimeout(t)})}),e.watch(()=>r.toast.delete,e=>{void 0!==e&&e&&($(),r.toast.onDismiss?.(r.toast))},{deep:!0}),(t,n)=>(e.openBlock(),e.createElementBlock("li",{tabindex:"0",ref_key:"toastRef",ref:w,class:e.normalizeClass(e.unref(f)(r.class,O.value,t.classes?.toast,t.toast.classes?.toast,t.classes?.[k.value],t.toast?.classes?.[k.value])),"data-sonner-toast":"","data-rich-colors":t.toast.richColors??t.defaultRichColors,"data-styled":!Boolean(t.toast.component||t.toast?.unstyled||t.unstyled),"data-mounted":s.value,"data-promise":Boolean(t.toast.promise),"data-swiped":v.value,"data-removed":c.value,"data-visible":E.value,"data-y-position":L.value,"data-x-position":D.value,"data-index":t.index,"data-front":_.value,"data-swiping":l.value,"data-dismissible":j.value,"data-type":k.value,"data-invert":t.toast.invert||t.invert,"data-swipe-out":d.value,"data-swipe-direction":a.value,"data-expanded":Boolean(t.expanded||t.expandByDefault&&s.value),"data-testid":t.toast.testId,style:e.normalizeStyle({"--index":t.index,"--toasts-before":t.index,"--z-index":t.toasts.length-t.index,"--offset":`${c.value?g.value:I.value}px`,"--initial-height":t.expandByDefault?"auto":`${m.value}px`,...t.style,...r.toast.style}),onDragend:Y,onPointerdown:U,onPointerup:q,onPointermove:W},[B.value&&!t.toast.component&&"loading"!==k.value?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":t.closeButtonAriaLabel||"Close toast","data-disabled":V.value,"data-close-button":"true",class:e.normalizeClass(e.unref(f)(t.classes?.closeButton,t.toast?.classes?.closeButton)),onClick:G},[t.icons?.close?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icons?.close),{key:0})):e.renderSlot(t.$slots,"close-icon",{key:1})],10,p)):e.createCommentVNode("v-if",!0),t.toast.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.toast.component),e.mergeProps({key:1},t.toast.componentProps,{onCloseToast:G}),null,16)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},["default"!==k.value||t.toast.icon||t.toast.promise?(e.openBlock(),e.createElementBlock("div",{key:0,"data-icon":"",class:e.normalizeClass(e.unref(f)(t.classes?.icon,t.toast?.classes?.icon))},[t.toast.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.toast.icon),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},["loading"===k.value?e.renderSlot(t.$slots,"loading-icon",{key:0}):"success"===k.value?e.renderSlot(t.$slots,"success-icon",{key:1}):"error"===k.value?e.renderSlot(t.$slots,"error-icon",{key:2}):"warning"===k.value?e.renderSlot(t.$slots,"warning-icon",{key:3}):"info"===k.value?e.renderSlot(t.$slots,"info-icon",{key:4}):e.createCommentVNode("v-if",!0)],64))],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{"data-content":"",class:e.normalizeClass(e.unref(f)(t.classes?.content,t.toast?.classes?.content))},[e.createElementVNode("div",{"data-title":"",class:e.normalizeClass(e.unref(f)(t.classes?.title,t.toast.classes?.title))},[F.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.toast.title),e.normalizeProps(e.mergeProps({key:0},t.toast.componentProps)),null,16)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.toast.title),1)],64))],2),t.toast.description?(e.openBlock(),e.createElementBlock("div",{key:0,"data-description":"",class:e.normalizeClass(e.unref(f)(t.descriptionClass,x.value,t.classes?.description,t.toast.classes?.description))},[R.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.toast.description),e.normalizeProps(e.mergeProps({key:0},t.toast.componentProps)),null,16)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.toast.description),1)],64))],2)):e.createCommentVNode("v-if",!0)],2),t.toast.cancel?(e.openBlock(),e.createElementBlock("button",{key:1,style:e.normalizeStyle(t.toast.cancelButtonStyle||t.cancelButtonStyle),class:e.normalizeClass(e.unref(f)(t.classes?.cancelButton,t.toast.classes?.cancelButton)),"data-button":"","data-cancel":"",onClick:n[0]||(n[0]=n=>{e.unref(u)(t.toast.cancel)&&j.value&&(t.toast.cancel.onClick?.(n),$())})},e.toDisplayString(e.unref(u)(t.toast.cancel)?t.toast.cancel?.label:t.toast.cancel),7)):e.createCommentVNode("v-if",!0),t.toast.action?(e.openBlock(),e.createElementBlock("button",{key:2,style:e.normalizeStyle(t.toast.actionButtonStyle||t.actionButtonStyle),class:e.normalizeClass(e.unref(f)(t.classes?.actionButton,t.toast.classes?.actionButton)),"data-button":"","data-action":"",onClick:n[1]||(n[1]=n=>{e.unref(u)(t.toast.action)&&(t.toast.action.onClick?.(n),n.defaultPrevented||$())})},e.toDisplayString(e.unref(u)(t.toast.action)?t.toast.action?.label:t.toast.action),7)):e.createCommentVNode("v-if",!0)],64))],46,h))}}),g=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};const m={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};var y=g({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("svg",m,n[0]||(n[0]=[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}]]);const b=["data-visible"],w={class:"sonner-spinner"};var _=e.defineComponent({__name:"Loader",props:{visible:{type:Boolean}},setup(t){const n=Array(12).fill(0);return(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:"sonner-loading-wrapper","data-visible":t.visible},[e.createElementVNode("div",w,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),t=>(e.openBlock(),e.createElementBlock("div",{key:`spinner-bar-${t}`,class:"sonner-loading-bar"}))),128))])],8,b))}});const E={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};var k=g({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("svg",E,n[0]||(n[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}]]);const j={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};var O=g({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("svg",j,n[0]||(n[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}]]);const x={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};var N=g({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("svg",x,n[0]||(n[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}]]);const C={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};var I=g({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("svg",C,n[0]||(n[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}]]);const B=["aria-label"],S=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position"],M="undefined"!=typeof window&&"undefined"!=typeof document;function T(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}var P=e.defineComponent({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{id:{},invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:14},visibleToasts:{default:3},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c},mobileOffset:{default:l},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(t){const n=t,r=e.useAttrs(),i=e.ref([]),a=e.computed(()=>n.id?i.value.filter(e=>e.toasterId===n.id):i.value.filter(e=>!e.toasterId));function s(e,t){return a.value.filter(n=>!n.position&&0===t||n.position===e)}const u=e.computed(()=>{const e=a.value.filter(e=>e.position).map(e=>e.position);return e.length>0?Array.from(new Set([n.position].concat(e))):[n.position]}),c=e.computed(()=>{const e={};return u.value.forEach(t=>{e[t]=i.value.filter(e=>e.position===t)}),e}),l=e.ref([]),f=e.ref({}),h=e.ref(!1);e.watchEffect(()=>{u.value.forEach(e=>{e in f.value||(f.value[e]=!1)})});const p=e.ref("system"!==n.theme?n.theme:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),g=e.ref(null),m=e.ref(null),b=e.ref(!1),w=n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function E(e){i.value.find(t=>t.id===e.id)?.delete||o.dismiss(e.id),i.value=i.value.filter(({id:t})=>t!==e.id),setTimeout(()=>{i.value.find(t=>t.id===e.id)||(l.value=l.value.filter(t=>t.toastId!==e.id))},250)}function j(e){b.value&&!e.currentTarget?.contains?.(e.relatedTarget)&&(b.value=!1,m.value&&(m.value.focus({preventScroll:!0}),m.value=null))}function x(e){e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||b.value||(b.value=!0,m.value=e.relatedTarget)}function C(e){if(e.target){if(e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible)return}h.value=!0}function P(e){const t=e.currentTarget,n=t.getAttribute("data-y-position")+"-"+t.getAttribute("data-x-position");f.value[n]=!0}function A(e){if(!h.value){const t=e.currentTarget,n=t.getAttribute("data-y-position")+"-"+t.getAttribute("data-x-position");f.value[n]=!1}}function L(){Object.keys(f.value).forEach(e=>{f.value[e]=!1})}function D(){h.value=!1}function F(e){l.value=e}function R(e){const t=l.value.findIndex(t=>t.toastId===e.toastId);if(-1!==t)l.value[t]=e;else{const t=l.value.findIndex(t=>t.position===e.position);-1!==t?l.value.splice(t,0,e):l.value.unshift(e)}}return e.watchEffect(t=>{t(o.subscribe(t=>{t.dismiss?requestAnimationFrame(()=>{i.value=i.value.map(e=>e.id===t.id?{...e,delete:!0}:e)}):e.nextTick(()=>{const e=i.value.findIndex(e=>e.id===t.id);i.value=-1!==e?[...i.value.slice(0,e),{...i.value[e],...t},...i.value.slice(e+1)]:[t,...i.value]})}))}),e.watchEffect(e=>{if("undefined"==typeof window)return;if("system"!==n.theme)return void(p.value=n.theme);const t=window.matchMedia("(prefers-color-scheme: dark)"),r=e=>{p.value=e?"dark":"light"};r(t.matches);const o=e=>{r(e.matches)};try{t.addEventListener("change",o)}catch{t.addListener(o)}e(()=>{try{t.removeEventListener("change",o)}catch{t.removeListener(o)}})}),e.watchEffect(()=>{g.value&&m.value&&(m.value.focus({preventScroll:!0}),m.value=null,b.value=!1)}),e.watchEffect(()=>{i.value.length<=1&&Object.keys(f.value).forEach(e=>{f.value[e]=!1})}),e.watchEffect(e=>{function t(e){const t=n.hotkey.every(t=>e[t]||e.code===t),r=Array.isArray(g.value)?g.value[0]:g.value;t&&(u.value.forEach(e=>{f.value[e]=!0}),r?.focus());const o=document.activeElement===g.value||r?.contains(document.activeElement);"Escape"===e.code&&o&&u.value.forEach(e=>{f.value[e]=!1})}M&&(document.addEventListener("keydown",t),e(()=>{document.removeEventListener("keydown",t)}))}),(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" Remove item from normal navigation flow, only available via hotkey "),e.createElementVNode("section",{"aria-label":`${t.containerAriaLabel} ${e.unref(w)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(o,i)=>(e.openBlock(),e.createElementBlock("ol",e.mergeProps({key:o,ref_for:!0,ref_key:"listRef",ref:g,"data-sonner-toaster":"","data-sonner-theme":p.value,class:n.class,dir:"auto"===t.dir?T():t.dir,tabIndex:-1,"data-theme":t.theme,"data-rich-colors":t.richColors,"data-y-position":o.split("-")[0],"data-x-position":o.split("-")[1],style:{"--front-toast-height":`${l.value[0]?.height||0}px`,"--width":`${e.unref(356)}px`,"--gap":`${t.gap}px`,...t.style,...e.unref(r).style,...e.unref(d)(t.offset,t.mobileOffset)}},{ref_for:!0},t.$attrs,{onBlur:j,onFocus:x,onMouseenter:P,onMousemove:P,onMouseleave:A,onDragend:L,onPointerdown:C,onPointerup:D}),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s(o,i),(r,i)=>(e.openBlock(),e.createBlock(v,{key:r.id,heights:l.value,icons:t.icons,index:i,toast:r,defaultRichColors:t.richColors,duration:t.toastOptions?.duration??t.duration,class:e.normalizeClass(t.toastOptions?.class??""),descriptionClass:t.toastOptions?.descriptionClass,invert:t.invert,visibleToasts:t.visibleToasts,closeButton:t.toastOptions?.closeButton??t.closeButton,interacting:h.value,position:o,style:e.normalizeStyle(t.toastOptions?.style),unstyled:t.toastOptions?.unstyled,classes:t.toastOptions?.classes,cancelButtonStyle:t.toastOptions?.cancelButtonStyle,actionButtonStyle:t.toastOptions?.actionButtonStyle,"close-button-aria-label":t.toastOptions?.closeButtonAriaLabel,toasts:c.value[o],expandByDefault:t.expand,gap:t.gap,expanded:f.value[o]||!1,swipeDirections:n.swipeDirections,"onUpdate:heights":F,"onUpdate:height":R,onRemoveToast:E},{"close-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"close-icon",{},()=>[e.createVNode(y)])]),"loading-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"loading-icon",{},()=>[e.createVNode(_,{visible:"loading"===r.type},null,8,["visible"])])]),"success-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"success-icon",{},()=>[e.createVNode(k)])]),"error-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"error-icon",{},()=>[e.createVNode(I)])]),"warning-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"warning-icon",{},()=>[e.createVNode(N)])]),"info-icon":e.withCtx(()=>[e.renderSlot(t.$slots,"info-icon",{},()=>[e.createVNode(O)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"]))),128))],16,S))),128))],8,B)],2112))}});function A(e,t){if(!e)return"";return function(e,t,n="text"){const r=e.match(/^\s*\{\{\s*([\s\S]+?)\s*\}\}\s*$/);return r?L(r[1].trim(),t):e.replace(/\{\{\s*([\s\S]+?)\s*\}\}/g,(e,r)=>{const o=L(String(r).trim(),t);if("js"===n){if(null==o)return"null";if("string"==typeof o)return JSON.stringify(o);if("number"==typeof o||"boolean"==typeof o)return String(o);try{return JSON.stringify(o)}catch{return"null"}}if(null==o)return"";if("string"==typeof o)return o;if("number"==typeof o||"boolean"==typeof o)return String(o);try{return JSON.stringify(o)}catch{return String(o)}})}(e,function(e){const t=["__proto__","constructor","prototype"],n=e=>{if(Array.isArray(e))return e.map(n);if(e&&"object"==typeof e){const r={};for(const o in e)!t.includes(o)&&D(o)&&(r[o]=n(e[o]));return r}return e};return n(e)}(t?.reduce((e,t)=>(e[t.name]=t.value,e),{})??{}))}function L(e,t){if(!e)return"";const n=function(e){const t=e.match(/\b[a-zA-Z_][a-zA-Z0-9_]*\b/g)||[],n=new Set(["true","false","null","undefined","return","if","else","try","catch","typeof"]);return[...new Set(t.filter(e=>!n.has(e)))]}(e),r={...t};for(const s of n)s in r||(r[s]=void 0);const o=Object.keys(r),i=Object.values(r);try{return new Function(...o,`'use strict'; return (${e})`)(...i)}catch(a){return void console.warn(`Interpolation failed for expression: "${e}"`,a)}}function D(e){return/^[$A-Z_][0-9A-Z_$]*$/i.test(e)}function F(e,t,n,r,o=8e3){const i=crypto.randomUUID();return new Promise((a,s)=>{const u=e=>{const t=e.data;t&&"response"===t.type&&t.id===i&&(l(),a(t.payload))},c=setTimeout(()=>{l(),s(new Error("Timed out waiting for response"))},o),l=()=>{clearTimeout(c),window.removeEventListener("message",u)};window.addEventListener("message",u),e.postMessage({type:t,id:i,payload:JSON.stringify(n)},r)})}const R={"api-request":async(e,{node:t})=>{try{let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=A(t.data.url,n),o=A(t.data.method,n).toUpperCase(),i=t.data.body?.map(e=>({key:A(e.key,n),value:A(e.value,n)}))||[],a=t.data.headers?.map(e=>({key:A(e.key,n),value:A(e.value,n)}))||[],s=t.data.cookies?.map(e=>({key:A(e.key,n),value:A(e.value,n)}))||[];const u=(t.data.urlParameters?.map(e=>({key:A(e.key,n),value:A(e.value,n)}))||[]).filter(e=>e.key).map(e=>`${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`).join("&"),c=u?`${r}?${u}`:r,l={};if(a.forEach(({key:e,value:t})=>{e&&(l[e]=t)}),s.length>0){const e=s.map(({key:e,value:t})=>`${e}=${t}`).join("; ");l.Cookie=e}let f=null;if(["POST","PUT","PATCH"].includes(o)){const e={};i.forEach(({key:t,value:n})=>{t&&(e[t]=n)}),f=JSON.stringify(e),l["Content-Type"]||="application/json"}const d=await fetch(c,{method:o,headers:l,body:f,credentials:"include"});if(d.status>=400)return{result:{success:!1,status:d.status}};let h;const p=d.headers.get("content-type");return h=p?.includes("application/json")?await d.json():await d.text(),{result:{success:!0,data:h,status:d.status}}}catch(n){return{result:{success:!1,status:n.status||500}}}},conditional:async(e,{node:t})=>({conditionMet:!!z(t.data.condition,e)}),"integration-action":async(e,{node:t})=>{console.log("Integration action task handler",t,e);const{$useIntegrationActions:r}=n.useNuxtApp(),{fireAction:o}=r(t.data.action.integration);return console.log("Firing integration action",t.data.action,e),{result:await o(t.data.action,e)}},"show-toast":async(e,{node:t})=>{console.log("Show toast",e,t);let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=A(t.data.title,n),o=A(t.data.message,n);return"true"===document.documentElement.dataset.moduleOverlayMode?(window.parent.postMessage({type:"toast:show",payload:{title:r,description:o}},"*"),{shown:!0}):(s(r,{description:o}),{shown:!0})},"finish-flow":async(e,{node:t,onFinish:n})=>{if(t.data.returnData){console.log("Finish flow with data",e,t);let r=z(t.data.transform,e);console.log("Finish flow return value",r),n(r)}else n();return{finished:!0}},confetti:async(e,{node:t})=>{const{$confetti:r}=n.useNuxtApp();return r(),{confetti:!0}},confirm:async(e,{node:t})=>{const{$useConfirmation:r}=n.useNuxtApp(),{confirm:o}=r();if(o){let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=A(t.data.title,n),i=A(t.data.message,n),a=A(t.data.confirmText,n);if("true"===document.documentElement.dataset.moduleOverlayMode){return{confirmed:(await F(window.parent,"confirmation-modal:show",{message:i,title:r,confirmText:a},"*")).confirmed}}return{confirmed:await o(i,r,a)}}return{confirmed:!1}},"set-variable":async(e,{node:t,localVariables:n})=>{console.log("Set variable",e,t,n);let r=Object.keys(e).map(t=>({name:t,value:e[t]})),o={};for(const i of t.data.updateActions??[]){const e=n.value.find(e=>e.id===i.variableId),t=A(i.value,r);console.log("skibi",i.value,r,t),e&&("element"===e.type?(e.value.value=t,o[e.name]={value:t}):(e.value=t,o[e.name]=t)),window.dispatchEvent(new CustomEvent("flow-update-form-variable",{detail:{id:i.variableId,value:t}}))}return{set:!0,...o}},"transform-data":async(e,{node:t})=>({transformed:!0,value:z(t.data.transform,e)}),"visit-url":async(e,{node:t})=>{let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=A(t.data.url,n);return t.data.newTab?window.open(r,"_blank"):window.location.href=r,{visited:!0}},"show-dialog":async(e,{node:t,flowBuilderExtensions:r})=>{const{$useCustomDialog:o}=n.useNuxtApp(),{openCustomDialog:i}=o();let a=Object.keys(e).map(t=>({name:t,value:e[t]}));if("true"===document.documentElement.dataset.moduleOverlayMode){return await F(window.parent,"dialog:show",{layout:t.data.layout,variables:a,formBuilderExtensions:[],flowBuilderExtensions:r},"*")}const s=await i(t.data.layout,a,[],r);return console.log("Dialog result",s),s},"show-module":async(e,{node:t})=>{console.log("Show module",e,t);const{$useModuleOverlay:r}=n.useNuxtApp(),{openInOverlay:o}=r();let i=Object.keys(e).map(t=>({name:t,value:e[t]}));const a={};if(t.data.moduleData?.forEach(e=>{a[A(e.key,i)]=A(e.value,i)}),console.log("mowauka aaa",t.data.moduleData,a),"true"===document.documentElement.dataset.moduleOverlayMode){return await F(window.parent,"module-overlay:show",{moduleId:t.data.moduleId,params:a},"*")}const s=await o(t.data.moduleId,a);return console.log("Overlay result",s),s},"wait-delay":async(e,{node:t})=>{console.log("Wait / delay",e,t);let n=parseInt(t.data.delayMs)||0;return await new Promise(e=>setTimeout(e,n)),{waited:!0}}},z=(e,t={})=>{var n=document.createElement("iframe");document.body.appendChild(n);var r=n.contentWindow.Function;return document.body.removeChild(n),r(...Object.keys(t),"'use strict';"+e)(...Object.values(t))},V={ERROR:"error",SKIPPED:"skipped",CANCELLED:"cancelled",FINISHED:"finished",RUNNING:"running"};var $,G,U,q,W,Y,H,J,K,X,Q,Z,ee,te,ne,re,oe,ie,ae,se,ue,ce,le,fe,de,he,pe,ve,ge,me,ye,be,we,_e,Ee,ke,je,Oe,xe,Ne,Ce,Ie,Be,Se,Me,Te,Pe,Ae,Le,De,Fe,Re,ze,Ve,$e,Ge,Ue,qe,We,Ye,He,Je,Ke,Xe,Qe,Ze,et,tt,nt,rt,ot,it,at,st,ut,ct,lt,ft,dt,ht,pt,vt,gt,mt,yt,bt,wt,_t,Et,kt,jt,Ot,xt,Nt,Ct="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function It(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Bt(){if(G)return $;G=1;var e="\0";function t(e,t){e[t]?e[t]++:e[t]=1}function n(e,t){--e[t]||delete e[t]}function r(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}return o+""+i+""+(void 0===r?"\0":r)}function o(e,t){return r(e,t.v,t.w,t.name)}return $=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(t){t&&(this._isDirected=!Object.hasOwn(t,"directed")||t.directed,this._isMultigraph=!!Object.hasOwn(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.hasOwn(t,"compound")&&t.compound),this._isCompound&&(this._parent={},this._children={},this._children[e]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var n=arguments,r=this;return e.forEach(function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(t,n){return Object.hasOwn(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=e,this._children[t]={},this._children[e][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===n)n=e;else{for(var r=n+="";void 0!==r;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(t){if(this._isCompound){var n=this._parent[t];if(n!==e)return n}}children(t=e){if(this._isCompound){var n=this._children[t];if(n)return Object.keys(n)}else{if(t===e)return this.nodes();if(this.hasNode(t))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){const r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,r]){e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function o(e){var i=n.parent(e);return void 0===i||t.hasNode(i)?(r[e]=i,i):i in r?r[i]:o(i)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,o(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce(function(e,o){return r.length>1?n.setEdge(e,o,t):n.setEdge(e,o),o}),this}setEdge(){var e,n,o,i,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,n=s.w,o=s.name,2===arguments.length&&(i=arguments[1],a=!0)):(e=s,n=arguments[1],o=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,n=""+n,void 0!==o&&(o=""+o);var u=r(this._isDirected,e,n,o);if(Object.hasOwn(this._edgeLabels,u))return a&&(this._edgeLabels[u]=i),this;if(void 0!==o&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(n),this._edgeLabels[u]=a?i:this._defaultEdgeLabelFn(e,n,o);var c=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};r&&(s.name=r);return s}(this._isDirected,e,n,o);return e=c.v,n=c.w,Object.freeze(c),this._edgeObjs[u]=c,t(this._preds[n],e),t(this._sucs[e],n),this._in[n][u]=c,this._out[e][u]=c,this._edgeCount++,this}edge(e,t,n){var i=1===arguments.length?o(this._isDirected,arguments[0]):r(this._isDirected,e,t,n);return this._edgeLabels[i]}edgeAsObj(){const e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,n){var i=1===arguments.length?o(this._isDirected,arguments[0]):r(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,i)}removeEdge(e,t,i){var a=1===arguments.length?o(this._isDirected,arguments[0]):r(this._isDirected,e,t,i),s=this._edgeObjs[a];return s&&(e=s.v,t=s.w,delete this._edgeLabels[a],delete this._edgeObjs[a],n(this._preds[t],e),n(this._sucs[e],t),delete this._in[t][a],delete this._out[e][a],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.v===t):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.w===t):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},$}function St(){if(J)return H;J=1;var e=Bt();function t(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),o={v:t};return void 0!==n&&(o.value=n),void 0!==r&&(o.parent=r),o})}function n(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return void 0!==t.name&&(r.name=t.name),void 0!==n&&(r.value=n),r})}return H={write:function(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:t(e),edges:n(e)};void 0!==e.graph()&&(r.value=structuredClone(e.graph()));return r},read:function(t){var n=new e(t.options).setGraph(t.value);return t.nodes.forEach(function(e){n.setNode(e.v,e.value),e.parent&&n.setParent(e.v,e.parent)}),t.edges.forEach(function(e){n.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),n}}}function Mt(){if(X)return K;return X=1,K=function(e){var t,n={},r=[];function o(r){Object.hasOwn(n,r)||(n[r]=!0,t.push(r),e.successors(r).forEach(o),e.predecessors(r).forEach(o))}return e.nodes().forEach(function(e){t=[],o(e),t.length&&r.push(t)}),r}}function Tt(){if(Z)return Q;Z=1;return Q=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,o=r.length;return n[e]=o,r.push({key:e,priority:t}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))}_decrease(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t}_swap(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}}}function Pt(){if(te)return ee;te=1;var e=Tt();ee=function(n,r,o,i){return function(t,n,r,o){var i,a,s={},u=new e,c=function(e){var t=e.v!==i?e.v:e.w,n=s[t],o=r(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<n.distance&&(n.distance=c,n.predecessor=i,u.decrease(t,c))};t.nodes().forEach(function(e){var t=e===n?0:Number.POSITIVE_INFINITY;s[e]={distance:t},u.add(e,t)});for(;u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)o(i).forEach(c);return s}(n,String(r),o||t,i||function(e){return n.outEdges(e)})};var t=()=>1;return ee}function At(){if(re)return ne;re=1;var e=Pt();return ne=function(t,n,r){return t.nodes().reduce(function(o,i){return o[i]=e(t,i,n,r),o},{})}}function Lt(){if(ie)return oe;return ie=1,oe=function(e){var t=0,n=[],r={},o=[];function i(a){var s=r[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),e.successors(a).forEach(function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(i(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))}),s.lowlink===s.index){var u,c=[];do{u=n.pop(),r[u].onStack=!1,c.push(u)}while(a!==u);o.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(r,e)||i(e)}),o}}function Dt(){if(se)return ae;se=1;var e=Lt();return ae=function(t){return e(t).filter(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}}function Ft(){if(ce)return ue;ce=1,ue=function(t,n,r){return function(e,t,n){var r={},o=e.nodes();return o.forEach(function(e){r[e]={},r[e][e]={distance:0},o.forEach(function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}})}),o.forEach(function(e){var t=r[e];o.forEach(function(n){var i=r[n];o.forEach(function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)})})}),r}(t,n||e,r||function(e){return t.outEdges(e)})};var e=()=>1;return ue}function Rt(){if(fe)return le;function e(e){var n={},r={},o=[];if(e.sinks().forEach(function i(a){if(Object.hasOwn(r,a))throw new t;Object.hasOwn(n,a)||(r[a]=!0,n[a]=!0,e.predecessors(a).forEach(i),delete r[a],o.push(a))}),Object.keys(n).length!==e.nodeCount())throw new t;return o}fe=1;class t extends Error{constructor(){super(...arguments)}}return le=e,e.CycleException=t,le}function zt(){if(he)return de;he=1;var e=Rt();return de=function(t){try{e(t)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}}function Vt(){if(ve)return pe;function e(e,t,r,o){for(var i=[[e,!1]];i.length>0;){var a=i.pop();a[1]?o.push(a[0]):Object.hasOwn(r,a[0])||(r[a[0]]=!0,i.push([a[0],!0]),n(t(a[0]),e=>i.push([e,!1])))}}function t(e,t,r,o){for(var i=[e];i.length>0;){var a=i.pop();Object.hasOwn(r,a)||(r[a]=!0,o.push(a),n(t(a),e=>i.push(e)))}}function n(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}return ve=1,pe=function(n,r,o){Array.isArray(r)||(r=[r]);var i=n.isDirected()?e=>n.successors(e):e=>n.neighbors(e),a="post"===o?e:t,s=[],u={};return r.forEach(e=>{if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);a(e,i,u,s)}),s}}function $t(){if(me)return ge;me=1;var e=Vt();return ge=function(t,n){return e(t,n,"post")}}function Gt(){if(be)return ye;be=1;var e=Vt();return ye=function(t,n){return e(t,n,"pre")}}function Ut(){if(_e)return we;_e=1;var e=Bt(),t=Tt();return we=function(n,r){var o,i=new e,a={},s=new t;function u(e){var t=e.v===o?e.w:e.v,n=s.priority(t);if(void 0!==n){var i=r(e);i<n&&(a[t]=o,s.decrease(t,i))}}if(0===n.nodeCount())return i;n.nodes().forEach(function(e){s.add(e,Number.POSITIVE_INFINITY),i.setNode(e)}),s.decrease(n.nodes()[0],0);var c=!1;for(;s.size()>0;){if(o=s.removeMin(),Object.hasOwn(a,o))i.setEdge(o,a[o]);else{if(c)throw new Error("Input graph is not connected: "+n);c=!0}n.nodeEdges(o).forEach(u)}return i}}function qt(){if(Oe)return je;Oe=1;var e=Y?W:(Y=1,W={Graph:Bt(),version:q?U:(q=1,U="2.2.4")});return je={Graph:e.Graph,json:St(),alg:ke?Ee:(ke=1,Ee={components:Mt(),dijkstra:Pt(),dijkstraAll:At(),findCycles:Dt(),floydWarshall:Ft(),isAcyclic:zt(),postorder:$t(),preorder:Gt(),prim:Ut(),tarjan:Lt(),topsort:Rt()}),version:e.version}}function Wt(){if(Ie)return Ce;Ie=1;let e=qt().Graph,t=function(){if(Ne)return xe;function e(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function t(e,t){if("_next"!==e&&"_prev"!==e)return t}return Ne=1,xe=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return e(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&e(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let e=[],n=this._sentinel,r=n._prev;for(;r!==n;)e.push(JSON.stringify(r,t)),r=r._prev;return"["+e.join(", ")+"]"}}}();Ce=function(i,a){if(i.nodeCount()<=1)return[];let s=function(n,r){let i=new e,a=0,s=0;n.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),n.edges().forEach(e=>{let t=i.edge(e.v,e.w)||0,n=r(e),o=t+n;i.setEdge(e.v,e.w,o),s=Math.max(s,i.node(e.v).out+=n),a=Math.max(a,i.node(e.w).in+=n)});let u=function(e){const t=[];for(let n=0;n<e;n++)t.push(n);return t}(s+a+3).map(()=>new t),c=a+1;return i.nodes().forEach(e=>{o(u,c,i.node(e))}),{graph:i,buckets:u,zeroIdx:c}}(i,a||n);return function(e,t,n){let o,i=[],a=t[t.length-1],s=t[0];for(;e.nodeCount();){for(;o=s.dequeue();)r(e,t,n,o);for(;o=a.dequeue();)r(e,t,n,o);if(e.nodeCount())for(let a=t.length-2;a>0;--a)if(o=t[a].dequeue(),o){i=i.concat(r(e,t,n,o,!0));break}}return i}(s.graph,s.buckets,s.zeroIdx).flatMap(e=>i.outEdges(e.v,e.w))};let n=()=>1;function r(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let s=e.edge(r),u=e.node(r.v);i&&a.push({v:r.v,w:r.w}),u.out-=s,o(t,n,u)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=r.w,s=e.node(a);s.in-=i,o(t,n,s)}),e.removeNode(r.v),a}function o(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}return Ce}function Yt(){if(Se)return Be;Se=1;let e=qt().Graph;function t(e,t,n,r){for(var o=r;e.hasNode(o);)o=a(r);return n.dummy=t,e.setNode(o,n),o}Be={addBorderNode:function(e,n,r,o){let i={width:0,height:0};arguments.length>=4&&(i.rank=r,i.order=o);return t(e,"border",i,n)},addDummyNode:t,applyWithChunking:r,asNonCompoundGraph:function(t){let n=new e({multigraph:t.isMultigraph()}).setGraph(t.graph());return t.nodes().forEach(e=>{t.children(e).length||n.setNode(e,t.node(e))}),t.edges().forEach(e=>{n.setEdge(e,t.edge(e))}),n},buildLayerMatrix:function(e){let t=s(o(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),o=r.rank;void 0!==o&&(t[o][r.order]=n)}),t},intersectRect:function(e,t){let n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a);return{x:o+n,y:i+r}},mapValues:function(e,t){let n=t;"string"==typeof t&&(n=e=>e[t]);return Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})},maxRank:o,normalizeRanks:function(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return void 0===n?Number.MAX_VALUE:n}),n=r(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,"rank")&&(r.rank-=n)})},notime:function(e,t){return t()},partition:function(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n},pick:function(e,t){const n={};for(const r of t)void 0!==e[r]&&(n[r]=e[r]);return n},predecessorWeights:function(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return u(e.nodes(),t)},range:s,removeEmptyRanks:function(e){let t=e.nodes().map(t=>e.node(t).rank),n=r(Math.min,t),o=[];e.nodes().forEach(t=>{let r=e.node(t).rank-n;o[r]||(o[r]=[]),o[r].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(o).forEach((t,n)=>{void 0===t&&n%a!==0?--i:void 0!==t&&i&&t.forEach(t=>e.node(t).rank+=i)})},simplify:function(t){let n=(new e).setGraph(t.graph());return t.nodes().forEach(e=>n.setNode(e,t.node(e))),t.edges().forEach(e=>{let r=n.edge(e.v,e.w)||{weight:0,minlen:1},o=t.edge(e);n.setEdge(e.v,e.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),n},successorWeights:function(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return u(e.nodes(),t)},time:function(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}},uniqueId:a,zipObject:u};const n=65535;function r(e,t){if(t.length>n){const r=function(e,t=n){const r=[];for(let n=0;n<e.length;n+=t){const o=e.slice(n,n+t);r.push(o)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}return e.apply(null,t)}function o(e){const t=e.nodes().map(t=>{let n=e.node(t).rank;return void 0===n?Number.MIN_VALUE:n});return r(Math.max,t)}let i=0;function a(e){return e+""+ ++i}function s(e,t,n=1){null==t&&(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);const o=[];for(let i=e;r(i);i+=n)o.push(i);return o}function u(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}return Be}function Ht(){if(Te)return Me;Te=1;let e=Wt(),t=Yt().uniqueId;return Me={run:function(n){("greedy"===n.graph().acyclicer?e(n,(r=n,e=>r.edge(e).weight)):function(e){let t=[],n={},r={};function o(i){Object.hasOwn(r,i)||(r[i]=!0,n[i]=!0,e.outEdges(i).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):o(e.w)}),delete n[i])}return e.nodes().forEach(o),t}(n)).forEach(e=>{let r=n.edge(e);n.removeEdge(e),r.forwardName=e.name,r.reversed=!0,n.setEdge(e.w,e.v,r,t("rev"))});var r},undo:function(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}}}function Jt(){if(Ae)return Pe;Ae=1;let e=Yt();return Pe={run:function(t){t.graph().dummyChains=[],t.edges().forEach(n=>function(t,n){let r,o,i,a=n.v,s=t.node(a).rank,u=n.w,c=t.node(u).rank,l=n.name,f=t.edge(n),d=f.labelRank;if(c===s+1)return;for(t.removeEdge(n),i=0,++s;s<c;++i,++s)f.points=[],o={width:0,height:0,edgeLabel:f,edgeObj:n,rank:s},r=e.addDummyNode(t,"edge",o,"_d"),s===d&&(o.width=f.width,o.height=f.height,o.dummy="edge-label",o.labelpos=f.labelpos),t.setEdge(a,r,{weight:f.weight},l),0===i&&t.graph().dummyChains.push(r),a=r;t.setEdge(a,u,{weight:f.weight},l)}(t,n))},undo:function(e){e.graph().dummyChains.forEach(t=>{let n,r=e.node(t),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),t=n,r=e.node(t)})}}}function Kt(){if(De)return Le;De=1;const{applyWithChunking:e}=Yt();return Le={longestPath:function(t){var n={};t.sources().forEach(function r(o){var i=t.node(o);if(Object.hasOwn(n,o))return i.rank;n[o]=!0;let a=t.outEdges(o).map(e=>null==e?Number.POSITIVE_INFINITY:r(e.w)-t.edge(e).minlen);var s=e(Math.min,a);return s===Number.POSITIVE_INFINITY&&(s=0),i.rank=s})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}}function Xt(){if(Re)return Fe;Re=1;var e=qt().Graph,t=Kt().slack;function n(e,n){return e.nodes().forEach(function r(o){n.nodeEdges(o).forEach(i=>{var a=i.v,s=o===a?i.w:a;e.hasNode(s)||t(n,i)||(e.setNode(s,{}),e.setEdge(o,s,{}),r(s))})}),e.nodeCount()}function r(e,n){return n.edges().reduce((r,o)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(i=t(n,o)),i<r[0]?[i,o]:r},[Number.POSITIVE_INFINITY,null])[1]}function o(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}return Fe=function(i){var a,s,u=new e({directed:!1}),c=i.nodes()[0],l=i.nodeCount();u.setNode(c,{});for(;n(u,i)<l;)a=r(u,i),s=u.hasNode(a.v)?t(i,a):-t(i,a),o(u,i,s);return u}}function Qt(){if(Ve)return ze;Ve=1;var e=Xt(),t=Kt().slack,n=Kt().longestPath,r=qt().alg.preorder,o=qt().alg.postorder,i=Yt().simplify;function a(t){t=i(t),n(t);var r,o=e(t);for(c(o),s(o,t);r=f(o);)h(o,t,r,d(o,t,r))}function s(e,t){var n=o(e,e.nodes());(n=n.slice(0,n.length-1)).forEach(n=>function(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=u(e,t,n)}(e,t,n))}function u(e,t,n){var r=e.node(n).parent,o=!0,i=t.edge(n,r),a=0;return i||(o=!1,i=t.edge(r,n)),a=i.weight,t.nodeEdges(n).forEach(i=>{var s,u,c=i.v===n,l=c?i.w:i.v;if(l!==r){var f=c===o,d=t.edge(i).weight;if(a+=f?d:-d,s=n,u=l,e.hasEdge(s,u)){var h=e.edge(n,l).cutvalue;a+=f?-h:h}}}),a}function c(e,t){arguments.length<2&&(t=e.nodes()[0]),l(e,{},1,t)}function l(e,t,n,r,o){var i=n,a=e.node(r);return t[r]=!0,e.neighbors(r).forEach(o=>{Object.hasOwn(t,o)||(n=l(e,t,n,o,r))}),a.low=i,a.lim=n++,o?a.parent=o:delete a.parent,n}function f(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function d(e,n,r){var o=r.v,i=r.w;n.hasEdge(o,i)||(o=r.w,i=r.v);var a=e.node(o),s=e.node(i),u=a,c=!1;return a.lim>s.lim&&(u=s,c=!0),n.edges().filter(t=>c===p(e,e.node(t.v),u)&&c!==p(e,e.node(t.w),u)).reduce((e,r)=>t(n,r)<t(n,e)?r:e)}function h(e,t,n,o){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(o.v,o.w,{}),c(e),s(e,t),function(e,t){var n=e.nodes().find(e=>!t.node(e).parent),o=r(e,n);(o=o.slice(1)).forEach(n=>{var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)})}(e,t)}function p(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}return ze=a,a.initLowLimValues=c,a.initCutValues=s,a.calcCutValue=u,a.leaveEdge=f,a.enterEdge=d,a.exchangeEdges=h,ze}function Zt(){if(Ge)return $e;Ge=1;var e=Kt().longestPath,t=Xt(),n=Qt();$e=function(n){var i=n.graph().ranker;if(i instanceof Function)return i(n);switch(n.graph().ranker){case"network-simplex":default:o(n);break;case"tight-tree":!function(n){e(n),t(n)}(n);break;case"longest-path":r(n);case"none":}};var r=e;function o(e){n(e)}return $e}function en(){if(qe)return Ue;return qe=1,Ue=function(e){let t=function(e){let t={},n=0;function r(o){let i=n;e.children(o).forEach(r),t[o]={low:i,lim:n++}}return e.children().forEach(r),t}(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),o=r.edgeObj,i=function(e,t,n,r){let o,i,a=[],s=[],u=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,s=i.lca,u=0,c=a[u],l=!0;for(;n!==o.w;){if(r=e.node(n),l){for(;(c=a[u])!==s&&e.node(c).maxRank<r.rank;)u++;c===s&&(l=!1)}if(!l){for(;u<a.length-1&&e.node(c=a[u+1]).minRank<=r.rank;)u++;c=a[u]}e.setParent(n,c),n=e.successors(n)[0]}})}}function tn(){if(Ye)return We;Ye=1;let e=Yt();function t(n,r,o,i,a,s,u){let c=n.children(u);if(!c.length)return void(u!==r&&n.setEdge(r,u,{weight:0,minlen:o}));let l=e.addBorderNode(n,"_bt"),f=e.addBorderNode(n,"_bb"),d=n.node(u);n.setParent(l,u),d.borderTop=l,n.setParent(f,u),d.borderBottom=f,c.forEach(e=>{t(n,r,o,i,a,s,e);let c=n.node(e),d=c.borderTop?c.borderTop:e,h=c.borderBottom?c.borderBottom:e,p=c.borderTop?i:2*i,v=d!==h?1:a-s[u]+1;n.setEdge(l,d,{weight:p,minlen:v,nestingEdge:!0}),n.setEdge(h,f,{weight:p,minlen:v,nestingEdge:!0})}),n.parent(u)||n.setEdge(r,l,{weight:0,minlen:a+s[u]})}return We={run:function(n){let r=e.addDummyNode(n,"root",{},"_root"),o=function(e){var t={};function n(r,o){var i=e.children(r);i&&i.length&&i.forEach(e=>n(e,o+1)),t[r]=o}return e.children().forEach(e=>n(e,1)),t}(n),i=Object.values(o),a=e.applyWithChunking(Math.max,i)-1,s=2*a+1;n.graph().nestingRoot=r,n.edges().forEach(e=>n.edge(e).minlen*=s);let u=function(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}(n)+1;n.children().forEach(e=>t(n,r,s,u,a,o,e)),n.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}}function nn(){if(Xe)return Ke;function e(e){e.nodes().forEach(n=>t(e.node(n))),e.edges().forEach(n=>t(e.edge(n)))}function t(e){let t=e.width;e.width=e.height,e.height=t}function n(e){e.y=-e.y}function r(e){let t=e.x;e.x=e.y,e.y=t}return Xe=1,Ke={adjust:function(t){let n=t.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||e(t)},undo:function(t){let o=t.graph().rankdir.toLowerCase();"bt"!==o&&"rl"!==o||function(e){e.nodes().forEach(t=>n(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(n),Object.hasOwn(r,"y")&&n(r)})}(t);"lr"!==o&&"rl"!==o||(!function(e){e.nodes().forEach(t=>r(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(r),Object.hasOwn(n,"x")&&r(n)})}(t),e(t))}}}function rn(){if(it)return ot;it=1;let e=Yt();return ot=function(t,n){let r={};return t.forEach((e,t)=>{let n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(n.barycenter=e.barycenter,n.weight=e.weight)}),n.edges().forEach(e=>{let t=r[e.v],n=r[e.w];void 0!==t&&void 0!==n&&(n.indegree++,t.out.push(r[e.w]))}),function(t){let n=[];function r(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function o(e){return n=>{n.in.push(e),0===--n.indegree&&t.push(n)}}for(;t.length;){let e=t.pop();n.push(e),e.in.reverse().forEach(r(e)),e.out.forEach(o(e))}return n.filter(e=>!e.merged).map(t=>e.pick(t,["vs","i","barycenter","weight"]))}(Object.values(r).filter(e=>!e.indegree))}}function on(){if(ct)return ut;ct=1;let e=rt?nt:(rt=1,nt=function(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce((t,n)=>{let r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}),t=rn(),n=function(){if(st)return at;st=1;let e=Yt();function t(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}return at=function(n,r){let o=e.partition(n,e=>Object.hasOwn(e,"barycenter")),i=o.lhs,a=o.rhs.sort((e,t)=>t.i-e.i),s=[],u=0,c=0,l=0;var f;i.sort((f=!!r,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:f?t.i-e.i:e.i-t.i)),l=t(s,a,l),i.forEach(e=>{l+=e.vs.length,s.push(e.vs),u+=e.barycenter*e.weight,c+=e.weight,l=t(s,a,l)});let d={vs:s.flat(!0)};return c&&(d.barycenter=u/c,d.weight=c),d}}();return ut=function r(o,i,a,s){let u=o.children(i),c=o.node(i),l=c?c.borderLeft:void 0,f=c?c.borderRight:void 0,d={};l&&(u=u.filter(e=>e!==l&&e!==f));let h=e(o,u);h.forEach(e=>{if(o.children(e.v).length){let i=r(o,e.v,a,s);d[e.v]=i,Object.hasOwn(i,"barycenter")&&(n=i,void 0!==(t=e).barycenter?(t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight):(t.barycenter=n.barycenter,t.weight=n.weight))}var t,n});let p=t(h,a);!function(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}(p,d);let v=n(p,s);if(l&&(v.vs=[l,v.vs,f].flat(!0),o.predecessors(l).length)){let e=o.node(o.predecessors(l)[0]),t=o.node(o.predecessors(f)[0]);Object.hasOwn(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+e.order+t.order)/(v.weight+2),v.weight+=2}return v},ut}function an(){if(ft)return lt;ft=1;let e=qt().Graph,t=Yt();return lt=function(n,r,o,i){i||(i=n.nodes());let a=function(e){var n;for(;e.hasNode(n=t.uniqueId("_root")););return n}(n),s=new e({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(e=>n.node(e));return i.forEach(e=>{let t=n.node(e),i=n.parent(e);(t.rank===r||t.minRank<=r&&r<=t.maxRank)&&(s.setNode(e),s.setParent(e,i||a),n[o](e).forEach(t=>{let r=t.v===e?t.w:t.v,o=s.edge(r,e),i=void 0!==o?o.weight:0;s.setEdge(r,e,{weight:n.edge(t).weight+i})}),Object.hasOwn(t,"minRank")&&s.setNode(e,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]}))}),s}}function sn(){if(vt)return pt;vt=1;let e=function(){if(Ze)return Qe;Ze=1;let e=Yt();return Qe=function(t){let n={},r=t.nodes().filter(e=>!t.children(e).length),o=r.map(e=>t.node(e).rank),i=e.applyWithChunking(Math.max,o),a=e.range(i+1).map(()=>[]);return r.sort((e,n)=>t.node(e).rank-t.node(n).rank).forEach(function e(r){if(n[r])return;n[r]=!0;let o=t.node(r);a[o.rank].push(r),t.successors(r).forEach(e)}),a}}(),t=function(){if(tt)return et;tt=1;let e=Yt().zipObject;function t(t,n,r){let o=e(r,r.map((e,t)=>t)),i=n.flatMap(e=>t.outEdges(e).map(e=>({pos:o[e.w],weight:t.edge(e).weight})).sort((e,t)=>e.pos-t.pos)),a=1;for(;a<r.length;)a<<=1;let s=2*a-1;a-=1;let u=new Array(s).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;u[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=u[t+1]),t=t-1>>1,u[t]+=e.weight;c+=e.weight*n}),c}return et=function(e,n){let r=0;for(let o=1;o<n.length;++o)r+=t(e,n[o-1],n[o]);return r}}(),n=on(),r=an(),o=ht?dt:(ht=1,dt=function(e,t,n){let r,o={};n.forEach(n=>{let i,a,s=e.parent(n);for(;s;){if(i=e.parent(s),i?(a=o[i],o[i]=s):(a=r,r=s),a&&a!==s)return void t.setEdge(a,s);s=i}})}),i=qt().Graph,a=Yt();function s(e,t,n){const o=new Map,i=(e,t)=>{o.has(e)||o.set(e,[]),o.get(e).push(t)};for(const r of e.nodes()){const t=e.node(r);if("number"==typeof t.rank&&i(t.rank,r),"number"==typeof t.minRank&&"number"==typeof t.maxRank)for(let e=t.minRank;e<=t.maxRank;e++)e!==t.rank&&i(e,r)}return t.map(function(t){return r(e,t,n,o.get(t)||[])})}function u(e,t){let r=new i;e.forEach(function(e){let i=e.graph().root,a=n(e,i,r,t);a.vs.forEach((t,n)=>e.node(t).order=n),o(e,r,a.vs)})}function c(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}return pt=function n(r,o){if(o&&"function"==typeof o.customOrder)return void o.customOrder(r,n);let i=a.maxRank(r),l=s(r,a.range(1,i+1),"inEdges"),f=s(r,a.range(i-1,-1,-1),"outEdges"),d=e(r);if(c(r,d),o&&o.disableOptimalOrderHeuristic)return;let h,p=Number.POSITIVE_INFINITY;for(let e=0,s=0;s<4;++e,++s){u(e%2?l:f,e%4>=2),d=a.buildLayerMatrix(r);let n=t(r,d);n<p&&(s=0,h=Object.assign({},d),p=n)}c(r,h)},pt}function un(){if(mt)return gt;mt=1;let e=qt().Graph,t=Yt();function n(e,t){let n={};return t.length&&t.reduce(function(t,r){let i=0,a=0,s=t.length,u=r[r.length-1];return r.forEach((t,c)=>{let l=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),f=l?e.node(l).order:s;(l||t===u)&&(r.slice(a,c+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),s=a.order;!(s<i||f<s)||a.dummy&&e.node(t).dummy||o(n,r,t)})}),a=c+1,i=f)}),r}),n}function r(e,n){let r={};function i(n,i,a,s,u){let c;t.range(i,a).forEach(t=>{c=n[t],e.node(c).dummy&&e.predecessors(c).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<s||n.order>u)&&o(r,t,c)})})}return n.length&&n.reduce(function(t,n){let r,o=-1,a=0;return n.forEach((s,u)=>{if("border"===e.node(s).dummy){let t=e.predecessors(s);t.length&&(r=e.node(t[0]).order,i(n,a,u,o,r),a=u,o=r)}i(n,a,n.length,r,t.length)}),n}),r}function o(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function i(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function a(e,t,n,r){let o={},a={},s={};return t.forEach(e=>{e.forEach((e,t)=>{o[e]=e,a[e]=e,s[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let u=r(e);if(u.length){u=u.sort((e,t)=>s[e]-s[t]);let r=(u.length-1)/2;for(let c=Math.floor(r),l=Math.ceil(r);c<=l;++c){let r=u[c];a[e]===e&&t<s[r]&&!i(n,e,r)&&(a[r]=e,a[e]=o[e]=o[r],t=s[r])}}})}),{root:o,align:a}}function s(t,n,r,o,i){let a={},s=function(t,n,r,o){let i=new e,a=t.graph(),s=function(e,t,n){return(r,o,i)=>{let a,s=r.node(o),u=r.node(i),c=0;if(c+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(c+=n?a:-a),a=0,c+=(s.dummy?t:e)/2,c+=(u.dummy?t:e)/2,c+=u.width/2,Object.hasOwn(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=u.width/2;break;case"r":a=-u.width/2}return a&&(c+=n?a:-a),a=0,c}}(a.nodesep,a.edgesep,o);return n.forEach(e=>{let n;e.forEach(e=>{let o=r[e];if(i.setNode(o),n){var a=r[n],u=i.edge(a,o);i.setEdge(a,o,Math.max(s(t,e,n),u||0))}n=e})}),i}(t,n,r,i),u=i?"borderLeft":"borderRight";function c(e,t){let n=s.nodes(),r=n.pop(),o={};for(;r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return c(function(e){a[e]=s.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+s.edge(t)),0)},s.predecessors.bind(s)),c(function(e){let n=s.outEdges(e).reduce((e,t)=>Math.min(e,a[t.w]-s.edge(t)),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(a[e]=Math.max(a[e],n))},s.successors.bind(s)),Object.keys(o).forEach(e=>a[e]=a[r[e]]),a}function u(e,t){return Object.values(t).reduce((t,n)=>{let r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;Object.entries(n).forEach(([t,n])=>{let i=function(e,t){return e.node(t).width}(e,t)/2;r=Math.max(n+i,r),o=Math.min(n-i,o)});const i=r-o;return i<t[0]&&(t=[i,n]),t},[Number.POSITIVE_INFINITY,null])[1]}function c(e,n){let r=Object.values(n),o=t.applyWithChunking(Math.min,r),i=t.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(a=>{let s=r+a,u=e[s];if(u===n)return;let c=Object.values(u),l=o-t.applyWithChunking(Math.min,c);"l"!==a&&(l=i-t.applyWithChunking(Math.max,c)),l&&(e[s]=t.mapValues(u,e=>e+l))})})}function l(e,n){return t.mapValues(e.ul,(t,r)=>{if(n)return e[n.toLowerCase()][r];{let t=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}return gt={positionX:function(e){let o,i=t.buildLayerMatrix(e),f=Object.assign(n(e,i),r(e,i)),d={};["u","d"].forEach(n=>{o="u"===n?i:Object.values(i).reverse(),["l","r"].forEach(r=>{"r"===r&&(o=o.map(e=>Object.values(e).reverse()));let i=("u"===n?e.predecessors:e.successors).bind(e),u=a(e,o,f,i),c=s(e,o,u.root,u.align,"r"===r);"r"===r&&(c=t.mapValues(c,e=>-e)),d[n+r]=c})});let h=u(e,d);return c(d,h),l(d,e.graph().align)},findType1Conflicts:n,findType2Conflicts:r,addConflict:o,hasConflict:i,verticalAlignment:a,horizontalCompaction:s,alignCoordinates:c,findSmallestWidthAlignment:u,balance:l}}function cn(){if(bt)return yt;bt=1;let e=Yt(),t=un().positionX;return yt=function(n){(function(t){let n=e.buildLayerMatrix(t),r=t.graph().ranksep,o=0;n.forEach(e=>{const n=e.reduce((e,n)=>{const r=t.node(n).height;return e>r?e:r},0);e.forEach(e=>t.node(e).y=o+n/2),o+=n+r})})(n=e.asNonCompoundGraph(n)),Object.entries(t(n)).forEach(([e,t])=>n.node(e).x=t)}}function ln(){if(_t)return wt;_t=1;let e=Ht(),t=Jt(),n=Zt(),r=Yt().normalizeRanks,o=en(),i=Yt().removeEmptyRanks,a=tn(),s=function(){if(Je)return He;Je=1;let e=Yt();function t(t,n,r,o,i,a){let s={width:0,height:0,rank:a,borderType:n},u=i[n][a-1],c=e.addDummyNode(t,"border",s,r);i[n][a]=c,t.setParent(c,o),u&&t.setEdge(u,c,{weight:1})}return He=function(e){e.children().forEach(function n(r){let o=e.children(r),i=e.node(r);if(o.length&&o.forEach(n),Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let n=i.minRank,o=i.maxRank+1;n<o;++n)t(e,"borderLeft","_bl",r,i,n),t(e,"borderRight","_br",r,i,n)}})}}(),u=nn(),c=sn(),l=cn(),f=Yt(),d=qt().Graph;wt=function(k,j){let O=j&&j.debugTiming?f.time:f.notime;O("layout",()=>{let x=O(" buildLayoutGraph",()=>function(e){let t=new d({multigraph:!0,compound:!0}),n=E(e.graph());return t.setGraph(Object.assign({},p,_(n,h),f.pick(n,v))),e.nodes().forEach(n=>{const r=_(E(e.node(n)),g);Object.keys(m).forEach(e=>{void 0===r[e]&&(r[e]=m[e])}),t.setNode(n,r),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let r=E(e.edge(n));t.setEdge(n,Object.assign({},b,_(r,y),f.pick(r,w)))}),t}(k));O(" runLayout",()=>function(d,h,p){h(" makeSpaceForEdgeLabels",()=>function(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(d)),h(" removeSelfEdges",()=>function(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}(d)),h(" acyclic",()=>e.run(d)),h(" nestingGraph.run",()=>a.run(d)),h(" rank",()=>n(f.asNonCompoundGraph(d))),h(" injectEdgeLabelProxies",()=>function(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};f.addDummyNode(e,"edge-proxy",r,"_ep")}})}(d)),h(" removeEmptyRanks",()=>i(d)),h(" nestingGraph.cleanup",()=>a.cleanup(d)),h(" normalizeRanks",()=>r(d)),h(" assignRankMinMax",()=>function(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}(d)),h(" removeEdgeLabelProxies",()=>function(e){e.nodes().forEach(t=>{let n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}(d)),h(" normalize.run",()=>t.run(d)),h(" parentDummyChains",()=>o(d)),h(" addBorderSegments",()=>s(d)),h(" order",()=>c(d,p)),h(" insertSelfEdges",()=>function(e){var t=f.buildLayerMatrix(e);t.forEach(t=>{var n=0;t.forEach((t,r)=>{var o=e.node(t);o.order=r+n,(o.selfEdges||[]).forEach(t=>{f.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:r+ ++n,e:t.e,label:t.label},"_se")}),delete o.selfEdges})})}(d)),h(" adjustCoordinateSystem",()=>u.adjust(d)),h(" position",()=>l(d)),h(" positionSelfEdges",()=>function(e){e.nodes().forEach(t=>{var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}})}(d)),h(" removeBorderNodes",()=>function(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),o=e.node(n.borderBottom),i=e.node(n.borderLeft[n.borderLeft.length-1]),a=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(a.x-i.x),n.height=Math.abs(o.y-r.y),n.x=i.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{"border"===e.node(t).dummy&&e.removeNode(t)})}(d)),h(" normalize.undo",()=>t.undo(d)),h(" fixupEdgeLabelCoords",()=>function(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(d)),h(" undoCoordinateSystem",()=>u.undo(d)),h(" translateGraph",()=>function(e){let t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,s=i.marginy||0;function u(e){let i=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,i-s/2),n=Math.max(n,i+s/2),r=Math.min(r,a-u/2),o=Math.max(o,a+u/2)}e.nodes().forEach(t=>u(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,"x")&&u(n)}),t-=a,r-=s,e.nodes().forEach(n=>{let o=e.node(n);o.x-=t,o.y-=r}),e.edges().forEach(n=>{let o=e.edge(n);o.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(o,"x")&&(o.x-=t),Object.hasOwn(o,"y")&&(o.y-=r)}),i.width=n-t+a,i.height=o-r+s}(d)),h(" assignNodeIntersects",()=>function(e){e.edges().forEach(t=>{let n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(f.intersectRect(i,n)),o.points.push(f.intersectRect(a,r))})}(d)),h(" reversePoints",()=>function(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}(d)),h(" acyclic.undo",()=>e.undo(d))}(x,O,j)),O(" updateInputGraph",()=>function(e,t){e.nodes().forEach(n=>{let r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,r.rank=o.rank,t.children(n).length&&(r.width=o.width,r.height=o.height))}),e.edges().forEach(n=>{let r=e.edge(n),o=t.edge(n);r.points=o.points,Object.hasOwn(o,"x")&&(r.x=o.x,r.y=o.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(k,x))})};let h=["nodesep","edgesep","ranksep","marginx","marginy"],p={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},v=["acyclicer","ranker","rankdir","align"],g=["width","height","rank"],m={width:0,height:0},y=["minlen","weight","width","height","labeloffset"],b={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},w=["labelpos"];function _(e,t){return f.mapValues(f.pick(e,t),Number)}function E(e){var t={};return e&&Object.entries(e).forEach(([e,n])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=n}),t}return wt}function fn(){if(kt)return Et;kt=1;let e=Yt(),t=qt().Graph;return Et={debugOrdering:function(n){let r=e.buildLayerMatrix(n),o=new t({compound:!0,multigraph:!0}).setGraph({});return n.nodes().forEach(e=>{o.setNode(e,{label:e}),o.setParent(e,"layer"+n.node(e).rank)}),n.edges().forEach(e=>o.setEdge(e.v,e.w,{},e.name)),r.forEach((e,t)=>{let n="layer"+t;o.setNode(n,{rank:"same"}),e.reduce((e,t)=>(o.setEdge(e,t,{style:"invis"}),t))}),o}}}const dn=It(Nt?xt:(Nt=1,xt={graphlib:qt(),layout:ln(),debug:fn(),util:{time:Yt().time,notime:Yt().notime},version:Ot?jt:(Ot=1,jt="1.1.8")}));var hn,pn,vn,gn,mn,yn,bn,wn,_n,En,kn,jn,On,xn,Nn,Cn,In,Bn,Sn,Mn,Tn,Pn,An,Ln,Dn,Fn,Rn,zn,Vn,$n,Gn,Un,qn,Wn,Yn,Hn,Jn,Kn,Xn,Qn,Zn,er,tr,nr,rr,or,ir,ar,sr,ur,cr,lr,fr,dr,hr,pr,vr,gr,mr,yr,br,wr,_r,Er,kr,jr,Or,xr,Nr,Cr,Ir,Br,Sr,Mr,Tr,Pr,Ar,Lr,Dr,Fr,Rr,zr,Vr,$r,Gr,Ur,qr,Wr,Yr,Hr,Jr,Kr,Xr,Qr,Zr,eo,to,no,ro,oo,io,ao,so,uo,co,lo,fo,ho;function po(){if(gn)return vn;return gn=1,vn=function(e,t){return e===t||e!=e&&t!=t}}function vo(){if(yn)return mn;yn=1;var e=po();return mn=function(t,n){for(var r=t.length;r--;)if(e(t[r][0],n))return r;return-1}}function go(){if(Cn)return Nn;Cn=1;var e=pn?hn:(pn=1,hn=function(){this.__data__=[],this.size=0}),t=function(){if(wn)return bn;wn=1;var e=vo(),t=Array.prototype.splice;return bn=function(n){var r=this.__data__,o=e(r,n);return!(o<0||(o==r.length-1?r.pop():t.call(r,o,1),--this.size,0))}}(),n=function(){if(En)return _n;En=1;var e=vo();return _n=function(t){var n=this.__data__,r=e(n,t);return r<0?void 0:n[r][1]}}(),r=function(){if(jn)return kn;jn=1;var e=vo();return kn=function(t){return e(this.__data__,t)>-1}}(),o=function(){if(xn)return On;xn=1;var e=vo();return On=function(t,n){var r=this.__data__,o=e(r,t);return o<0?(++this.size,r.push([t,n])):r[o][1]=n,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Nn=i}function mo(){if(Fn)return Dn;Fn=1;var e="object"==typeof Ct&&Ct&&Ct.Object===Object&&Ct;return Dn=e}function yo(){if(zn)return Rn;zn=1;var e=mo(),t="object"==typeof self&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Rn=n}function bo(){if($n)return Vn;$n=1;var e=yo().Symbol;return Vn=e}function wo(){if(Hn)return Yn;Hn=1;var e=bo(),t=function(){if(Un)return Gn;Un=1;var e=bo(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;return Gn=function(e){var t=n.call(e,o),i=e[o];try{e[o]=void 0;var a=!0}catch(u){}var s=r.call(e);return a&&(t?e[o]=i:delete e[o]),s}}(),n=function(){if(Wn)return qn;Wn=1;var e=Object.prototype.toString;return qn=function(t){return e.call(t)}}(),r=e?e.toStringTag:void 0;return Yn=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):n(e)}}function _o(){if(Kn)return Jn;return Kn=1,Jn=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function Eo(){if(Qn)return Xn;Qn=1;var e=wo(),t=_o();return Xn=function(n){if(!t(n))return!1;var r=e(n);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function ko(){if(nr)return tr;nr=1;var e,t=function(){if(er)return Zn;er=1;var e=yo()["__core-js_shared__"];return Zn=e}(),n=(e=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";return tr=function(e){return!!n&&n in e}}function jo(){if(or)return rr;or=1;var e=Function.prototype.toString;return rr=function(t){if(null!=t){try{return e.call(t)}catch(n){}try{return t+""}catch(n){}}return""}}function Oo(){if(lr)return cr;lr=1;var e=function(){if(ar)return ir;ar=1;var e=Eo(),t=ko(),n=_o(),r=jo(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,c=RegExp("^"+s.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return ir=function(i){return!(!n(i)||t(i))&&(e(i)?c:o).test(r(i))}}(),t=ur?sr:(ur=1,sr=function(e,t){return null==e?void 0:e[t]});return cr=function(n,r){var o=t(n,r);return e(o)?o:void 0}}function xo(){if(dr)return fr;dr=1;var e=Oo()(yo(),"Map");return fr=e}function No(){if(pr)return hr;pr=1;var e=Oo()(Object,"create");return hr=e}function Co(){if(xr)return Or;xr=1;var e=function(){if(gr)return vr;gr=1;var e=No();return vr=function(){this.__data__=e?e(null):{},this.size=0}}(),t=yr?mr:(yr=1,mr=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}),n=function(){if(wr)return br;wr=1;var e=No(),t=Object.prototype.hasOwnProperty;return br=function(n){var r=this.__data__;if(e){var o=r[n];return"__lodash_hash_undefined__"===o?void 0:o}return t.call(r,n)?r[n]:void 0}}(),r=function(){if(Er)return _r;Er=1;var e=No(),t=Object.prototype.hasOwnProperty;return _r=function(n){var r=this.__data__;return e?void 0!==r[n]:t.call(r,n)}}(),o=function(){if(jr)return kr;jr=1;var e=No();return kr=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=e&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Or=i}function Io(){if(Mr)return Sr;Mr=1;var e=Br?Ir:(Br=1,Ir=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e});return Sr=function(t,n){var r=t.__data__;return e(n)?r["string"==typeof n?"string":"hash"]:r.map}}function Bo(){if($r)return Vr;$r=1;var e=function(){if(Cr)return Nr;Cr=1;var e=Co(),t=go(),n=xo();return Nr=function(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}}(),t=function(){if(Pr)return Tr;Pr=1;var e=Io();return Tr=function(t){var n=e(this,t).delete(t);return this.size-=n?1:0,n}}(),n=function(){if(Lr)return Ar;Lr=1;var e=Io();return Ar=function(t){return e(this,t).get(t)}}(),r=function(){if(Fr)return Dr;Fr=1;var e=Io();return Dr=function(t){return e(this,t).has(t)}}(),o=function(){if(zr)return Rr;zr=1;var e=Io();return Rr=function(t,n){var r=e(this,t),o=r.size;return r.set(t,n),this.size+=r.size==o?0:1,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Vr=i}function So(){if(Wr)return qr;Wr=1;var e=go(),t=function(){if(Bn)return In;Bn=1;var e=go();return In=function(){this.__data__=new e,this.size=0}}(),n=Mn?Sn:(Mn=1,Sn=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}),r=Pn?Tn:(Pn=1,Tn=function(e){return this.__data__.get(e)}),o=Ln?An:(Ln=1,An=function(e){return this.__data__.has(e)}),i=function(){if(Ur)return Gr;Ur=1;var e=go(),t=xo(),n=Bo();return Gr=function(r,o){var i=this.__data__;if(i instanceof e){var a=i.__data__;if(!t||a.length<199)return a.push([r,o]),this.size=++i.size,this;i=this.__data__=new n(a)}return i.set(r,o),this.size=i.size,this}}();function a(t){var n=this.__data__=new e(t);this.size=n.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,qr=a}function Mo(){if(Hr)return Yr;return Hr=1,Yr=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function To(){if(Kr)return Jr;Kr=1;var e=Oo(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(n){}}();return Jr=t}function Po(){if(Qr)return Xr;Qr=1;var e=To();return Xr=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function Ao(){if(eo)return Zr;eo=1;var e=Po(),t=po(),n=Object.prototype.hasOwnProperty;return Zr=function(r,o,i){var a=r[o];n.call(r,o)&&t(a,i)&&(void 0!==i||o in r)||e(r,o,i)}}function Lo(){if(no)return to;no=1;var e=Ao(),t=Po();return to=function(n,r,o,i){var a=!o;o||(o={});for(var s=-1,u=r.length;++s<u;){var c=r[s],l=i?i(o[c],n[c],c,o,n):void 0;void 0===l&&(l=n[c]),a?t(o,c,l):e(o,c,l)}return o}}function Do(){if(ao)return io;return ao=1,io=function(e){return null!=e&&"object"==typeof e}}function Fo(){if(lo)return co;lo=1;var e=function(){if(uo)return so;uo=1;var e=wo(),t=Do();return so=function(n){return t(n)&&"[object Arguments]"==e(n)}}(),t=Do(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return co=i}function Ro(){if(ho)return fo;ho=1;var e=Array.isArray;return fo=e}var zo,Vo,$o,Go,Uo,qo,Wo,Yo,Ho,Jo,Ko,Xo={exports:{}};function Qo(){return $o||($o=1,e=Xo,t=Xo.exports,n=yo(),r=Vo?zo:(Vo=1,zo=function(){return!1}),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r,e.exports=s),Xo.exports;var e,t,n,r,o,i,a,s}function Zo(){if(Uo)return Go;Uo=1;var e=/^(?:0|[1-9]\d*)$/;return Go=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function ei(){if(Wo)return qo;Wo=1;return qo=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function ti(){if(Ko)return Jo;return Ko=1,Jo=function(e){return function(t){return e(t)}}}var ni,ri,oi,ii,ai,si,ui,ci,li,fi,di,hi,pi,vi,gi,mi,yi,bi,wi,_i,Ei,ki,ji,Oi,xi,Ni,Ci,Ii={exports:{}};function Bi(){return ni||(ni=1,e=Ii,t=Ii.exports,n=mo(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(t){}}(),e.exports=a),Ii.exports;var e,t,n,r,o,i,a}function Si(){if(oi)return ri;oi=1;var e=function(){if(Ho)return Yo;Ho=1;var e=wo(),t=ei(),n=Do(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Yo=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}(),t=ti(),n=Bi(),r=n&&n.isTypedArray,o=r?t(r):e;return ri=o}function Mi(){if(ai)return ii;ai=1;var e=oo?ro:(oo=1,ro=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}),t=Fo(),n=Ro(),r=Qo(),o=Zo(),i=Si(),a=Object.prototype.hasOwnProperty;return ii=function(s,u){var c=n(s),l=!c&&t(s),f=!c&&!l&&r(s),d=!c&&!l&&!f&&i(s),h=c||l||f||d,p=h?e(s.length,String):[],v=p.length;for(var g in s)!u&&!a.call(s,g)||h&&("length"==g||f&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,v))||p.push(g);return p}}function Ti(){if(ui)return si;ui=1;var e=Object.prototype;return si=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function Pi(){if(li)return ci;return li=1,ci=function(e,t){return function(n){return e(t(n))}}}function Ai(){if(pi)return hi;pi=1;var e=Ti(),t=function(){if(di)return fi;di=1;var e=Pi()(Object.keys,Object);return fi=e}(),n=Object.prototype.hasOwnProperty;return hi=function(r){if(!e(r))return t(r);var o=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&o.push(i);return o}}function Li(){if(gi)return vi;gi=1;var e=Eo(),t=ei();return vi=function(n){return null!=n&&t(n.length)&&!e(n)}}function Di(){if(yi)return mi;yi=1;var e=Mi(),t=Ai(),n=Li();return mi=function(r){return n(r)?e(r):t(r)}}function Fi(){if(ji)return ki;ji=1;var e=_o(),t=Ti(),n=Ei?_i:(Ei=1,_i=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}),r=Object.prototype.hasOwnProperty;return ki=function(o){if(!e(o))return n(o);var i=t(o),a=[];for(var s in o)("constructor"!=s||!i&&r.call(o,s))&&a.push(s);return a}}function Ri(){if(xi)return Oi;xi=1;var e=Mi(),t=Fi(),n=Li();return Oi=function(r){return n(r)?e(r,!0):t(r)}}var zi,Vi,$i,Gi,Ui,qi,Wi,Yi,Hi,Ji,Ki,Xi,Qi,Zi,ea,ta,na,ra,oa,ia,aa,sa,ua,ca,la,fa,da,ha,pa,va,ga,ma,ya,ba,wa,_a,Ea,ka,ja,Oa,xa,Na,Ca,Ia,Ba,Sa,Ma,Ta,Pa,Aa,La,Da,Fa,Ra,za,Va,$a,Ga,Ua,qa,Wa,Ya,Ha,Ja,Ka,Xa,Qa,Za,es,ts,ns,rs,os,is,as,ss,us,cs,ls,fs,ds,hs,ps,vs,gs,ms,ys,bs,ws,_s,Es,ks,js,Os,xs,Ns,Cs,Is,Bs,Ss,Ms,Ts,Ps,As,Ls,Ds,Fs,Rs,zs,Vs,$s,Gs,Us,qs,Ws,Ys,Hs,Js,Ks,Xs,Qs,Zs,eu,tu,nu,ru,ou,iu,au,su,uu,cu,lu,fu,du,hu,pu,vu,gu,mu,yu,bu,wu,_u,Eu,ku,ju,Ou,xu,Nu,Cu,Iu,Bu,Su,Mu,Tu,Pu,Au,Lu,Du,Fu,Ru,zu,Vu,$u,Gu,Uu,qu,Wu,Yu,Hu,Ju,Ku,Xu,Qu,Zu,ec,tc,nc,rc,oc,ic,ac,sc,uc,cc,lc,fc,dc,hc,pc,vc,gc,mc,yc,bc,wc,_c,Ec,kc,jc,Oc,xc,Nc,Cc,Ic,Bc,Sc,Mc,Tc,Pc,Ac,Lc,Dc,Fc,Rc,zc,Vc,$c,Gc,Uc,qc,Wc,Yc,Hc,Jc,Kc,Xc,Qc,Zc,el,tl,nl,rl,ol,il,al,sl,ul,cl,ll,fl,dl,hl,pl,vl,gl,ml,yl,bl,wl,_l,El,kl,jl,Ol,xl,Nl,Cl,Il,Bl,Sl,Ml,Tl,Pl,Al,Ll,Dl,Fl,Rl,zl,Vl,$l,Gl,Ul,ql,Wl,Yl,Hl,Jl={exports:{}};function Kl(){if(Ui)return Gi;return Ui=1,Gi=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}}function Xl(){if(Wi)return qi;return Wi=1,qi=function(){return[]}}function Ql(){if(Hi)return Yi;Hi=1;var e=Kl(),t=Xl(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Yi=r?function(t){return null==t?[]:(t=Object(t),e(r(t),function(e){return n.call(t,e)}))}:t}function Zl(){if(Qi)return Xi;return Qi=1,Xi=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function ef(){if(ea)return Zi;ea=1;var e=Pi()(Object.getPrototypeOf,Object);return Zi=e}function tf(){if(na)return ta;na=1;var e=Zl(),t=ef(),n=Ql(),r=Xl(),o=Object.getOwnPropertySymbols;return ta=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function nf(){if(aa)return ia;aa=1;var e=Zl(),t=Ro();return ia=function(n,r,o){var i=r(n);return t(n)?i:e(i,o(n))}}function rf(){if(ua)return sa;ua=1;var e=nf(),t=Ql(),n=Di();return sa=function(r){return e(r,n,t)}}function of(){if(ga)return va;ga=1;var e=Oo()(yo(),"Set");return va=e}function af(){if(wa)return ba;wa=1;var e=function(){if(da)return fa;da=1;var e=Oo()(yo(),"DataView");return fa=e}(),t=xo(),n=function(){if(pa)return ha;pa=1;var e=Oo()(yo(),"Promise");return ha=e}(),r=of(),o=function(){if(ya)return ma;ya=1;var e=Oo()(yo(),"WeakMap");return ma=e}(),i=wo(),a=jo(),s="[object Map]",u="[object Promise]",c="[object Set]",l="[object WeakMap]",f="[object DataView]",d=a(e),h=a(t),p=a(n),v=a(r),g=a(o),m=i;return(e&&m(new e(new ArrayBuffer(1)))!=f||t&&m(new t)!=s||n&&m(n.resolve())!=u||r&&m(new r)!=c||o&&m(new o)!=l)&&(m=function(e){var t=i(e),n="[object Object]"==t?e.constructor:void 0,r=n?a(n):"";if(r)switch(r){case d:return f;case h:return s;case p:return u;case v:return c;case g:return l}return t}),ba=m}function sf(){if(ja)return ka;ja=1;var e=yo().Uint8Array;return ka=e}function uf(){if(xa)return Oa;xa=1;var e=sf();return Oa=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function cf(){if(La)return Aa;La=1;var e=uf(),t=function(){if(Ca)return Na;Ca=1;var e=uf();return Na=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}(),n=function(){if(Ba)return Ia;Ba=1;var e=/\w*$/;return Ia=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}(),r=function(){if(Ma)return Sa;Ma=1;var e=bo(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return Sa=function(e){return n?Object(n.call(e)):{}}}(),o=function(){if(Pa)return Ta;Pa=1;var e=uf();return Ta=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}();return Aa=function(i,a,s){var u=i.constructor;switch(a){case"[object ArrayBuffer]":return e(i);case"[object Boolean]":case"[object Date]":return new u(+i);case"[object DataView]":return t(i,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,s);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(i);case"[object RegExp]":return n(i);case"[object Symbol]":return r(i)}}}function lf(){if(Fa)return Da;Fa=1;var e=_o(),t=Object.create;return Da=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function ff(){if(Ua)return Ga;Ua=1;var e=function(){if($a)return Va;$a=1;var e=af(),t=Do();return Va=function(n){return t(n)&&"[object Map]"==e(n)}}(),t=ti(),n=Bi(),r=n&&n.isMap,o=r?t(r):e;return Ga=o}function df(){if(Ha)return Ya;Ha=1;var e=function(){if(Wa)return qa;Wa=1;var e=af(),t=Do();return qa=function(n){return t(n)&&"[object Set]"==e(n)}}(),t=ti(),n=Bi(),r=n&&n.isSet,o=r?t(r):e;return Ya=o}function hf(){if(Ka)return Ja;Ka=1;var e,t,n,r,o,i,a,s=So(),u=Mo(),c=Ao(),l=function(){if(wi)return bi;wi=1;var e=Lo(),t=Di();return bi=function(n,r){return n&&e(r,t(r),n)}}(),f=function(){if(Ci)return Ni;Ci=1;var e=Lo(),t=Ri();return Ni=function(n,r){return n&&e(r,t(r),n)}}(),d=(zi||(zi=1,e=Jl,t=Jl.exports,n=yo(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}),Jl.exports),h=$i?Vi:($i=1,Vi=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}),p=function(){if(Ki)return Ji;Ki=1;var e=Lo(),t=Ql();return Ji=function(n,r){return e(n,t(n),r)}}(),v=function(){if(oa)return ra;oa=1;var e=Lo(),t=tf();return ra=function(n,r){return e(n,t(n),r)}}(),g=rf(),m=function(){if(la)return ca;la=1;var e=nf(),t=tf(),n=Ri();return ca=function(r){return e(r,n,t)}}(),y=af(),b=function(){if(Ea)return _a;Ea=1;var e=Object.prototype.hasOwnProperty;return _a=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}(),w=cf(),_=function(){if(za)return Ra;za=1;var e=lf(),t=ef(),n=Ti();return Ra=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}(),E=Ro(),k=Qo(),j=ff(),O=_o(),x=df(),N=Di(),C=Ri(),I="[object Arguments]",B="[object Function]",S="[object Object]",M={};return M[I]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object DataView]"]=M["[object Boolean]"]=M["[object Date]"]=M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Map]"]=M["[object Number]"]=M[S]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object Symbol]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Error]"]=M[B]=M["[object WeakMap]"]=!1,Ja=function e(t,n,r,o,i,a){var T,P=1&n,A=2&n,L=4&n;if(r&&(T=i?r(t,o,i,a):r(t)),void 0!==T)return T;if(!O(t))return t;var D=E(t);if(D){if(T=b(t),!P)return h(t,T)}else{var F=y(t),R=F==B||"[object GeneratorFunction]"==F;if(k(t))return d(t,P);if(F==S||F==I||R&&!i){if(T=A||R?{}:_(t),!P)return A?v(t,f(T,t)):p(t,l(T,t))}else{if(!M[F])return i?t:{};T=w(t,F,P)}}a||(a=new s);var z=a.get(t);if(z)return z;a.set(t,T),x(t)?t.forEach(function(o){T.add(e(o,n,r,o,t,a))}):j(t)&&t.forEach(function(o,i){T.set(i,e(o,n,r,i,t,a))});var V=D?void 0:(L?A?m:g:A?C:N)(t);return u(V||t,function(o,i){V&&(o=t[i=o]),c(T,i,e(o,n,r,i,t,a))}),T},Ja}function pf(){if(Qa)return Xa;Qa=1;var e=hf();return Xa=function(t){return e(t,4)}}function vf(){if(es)return Za;return es=1,Za=function(e){return function(){return e}}}function gf(){if(os)return rs;os=1;var e=(ns?ts:(ns=1,ts=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}))();return rs=e}function mf(){if(as)return is;as=1;var e=gf(),t=Di();return is=function(n,r){return n&&e(n,r,t)}}function yf(){if(ls)return cs;ls=1;var e=mf(),t=function(){if(us)return ss;us=1;var e=Li();return ss=function(t,n){return function(r,o){if(null==r)return r;if(!e(r))return t(r,o);for(var i=r.length,a=n?i:-1,s=Object(r);(n?a--:++a<i)&&!1!==o(s[a],a,s););return r}}}()(e);return cs=t}function bf(){if(ds)return fs;return ds=1,fs=function(e){return e}}function wf(){if(gs)return vs;gs=1;var e=Mo(),t=yf(),n=function(){if(ps)return hs;ps=1;var e=bf();return hs=function(t){return"function"==typeof t?t:e}}(),r=Ro();return vs=function(o,i){return(r(o)?e:t)(o,n(i))}}function _f(){if(xs)return Os;xs=1;var e=Bo(),t=Es?_s:(Es=1,_s=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}),n=js?ks:(js=1,ks=function(e){return this.__data__.has(e)});function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Os=r}function Ef(){if(Bs)return Is;return Bs=1,Is=function(e,t){return e.has(t)}}function kf(){if(Ms)return Ss;Ms=1;var e=_f(),t=Cs?Ns:(Cs=1,Ns=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}),n=Ef();return Ss=function(r,o,i,a,s,u){var c=1&i,l=r.length,f=o.length;if(l!=f&&!(c&&f>l))return!1;var d=u.get(r),h=u.get(o);if(d&&h)return d==o&&h==r;var p=-1,v=!0,g=2&i?new e:void 0;for(u.set(r,o),u.set(o,r);++p<l;){var m=r[p],y=o[p];if(a)var b=c?a(y,m,p,o,r,u):a(m,y,p,r,o,u);if(void 0!==b){if(b)continue;v=!1;break}if(g){if(!t(o,function(e,t){if(!n(g,t)&&(m===e||s(m,e,i,a,u)))return g.push(t)})){v=!1;break}}else if(m!==y&&!s(m,y,i,a,u)){v=!1;break}}return u.delete(r),u.delete(o),v}}function jf(){if(Ls)return As;return Ls=1,As=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}}function Of(){if(Fs)return Ds;Fs=1;var e=bo(),t=sf(),n=po(),r=kf(),o=Ps?Ts:(Ps=1,Ts=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}),i=jf(),a=e?e.prototype:void 0,s=a?a.valueOf:void 0;return Ds=function(e,a,u,c,l,f,d){switch(u){case"[object DataView]":if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=a.byteLength||!f(new t(e),new t(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+a);case"[object Error]":return e.name==a.name&&e.message==a.message;case"[object RegExp]":case"[object String]":return e==a+"";case"[object Map]":var h=o;case"[object Set]":var p=1&c;if(h||(h=i),e.size!=a.size&&!p)return!1;var v=d.get(e);if(v)return v==a;c|=2,d.set(e,a);var g=r(h(e),h(a),c,l,f,d);return d.delete(e),g;case"[object Symbol]":if(s)return s.call(e)==s.call(a)}return!1}}function xf(){if($s)return Vs;$s=1;var e=So(),t=kf(),n=Of(),r=function(){if(zs)return Rs;zs=1;var e=rf(),t=Object.prototype.hasOwnProperty;return Rs=function(n,r,o,i,a,s){var u=1&o,c=e(n),l=c.length;if(l!=e(r).length&&!u)return!1;for(var f=l;f--;){var d=c[f];if(!(u?d in r:t.call(r,d)))return!1}var h=s.get(n),p=s.get(r);if(h&&p)return h==r&&p==n;var v=!0;s.set(n,r),s.set(r,n);for(var g=u;++f<l;){var m=n[d=c[f]],y=r[d];if(i)var b=u?i(y,m,d,r,n,s):i(m,y,d,n,r,s);if(!(void 0===b?m===y||a(m,y,o,i,s):b)){v=!1;break}g||(g="constructor"==d)}if(v&&!g){var w=n.constructor,_=r.constructor;w==_||!("constructor"in n)||!("constructor"in r)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(v=!1)}return s.delete(n),s.delete(r),v}}(),o=af(),i=Ro(),a=Qo(),s=Si(),u="[object Arguments]",c="[object Array]",l="[object Object]",f=Object.prototype.hasOwnProperty;return Vs=function(d,h,p,v,g,m){var y=i(d),b=i(h),w=y?c:o(d),_=b?c:o(h),E=(w=w==u?l:w)==l,k=(_=_==u?l:_)==l,j=w==_;if(j&&a(d)){if(!a(h))return!1;y=!0,E=!1}if(j&&!E)return m||(m=new e),y||s(d)?t(d,h,p,v,g,m):n(d,h,w,p,v,g,m);if(!(1&p)){var O=E&&f.call(d,"__wrapped__"),x=k&&f.call(h,"__wrapped__");if(O||x){var N=O?d.value():d,C=x?h.value():h;return m||(m=new e),g(N,C,p,v,m)}}return!!j&&(m||(m=new e),r(d,h,p,v,g,m))}}function Nf(){if(Us)return Gs;Us=1;var e=xf(),t=Do();return Gs=function n(r,o,i,a,s){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,i,a,n,s))},Gs}function Cf(){if(Hs)return Ys;Hs=1;var e=_o();return Ys=function(t){return t==t&&!e(t)}}function If(){if(Qs)return Xs;return Qs=1,Xs=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function Bf(){if(eu)return Zs;eu=1;var e=function(){if(Ws)return qs;Ws=1;var e=So(),t=Nf();return qs=function(n,r,o,i){var a=o.length,s=a,u=!i;if(null==n)return!s;for(n=Object(n);a--;){var c=o[a];if(u&&c[2]?c[1]!==n[c[0]]:!(c[0]in n))return!1}for(;++a<s;){var l=(c=o[a])[0],f=n[l],d=c[1];if(u&&c[2]){if(void 0===f&&!(l in n))return!1}else{var h=new e;if(i)var p=i(f,d,l,n,r,h);if(!(void 0===p?t(d,f,3,i,h):p))return!1}}return!0}}(),t=function(){if(Ks)return Js;Ks=1;var e=Cf(),t=Di();return Js=function(n){for(var r=t(n),o=r.length;o--;){var i=r[o],a=n[i];r[o]=[i,a,e(a)]}return r}}(),n=If();return Zs=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function Sf(){if(nu)return tu;nu=1;var e=wo(),t=Do();return tu=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}function Mf(){if(ou)return ru;ou=1;var e=Ro(),t=Sf(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return ru=function(o,i){if(e(o))return!1;var a=typeof o;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=o&&!t(o))||(r.test(o)||!n.test(o)||null!=i&&o in Object(i))}}function Tf(){if(uu)return su;uu=1;var e=function(){if(au)return iu;au=1;var e=Bo();function t(n,r){if("function"!=typeof n||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var o=function(){var e=arguments,t=r?r.apply(this,e):e[0],i=o.cache;if(i.has(t))return i.get(t);var a=n.apply(this,e);return o.cache=i.set(t,a)||i,a};return o.cache=new(t.Cache||e),o}return t.Cache=e,iu=t}();return su=function(t){var n=e(t,function(e){return 500===r.size&&r.clear(),e}),r=n.cache;return n}}function Pf(){if(du)return fu;return du=1,fu=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}}function Af(){if(gu)return vu;gu=1;var e=function(){if(pu)return hu;pu=1;var e=bo(),t=Pf(),n=Ro(),r=Sf(),o=e?e.prototype:void 0,i=o?o.toString:void 0;return hu=function e(o){if("string"==typeof o)return o;if(n(o))return t(o,e)+"";if(r(o))return i?i.call(o):"";var a=o+"";return"0"==a&&1/o==-1/0?"-0":a},hu}();return vu=function(t){return null==t?"":e(t)}}function Lf(){if(yu)return mu;yu=1;var e=Ro(),t=Mf(),n=function(){if(lu)return cu;lu=1;var e=Tf(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(e){var r=[];return 46===e.charCodeAt(0)&&r.push(""),e.replace(t,function(e,t,o,i){r.push(o?i.replace(n,"$1"):t||e)}),r});return cu=r}(),r=Af();return mu=function(o,i){return e(o)?o:t(o,i)?[o]:n(r(o))}}function Df(){if(wu)return bu;wu=1;var e=Sf();return bu=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}}function Ff(){if(Eu)return _u;Eu=1;var e=Lf(),t=Df();return _u=function(n,r){for(var o=0,i=(r=e(r,n)).length;null!=n&&o<i;)n=n[t(r[o++])];return o&&o==i?n:void 0}}function Rf(){if(Cu)return Nu;Cu=1;var e=Lf(),t=Fo(),n=Ro(),r=Zo(),o=ei(),i=Df();return Nu=function(a,s,u){for(var c=-1,l=(s=e(s,a)).length,f=!1;++c<l;){var d=i(s[c]);if(!(f=null!=a&&u(a,d)))break;a=a[d]}return f||++c!=l?f:!!(l=null==a?0:a.length)&&o(l)&&r(d,l)&&(n(a)||t(a))}}function zf(){if(Bu)return Iu;Bu=1;var e=xu?Ou:(xu=1,Ou=function(e,t){return null!=e&&t in Object(e)}),t=Rf();return Iu=function(n,r){return null!=n&&t(n,r,e)}}function Vf(){if(Mu)return Su;Mu=1;var e=Nf(),t=function(){if(ju)return ku;ju=1;var e=Ff();return ku=function(t,n,r){var o=null==t?void 0:e(t,n);return void 0===o?r:o}}(),n=zf(),r=Mf(),o=Cf(),i=If(),a=Df();return Su=function(s,u){return r(s)&&o(u)?i(a(s),u):function(r){var o=t(r,s);return void 0===o&&o===u?n(r,s):e(u,o,3)}}}function $f(){if(Pu)return Tu;return Pu=1,Tu=function(e){return function(t){return null==t?void 0:t[e]}}}function Gf(){if(Fu)return Du;Fu=1;var e=$f(),t=function(){if(Lu)return Au;Lu=1;var e=Ff();return Au=function(t){return function(n){return e(n,t)}}}(),n=Mf(),r=Df();return Du=function(o){return n(o)?e(r(o)):t(o)}}function Uf(){if(zu)return Ru;zu=1;var e=Bf(),t=Vf(),n=bf(),r=Ro(),o=Gf();return Ru=function(i){return"function"==typeof i?i:null==i?n:"object"==typeof i?r(i)?t(i[0],i[1]):e(i):o(i)}}function qf(){if($u)return Vu;$u=1;var e=Kl(),t=function(){if(ws)return bs;ws=1;var e=yf();return bs=function(t,n){var r=[];return e(t,function(e,t,o){n(e,t,o)&&r.push(e)}),r}}(),n=Uf(),r=Ro();return Vu=function(o,i){return(r(o)?e:t)(o,n(i,3))}}function Wf(){if(Wu)return qu;Wu=1;var e=function(){if(Uu)return Gu;Uu=1;var e=Object.prototype.hasOwnProperty;return Gu=function(t,n){return null!=t&&e.call(t,n)}}(),t=Rf();return qu=function(n,r){return null!=n&&t(n,r,e)}}function Yf(){if(Hu)return Yu;Hu=1;var e=Ai(),t=af(),n=Fo(),r=Ro(),o=Li(),i=Qo(),a=Ti(),s=Si(),u=Object.prototype.hasOwnProperty;return Yu=function(c){if(null==c)return!0;if(o(c)&&(r(c)||"string"==typeof c||"function"==typeof c.splice||i(c)||s(c)||n(c)))return!c.length;var l=t(c);if("[object Map]"==l||"[object Set]"==l)return!c.size;if(a(c))return!e(c).length;for(var f in c)if(u.call(c,f))return!1;return!0}}function Hf(){if(Ku)return Ju;return Ku=1,Ju=function(e){return void 0===e}}function Jf(){if(ec)return Zu;ec=1;var e=Pf(),t=Uf(),n=function(){if(Qu)return Xu;Qu=1;var e=yf(),t=Li();return Xu=function(n,r){var o=-1,i=t(n)?Array(n.length):[];return e(n,function(e,t,n){i[++o]=r(e,t,n)}),i}}(),r=Ro();return Zu=function(o,i){return(r(o)?e:n)(o,t(i,3))}}function Kf(){if(ac)return ic;ac=1;var e=nc?tc:(nc=1,tc=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}),t=yf(),n=Uf(),r=oc?rc:(oc=1,rc=function(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}),o=Ro();return ic=function(i,a,s){var u=o(i)?e:r,c=arguments.length<3;return u(i,n(a,4),s,c,t)},ic}function Xf(){if(gc)return vc;gc=1;var e=function(){if(lc)return cc;lc=1;var e=$f()("length");return cc=e}(),t=function(){if(dc)return fc;dc=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return fc=function(t){return e.test(t)}}(),n=function(){if(pc)return hc;pc=1;var e="\\ud800-\\udfff",t="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+n+"|"+r+")?",u="[\\ufe0e\\ufe0f]?",c=u+s+"(?:\\u200d(?:"+[o,i,a].join("|")+")"+u+s+")*",l="(?:"+[o+n+"?",n,i,a,t].join("|")+")",f=RegExp(r+"(?="+r+")|"+l+c,"g");return hc=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}}();return vc=function(r){return t(r)?n(r):e(r)}}function Qf(){if(yc)return mc;yc=1;var e=Ai(),t=af(),n=Li(),r=function(){if(uc)return sc;uc=1;var e=wo(),t=Ro(),n=Do();return sc=function(r){return"string"==typeof r||!t(r)&&n(r)&&"[object String]"==e(r)}}(),o=Xf();return mc=function(i){if(null==i)return 0;if(n(i))return r(i)?o(i):i.length;var a=t(i);return"[object Map]"==a||"[object Set]"==a?i.size:e(i).length}}function Zf(){if(wc)return bc;wc=1;var e=Mo(),t=lf(),n=mf(),r=Uf(),o=ef(),i=Ro(),a=Qo(),s=Eo(),u=_o(),c=Si();return bc=function(l,f,d){var h=i(l),p=h||a(l)||c(l);if(f=r(f,4),null==d){var v=l&&l.constructor;d=p?h?new v:[]:u(l)&&s(v)?t(o(l)):{}}return(p?e:n)(l,function(e,t,n){return f(d,e,t,n)}),d}}function ed(){if(jc)return kc;jc=1;var e=Zl(),t=function(){if(Ec)return _c;Ec=1;var e=bo(),t=Fo(),n=Ro(),r=e?e.isConcatSpreadable:void 0;return _c=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}();return kc=function n(r,o,i,a,s){var u=-1,c=r.length;for(i||(i=t),s||(s=[]);++u<c;){var l=r[u];o>0&&i(l)?o>1?n(l,o-1,i,a,s):e(s,l):a||(s[s.length]=l)}return s},kc}function td(){if(Cc)return Nc;Cc=1;var e=xc?Oc:(xc=1,Oc=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}),t=Math.max;return Nc=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var i=arguments,a=-1,s=t(i.length-r,0),u=Array(s);++a<s;)u[a]=i[r+a];a=-1;for(var c=Array(r+1);++a<r;)c[a]=i[a];return c[r]=o(u),e(n,this,c)}},Nc}function nd(){if(Pc)return Tc;Pc=1;var e=function(){if(Bc)return Ic;Bc=1;var e=vf(),t=To(),n=bf();return Ic=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}(),t=function(){if(Mc)return Sc;Mc=1;var e=Date.now;return Sc=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},Sc}(),n=t(e);return Tc=n}function rd(){if(Uc)return Gc;Uc=1;var e=Fc?Dc:(Fc=1,Dc=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}),t=zc?Rc:(zc=1,Rc=function(e){return e!=e}),n=$c?Vc:($c=1,Vc=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1});return Gc=function(r,o,i){return o==o?n(r,o,i):e(r,t,i)}}function od(){if(Qc)return Xc;Qc=1;var e=of(),t=Kc?Jc:(Kc=1,Jc=function(){}),n=jf(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Xc=r}function id(){if(el)return Zc;el=1;var e=_f(),t=function(){if(Wc)return qc;Wc=1;var e=rd();return qc=function(t,n){return!(null==t||!t.length)&&e(t,n,0)>-1}}(),n=Hc?Yc:(Hc=1,Yc=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}),r=Ef(),o=od(),i=jf();return Zc=function(a,s,u){var c=-1,l=t,f=a.length,d=!0,h=[],p=h;if(u)d=!1,l=n;else if(f>=200){var v=s?null:o(a);if(v)return i(v);d=!1,l=r,p=new e}else p=s?[]:h;e:for(;++c<f;){var g=a[c],m=s?s(g):g;if(g=u||0!==g?g:0,d&&m==m){for(var y=p.length;y--;)if(p[y]===m)continue e;s&&p.push(m),h.push(g)}else l(p,m,u)||(p!==h&&p.push(m),h.push(g))}return h}}function ad(){if(ol)return rl;ol=1;var e=ed(),t=function(){if(Lc)return Ac;Lc=1;var e=bf(),t=td(),n=nd();return Ac=function(r,o){return n(t(r,o,e),r+"")}}(),n=id(),r=function(){if(nl)return tl;nl=1;var e=Li(),t=Do();return tl=function(n){return t(n)&&e(n)}}(),o=t(function(t){return n(e(t,1,r,!0))});return rl=o}function sd(){if(ul)return sl;ul=1;var e=function(){if(al)return il;al=1;var e=Pf();return il=function(t,n){return e(n,function(e){return t[e]})}}(),t=Di();return sl=function(n){return null==n?[]:e(n,t(n))}}function ud(){if(ll)return cl;var e;ll=1;try{e={clone:pf(),constant:vf(),each:ys?ms:(ys=1,ms=wf()),filter:qf(),has:Wf(),isArray:Ro(),isEmpty:Yf(),isFunction:Eo(),isUndefined:Hf(),keys:Di(),map:Jf(),reduce:Kf(),size:Qf(),transform:Zf(),union:ad(),values:sd()}}catch(t){}return e||(e=window._),cl=e}function cd(){if(dl)return fl;dl=1;var e=ud();fl=n;var t="\0";function n(n){this._isDirected=!e.has(n,"directed")||n.directed,this._isMultigraph=!!e.has(n,"multigraph")&&n.multigraph,this._isCompound=!!e.has(n,"compound")&&n.compound,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[t]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function r(e,t){e[t]?e[t]++:e[t]=1}function o(e,t){--e[t]||delete e[t]}function i(t,n,r,o){var i=""+n,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+""+a+""+(e.isUndefined(o)?"\0":o)}function a(e,t){return i(e,t.v,t.w,t.name)}return n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(e){return this._label=e,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(t){return e.isFunction(t)||(t=e.constant(t)),this._defaultNodeLabelFn=t,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return e.keys(this._nodes)},n.prototype.sources=function(){var t=this;return e.filter(this.nodes(),function(n){return e.isEmpty(t._in[n])})},n.prototype.sinks=function(){var t=this;return e.filter(this.nodes(),function(n){return e.isEmpty(t._out[n])})},n.prototype.setNodes=function(t,n){var r=arguments,o=this;return e.each(t,function(e){r.length>1?o.setNode(e,n):o.setNode(e)}),this},n.prototype.setNode=function(n,r){return e.has(this._nodes,n)?(arguments.length>1&&(this._nodes[n]=r),this):(this._nodes[n]=arguments.length>1?r:this._defaultNodeLabelFn(n),this._isCompound&&(this._parent[n]=t,this._children[n]={},this._children[t][n]=!0),this._in[n]={},this._preds[n]={},this._out[n]={},this._sucs[n]={},++this._nodeCount,this)},n.prototype.node=function(e){return this._nodes[e]},n.prototype.hasNode=function(t){return e.has(this._nodes,t)},n.prototype.removeNode=function(t){var n=this;if(e.has(this._nodes,t)){var r=function(e){n.removeEdge(n._edgeObjs[e])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],e.each(this.children(t),function(e){n.setParent(e)}),delete this._children[t]),e.each(e.keys(this._in[t]),r),delete this._in[t],delete this._preds[t],e.each(e.keys(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},n.prototype.setParent=function(n,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(r))r=t;else{for(var o=r+="";!e.isUndefined(o);o=this.parent(o))if(o===n)throw new Error("Setting "+r+" as parent of "+n+" would create a cycle");this.setNode(r)}return this.setNode(n),this._removeFromParentsChildList(n),this._parent[n]=r,this._children[r][n]=!0,this},n.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},n.prototype.parent=function(e){if(this._isCompound){var n=this._parent[e];if(n!==t)return n}},n.prototype.children=function(n){if(e.isUndefined(n)&&(n=t),this._isCompound){var r=this._children[n];if(r)return e.keys(r)}else{if(n===t)return this.nodes();if(this.hasNode(n))return[]}},n.prototype.predecessors=function(t){var n=this._preds[t];if(n)return e.keys(n)},n.prototype.successors=function(t){var n=this._sucs[t];if(n)return e.keys(n)},n.prototype.neighbors=function(t){var n=this.predecessors(t);if(n)return e.union(n,this.successors(t))},n.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},n.prototype.filterNodes=function(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;e.each(this._nodes,function(e,r){t(r)&&n.setNode(r,e)}),e.each(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,r.edge(e))});var o={};function i(e){var t=r.parent(e);return void 0===t||n.hasNode(t)?(o[e]=t,t):t in o?o[t]:i(t)}return this._isCompound&&e.each(n.nodes(),function(e){n.setParent(e,i(e))}),n},n.prototype.setDefaultEdgeLabel=function(t){return e.isFunction(t)||(t=e.constant(t)),this._defaultEdgeLabelFn=t,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return e.values(this._edgeObjs)},n.prototype.setPath=function(t,n){var r=this,o=arguments;return e.reduce(t,function(e,t){return o.length>1?r.setEdge(e,t,n):r.setEdge(e,t),t}),this},n.prototype.setEdge=function(){var t,n,o,a,s=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(t=u.v,n=u.w,o=u.name,2===arguments.length&&(a=arguments[1],s=!0)):(t=u,n=arguments[1],o=arguments[3],arguments.length>2&&(a=arguments[2],s=!0)),t=""+t,n=""+n,e.isUndefined(o)||(o=""+o);var c=i(this._isDirected,t,n,o);if(e.has(this._edgeLabels,c))return s&&(this._edgeLabels[c]=a),this;if(!e.isUndefined(o)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[c]=s?a:this._defaultEdgeLabelFn(t,n,o);var l=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};r&&(s.name=r);return s}(this._isDirected,t,n,o);return t=l.v,n=l.w,Object.freeze(l),this._edgeObjs[c]=l,r(this._preds[n],t),r(this._sucs[t],n),this._in[n][c]=l,this._out[t][c]=l,this._edgeCount++,this},n.prototype.edge=function(e,t,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):i(this._isDirected,e,t,n);return this._edgeLabels[r]},n.prototype.hasEdge=function(t,n,r){var o=1===arguments.length?a(this._isDirected,arguments[0]):i(this._isDirected,t,n,r);return e.has(this._edgeLabels,o)},n.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):i(this._isDirected,e,t,n),s=this._edgeObjs[r];return s&&(e=s.v,t=s.w,delete this._edgeLabels[r],delete this._edgeObjs[r],o(this._preds[t],e),o(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},n.prototype.inEdges=function(t,n){var r=this._in[t];if(r){var o=e.values(r);return n?e.filter(o,function(e){return e.v===n}):o}},n.prototype.outEdges=function(t,n){var r=this._out[t];if(r){var o=e.values(r);return n?e.filter(o,function(e){return e.w===n}):o}},n.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))},fl}function ld(){if(yl)return ml;yl=1;var e=ud(),t=cd();function n(t){return e.map(t.nodes(),function(n){var r=t.node(n),o=t.parent(n),i={v:n};return e.isUndefined(r)||(i.value=r),e.isUndefined(o)||(i.parent=o),i})}function r(t){return e.map(t.edges(),function(n){var r=t.edge(n),o={v:n.v,w:n.w};return e.isUndefined(n.name)||(o.name=n.name),e.isUndefined(r)||(o.value=r),o})}return ml={write:function(t){var o={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:n(t),edges:r(t)};e.isUndefined(t.graph())||(o.value=e.clone(t.graph()));return o},read:function(n){var r=new t(n.options).setGraph(n.value);return e.each(n.nodes,function(e){r.setNode(e.v,e.value),e.parent&&r.setParent(e.v,e.parent)}),e.each(n.edges,function(e){r.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),r}}}function fd(){if(wl)return bl;wl=1;var e=ud();return bl=function(t){var n,r={},o=[];function i(o){e.has(r,o)||(r[o]=!0,n.push(o),e.each(t.successors(o),i),e.each(t.predecessors(o),i))}return e.each(t.nodes(),function(e){n=[],i(e),n.length&&o.push(n)}),o}}function dd(){if(El)return _l;El=1;var e=ud();function t(){this._arr=[],this._keyIndices={}}return _l=t,t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(e){return e.key})},t.prototype.has=function(t){return e.has(this._keyIndices,t)},t.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},t.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(t,n){var r=this._keyIndices;if(t=String(t),!e.has(r,t)){var o=this._arr,i=o.length;return r[t]=i,o.push({key:t,priority:n}),this._decrease(i),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},t.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},t.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},t.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},t.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t},_l}function hd(){if(jl)return kl;jl=1;var e=ud(),t=dd();kl=function(e,r,o,i){return function(e,n,r,o){var i,a,s={},u=new t,c=function(e){var t=e.v!==i?e.v:e.w,n=s[t],o=r(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<n.distance&&(n.distance=c,n.predecessor=i,u.decrease(t,c))};e.nodes().forEach(function(e){var t=e===n?0:Number.POSITIVE_INFINITY;s[e]={distance:t},u.add(e,t)});for(;u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)o(i).forEach(c);return s}(e,String(r),o||n,i||function(t){return e.outEdges(t)})};var n=e.constant(1);return kl}function pd(){if(xl)return Ol;xl=1;var e=hd(),t=ud();return Ol=function(n,r,o){return t.transform(n.nodes(),function(t,i){t[i]=e(n,i,r,o)},{})}}function vd(){if(Cl)return Nl;Cl=1;var e=ud();return Nl=function(t){var n=0,r=[],o={},i=[];function a(s){var u=o[s]={onStack:!0,lowlink:n,index:n++};if(r.push(s),t.successors(s).forEach(function(t){e.has(o,t)?o[t].onStack&&(u.lowlink=Math.min(u.lowlink,o[t].index)):(a(t),u.lowlink=Math.min(u.lowlink,o[t].lowlink))}),u.lowlink===u.index){var c,l=[];do{c=r.pop(),o[c].onStack=!1,l.push(c)}while(s!==c);i.push(l)}}return t.nodes().forEach(function(t){e.has(o,t)||a(t)}),i}}function gd(){if(Bl)return Il;Bl=1;var e=ud(),t=vd();return Il=function(n){return e.filter(t(n),function(e){return e.length>1||1===e.length&&n.hasEdge(e[0],e[0])})}}function md(){if(Ml)return Sl;Ml=1;var e=ud();Sl=function(e,n,r){return function(e,t,n){var r={},o=e.nodes();return o.forEach(function(e){r[e]={},r[e][e]={distance:0},o.forEach(function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}})}),o.forEach(function(e){var t=r[e];o.forEach(function(n){var i=r[n];o.forEach(function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)})})}),r}(e,n||t,r||function(t){return e.outEdges(t)})};var t=e.constant(1);return Sl}function yd(){if(Pl)return Tl;Pl=1;var e=ud();function t(t){var r={},o={},i=[];if(e.each(t.sinks(),function a(s){if(e.has(o,s))throw new n;e.has(r,s)||(o[s]=!0,r[s]=!0,e.each(t.predecessors(s),a),delete o[s],i.push(s))}),e.size(r)!==t.nodeCount())throw new n;return i}function n(){}return Tl=t,t.CycleException=n,n.prototype=new Error,Tl}function bd(){if(Ll)return Al;Ll=1;var e=yd();return Al=function(t){try{e(t)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}}function wd(){if(Fl)return Dl;Fl=1;var e=ud();function t(n,r,o,i,a,s){e.has(i,r)||(i[r]=!0,o||s.push(r),e.each(a(r),function(e){t(n,e,o,i,a,s)}),o&&s.push(r))}return Dl=function(n,r,o){e.isArray(r)||(r=[r]);var i=(n.isDirected()?n.successors:n.neighbors).bind(n),a=[],s={};return e.each(r,function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);t(n,e,"post"===o,s,i,a)}),a}}function _d(){if(zl)return Rl;zl=1;var e=wd();return Rl=function(t,n){return e(t,n,"post")}}function Ed(){if($l)return Vl;$l=1;var e=wd();return Vl=function(t,n){return e(t,n,"pre")}}function kd(){if(Ul)return Gl;Ul=1;var e=ud(),t=cd(),n=dd();return Gl=function(r,o){var i,a=new t,s={},u=new n;function c(e){var t=e.v===i?e.w:e.v,n=u.priority(t);if(void 0!==n){var r=o(e);r<n&&(s[t]=i,u.decrease(t,r))}}if(0===r.nodeCount())return a;e.each(r.nodes(),function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)}),u.decrease(r.nodes()[0],0);var l=!1;for(;u.size()>0;){if(i=u.removeMin(),e.has(s,i))a.setEdge(i,s[i]);else{if(l)throw new Error("Input graph is not connected: "+r);l=!0}r.nodeEdges(i).forEach(c)}return a}}var jd=function(){if(Hl)return Yl;Hl=1;var e=gl?vl:(gl=1,vl={Graph:cd(),version:pl?hl:(pl=1,hl="2.1.8")});return Yl={Graph:e.Graph,json:ld(),alg:Wl?ql:(Wl=1,ql={components:fd(),dijkstra:hd(),dijkstraAll:pd(),findCycles:gd(),floydWarshall:md(),isAcyclic:bd(),postorder:_d(),preorder:Ed(),prim:kd(),tarjan:vd(),topsort:yd()}),version:e.version}}();const Od={};function xd(t){if(Od[t])return Od[t];const n=e.inject(t,null);if(!n){console.warn(`[whitelabel-modules] Missing injected composable: ${t}. Will retry on next call.`);const n=(...n)=>{const r=e.inject(t,null);if(!r)throw new Error(`[whitelabel-modules] ${t} still not provided.`);return Od[t]=r,r(...n)};return Od[t]=n,n}return Od[t]=n,n}exports.ProcessStatus=V,exports.Toaster_default=P,exports.getDefaultExportFromCjs=It,exports.interpolateTemplateFromVariableContext=A,exports.useConfirmation=()=>xd("cms-useConfirmation")(),exports.useCustomDialog=()=>xd("cms-useCustomDialog")(),exports.useFirebaseIntegration=e=>xd("cms-useFirebaseIntegration")(e),exports.useFlowBuilder=()=>xd("cms-useFlowBuilder")(),exports.useFormBuilder=()=>xd("cms-useFormBuilder")(),exports.useIntegrationActionBuilder=()=>xd("cms-useIntegrationActionBuilder")(),exports.useIntegrationActions=e=>xd("cms-useIntegrationActions")(e),exports.useIntegrations=()=>xd("cms-useIntegrations")(),exports.useLayout=function(){const{findNode:n}=t.useVueFlow(),r=e.ref(new jd.Graph({directed:!0}));return{graph:r,layout:function(e,o,i="TB"){const a=new dn.graphlib.Graph;a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:i});const s="LR"===i;for(const t of e){const e=n(t.id);a.setNode(t.id,{width:e?.dimensions.width||150,height:e?.dimensions.height||50})}for(const t of o)a.setEdge(t.source,t.target);dn.layout(a);const u=new jd.Graph({directed:!0});for(const t of e)u.setNode(t.id);for(const t of o)u.setEdge(t.source,t.target);return r.value=u,e.map(e=>{const n=a.node(e.id);return{...e,targetPosition:s?t.Position.Left:t.Position.Top,sourcePosition:s?t.Position.Right:t.Position.Bottom,position:{x:n.x,y:n.y}}})}}},exports.useLogs=()=>xd("cms-useLogs")(),exports.useMailer=e=>xd("cms-useMailer")(e),exports.useMediaLibrary=()=>xd("cms-useMediaLibrary")(),exports.useModule=()=>xd("cms-useModule")(),exports.useModuleBreadcrumbs=e=>xd("cms-useModuleBreadcrumbs")(e),exports.useModuleOverlay=()=>xd("cms-useModuleOverlay")(),exports.useModulePermissions=()=>xd("cms-useModulePermissions")(),exports.useModuleRoute=()=>xd("cms-useModuleRoute")(),exports.useModuleStorage=()=>xd("cms-useModuleStorage")(),exports.useOverlayStack=()=>xd("cms-useOverlayStack")(),exports.useProjectService=()=>xd("cms-useProjectService")(),exports.useProjectSettings=()=>xd("cms-useProjectSettings")(),exports.useQueryBuilder=()=>xd("cms-useQueryBuilder")(),exports.useRoute=()=>xd("cms-useRoute")(),exports.useRouter=()=>xd("cms-useRouter")(),exports.useRunProcess=function({graph:n,cancelOnError:r=!0,nodes:o=[],edges:i=[],variables:a=[],computedVariables:s=[],onFinish:u,flowBuilderExtensions:c=[]}){const{updateNodeData:l,getConnectedEdges:f,findNode:d}=t.useVueFlow(),h=new Map;let p=!1;const v=(...e)=>(p=!0,u?.(...e)),g=new Map(o.map(e=>[e.id,e])),m=e.toRef(()=>e.toValue(n)),y=e.ref(!1),b=new Map,w=new Set,_=new Set,E=e.ref(a?JSON.parse(JSON.stringify(a.map(e=>({...e,value:Object.keys(e).includes("defaultValue")?e.defaultValue:e.value??null})))):[]);async function k(t,n=!1){if(n&&"START"!==t||w.has(t))return;_.add(t);const o=f(t).filter(e=>e.target===t);if(await Promise.all(o.map(e=>async function(e){return new Promise(t=>{const n=setInterval(()=>{e()&&(clearInterval(n),t(!0))},100)})}(()=>!e.data?.isAnimating))),_.clear(),y.value){w.add(t),N(t,V.RUNNING);try{const e=m.value.predecessors(t)||[],n=Object.assign({},...e.map(e=>h.get(e)??{})),r={...Object.fromEntries(E.value.map(e=>[e.name,e.value])),...n},o=g?.size>0?g.get(t):d(t),a=function(e){const t={};return e.forEach(e=>{e.type?.value&&"function"==typeof e.processFunction&&(t[e.type.value]=e.processFunction)}),t}(c);console.log("processFunctions from extensions",a,"from",c);const s={...R,...a}[o.data.taskType??o.type];console.log("Running task:",o.data.taskType,s,c);const u=s?await s(r,{node:o,graph:m.value,onFinish:v,localVariables:E,flowBuilderExtensions:c}):{};h.set(t,u?JSON.parse(JSON.stringify(u)):{}),N(t,V.FINISHED);const l=i.filter(e=>e.source===t),f=l.some(e=>e.sourceHandle);for(const t of l){const{source:e,sourceHandle:n}=t,r=g.get(e).type,o="start"===r||"confirm"===r&&"success"===n&&!0===u.confirmed||"confirm"===r&&"error"===n&&!1===u.confirmed||"integration-action"===r&&"success"===n&&!0===u.result?.success||"integration-action"===r&&"error"===n&&!1===u.result?.success||"api-request"===r&&"success"===n&&!0===u.result?.success||"api-request"===r&&"error"===n&&!1===u.result?.success||"conditional"===r&&"success"===n&&!0===u.conditionMet||"conditional"===r&&"error"===n&&!1===u.conditionMet||!["confirm","integration-action","api-request","conditional"].includes(r)&&"success"===n;console.log("should run",o,r,n,u,f),o&&await k(t.target)}}catch(a){console.error(`Error in node ${t}:`,a),N(t,V.ERROR),e.toValue(r)&&await O(t)}}}function j(e){x();for(const t of e)N(t.id,null)}async function O(e){const t=m.value.successors(e)||[];for(const n of t)N(n,V.SKIPPED),await O(n)}function x(){y.value=!1,w.clear(),b.clear()}function N(e,t){l(e,{status:t})}return{run:async function(e){if(y.value)return;j(e),y.value=!0;const t=e.filter(e=>0===m.value.predecessors(e.id)?.length);await Promise.all(t.map(e=>k(e.id,!0))),0!==_.size||p||v(),x()},stop:async function(){y.value=!1;for(const e of _)clearTimeout(b.get(e)),b.delete(e),N(e,V.CANCELLED),await O(e);for(const[e,t]of b)clearTimeout(t),b.delete(e),N(e,V.CANCELLED),await O(e);w.clear(),_.clear()},reset:j,isRunning:y}},exports.useUtilsService=()=>xd("cms-useUtilsService")();
|