@a2simcode/dui 0.0.2 → 0.0.3
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.
|
@@ -14,9 +14,7 @@ declare function __VLS_template(): {
|
|
|
14
14
|
rootEl: HTMLDivElement;
|
|
15
15
|
};
|
|
16
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
-
config: DesignComponent;
|
|
19
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
20
18
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
19
|
export default _default;
|
|
22
20
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/dist/dui.es.js
CHANGED
|
@@ -1861,10 +1861,13 @@ const va = {
|
|
|
1861
1861
|
name: "DDragTool",
|
|
1862
1862
|
__name: "tool",
|
|
1863
1863
|
props: {
|
|
1864
|
-
config: {
|
|
1864
|
+
config: {}
|
|
1865
1865
|
},
|
|
1866
1866
|
setup(t) {
|
|
1867
|
-
const e = t, { onContextmenu: n, onMousedown: i, onClick: o } = Ms(
|
|
1867
|
+
const e = t, { onContextmenu: n, onMousedown: i, onClick: o } = Ms(
|
|
1868
|
+
e.config ?? { name: "", id: "" },
|
|
1869
|
+
!0
|
|
1870
|
+
);
|
|
1868
1871
|
return (s, r) => (V(), ne("div", {
|
|
1869
1872
|
class: "d-drag-tool",
|
|
1870
1873
|
onClick: r[0] || (r[0] = ze(
|
package/dist/dui.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(_e,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(_e=typeof globalThis<"u"?globalThis:_e||self,r(_e.DuiUI={},_e.Vue))})(this,(function(_e,r){"use strict";const mt=(t,e)=>(t.install=n=>{n.component(t.name,t),e&&e.forEach(o=>{n.component(o.name,o)})},t),Wt=(t="")=>{const e=Date.now(),n=Math.floor(Math.random()*1e9);return t===""?String(n)+String(e):t+"_"+n+String(e)},On={},wr=(t,e,n)=>{n[t]=n[t]||{};const o=Wt();return n[t][o]=e,o},_r=(t,e,n)=>{const o=[],i=n[t]||{};return Object.keys(i).forEach(s=>{const l=i[s];try{l&&o.push(l(e))}catch(a){console.error(a)}}),o},br=(t,e,n)=>{if(e){const o=n[t];o&&delete o[e]}else delete n[t]},Vo=(t,e)=>wr(t,e,On),we=(t,e)=>_r(t,e,On),xr=(t,e)=>{br(t,e,On)},Lo=(t,e,n,o,i,s)=>{const l=e.id,a=e.level,{getDesignLocals:d,selectComponent:c,getComponent:u,isMyChildComponent:f,addComponent:h,deleteComponent:g,getParentComponents:p,removeComponentFromContainer:m,addComponentToContainer:v,copyComponent:E,activedComponent:M,top:y}=r.inject("d-drag-design-provide",{}),C=[],$=r.ref(!1),O=r.ref(!1),L=r.ref(!1),j=r.ref(!1),W=r.ref(!1),G={id:"",type:""},F=r.ref(!1),N=r.ref(!1);let H="",_=null;const A=B=>{if(H===B)return _;H=B;const{top:U,left:K,width:te,height:ce}=t.value.getBoundingClientRect();return _=[{x:K,y:U},{x:K+te,y:U},{x:K+te,y:U+ce},{x:K,y:U+ce}],_},S=(B,U,K)=>{let te=U-K[0].y;te<0&&(te=-te);let ce=U-K[3].y;ce<0&&(ce=-ce);let q=B-K[0].x;q<0&&(q=-q);let ie=B-K[1].x;return ie<0&&(ie=-ie),{ly:te>ce?ce:te,typey:te>ce?"bottom":"top",lx:q>ie?ie:q,lallx:q+ie}},R=(B,U,K)=>B>=K[0].x&&B<=K[1].x&&U>=K[0].y&&U<=K[3].y,V=()=>{if(i){we("dragClick",{id:l});return}if(!O.value){if(c(l),a!==0){const B=t.value.getBoundingClientRect(),U=d();B.top-U.top<22?j.value=!0:j.value=!1}O.value=!0,we("dragClick",{id:l})}},T=B=>{const U=g(B);U&&r.nextTick(()=>{we("dragClick",{id:U})})},I=()=>{G.id="",G.type="",a===0&&(W.value=!1)},Y=()=>{we("mouseEnterOrLeave",{id:l,type:"enter"})},X=()=>{we("mouseEnterOrLeave",{id:l,type:"leave"})},J=B=>{we("dragClick",{id:B})},re={mouseEnterOrLeave:({id:B,type:U})=>{U==="enter"?C.push(B):C.length>0&&C.splice(C.length-1,1);const K=C.length;K>0&&l===C[K-1]?$.value=!0:$.value=!1},dragAciveChild:({type:B,id:U})=>{U===l?B==="top"?(F.value=!0,N.value=!1):(N.value=!0,F.value=!1):(N.value=!1,F.value=!1)},dragClick({id:B,isAgain:U}){console.log("dragClick",B,l),B!==l?O.value=!1:(U&&(O.value=!1),V())}};re[`dragGetChildDistance_${l}`]=({dragX:B,dragY:U,moveId:K})=>{const te=A(K);return S(B,U,te)};const P={isInContainer({x:B,y:U,id:K,moveId:te}){if(l===K||f(K,l))return L.value=!1,{isIn:!1,level:a,id:l,groupId:s};const ce=A(te);if(R(B,U,ce))return a===0&&(W.value=!0),{isIn:!0,level:a,id:l,groupId:s};if(a===0){const{ly:q,lx:ie}=S(B,U,ce);if(q<20&&ie<20)return W.value=!0,{isIn:!0,level:a,id:l,groupId:s};W.value=!1}return L.value=!1,{isIn:!1,level:a,id:l,groupId:s}},dragActiveContainer:({containerId:B,containerGroupId:U,dragX:K,dragY:te,moveId:ce})=>{if(B===l&&U===s)if(L.value=!0,o&&o.value.length>0){let q={ly:9999999,lx:0,lallx:0,id:"",typey:""};o?.value.forEach(ie=>{if(s&&ie.groupId!==s)return;const b=we(`dragGetChildDistance_${ie.id}`,{dragX:K,dragY:te,moveId:ce})[0];b&&(q.ly>b.ly||q.ly===b.ly&&(q.lx>b.lx||q.lx===b.lx&&q.lallx>b.lallx))&&(q=b,q.id=ie.id)}),G.id=q.id,G.type=q.typey,we("dragAciveChild",{id:q.id,type:q.typey})}else we("dragAciveChild",{id:""});else L.value=!1},dragAdd:B=>{if(L.value){let U=o?.value.length||0;G.id!==""&&G.id!==void 0&&(U=o?.value.findIndex(K=>K.id===G.id)||0,G.type==="bottom"&&(U+=1)),h(B,l,U,s),L.value=!1}I()},dragAddByClick:B=>{if(!M.value&&l===y.id||M.value?.id===l||M.value?.containerId===l&&M.value?.dragType!=="container"){const U=o?.value.length||0,K=h(B,l,U,s,!0);K&&B.config&&Object.keys(B.config).forEach(te=>{K.config[te]=B.config[te]})}},dragUpdate(B){if(L.value){const U=u(B);if(U.level=a+1,G.id!==U.id){m(U.containerId,B);let K=o?.value.findIndex(te=>te.id===G.id)||0;G.type==="bottom"&&(K+=1),v(U,l,K,s)}L.value=!1,r.nextTick(()=>{we("dragClick",{id:U.id,isAgain:!0})})}I()}},Z={};return r.onMounted(()=>{(!i||n!=="container")&&Object.keys(re).forEach(B=>{Z[B]=Vo(B,re[B])}),n==="container"&&Object.keys(P).forEach(B=>{Z[B]=Vo(B,P[B])}),e.isNewAdd&&r.nextTick(()=>{V(),delete e.isNewAdd})}),r.onUnmounted(()=>{Object.keys(Z).forEach(B=>{xr(B,Z[B])})}),{onMouseenter:Y,onMouseleave:X,activeComponent:V,handleComponentClick:J,deleteComponentByClick:T,copyComponent:E,getParentComponents:p,isBottomToolBar:j,isHover:$,isSelect:O,isToContainer:L,isMoveingInTopLevel:W,isTopActive:F,isBottomActive:N}},Fo=(t,e)=>{const n={x:0,y:0,clientX:0,clientY:0,dragElement:null,dragElementId:"jcode-darg-move-id",toContainerLevel:-1,toContainerId:"",groupId:"",id:""};let o=!1;const i=(g,p)=>{o!==!0&&(o=!0,setTimeout(()=>{g(),o=!1},p))},s=r.ref(!1),l=(g,p,m)=>{const v=document.createElement("div");return v.id=n.dragElementId,v.innerText=g,v.className="d-drag-move",v.style.top=`${p}px`,v.style.left=`${m}px`,document.body.appendChild(v),v},a=()=>{document.onmousemove=null,document.onmouseup=null,s.value=!1,we("dragAciveChild",{id:""})},d=()=>{a(),n.dragElement&&(n.dragElement.remove(),n.dragElement=null,e?we("dragAdd",t):we("dragUpdate",t.id))},c=g=>{const{clientY:p,clientX:m}=g;if(!n.dragElement){const v=Math.abs(n.x-m),E=Math.abs(n.y-p);if(v<=1&&E<=1)return;s.value=!0,n.dragElement=l(t.name,p-11,m-32)}n.dragElement.style.top=`${p-11}px`,n.dragElement.style.left=`${m-32}px`,n.clientX=m,n.clientY=p,i(()=>{if(!s.value)return;const v=we("isInContainer",{x:m,y:p,id:t.id,moveId:n.id});n.toContainerLevel=-1,n.toContainerId="",n.groupId="",v.forEach(({level:E,id:M,isIn:y,groupId:C})=>{y&&n.toContainerLevel<E&&(n.toContainerLevel=E,n.toContainerId=M,n.groupId=C)}),n.toContainerId!==""?we("dragActiveContainer",{containerId:n.toContainerId,containerGroupId:n.groupId,dragX:m,dragY:p,moveId:n.id}):we("dragAciveChild",{id:""})},100)};return{onContextmenu:()=>{a()},onMousedown:g=>{n.x=g.clientX,n.y=g.clientY,n.id=Wt(),document.onmouseup=d,document.onmousemove=c},onClick:()=>{we("dragAddByClick",t)},moveActive:s}},Er=t=>(t.install=e=>{e.component(t.name,t)},t),Cr=t=>!!(t==null||typeof t=="string"&&t.trim()===""||Array.isArray(t)&&t.length===0||typeof t=="object"&&Object.keys(t).length===0),Go=/^[a-z0-9]+(-[a-z0-9]+)*$/,Yt=(t,e,n,o="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;o=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const a=i.pop(),d=i.pop(),c={provider:i.length>0?i[0]:o,prefix:d,name:a};return e&&!Ut(c)?null:c}const s=i[0],l=s.split("-");if(l.length>1){const a={provider:o,prefix:l.shift(),name:l.join("-")};return e&&!Ut(a)?null:a}if(n&&o===""){const a={provider:o,prefix:"",name:s};return e&&!Ut(a,n)?null:a}return null},Ut=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1,Wo=Object.freeze({left:0,top:0,width:16,height:16}),Xt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),yt=Object.freeze({...Wo,...Xt}),Hn=Object.freeze({...yt,body:"",hidden:!1});function Nr(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const o=((t.rotate||0)+(e.rotate||0))%4;return o&&(n.rotate=o),n}function Yo(t,e){const n=Nr(t,e);for(const o in Hn)o in Xt?o in t&&!(o in n)&&(n[o]=Xt[o]):o in e?n[o]=e[o]:o in t&&(n[o]=t[o]);return n}function kr(t,e){const n=t.icons,o=t.aliases||Object.create(null),i=Object.create(null);function s(l){if(n[l])return i[l]=[];if(!(l in i)){i[l]=null;const a=o[l]&&o[l].parent,d=a&&s(a);d&&(i[l]=[a].concat(d))}return i[l]}return Object.keys(n).concat(Object.keys(o)).forEach(s),i}function Sr(t,e,n){const o=t.icons,i=t.aliases||Object.create(null);let s={};function l(a){s=Yo(o[a]||i[a],s)}return l(e),n.forEach(l),Yo(t,s)}function Uo(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(i=>{e(i,null),n.push(i)});const o=kr(t);for(const i in o){const s=o[i];s&&(e(i,Sr(t,i,s)),n.push(i))}return n}const Mr={provider:"",aliases:{},not_found:{},...Wo};function Vn(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Xo(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!Vn(t,Mr))return null;const n=e.icons;for(const i in n){const s=n[i];if(!i||typeof s.body!="string"||!Vn(s,Hn))return null}const o=e.aliases||Object.create(null);for(const i in o){const s=o[i],l=s.parent;if(!i||typeof l!="string"||!n[l]&&!o[l]||!Vn(s,Hn))return null}return e}const jo=Object.create(null);function Dr(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function it(t,e){const n=jo[t]||(jo[t]=Object.create(null));return n[e]||(n[e]=Dr(t,e))}function Zo(t,e){return Xo(e)?Uo(e,(n,o)=>{o?t.icons[n]=o:t.missing.add(n)}):[]}function zr(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let vt=!1;function qo(t){return typeof t=="boolean"&&(vt=t),vt}function Ko(t){const e=typeof t=="string"?Yt(t,!0,vt):t;if(e){const n=it(e.provider,e.prefix),o=e.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function Tr(t,e){const n=Yt(t,!0,vt);if(!n)return!1;const o=it(n.provider,n.prefix);return e?zr(o,n.name,e):(o.missing.add(n.name),!0)}function Ir(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),vt&&!e&&!t.prefix){let i=!1;return Xo(t)&&(t.prefix="",Uo(t,(s,l)=>{Tr(s,l)&&(i=!0)})),i}const n=t.prefix;if(!Ut({prefix:n,name:"a"}))return!1;const o=it(e,n);return!!Zo(o,t)}function Qo(t){const e=Ko(t);return e&&{...yt,...e}}const Jo=Object.freeze({width:null,height:null}),ei=Object.freeze({...Jo,...Xt}),Br=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Rr=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ti(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const o=t.split(Br);if(o===null||!o.length)return t;const i=[];let s=o.shift(),l=Rr.test(s);for(;;){if(l){const a=parseFloat(s);isNaN(a)?i.push(s):i.push(Math.ceil(a*e*n)/n)}else i.push(s);if(s=o.shift(),s===void 0)return i.join("");l=!l}}function Ar(t,e="defs"){let n="";const o=t.indexOf("<"+e);for(;o>=0;){const i=t.indexOf(">",o),s=t.indexOf("</"+e);if(i===-1||s===-1)break;const l=t.indexOf(">",s);if(l===-1)break;n+=t.slice(i+1,s).trim(),t=t.slice(0,o).trim()+t.slice(l+1)}return{defs:n,content:t}}function $r(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Pr(t,e,n){const o=Ar(t);return $r(o.defs,e+o.content+n)}const Or=t=>t==="unset"||t==="undefined"||t==="none";function Hr(t,e){const n={...yt,...t},o={...ei,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,o].forEach(m=>{const v=[],E=m.hFlip,M=m.vFlip;let y=m.rotate;E?M?y+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):M&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(y<0&&(y-=Math.floor(y/4)*4),y=y%4,y){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}y%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(s=Pr(s,'<g transform="'+v.join(" ")+'">',"</g>"))});const l=o.width,a=o.height,d=i.width,c=i.height;let u,f;l===null?(f=a===null?"1em":a==="auto"?c:a,u=ti(f,d/c)):(u=l==="auto"?d:l,f=a===null?ti(u,c/d):a==="auto"?c:a);const h={},g=(m,v)=>{Or(v)||(h[m]=v.toString())};g("width",u),g("height",f);const p=[i.left,i.top,d,c];return h.viewBox=p.join(" "),{attributes:h,viewBox:p,body:s}}const Vr=/\sid="(\S+)"/g,Lr="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Fr=0;function Gr(t,e=Lr){const n=[];let o;for(;o=Vr.exec(t);)n.push(o[1]);if(!n.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const l=typeof e=="function"?e(s):e+(Fr++).toString(),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+l+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}const Ln=Object.create(null);function Wr(t,e){Ln[t]=e}function Fn(t){return Ln[t]||Ln[""]}function Gn(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Wn=Object.create(null),wt=["https://api.simplesvg.com","https://api.unisvg.com"],jt=[];for(;wt.length>0;)wt.length===1||Math.random()>.5?jt.push(wt.shift()):jt.push(wt.pop());Wn[""]=Gn({resources:["https://api.iconify.design"].concat(jt)});function Yr(t,e){const n=Gn(e);return n===null?!1:(Wn[t]=n,!0)}function Yn(t){return Wn[t]}let ni=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function Ur(t,e){const n=Yn(t);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let i=0;n.resources.forEach(l=>{i=Math.max(i,l.length)});const s=e+".json?icons=";o=n.maxURL-i-n.path.length-s.length}return o}function Xr(t){return t===404}const jr=(t,e,n)=>{const o=[],i=Ur(t,e),s="icons";let l={type:s,provider:t,prefix:e,icons:[]},a=0;return n.forEach((d,c)=>{a+=d.length+1,a>=i&&c>0&&(o.push(l),l={type:s,provider:t,prefix:e,icons:[]},a=d.length),l.icons.push(d)}),o.push(l),o};function Zr(t){if(typeof t=="string"){const e=Yn(t);if(e)return e.path}return"/"}const qr={prepare:jr,send:(t,e,n)=>{if(!ni){n("abort",424);return}let o=Zr(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),d=new URLSearchParams({icons:a});o+=s+".json?"+d.toString();break}case"custom":{const s=e.uri;o+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;ni(t+o).then(s=>{const l=s.status;if(l!==200){setTimeout(()=>{n(Xr(l)?"abort":"next",l)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})}};function Kr(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let o={provider:"",prefix:"",name:""};return t.forEach(i=>{if(o.name===i.name&&o.prefix===i.prefix&&o.provider===i.provider)return;o=i;const s=i.provider,l=i.prefix,a=i.name,d=n[s]||(n[s]=Object.create(null)),c=d[l]||(d[l]=it(s,l));let u;a in c.icons?u=e.loaded:l===""||c.missing.has(a)?u=e.missing:u=e.pending;const f={provider:s,prefix:l,name:a};u.push(f)}),e}function oi(t,e){t.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(i=>i.id!==e))})}function Qr(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const o=t.provider,i=t.prefix;e.forEach(s=>{const l=s.icons,a=l.pending.length;l.pending=l.pending.filter(d=>{if(d.prefix!==i)return!0;const c=d.name;if(t.icons[c])l.loaded.push({provider:o,prefix:i,name:c});else if(t.missing.has(c))l.missing.push({provider:o,prefix:i,name:c});else return n=!0,!0;return!1}),l.pending.length!==a&&(n||oi([t],s.id),s.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),s.abort))})}))}let Jr=0;function el(t,e,n){const o=Jr++,i=oi.bind(null,n,o);if(!e.pending.length)return i;const s={id:o,icons:e,callback:t,abort:i};return n.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(s)}),i}function tl(t,e=!0,n=!1){const o=[];return t.forEach(i=>{const s=typeof i=="string"?Yt(i,e,n):i;s&&o.push(s)}),o}var nl={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ol(t,e,n,o){const i=t.resources.length,s=t.random?Math.floor(Math.random()*i):t.index;let l;if(t.random){let O=t.resources.slice(0);for(l=[];O.length>1;){const L=Math.floor(Math.random()*O.length);l.push(O[L]),O=O.slice(0,L).concat(O.slice(L+1))}l=l.concat(O)}else l=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let d="pending",c=0,u,f=null,h=[],g=[];typeof o=="function"&&g.push(o);function p(){f&&(clearTimeout(f),f=null)}function m(){d==="pending"&&(d="aborted"),p(),h.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),h=[]}function v(O,L){L&&(g=[]),typeof O=="function"&&g.push(O)}function E(){return{startTime:a,payload:e,status:d,queriesSent:c,queriesPending:h.length,subscribe:v,abort:m}}function M(){d="failed",g.forEach(O=>{O(void 0,u)})}function y(){h.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),h=[]}function C(O,L,j){const W=L!=="success";switch(h=h.filter(G=>G!==O),d){case"pending":break;case"failed":if(W||!t.dataAfterTimeout)return;break;default:return}if(L==="abort"){u=j,M();return}if(W){u=j,h.length||(l.length?$():M());return}if(p(),y(),!t.random){const G=t.resources.indexOf(O.resource);G!==-1&&G!==t.index&&(t.index=G)}d="completed",g.forEach(G=>{G(j)})}function $(){if(d!=="pending")return;p();const O=l.shift();if(O===void 0){if(h.length){f=setTimeout(()=>{p(),d==="pending"&&(y(),M())},t.timeout);return}M();return}const L={status:"pending",resource:O,callback:(j,W)=>{C(L,j,W)}};h.push(L),c++,f=setTimeout($,t.rotate),n(O,e,L.callback)}return setTimeout($),E}function ii(t){const e={...nl,...t};let n=[];function o(){n=n.filter(a=>a().status==="pending")}function i(a,d,c){const u=ol(e,a,d,(f,h)=>{o(),c&&c(f,h)});return n.push(u),u}function s(a){return n.find(d=>a(d))||null}return{query:i,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:o}}function si(){}const Un=Object.create(null);function il(t){if(!Un[t]){const e=Yn(t);if(!e)return;const n=ii(e),o={config:e,redundancy:n};Un[t]=o}return Un[t]}function sl(t,e,n){let o,i;if(typeof t=="string"){const s=Fn(t);if(!s)return n(void 0,424),si;i=s.send;const l=il(t);l&&(o=l.redundancy)}else{const s=Gn(t);if(s){o=ii(s);const l=t.resources?t.resources[0]:"",a=Fn(l);a&&(i=a.send)}}return!o||!i?(n(void 0,424),si):o.query(e,i,n)().abort}function ri(){}function rl(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Qr(t)}))}function ll(t){const e=[],n=[];return t.forEach(o=>{(o.match(Go)?e:n).push(o)}),{valid:e,invalid:n}}function _t(t,e,n){function o(){const i=t.pendingIcons;e.forEach(s=>{i&&i.delete(s),t.icons[s]||t.missing.add(s)})}if(n&&typeof n=="object")try{if(!Zo(t,n).length){o();return}}catch(i){console.error(i)}o(),rl(t)}function li(t,e){t instanceof Promise?t.then(n=>{e(n)}).catch(()=>{e(null)}):e(t)}function al(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:o}=t,i=t.iconsToLoad;if(delete t.iconsToLoad,!i||!i.length)return;const s=t.loadIcon;if(t.loadIcons&&(i.length>1||!s)){li(t.loadIcons(i,o,n),u=>{_t(t,i,u)});return}if(s){i.forEach(u=>{const f=s(u,o,n);li(f,h=>{const g=h?{prefix:o,icons:{[u]:h}}:null;_t(t,[u],g)})});return}const{valid:l,invalid:a}=ll(i);if(a.length&&_t(t,a,null),!l.length)return;const d=o.match(Go)?Fn(n):null;if(!d){_t(t,l,null);return}d.prepare(n,o,l).forEach(u=>{sl(n,u,f=>{_t(t,u.icons,f)})})}))}const cl=(t,e)=>{const n=tl(t,!0,qo()),o=Kr(n);if(!o.pending.length){let d=!0;return e&&setTimeout(()=>{d&&e(o.loaded,o.missing,o.pending,ri)}),()=>{d=!1}}const i=Object.create(null),s=[];let l,a;return o.pending.forEach(d=>{const{provider:c,prefix:u}=d;if(u===a&&c===l)return;l=c,a=u,s.push(it(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),o.pending.forEach(d=>{const{provider:c,prefix:u,name:f}=d,h=it(c,u),g=h.pendingIcons||(h.pendingIcons=new Set);g.has(f)||(g.add(f),i[c][u].push(f))}),s.forEach(d=>{const c=i[d.provider][d.prefix];c.length&&al(d,c)}),e?el(e,o,s):ri};function dl(t,e){const n={...t};for(const o in e){const i=e[o],s=typeof i;o in Jo?(i===null||i&&(s==="string"||s==="number"))&&(n[o]=i):s===typeof n[o]&&(n[o]=o==="rotate"?i%4:i)}return n}const ul=/[\s,]+/;function fl(t,e){e.split(ul).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function hl(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function o(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(t);return isNaN(i)?0:o(i)}else if(n!==t){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?o(s):0)}}return e}function gl(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in e)n+=" "+o+'="'+e[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function pl(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ml(t){return"data:image/svg+xml,"+pl(t)}function yl(t){return'url("'+ml(t)+'")'}const ai={...ei,inline:!1},vl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},wl={display:"inline-block"},Xn={backgroundColor:"currentColor"},ci={backgroundColor:"transparent"},di={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},ui={webkitMask:Xn,mask:Xn,background:ci};for(const t in ui){const e=ui[t];for(const n in di)e[t+n]=di[n]}const Zt={};["horizontal","vertical"].forEach(t=>{const e=t.slice(0,1)+"Flip";Zt[t+"-flip"]=e,Zt[t.slice(0,1)+"-flip"]=e,Zt[t+"Flip"]=e});function fi(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const hi=(t,e)=>{const n=dl(ai,e),o={...vl},i=e.mode||"svg",s={},l=e.style,a=typeof l=="object"&&!(l instanceof Array)?l:{};for(let m in e){const v=e[m];if(v!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[m]=v===!0||v==="true"||v===1;break;case"flip":typeof v=="string"&&fl(n,v);break;case"color":s.color=v;break;case"rotate":typeof v=="string"?n[m]=hl(v):typeof v=="number"&&(n[m]=v);break;case"ariaHidden":case"aria-hidden":v!==!0&&v!=="true"&&delete o["aria-hidden"];break;default:{const E=Zt[m];E?(v===!0||v==="true"||v===1)&&(n[E]=!0):ai[m]===void 0&&(o[m]=v)}}}const d=Hr(t,n),c=d.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),i==="svg"){o.style={...s,...a},Object.assign(o,c);let m=0,v=e.id;return typeof v=="string"&&(v=v.replace(/-/g,"_")),o.innerHTML=Gr(d.body,v?()=>v+"ID"+m++:"iconifyVue"),r.h("svg",o)}const{body:u,width:f,height:h}=t,g=i==="mask"||(i==="bg"?!1:u.indexOf("currentColor")!==-1),p=gl(u,{...c,width:f+"",height:h+""});return o.style={...s,"--svg":yl(p),width:fi(c.width),height:fi(c.height),...wl,...g?Xn:ci,...a},r.h("span",o)};if(qo(!0),Wr("",qr),typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Ir(o))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const o="IconifyProviders["+n+"] is invalid.";try{const i=e[n];if(typeof i!="object"||!i||i.resources===void 0)continue;Yr(n,i)||console.error(o)}catch{console.error(o)}}}}const _l={...yt,body:""},gi=r.defineComponent((t,{emit:e})=>{const n=r.ref(null);function o(){n.value&&(n.value.abort?.(),n.value=null)}const i=r.ref(!!t.ssr),s=r.ref(""),l=r.shallowRef(null);function a(){const c=t.icon;if(typeof c=="object"&&c!==null&&typeof c.body=="string")return s.value="",{data:c};let u;if(typeof c!="string"||(u=Yt(c,!1,!0))===null)return null;let f=Ko(u);if(!f){const p=n.value;return(!p||p.name!==c)&&(f===null?n.value={name:c}:n.value={name:c,abort:cl([u],d)}),null}o(),s.value!==c&&(s.value=c,r.nextTick(()=>{e("load",c)}));const h=t.customise;if(h){f=Object.assign({},f);const p=h(f.body,u.name,u.prefix,u.provider);typeof p=="string"&&(f.body=p)}const g=["iconify"];return u.prefix!==""&&g.push("iconify--"+u.prefix),u.provider!==""&&g.push("iconify--"+u.provider),{data:f,classes:g}}function d(){const c=a();c?c.data!==l.value?.data&&(l.value=c):l.value=null}return i.value?d():r.onMounted(()=>{i.value=!0,d()}),r.watch(()=>t.icon,d),r.onUnmounted(o),()=>{const c=l.value;if(!c)return hi(_l,t);let u=t;return c.classes&&(u={...t,class:c.classes.join(" ")}),hi({...yt,...c.data},u)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]}),bt=r.defineComponent({name:"JIcon",inheritAttrs:!1,__name:"icon",props:{icon:{},size:{default:16},color:{default:void 0},rotate:{default:void 0},isDiv:{type:Boolean,default:!0}},setup(t){const e=t,n=r.computed(()=>{const i=e.icon;if(i.indexOf(":")===-1)return Qo(`jcode:${e.icon}`)==null,`jcode:${e.icon}`;const l=`jcode:${i.split(":")[1]}`;return Qo(l)!=null?l:i}),o=r.computed(()=>({size:e.size,color:e.color,icon:n.value}));return(i,s)=>t.isDiv?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0},i.$attrs,{class:"j-icon jicon",style:{height:`${t.size}px`}}),[r.createVNode(r.unref(gi),r.mergeProps(o.value,{height:`${t.size}px`,width:`${t.size}px`,mode:"svg",style:`transform:rotate(${t.rotate||0}deg)`}),null,16,["height","width","style"])],16)):(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:1},i.$attrs,{class:"jicon"}),[r.createVNode(r.unref(gi),r.mergeProps(o.value,{height:`${t.size}px`,width:`${t.size}px`,mode:"svg",style:`transform:rotate(${t.rotate||0}deg)`}),null,16,["height","width","style"])],16))}}),bl=["disabled"],xl={key:2},st=Er(r.defineComponent({name:"JButton",__name:"button",props:{type:{type:String,default:"default"},size:{type:String,default:"default"},shape:{type:String,default:"default"},ghost:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},block:{type:Boolean,default:!1},loading:{type:[Boolean,Object],default:()=>!1},icon:{type:String,default:""},href:{type:String,default:""},target:{type:String,default:"_self"},label:{type:String,default:""},notLabel:{type:Boolean,default:!1},compact:Boolean,lastCompactItem:Boolean,firstCompactItem:Boolean},emits:["click"],setup(t,{expose:e,emit:n}){const o=t,i=n,s=h=>{!u.value&&!o.disabled&&(i("click",h),o.href&&window.open(o.href,o.target?o.target:"_self"))},l=r.shallowRef(null),a=()=>{l.value?.focus()},d=()=>{l.value?.blur()},c=r.computed(()=>o.notLabel||!o.label),u=r.ref(!1);r.watch(()=>o.loading,h=>{if(typeof h=="boolean")u.value=h;else if(Cr(h?.delay))u.value=!1;else{const g=setTimeout(()=>{u.value=!0},h.delay);return()=>clearTimeout(g)}},{immediate:!0});const f=r.computed(()=>o.label||"");return e({focus:a,blur:d}),(h,g)=>(r.openBlock(),r.createElementBlock("button",{ref_key:"buttonNodeRef",ref:l,type:"button",class:r.normalizeClass(["j-button",{"j-button-primary":t.type=="primary","j-button-default":t.type=="default","j-button-dashed":t.type=="dashed","j-button-link":t.type=="link","j-button-text":t.type=="text","j-button-ghost":t.ghost==!0,"j-button-danger":t.danger==!0,"j-button-lg":t.size=="large","j-button-sm":t.size=="small","j-button-circle":t.shape=="circle","j-button-round":t.shape=="round","j-button-block":t.block==!0,"j-button-loading":u.value==!0,"j-button-icon-only":c.value==!0,"j-button-compact":t.compact==!0,"j-button-last-compact-item":t.lastCompactItem==!0,"j-button-first-compact-item":t.firstCompactItem==!0}]),disabled:t.disabled,onClick:r.withModifiers(s,["stop"])},[u.value?(r.openBlock(),r.createBlock(bt,{key:0,icon:"mdi:loading",size:t.size=="large"?14:12,class:"loading-spin j-button-loading-icon"},null,8,["size"])):r.createCommentVNode("",!0),t.icon?(r.openBlock(),r.createBlock(bt,{key:1,icon:t.icon},null,8,["icon"])):r.createCommentVNode("",!0),t.notLabel?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",xl,r.toDisplayString(f.value),1)),r.renderSlot(h.$slots,"iconAfter")],10,bl))}})),El={class:"d-drag-btns-pname"},Cl={key:0,class:"d-drag-mask"},jn=r.defineComponent({name:"DDrag",__name:"drag",props:{componentData:{default:()=>({})},isContainer:{type:Boolean,default:!1}},setup(t){const e=t,n=r.ref(),{onMouseenter:o,onMouseleave:i,activeComponent:s,handleComponentClick:l,deleteComponentByClick:a,copyComponent:d,getParentComponents:c,isHover:u,isSelect:f,isTopActive:h,isBottomActive:g,isBottomToolBar:p}=Lo(n,e.componentData,"component"),{onContextmenu:m,onMousedown:v,moveActive:E}=Fo(e.componentData,!1);return(M,y)=>{const C=r.resolveComponent("el-space");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["d-drag-component",{selected:r.unref(f),hovered:r.unref(u),isBottomToolBar:r.unref(p),active:r.unref(E),isTopActive:r.unref(h),isBottomActive:r.unref(g)}])},[y[11]||(y[11]=r.createElementVNode("div",{class:"d-drag-line"},null,-1)),r.createElementVNode("div",{class:"d-drag-btns",onMouseenter:y[4]||(y[4]=(...$)=>r.unref(o)&&r.unref(o)(...$)),onMouseleave:y[5]||(y[5]=(...$)=>r.unref(i)&&r.unref(i)(...$))},[r.createVNode(C,{size:4},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"d-drag-btns-names",onClick:r.withModifiers(()=>{},["stop"])},[r.createVNode(r.unref(st),{class:"d-drag-btn",type:"primary",size:"small",label:t.componentData.name},null,8,["label"]),r.createElementVNode("div",El,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c)(t.componentData.containerId),$=>(r.openBlock(),r.createElementBlock("div",{key:$.id},[r.createVNode(r.unref(st),{class:"d-drag-btn",type:"primary",size:"small",label:$.name,onClick:O=>r.unref(l)($.id)},null,8,["label","onClick"])]))),128))])]),r.createVNode(r.unref(st),{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:content-copy",onClick:y[0]||(y[0]=r.withModifiers($=>r.unref(d)(t.componentData.id),["stop"]))}),r.createElementVNode("div",{onContextmenu:y[1]||(y[1]=r.withModifiers((...$)=>r.unref(m)&&r.unref(m)(...$),["stop"])),onMousedown:y[2]||(y[2]=r.withModifiers((...$)=>r.unref(v)&&r.unref(v)(...$),["stop"])),style:{display:"flex"}},[r.createVNode(r.unref(st),{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:drag"})],32),r.createVNode(r.unref(st),{class:"d-drag-btn",danger:"",type:"primary",size:"small",icon:"mdi:delete",onClick:y[3]||(y[3]=r.withModifiers($=>r.unref(a)(t.componentData.id),["stop"]))})]),_:1})],32),r.createElementVNode("div",{ref_key:"refDrag",ref:n,class:"d-drag-body",onClick:y[6]||(y[6]=r.withModifiers((...$)=>r.unref(s)&&r.unref(s)(...$),["stop"])),onContextmenu:y[7]||(y[7]=r.withModifiers((...$)=>r.unref(m)&&r.unref(m)(...$),["stop"])),onMousedown:y[8]||(y[8]=r.withModifiers((...$)=>r.unref(v)&&r.unref(v)(...$),["stop"])),onMouseenter:y[9]||(y[9]=(...$)=>r.unref(o)&&r.unref(o)(...$)),onMouseleave:y[10]||(y[10]=(...$)=>r.unref(i)&&r.unref(i)(...$))},[r.renderSlot(M.$slots,"default"),t.isContainer?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Cl))],544)],2)}}}),Zn=r.defineComponent({name:"DDragTool",__name:"tool",props:{config:{default:()=>({})}},setup(t){const e=t,{onContextmenu:n,onMousedown:o,onClick:i}=Fo(e.config,!0);return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:"d-drag-tool",onClick:l[0]||(l[0]=r.withModifiers((...a)=>r.unref(i)&&r.unref(i)(...a),["stop"])),onContextmenu:l[1]||(l[1]=r.withModifiers((...a)=>r.unref(n)&&r.unref(n)(...a),["stop"])),onMousedown:l[2]||(l[2]=r.withModifiers((...a)=>r.unref(o)&&r.unref(o)(...a),["stop"]))},[r.renderSlot(s.$slots,"default")],32))}}),Nl={key:0,class:"d-drag-line"},kl={key:1,class:"d-drag-btns"},qn=r.defineComponent({name:"DDragContainer",__name:"container",props:{componentData:{default:()=>({})},isComponentContainer:{type:Boolean,default:!0},groupId:{default:void 0}},setup(t){const e=t,n=r.ref(),o=r.computed(()=>e.componentData?.children||[]),{onMouseenter:i,onMouseleave:s,activeComponent:l,isHover:a,isSelect:d,isToContainer:c,isMoveingInTopLevel:u,isTopActive:f,isBottomActive:h}=Lo(n,e.componentData,"container",o,e.isComponentContainer,e.groupId),g=r.computed(()=>!!(o.value.findIndex(p=>p.groupId===e.groupId)===-1&&c.value));return(p,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"refDrag",ref:n,class:r.normalizeClass(["d-drag-container",{selected:r.unref(d)&&!t.isComponentContainer,hovered:r.unref(a)&&!t.isComponentContainer,isTopLevel:t.componentData.level===0,active:g.value,isMoveingInTopLevel:r.unref(u),isTopActive:r.unref(f),isBottomActive:r.unref(h)}])},[t.isComponentContainer?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Nl)),t.isComponentContainer?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",kl,[r.createElementVNode("div",{class:"d-drag-btns-names",onClick:r.withModifiers(()=>{},["stop"])},[r.createVNode(r.unref(st),{class:"d-drag-btn",type:"primary",size:"small",label:t.componentData.name},null,8,["label"])])])),r.createElementVNode("div",{class:"d-drag-body",onClick:m[0]||(m[0]=r.withModifiers((...v)=>r.unref(l)&&r.unref(l)(...v),["stop"])),onMouseenter:m[1]||(m[1]=(...v)=>r.unref(i)&&r.unref(i)(...v)),onMouseleave:m[2]||(m[2]=(...v)=>r.unref(s)&&r.unref(s)(...v))},[r.renderSlot(p.$slots,"default")],32)],2))}}),Kn=r.defineComponent({name:"DDragFormList",__name:"dragFormList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(t){const{designItemName:e}=r.inject("dui-design-provide",{});return(n,o)=>{const i=r.resolveComponent("el-col");return r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.componentList,s=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:s.id},[s.type!="pkey"?(r.openBlock(),r.createBlock(i,{key:0,span:s.config.span||24},{default:r.withCtx(()=>[r.createVNode(jn,{"is-container":s.dragType!=="component","component-data":s},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(e)),{"component-data":s,"global-config":t.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["is-container","component-data"])]),_:2},1032,["span"])):r.createCommentVNode("",!0)],64))),128)}}}),Qn=r.defineComponent({name:"DDragIndexList",__name:"dragIndexList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(t){const{designItemName:e}=r.inject("dui-design-provide",{}),n=o=>{if(o.flexWidth)return{width:o.flexWidth+"%"}};return(o,i)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.componentList,s=>(r.openBlock(),r.createBlock(jn,{key:s.id,style:r.normalizeStyle(n(s.config)),"is-container":s.dragType!=="component","component-data":s},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(e)),{"component-data":s,"global-config":t.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["style","is-container","component-data"]))),128))}}),pi=mt(jn,[Zn,qn,Kn,Qn]);function xt(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Pe(t){return typeof t=="function"?t():r.unref(t)}const Sl=typeof window<"u"&&typeof document<"u",Ml=t=>typeof t<"u",Dl=Object.prototype.toString,zl=t=>Dl.call(t)==="[object Object]",Tl=()=>{};function Il(t,e){function n(...o){return new Promise((i,s)=>{Promise.resolve(t(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})).then(i).catch(s)})}return n}const mi=t=>t();function Bl(t=mi){const e=r.ref(!0);function n(){e.value=!1}function o(){e.value=!0}const i=(...s)=>{e.value&&t(...s)};return{isActive:r.readonly(e),pause:n,resume:o,eventFilter:i}}function yi(t,e=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(e?()=>i(n):o,t)})}function Rl(t,e,n={}){const{eventFilter:o=mi,...i}=n;return r.watch(t,Il(o,e),i)}function rt(t,e,n={}){const{eventFilter:o,...i}=n,{eventFilter:s,pause:l,resume:a,isActive:d}=Bl(o);return{stop:Rl(t,e,{...i,eventFilter:s}),pause:l,resume:a,isActive:d}}function Al(t,e={}){if(!r.isRef(t))return r.toRefs(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const o in t.value)n[o]=r.customRef(()=>({get(){return t.value[o]},set(i){var s;if((s=Pe(e.replaceRef))!=null?s:!0)if(Array.isArray(t.value)){const a=[...t.value];a[o]=i,t.value=a}else{const a={...t.value,[o]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[o]=i}}));return n}function Jn(t,e=!1){function n(f,{flush:h="sync",deep:g=!1,timeout:p,throwOnTimeout:m}={}){let v=null;const M=[new Promise(y=>{v=r.watch(t,C=>{f(C)!==e&&(v?.(),y(C))},{flush:h,deep:g,immediate:!0})})];return p!=null&&M.push(yi(p,m).then(()=>Pe(t)).finally(()=>v?.())),Promise.race(M)}function o(f,h){if(!r.isRef(f))return n(C=>C===f,h);const{flush:g="sync",deep:p=!1,timeout:m,throwOnTimeout:v}=h??{};let E=null;const y=[new Promise(C=>{E=r.watch([t,f],([$,O])=>{e!==($===O)&&(E?.(),C($))},{flush:g,deep:p,immediate:!0})})];return m!=null&&y.push(yi(m,v).then(()=>Pe(t)).finally(()=>(E?.(),Pe(t)))),Promise.race(y)}function i(f){return n(h=>!!h,f)}function s(f){return o(null,f)}function l(f){return o(void 0,f)}function a(f){return n(Number.isNaN,f)}function d(f,h){return n(g=>{const p=Array.from(g);return p.includes(f)||p.includes(Pe(f))},h)}function c(f){return u(1,f)}function u(f=1,h){let g=-1;return n(()=>(g+=1,g>=f),h)}return Array.isArray(Pe(t))?{toMatch:n,toContains:d,changed:c,changedTimes:u,get not(){return Jn(t,!e)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:s,toBeNaN:a,toBeUndefined:l,changed:c,changedTimes:u,get not(){return Jn(t,!e)}}}function eo(t){return Jn(t)}function $l(t){var e;const n=Pe(t);return(e=n?.$el)!=null?e:n}const vi=Sl?window:void 0;function wi(...t){let e,n,o,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,i]=t,e=vi):[e,n,o,i]=t,!e)return Tl;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],l=()=>{s.forEach(u=>u()),s.length=0},a=(u,f,h,g)=>(u.addEventListener(f,h,g),()=>u.removeEventListener(f,h,g)),d=r.watch(()=>[$l(e),Pe(i)],([u,f])=>{if(l(),!u)return;const h=zl(f)?{...f}:f;s.push(...n.flatMap(g=>o.map(p=>a(u,g,p,h))))},{immediate:!0,flush:"post"}),c=()=>{d(),l()};return xt(c),c}function Pl(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function _i(...t){let e,n,o={};t.length===3?(e=t[0],n=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],o=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:i=vi,eventName:s="keydown",passive:l=!1,dedupe:a=!1}=o,d=Pl(e);return wi(i,s,u=>{u.repeat&&Pe(a)||d(u)&&n(u)},l)}function Ol(t){return JSON.parse(JSON.stringify(t))}function to(t,e,n,o={}){var i,s,l;const{clone:a=!1,passive:d=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:h}=o,g=r.getCurrentInstance(),p=n||g?.emit||((i=g?.$emit)==null?void 0:i.bind(g))||((l=(s=g?.proxy)==null?void 0:s.$emit)==null?void 0:l.bind(g?.proxy));let m=c;e||(e="modelValue"),m=m||`update:${e.toString()}`;const v=y=>a?typeof a=="function"?a(y):Ol(y):y,E=()=>Ml(t[e])?v(t[e]):f,M=y=>{h?h(y)&&p(m,y):p(m,y)};if(d){const y=E(),C=r.ref(y);let $=!1;return r.watch(()=>t[e],O=>{$||($=!0,C.value=v(O),r.nextTick(()=>$=!1))}),r.watch(C,O=>{!$&&(O!==t[e]||u)&&M(O)},{deep:u}),C}else return r.computed({get(){return E()},set(y){M(y)}})}var Hl={value:()=>{}};function qt(){for(var t=0,e=arguments.length,n={},o;t<e;++t){if(!(o=arguments[t]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Kt(n)}function Kt(t){this._=t}function Vl(t,e){return t.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Kt.prototype=qt.prototype={constructor:Kt,on:function(t,e){var n=this._,o=Vl(t+"",n),i,s=-1,l=o.length;if(arguments.length<2){for(;++s<l;)if((i=(t=o[s]).type)&&(i=Ll(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<l;)if(i=(t=o[s]).type)n[i]=bi(n[i],t.name,e);else if(e==null)for(i in n)n[i]=bi(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Kt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,s;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],o=0,i=s.length;o<i;++o)s[o].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],i=0,s=o.length;i<s;++i)o[i].value.apply(e,n)}};function Ll(t,e){for(var n=0,o=t.length,i;n<o;++n)if((i=t[n]).name===e)return i.value}function bi(t,e,n){for(var o=0,i=t.length;o<i;++o)if(t[o].name===e){t[o]=Hl,t=t.slice(0,o).concat(t.slice(o+1));break}return n!=null&&t.push({name:e,value:n}),t}var no="http://www.w3.org/1999/xhtml";const xi={svg:"http://www.w3.org/2000/svg",xhtml:no,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qt(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),xi.hasOwnProperty(e)?{space:xi[e],local:t}:t}function Fl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===no&&e.documentElement.namespaceURI===no?e.createElement(t):e.createElementNS(n,t)}}function Gl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ei(t){var e=Qt(t);return(e.local?Gl:Fl)(e)}function Wl(){}function oo(t){return t==null?Wl:function(){return this.querySelector(t)}}function Yl(t){typeof t!="function"&&(t=oo(t));for(var e=this._groups,n=e.length,o=new Array(n),i=0;i<n;++i)for(var s=e[i],l=s.length,a=o[i]=new Array(l),d,c,u=0;u<l;++u)(d=s[u])&&(c=t.call(d,d.__data__,u,s))&&("__data__"in d&&(c.__data__=d.__data__),a[u]=c);return new Ce(o,this._parents)}function Ul(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Xl(){return[]}function Ci(t){return t==null?Xl:function(){return this.querySelectorAll(t)}}function jl(t){return function(){return Ul(t.apply(this,arguments))}}function Zl(t){typeof t=="function"?t=jl(t):t=Ci(t);for(var e=this._groups,n=e.length,o=[],i=[],s=0;s<n;++s)for(var l=e[s],a=l.length,d,c=0;c<a;++c)(d=l[c])&&(o.push(t.call(d,d.__data__,c,l)),i.push(d));return new Ce(o,i)}function Ni(t){return function(){return this.matches(t)}}function ki(t){return function(e){return e.matches(t)}}var ql=Array.prototype.find;function Kl(t){return function(){return ql.call(this.children,t)}}function Ql(){return this.firstElementChild}function Jl(t){return this.select(t==null?Ql:Kl(typeof t=="function"?t:ki(t)))}var ea=Array.prototype.filter;function ta(){return Array.from(this.children)}function na(t){return function(){return ea.call(this.children,t)}}function oa(t){return this.selectAll(t==null?ta:na(typeof t=="function"?t:ki(t)))}function ia(t){typeof t!="function"&&(t=Ni(t));for(var e=this._groups,n=e.length,o=new Array(n),i=0;i<n;++i)for(var s=e[i],l=s.length,a=o[i]=[],d,c=0;c<l;++c)(d=s[c])&&t.call(d,d.__data__,c,s)&&a.push(d);return new Ce(o,this._parents)}function Si(t){return new Array(t.length)}function sa(){return new Ce(this._enter||this._groups.map(Si),this._parents)}function Jt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Jt.prototype={constructor:Jt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ra(t){return function(){return t}}function la(t,e,n,o,i,s){for(var l=0,a,d=e.length,c=s.length;l<c;++l)(a=e[l])?(a.__data__=s[l],o[l]=a):n[l]=new Jt(t,s[l]);for(;l<d;++l)(a=e[l])&&(i[l]=a)}function aa(t,e,n,o,i,s,l){var a,d,c=new Map,u=e.length,f=s.length,h=new Array(u),g;for(a=0;a<u;++a)(d=e[a])&&(h[a]=g=l.call(d,d.__data__,a,e)+"",c.has(g)?i[a]=d:c.set(g,d));for(a=0;a<f;++a)g=l.call(t,s[a],a,s)+"",(d=c.get(g))?(o[a]=d,d.__data__=s[a],c.delete(g)):n[a]=new Jt(t,s[a]);for(a=0;a<u;++a)(d=e[a])&&c.get(h[a])===d&&(i[a]=d)}function ca(t){return t.__data__}function da(t,e){if(!arguments.length)return Array.from(this,ca);var n=e?aa:la,o=this._parents,i=this._groups;typeof t!="function"&&(t=ra(t));for(var s=i.length,l=new Array(s),a=new Array(s),d=new Array(s),c=0;c<s;++c){var u=o[c],f=i[c],h=f.length,g=ua(t.call(u,u&&u.__data__,c,o)),p=g.length,m=a[c]=new Array(p),v=l[c]=new Array(p),E=d[c]=new Array(h);n(u,f,m,v,E,g,e);for(var M=0,y=0,C,$;M<p;++M)if(C=m[M]){for(M>=y&&(y=M+1);!($=v[y])&&++y<p;);C._next=$||null}}return l=new Ce(l,o),l._enter=a,l._exit=d,l}function ua(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function fa(){return new Ce(this._exit||this._groups.map(Si),this._parents)}function ha(t,e,n){var o=this.enter(),i=this,s=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?s.remove():n(s),o&&i?o.merge(i).order():i}function ga(t){for(var e=t.selection?t.selection():t,n=this._groups,o=e._groups,i=n.length,s=o.length,l=Math.min(i,s),a=new Array(i),d=0;d<l;++d)for(var c=n[d],u=o[d],f=c.length,h=a[d]=new Array(f),g,p=0;p<f;++p)(g=c[p]||u[p])&&(h[p]=g);for(;d<i;++d)a[d]=n[d];return new Ce(a,this._parents)}function pa(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var o=t[e],i=o.length-1,s=o[i],l;--i>=0;)(l=o[i])&&(s&&l.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(l,s),s=l);return this}function ma(t){t||(t=ya);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,o=n.length,i=new Array(o),s=0;s<o;++s){for(var l=n[s],a=l.length,d=i[s]=new Array(a),c,u=0;u<a;++u)(c=l[u])&&(d[u]=c);d.sort(e)}return new Ce(i,this._parents).order()}function ya(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function va(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function wa(){return Array.from(this)}function _a(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o=t[e],i=0,s=o.length;i<s;++i){var l=o[i];if(l)return l}return null}function ba(){let t=0;for(const e of this)++t;return t}function xa(){return!this.node()}function Ea(t){for(var e=this._groups,n=0,o=e.length;n<o;++n)for(var i=e[n],s=0,l=i.length,a;s<l;++s)(a=i[s])&&t.call(a,a.__data__,s,i);return this}function Ca(t){return function(){this.removeAttribute(t)}}function Na(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ka(t,e){return function(){this.setAttribute(t,e)}}function Sa(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ma(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Da(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function za(t,e){var n=Qt(t);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((e==null?n.local?Na:Ca:typeof e=="function"?n.local?Da:Ma:n.local?Sa:ka)(n,e))}function Mi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ta(t){return function(){this.style.removeProperty(t)}}function Ia(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ba(t,e,n){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,n)}}function Ra(t,e,n){return arguments.length>1?this.each((e==null?Ta:typeof e=="function"?Ba:Ia)(t,e,n??"")):lt(this.node(),t)}function lt(t,e){return t.style.getPropertyValue(e)||Mi(t).getComputedStyle(t,null).getPropertyValue(e)}function Aa(t){return function(){delete this[t]}}function $a(t,e){return function(){this[t]=e}}function Pa(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Oa(t,e){return arguments.length>1?this.each((e==null?Aa:typeof e=="function"?Pa:$a)(t,e)):this.node()[t]}function Di(t){return t.trim().split(/^|\s+/)}function io(t){return t.classList||new zi(t)}function zi(t){this._node=t,this._names=Di(t.getAttribute("class")||"")}zi.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ti(t,e){for(var n=io(t),o=-1,i=e.length;++o<i;)n.add(e[o])}function Ii(t,e){for(var n=io(t),o=-1,i=e.length;++o<i;)n.remove(e[o])}function Ha(t){return function(){Ti(this,t)}}function Va(t){return function(){Ii(this,t)}}function La(t,e){return function(){(e.apply(this,arguments)?Ti:Ii)(this,t)}}function Fa(t,e){var n=Di(t+"");if(arguments.length<2){for(var o=io(this.node()),i=-1,s=n.length;++i<s;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?La:e?Ha:Va)(n,e))}function Ga(){this.textContent=""}function Wa(t){return function(){this.textContent=t}}function Ya(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ua(t){return arguments.length?this.each(t==null?Ga:(typeof t=="function"?Ya:Wa)(t)):this.node().textContent}function Xa(){this.innerHTML=""}function ja(t){return function(){this.innerHTML=t}}function Za(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function qa(t){return arguments.length?this.each(t==null?Xa:(typeof t=="function"?Za:ja)(t)):this.node().innerHTML}function Ka(){this.nextSibling&&this.parentNode.appendChild(this)}function Qa(){return this.each(Ka)}function Ja(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ec(){return this.each(Ja)}function tc(t){var e=typeof t=="function"?t:Ei(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function nc(){return null}function oc(t,e){var n=typeof t=="function"?t:Ei(t),o=e==null?nc:typeof e=="function"?e:oo(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function ic(){var t=this.parentNode;t&&t.removeChild(this)}function sc(){return this.each(ic)}function rc(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function lc(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ac(t){return this.select(t?lc:rc)}function cc(t){return arguments.length?this.property("__data__",t):this.node().__data__}function dc(t){return function(e){t.call(this,e,this.__data__)}}function uc(t){return t.trim().split(/^|\s+/).map(function(e){var n="",o=e.indexOf(".");return o>=0&&(n=e.slice(o+1),e=e.slice(0,o)),{type:e,name:n}})}function fc(t){return function(){var e=this.__on;if(e){for(var n=0,o=-1,i=e.length,s;n<i;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++o]=s;++o?e.length=o:delete this.__on}}}function hc(t,e,n){return function(){var o=this.__on,i,s=dc(e);if(o){for(var l=0,a=o.length;l<a;++l)if((i=o[l]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=e;return}}this.addEventListener(t.type,s,n),i={type:t.type,name:t.name,value:e,listener:s,options:n},o?o.push(i):this.__on=[i]}}function gc(t,e,n){var o=uc(t+""),i,s=o.length,l;if(arguments.length<2){var a=this.node().__on;if(a){for(var d=0,c=a.length,u;d<c;++d)for(i=0,u=a[d];i<s;++i)if((l=o[i]).type===u.type&&l.name===u.name)return u.value}return}for(a=e?hc:fc,i=0;i<s;++i)this.each(a(o[i],e,n));return this}function Bi(t,e,n){var o=Mi(t),i=o.CustomEvent;typeof i=="function"?i=new i(e,n):(i=o.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function pc(t,e){return function(){return Bi(this,t,e)}}function mc(t,e){return function(){return Bi(this,t,e.apply(this,arguments))}}function yc(t,e){return this.each((typeof e=="function"?mc:pc)(t,e))}function*vc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o=t[e],i=0,s=o.length,l;i<s;++i)(l=o[i])&&(yield l)}var Ri=[null];function Ce(t,e){this._groups=t,this._parents=e}function Et(){return new Ce([[document.documentElement]],Ri)}function wc(){return this}Ce.prototype=Et.prototype={constructor:Ce,select:Yl,selectAll:Zl,selectChild:Jl,selectChildren:oa,filter:ia,data:da,enter:sa,exit:fa,join:ha,merge:ga,selection:wc,order:pa,sort:ma,call:va,nodes:wa,node:_a,size:ba,empty:xa,each:Ea,attr:za,style:Ra,property:Oa,classed:Fa,text:Ua,html:qa,raise:Qa,lower:ec,append:tc,insert:oc,remove:sc,clone:ac,datum:cc,on:gc,dispatch:yc,[Symbol.iterator]:vc};function Se(t){return typeof t=="string"?new Ce([[document.querySelector(t)]],[document.documentElement]):new Ce([[t]],Ri)}function _c(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Te(t,e){if(t=_c(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,o=o.matrixTransform(e.getScreenCTM().inverse()),[o.x,o.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const bc={passive:!1},Ct={capture:!0,passive:!1};function so(t){t.stopImmediatePropagation()}function at(t){t.preventDefault(),t.stopImmediatePropagation()}function Ai(t){var e=t.document.documentElement,n=Se(t).on("dragstart.drag",at,Ct);"onselectstart"in e?n.on("selectstart.drag",at,Ct):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function $i(t,e){var n=t.document.documentElement,o=Se(t).on("dragstart.drag",null);e&&(o.on("click.drag",at,Ct),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const en=t=>()=>t;function ro(t,{sourceEvent:e,subject:n,target:o,identifier:i,active:s,x:l,y:a,dx:d,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}ro.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function xc(t){return!t.ctrlKey&&!t.button}function Ec(){return this.parentNode}function Cc(t,e){return e??{x:t.x,y:t.y}}function Nc(){return navigator.maxTouchPoints||"ontouchstart"in this}function kc(){var t=xc,e=Ec,n=Cc,o=Nc,i={},s=qt("start","drag","end"),l=0,a,d,c,u,f=0;function h(C){C.on("mousedown.drag",g).filter(o).on("touchstart.drag",v).on("touchmove.drag",E,bc).on("touchend.drag touchcancel.drag",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(C,$){if(!(u||!t.call(this,C,$))){var O=y(this,e.call(this,C,$),C,$,"mouse");O&&(Se(C.view).on("mousemove.drag",p,Ct).on("mouseup.drag",m,Ct),Ai(C.view),so(C),c=!1,a=C.clientX,d=C.clientY,O("start",C))}}function p(C){if(at(C),!c){var $=C.clientX-a,O=C.clientY-d;c=$*$+O*O>f}i.mouse("drag",C)}function m(C){Se(C.view).on("mousemove.drag mouseup.drag",null),$i(C.view,c),at(C),i.mouse("end",C)}function v(C,$){if(t.call(this,C,$)){var O=C.changedTouches,L=e.call(this,C,$),j=O.length,W,G;for(W=0;W<j;++W)(G=y(this,L,C,$,O[W].identifier,O[W]))&&(so(C),G("start",C,O[W]))}}function E(C){var $=C.changedTouches,O=$.length,L,j;for(L=0;L<O;++L)(j=i[$[L].identifier])&&(at(C),j("drag",C,$[L]))}function M(C){var $=C.changedTouches,O=$.length,L,j;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),L=0;L<O;++L)(j=i[$[L].identifier])&&(so(C),j("end",C,$[L]))}function y(C,$,O,L,j,W){var G=s.copy(),F=Te(W||O,$),N,H,_;if((_=n.call(C,new ro("beforestart",{sourceEvent:O,target:h,identifier:j,active:l,x:F[0],y:F[1],dx:0,dy:0,dispatch:G}),L))!=null)return N=_.x-F[0]||0,H=_.y-F[1]||0,function A(S,R,V){var T=F,I;switch(S){case"start":i[j]=A,I=l++;break;case"end":delete i[j],--l;case"drag":F=Te(V||R,$),I=l;break}G.call(S,C,new ro(S,{sourceEvent:R,subject:_,target:h,identifier:j,active:I,x:F[0]+N,y:F[1]+H,dx:F[0]-T[0],dy:F[1]-T[1],dispatch:G}),L)}}return h.filter=function(C){return arguments.length?(t=typeof C=="function"?C:en(!!C),h):t},h.container=function(C){return arguments.length?(e=typeof C=="function"?C:en(C),h):e},h.subject=function(C){return arguments.length?(n=typeof C=="function"?C:en(C),h):n},h.touchable=function(C){return arguments.length?(o=typeof C=="function"?C:en(!!C),h):o},h.on=function(){var C=s.on.apply(s,arguments);return C===s?h:C},h.clickDistance=function(C){return arguments.length?(f=(C=+C)*C,h):Math.sqrt(f)},h}function lo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Pi(t,e){var n=Object.create(t.prototype);for(var o in e)n[o]=e[o];return n}function Nt(){}var kt=.7,tn=1/kt,ct="\\s*([+-]?\\d+)\\s*",St="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sc=/^#([0-9a-f]{3,8})$/,Mc=new RegExp(`^rgb\\(${ct},${ct},${ct}\\)$`),Dc=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),zc=new RegExp(`^rgba\\(${ct},${ct},${ct},${St}\\)$`),Tc=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${St}\\)$`),Ic=new RegExp(`^hsl\\(${St},${Ie},${Ie}\\)$`),Bc=new RegExp(`^hsla\\(${St},${Ie},${Ie},${St}\\)$`),Oi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};lo(Nt,qe,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Hi,formatHex:Hi,formatHex8:Rc,formatHsl:Ac,formatRgb:Vi,toString:Vi});function Hi(){return this.rgb().formatHex()}function Rc(){return this.rgb().formatHex8()}function Ac(){return Yi(this).formatHsl()}function Vi(){return this.rgb().formatRgb()}function qe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Sc.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Li(e):n===3?new xe(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?nn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?nn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Mc.exec(t))?new xe(e[1],e[2],e[3],1):(e=Dc.exec(t))?new xe(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=zc.exec(t))?nn(e[1],e[2],e[3],e[4]):(e=Tc.exec(t))?nn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Ic.exec(t))?Wi(e[1],e[2]/100,e[3]/100,1):(e=Bc.exec(t))?Wi(e[1],e[2]/100,e[3]/100,e[4]):Oi.hasOwnProperty(t)?Li(Oi[t]):t==="transparent"?new xe(NaN,NaN,NaN,0):null}function Li(t){return new xe(t>>16&255,t>>8&255,t&255,1)}function nn(t,e,n,o){return o<=0&&(t=e=n=NaN),new xe(t,e,n,o)}function $c(t){return t instanceof Nt||(t=qe(t)),t?(t=t.rgb(),new xe(t.r,t.g,t.b,t.opacity)):new xe}function ao(t,e,n,o){return arguments.length===1?$c(t):new xe(t,e,n,o??1)}function xe(t,e,n,o){this.r=+t,this.g=+e,this.b=+n,this.opacity=+o}lo(xe,ao,Pi(Nt,{brighter(t){return t=t==null?tn:Math.pow(tn,t),new xe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?kt:Math.pow(kt,t),new xe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new xe(Ke(this.r),Ke(this.g),Ke(this.b),on(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fi,formatHex:Fi,formatHex8:Pc,formatRgb:Gi,toString:Gi}));function Fi(){return`#${Qe(this.r)}${Qe(this.g)}${Qe(this.b)}`}function Pc(){return`#${Qe(this.r)}${Qe(this.g)}${Qe(this.b)}${Qe((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gi(){const t=on(this.opacity);return`${t===1?"rgb(":"rgba("}${Ke(this.r)}, ${Ke(this.g)}, ${Ke(this.b)}${t===1?")":`, ${t})`}`}function on(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ke(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Qe(t){return t=Ke(t),(t<16?"0":"")+t.toString(16)}function Wi(t,e,n,o){return o<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Me(t,e,n,o)}function Yi(t){if(t instanceof Me)return new Me(t.h,t.s,t.l,t.opacity);if(t instanceof Nt||(t=qe(t)),!t)return new Me;if(t instanceof Me)return t;t=t.rgb();var e=t.r/255,n=t.g/255,o=t.b/255,i=Math.min(e,n,o),s=Math.max(e,n,o),l=NaN,a=s-i,d=(s+i)/2;return a?(e===s?l=(n-o)/a+(n<o)*6:n===s?l=(o-e)/a+2:l=(e-n)/a+4,a/=d<.5?s+i:2-s-i,l*=60):a=d>0&&d<1?0:l,new Me(l,a,d,t.opacity)}function Oc(t,e,n,o){return arguments.length===1?Yi(t):new Me(t,e,n,o??1)}function Me(t,e,n,o){this.h=+t,this.s=+e,this.l=+n,this.opacity=+o}lo(Me,Oc,Pi(Nt,{brighter(t){return t=t==null?tn:Math.pow(tn,t),new Me(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?kt:Math.pow(kt,t),new Me(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*e,i=2*n-o;return new xe(co(t>=240?t-240:t+120,i,o),co(t,i,o),co(t<120?t+240:t-120,i,o),this.opacity)},clamp(){return new Me(Ui(this.h),sn(this.s),sn(this.l),on(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=on(this.opacity);return`${t===1?"hsl(":"hsla("}${Ui(this.h)}, ${sn(this.s)*100}%, ${sn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ui(t){return t=(t||0)%360,t<0?t+360:t}function sn(t){return Math.max(0,Math.min(1,t||0))}function co(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const uo=t=>()=>t;function Hc(t,e){return function(n){return t+n*e}}function Vc(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(o){return Math.pow(t+o*e,n)}}function Lc(t){return(t=+t)==1?Xi:function(e,n){return n-e?Vc(e,n,t):uo(isNaN(e)?n:e)}}function Xi(t,e){var n=e-t;return n?Hc(t,n):uo(isNaN(t)?e:t)}const rn=(function t(e){var n=Lc(e);function o(i,s){var l=n((i=ao(i)).r,(s=ao(s)).r),a=n(i.g,s.g),d=n(i.b,s.b),c=Xi(i.opacity,s.opacity);return function(u){return i.r=l(u),i.g=a(u),i.b=d(u),i.opacity=c(u),i+""}}return o.gamma=t,o})(1);function Fc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,o=e.slice(),i;return function(s){for(i=0;i<n;++i)o[i]=t[i]*(1-s)+e[i]*s;return o}}function Gc(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Wc(t,e){var n=e?e.length:0,o=t?Math.min(n,t.length):0,i=new Array(o),s=new Array(n),l;for(l=0;l<o;++l)i[l]=Mt(t[l],e[l]);for(;l<n;++l)s[l]=e[l];return function(a){for(l=0;l<o;++l)s[l]=i[l](a);return s}}function Yc(t,e){var n=new Date;return t=+t,e=+e,function(o){return n.setTime(t*(1-o)+e*o),n}}function Be(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Uc(t,e){var n={},o={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Mt(t[i],e[i]):o[i]=e[i];return function(s){for(i in n)o[i]=n[i](s);return o}}var fo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ho=new RegExp(fo.source,"g");function Xc(t){return function(){return t}}function jc(t){return function(e){return t(e)+""}}function ji(t,e){var n=fo.lastIndex=ho.lastIndex=0,o,i,s,l=-1,a=[],d=[];for(t=t+"",e=e+"";(o=fo.exec(t))&&(i=ho.exec(e));)(s=i.index)>n&&(s=e.slice(n,s),a[l]?a[l]+=s:a[++l]=s),(o=o[0])===(i=i[0])?a[l]?a[l]+=i:a[++l]=i:(a[++l]=null,d.push({i:l,x:Be(o,i)})),n=ho.lastIndex;return n<e.length&&(s=e.slice(n),a[l]?a[l]+=s:a[++l]=s),a.length<2?d[0]?jc(d[0].x):Xc(e):(e=d.length,function(c){for(var u=0,f;u<e;++u)a[(f=d[u]).i]=f.x(c);return a.join("")})}function Mt(t,e){var n=typeof e,o;return e==null||n==="boolean"?uo(e):(n==="number"?Be:n==="string"?(o=qe(e))?(e=o,rn):ji:e instanceof qe?rn:e instanceof Date?Yc:Gc(e)?Fc:Array.isArray(e)?Wc:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Uc:Be)(t,e)}var Zi=180/Math.PI,go={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qi(t,e,n,o,i,s){var l,a,d;return(l=Math.sqrt(t*t+e*e))&&(t/=l,e/=l),(d=t*n+e*o)&&(n-=t*d,o-=e*d),(a=Math.sqrt(n*n+o*o))&&(n/=a,o/=a,d/=a),t*o<e*n&&(t=-t,e=-e,d=-d,l=-l),{translateX:i,translateY:s,rotate:Math.atan2(e,t)*Zi,skewX:Math.atan(d)*Zi,scaleX:l,scaleY:a}}var ln;function Zc(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?go:qi(e.a,e.b,e.c,e.d,e.e,e.f)}function qc(t){return t==null||(ln||(ln=document.createElementNS("http://www.w3.org/2000/svg","g")),ln.setAttribute("transform",t),!(t=ln.transform.baseVal.consolidate()))?go:(t=t.matrix,qi(t.a,t.b,t.c,t.d,t.e,t.f))}function Ki(t,e,n,o){function i(c){return c.length?c.pop()+" ":""}function s(c,u,f,h,g,p){if(c!==f||u!==h){var m=g.push("translate(",null,e,null,n);p.push({i:m-4,x:Be(c,f)},{i:m-2,x:Be(u,h)})}else(f||h)&&g.push("translate("+f+e+h+n)}function l(c,u,f,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:f.push(i(f)+"rotate(",null,o)-2,x:Be(c,u)})):u&&f.push(i(f)+"rotate("+u+o)}function a(c,u,f,h){c!==u?h.push({i:f.push(i(f)+"skewX(",null,o)-2,x:Be(c,u)}):u&&f.push(i(f)+"skewX("+u+o)}function d(c,u,f,h,g,p){if(c!==f||u!==h){var m=g.push(i(g)+"scale(",null,",",null,")");p.push({i:m-4,x:Be(c,f)},{i:m-2,x:Be(u,h)})}else(f!==1||h!==1)&&g.push(i(g)+"scale("+f+","+h+")")}return function(c,u){var f=[],h=[];return c=t(c),u=t(u),s(c.translateX,c.translateY,u.translateX,u.translateY,f,h),l(c.rotate,u.rotate,f,h),a(c.skewX,u.skewX,f,h),d(c.scaleX,c.scaleY,u.scaleX,u.scaleY,f,h),c=u=null,function(g){for(var p=-1,m=h.length,v;++p<m;)f[(v=h[p]).i]=v.x(g);return f.join("")}}}var Kc=Ki(Zc,"px, ","px)","deg)"),Qc=Ki(qc,", ",")",")"),Jc=1e-12;function Qi(t){return((t=Math.exp(t))+1/t)/2}function ed(t){return((t=Math.exp(t))-1/t)/2}function td(t){return((t=Math.exp(2*t))-1)/(t+1)}const an=(function t(e,n,o){function i(s,l){var a=s[0],d=s[1],c=s[2],u=l[0],f=l[1],h=l[2],g=u-a,p=f-d,m=g*g+p*p,v,E;if(m<Jc)E=Math.log(h/c)/e,v=function(L){return[a+L*g,d+L*p,c*Math.exp(e*L*E)]};else{var M=Math.sqrt(m),y=(h*h-c*c+o*m)/(2*c*n*M),C=(h*h-c*c-o*m)/(2*h*n*M),$=Math.log(Math.sqrt(y*y+1)-y),O=Math.log(Math.sqrt(C*C+1)-C);E=(O-$)/e,v=function(L){var j=L*E,W=Qi($),G=c/(n*M)*(W*td(e*j+$)-ed($));return[a+G*g,d+G*p,c*W/Qi(e*j+$)]}}return v.duration=E*1e3*e/Math.SQRT2,v}return i.rho=function(s){var l=Math.max(.001,+s),a=l*l,d=a*a;return t(l,a,d)},i})(Math.SQRT2,2,4);var dt=0,Dt=0,zt=0,Ji=1e3,cn,Tt,dn=0,Je=0,un=0,It=typeof performance=="object"&&performance.now?performance:Date,es=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function po(){return Je||(es(nd),Je=It.now()+un)}function nd(){Je=0}function fn(){this._call=this._time=this._next=null}fn.prototype=ts.prototype={constructor:fn,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?po():+n)+(e==null?0:+e),!this._next&&Tt!==this&&(Tt?Tt._next=this:cn=this,Tt=this),this._call=t,this._time=n,mo()},stop:function(){this._call&&(this._call=null,this._time=1/0,mo())}};function ts(t,e,n){var o=new fn;return o.restart(t,e,n),o}function od(){po(),++dt;for(var t=cn,e;t;)(e=Je-t._time)>=0&&t._call.call(void 0,e),t=t._next;--dt}function ns(){Je=(dn=It.now())+un,dt=Dt=0;try{od()}finally{dt=0,sd(),Je=0}}function id(){var t=It.now(),e=t-dn;e>Ji&&(un-=e,dn=t)}function sd(){for(var t,e=cn,n,o=1/0;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:cn=n);Tt=t,mo(o)}function mo(t){if(!dt){Dt&&(Dt=clearTimeout(Dt));var e=t-Je;e>24?(t<1/0&&(Dt=setTimeout(ns,t-It.now()-un)),zt&&(zt=clearInterval(zt))):(zt||(dn=It.now(),zt=setInterval(id,Ji)),dt=1,es(ns))}}function os(t,e,n){var o=new fn;return e=e==null?0:+e,o.restart(i=>{o.stop(),t(i+e)},e,n),o}var rd=qt("start","end","cancel","interrupt"),ld=[],is=0,ss=1,yo=2,hn=3,rs=4,vo=5,gn=6;function pn(t,e,n,o,i,s){var l=t.__transition;if(!l)t.__transition={};else if(n in l)return;ad(t,n,{name:e,index:o,group:i,on:rd,tween:ld,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:is})}function wo(t,e){var n=De(t,e);if(n.state>is)throw new Error("too late; already scheduled");return n}function Re(t,e){var n=De(t,e);if(n.state>hn)throw new Error("too late; already running");return n}function De(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ad(t,e,n){var o=t.__transition,i;o[e]=n,n.timer=ts(s,0,n.time);function s(c){n.state=ss,n.timer.restart(l,n.delay,n.time),n.delay<=c&&l(c-n.delay)}function l(c){var u,f,h,g;if(n.state!==ss)return d();for(u in o)if(g=o[u],g.name===n.name){if(g.state===hn)return os(l);g.state===rs?(g.state=gn,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete o[u]):+u<e&&(g.state=gn,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete o[u])}if(os(function(){n.state===hn&&(n.state=rs,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=yo,n.on.call("start",t,t.__data__,n.index,n.group),n.state===yo){for(n.state=hn,i=new Array(h=n.tween.length),u=0,f=-1;u<h;++u)(g=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=g);i.length=f+1}}function a(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(d),n.state=vo,1),f=-1,h=i.length;++f<h;)i[f].call(t,u);n.state===vo&&(n.on.call("end",t,t.__data__,n.index,n.group),d())}function d(){n.state=gn,n.timer.stop(),delete o[e];for(var c in o)return;delete t.__transition}}function mn(t,e){var n=t.__transition,o,i,s=!0,l;if(n){e=e==null?null:e+"";for(l in n){if((o=n[l]).name!==e){s=!1;continue}i=o.state>yo&&o.state<vo,o.state=gn,o.timer.stop(),o.on.call(i?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete n[l]}s&&delete t.__transition}}function cd(t){return this.each(function(){mn(this,t)})}function dd(t,e){var n,o;return function(){var i=Re(this,t),s=i.tween;if(s!==n){o=n=s;for(var l=0,a=o.length;l<a;++l)if(o[l].name===e){o=o.slice(),o.splice(l,1);break}}i.tween=o}}function ud(t,e,n){var o,i;if(typeof n!="function")throw new Error;return function(){var s=Re(this,t),l=s.tween;if(l!==o){i=(o=l).slice();for(var a={name:e,value:n},d=0,c=i.length;d<c;++d)if(i[d].name===e){i[d]=a;break}d===c&&i.push(a)}s.tween=i}}function fd(t,e){var n=this._id;if(t+="",arguments.length<2){for(var o=De(this.node(),n).tween,i=0,s=o.length,l;i<s;++i)if((l=o[i]).name===t)return l.value;return null}return this.each((e==null?dd:ud)(n,t,e))}function _o(t,e,n){var o=t._id;return t.each(function(){var i=Re(this,o);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return De(i,o).value[e]}}function ls(t,e){var n;return(typeof e=="number"?Be:e instanceof qe?rn:(n=qe(e))?(e=n,rn):ji)(t,e)}function hd(t){return function(){this.removeAttribute(t)}}function gd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pd(t,e,n){var o,i=n+"",s;return function(){var l=this.getAttribute(t);return l===i?null:l===o?s:s=e(o=l,n)}}function md(t,e,n){var o,i=n+"",s;return function(){var l=this.getAttributeNS(t.space,t.local);return l===i?null:l===o?s:s=e(o=l,n)}}function yd(t,e,n){var o,i,s;return function(){var l,a=n(this),d;return a==null?void this.removeAttribute(t):(l=this.getAttribute(t),d=a+"",l===d?null:l===o&&d===i?s:(i=d,s=e(o=l,a)))}}function vd(t,e,n){var o,i,s;return function(){var l,a=n(this),d;return a==null?void this.removeAttributeNS(t.space,t.local):(l=this.getAttributeNS(t.space,t.local),d=a+"",l===d?null:l===o&&d===i?s:(i=d,s=e(o=l,a)))}}function wd(t,e){var n=Qt(t),o=n==="transform"?Qc:ls;return this.attrTween(t,typeof e=="function"?(n.local?vd:yd)(n,o,_o(this,"attr."+t,e)):e==null?(n.local?gd:hd)(n):(n.local?md:pd)(n,o,e))}function _d(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function bd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function xd(t,e){var n,o;function i(){var s=e.apply(this,arguments);return s!==o&&(n=(o=s)&&bd(t,s)),n}return i._value=e,i}function Ed(t,e){var n,o;function i(){var s=e.apply(this,arguments);return s!==o&&(n=(o=s)&&_d(t,s)),n}return i._value=e,i}function Cd(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var o=Qt(t);return this.tween(n,(o.local?xd:Ed)(o,e))}function Nd(t,e){return function(){wo(this,t).delay=+e.apply(this,arguments)}}function kd(t,e){return e=+e,function(){wo(this,t).delay=e}}function Sd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Nd:kd)(e,t)):De(this.node(),e).delay}function Md(t,e){return function(){Re(this,t).duration=+e.apply(this,arguments)}}function Dd(t,e){return e=+e,function(){Re(this,t).duration=e}}function zd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Md:Dd)(e,t)):De(this.node(),e).duration}function Td(t,e){if(typeof e!="function")throw new Error;return function(){Re(this,t).ease=e}}function Id(t){var e=this._id;return arguments.length?this.each(Td(e,t)):De(this.node(),e).ease}function Bd(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Re(this,t).ease=n}}function Rd(t){if(typeof t!="function")throw new Error;return this.each(Bd(this._id,t))}function Ad(t){typeof t!="function"&&(t=Ni(t));for(var e=this._groups,n=e.length,o=new Array(n),i=0;i<n;++i)for(var s=e[i],l=s.length,a=o[i]=[],d,c=0;c<l;++c)(d=s[c])&&t.call(d,d.__data__,c,s)&&a.push(d);return new Oe(o,this._parents,this._name,this._id)}function $d(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,o=e.length,i=n.length,s=Math.min(o,i),l=new Array(o),a=0;a<s;++a)for(var d=e[a],c=n[a],u=d.length,f=l[a]=new Array(u),h,g=0;g<u;++g)(h=d[g]||c[g])&&(f[g]=h);for(;a<o;++a)l[a]=e[a];return new Oe(l,this._parents,this._name,this._id)}function Pd(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Od(t,e,n){var o,i,s=Pd(e)?wo:Re;return function(){var l=s(this,t),a=l.on;a!==o&&(i=(o=a).copy()).on(e,n),l.on=i}}function Hd(t,e){var n=this._id;return arguments.length<2?De(this.node(),n).on.on(t):this.each(Od(n,t,e))}function Vd(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ld(){return this.on("end.remove",Vd(this._id))}function Fd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=oo(t));for(var o=this._groups,i=o.length,s=new Array(i),l=0;l<i;++l)for(var a=o[l],d=a.length,c=s[l]=new Array(d),u,f,h=0;h<d;++h)(u=a[h])&&(f=t.call(u,u.__data__,h,a))&&("__data__"in u&&(f.__data__=u.__data__),c[h]=f,pn(c[h],e,n,h,c,De(u,n)));return new Oe(s,this._parents,e,n)}function Gd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ci(t));for(var o=this._groups,i=o.length,s=[],l=[],a=0;a<i;++a)for(var d=o[a],c=d.length,u,f=0;f<c;++f)if(u=d[f]){for(var h=t.call(u,u.__data__,f,d),g,p=De(u,n),m=0,v=h.length;m<v;++m)(g=h[m])&&pn(g,e,n,m,h,p);s.push(h),l.push(u)}return new Oe(s,l,e,n)}var Wd=Et.prototype.constructor;function Yd(){return new Wd(this._groups,this._parents)}function Ud(t,e){var n,o,i;return function(){var s=lt(this,t),l=(this.style.removeProperty(t),lt(this,t));return s===l?null:s===n&&l===o?i:i=e(n=s,o=l)}}function as(t){return function(){this.style.removeProperty(t)}}function Xd(t,e,n){var o,i=n+"",s;return function(){var l=lt(this,t);return l===i?null:l===o?s:s=e(o=l,n)}}function jd(t,e,n){var o,i,s;return function(){var l=lt(this,t),a=n(this),d=a+"";return a==null&&(d=a=(this.style.removeProperty(t),lt(this,t))),l===d?null:l===o&&d===i?s:(i=d,s=e(o=l,a))}}function Zd(t,e){var n,o,i,s="style."+e,l="end."+s,a;return function(){var d=Re(this,t),c=d.on,u=d.value[s]==null?a||(a=as(e)):void 0;(c!==n||i!==u)&&(o=(n=c).copy()).on(l,i=u),d.on=o}}function qd(t,e,n){var o=(t+="")=="transform"?Kc:ls;return e==null?this.styleTween(t,Ud(t,o)).on("end.style."+t,as(t)):typeof e=="function"?this.styleTween(t,jd(t,o,_o(this,"style."+t,e))).each(Zd(this._id,t)):this.styleTween(t,Xd(t,o,e),n).on("end.style."+t,null)}function Kd(t,e,n){return function(o){this.style.setProperty(t,e.call(this,o),n)}}function Qd(t,e,n){var o,i;function s(){var l=e.apply(this,arguments);return l!==i&&(o=(i=l)&&Kd(t,l,n)),o}return s._value=e,s}function Jd(t,e,n){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,Qd(t,e,n??""))}function eu(t){return function(){this.textContent=t}}function tu(t){return function(){var e=t(this);this.textContent=e??""}}function nu(t){return this.tween("text",typeof t=="function"?tu(_o(this,"text",t)):eu(t==null?"":t+""))}function ou(t){return function(e){this.textContent=t.call(this,e)}}function iu(t){var e,n;function o(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&ou(i)),e}return o._value=t,o}function su(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,iu(t))}function ru(){for(var t=this._name,e=this._id,n=cs(),o=this._groups,i=o.length,s=0;s<i;++s)for(var l=o[s],a=l.length,d,c=0;c<a;++c)if(d=l[c]){var u=De(d,e);pn(d,t,n,c,l,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Oe(o,this._parents,t,n)}function lu(){var t,e,n=this,o=n._id,i=n.size();return new Promise(function(s,l){var a={value:l},d={value:function(){--i===0&&s()}};n.each(function(){var c=Re(this,o),u=c.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(d)),c.on=e}),i===0&&s()})}var au=0;function Oe(t,e,n,o){this._groups=t,this._parents=e,this._name=n,this._id=o}function cs(){return++au}var He=Et.prototype;Oe.prototype={constructor:Oe,select:Fd,selectAll:Gd,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:Ad,merge:$d,selection:Yd,transition:ru,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:Hd,attr:wd,attrTween:Cd,style:qd,styleTween:Jd,text:nu,textTween:su,remove:Ld,tween:fd,delay:Sd,duration:zd,ease:Id,easeVarying:Rd,end:lu,[Symbol.iterator]:He[Symbol.iterator]};function cu(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var du={time:null,delay:0,duration:250,ease:cu};function uu(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function fu(t){var e,n;t instanceof Oe?(e=t._id,t=t._name):(e=cs(),(n=du).time=po(),t=t==null?null:t+"");for(var o=this._groups,i=o.length,s=0;s<i;++s)for(var l=o[s],a=l.length,d,c=0;c<a;++c)(d=l[c])&&pn(d,t,e,c,l,n||uu(d,e));return new Oe(o,this._parents,t,e)}Et.prototype.interrupt=cd,Et.prototype.transition=fu;const yn=t=>()=>t;function hu(t,{sourceEvent:e,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Ve(t,e,n){this.k=t,this.x=e,this.y=n}Ve.prototype={constructor:Ve,scale:function(t){return t===1?this:new Ve(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Ve(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ut=new Ve(1,0,0);Ve.prototype;function bo(t){t.stopImmediatePropagation()}function Bt(t){t.preventDefault(),t.stopImmediatePropagation()}function gu(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function pu(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function ds(){return this.__zoom||ut}function mu(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function yu(){return navigator.maxTouchPoints||"ontouchstart"in this}function vu(t,e,n){var o=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],l=t.invertY(e[1][1])-n[1][1];return t.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),l>s?(s+l)/2:Math.min(0,s)||Math.max(0,l))}function wu(){var t=gu,e=pu,n=vu,o=mu,i=yu,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],a=250,d=an,c=qt("start","zoom","end"),u,f,h,g=500,p=150,m=0,v=10;function E(_){_.property("__zoom",ds).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",W).on("dblclick.zoom",G).filter(i).on("touchstart.zoom",F).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(_,A,S,R){var V=_.selection?_.selection():_;V.property("__zoom",ds),_!==V?$(_,A,S,R):V.interrupt().each(function(){O(this,arguments).event(R).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},E.scaleBy=function(_,A,S,R){E.scaleTo(_,function(){var V=this.__zoom.k,T=typeof A=="function"?A.apply(this,arguments):A;return V*T},S,R)},E.scaleTo=function(_,A,S,R){E.transform(_,function(){var V=e.apply(this,arguments),T=this.__zoom,I=S==null?C(V):typeof S=="function"?S.apply(this,arguments):S,Y=T.invert(I),X=typeof A=="function"?A.apply(this,arguments):A;return n(y(M(T,X),I,Y),V,l)},S,R)},E.translateBy=function(_,A,S,R){E.transform(_,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof S=="function"?S.apply(this,arguments):S),e.apply(this,arguments),l)},null,R)},E.translateTo=function(_,A,S,R,V){E.transform(_,function(){var T=e.apply(this,arguments),I=this.__zoom,Y=R==null?C(T):typeof R=="function"?R.apply(this,arguments):R;return n(ut.translate(Y[0],Y[1]).scale(I.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof S=="function"?-S.apply(this,arguments):-S),T,l)},R,V)};function M(_,A){return A=Math.max(s[0],Math.min(s[1],A)),A===_.k?_:new Ve(A,_.x,_.y)}function y(_,A,S){var R=A[0]-S[0]*_.k,V=A[1]-S[1]*_.k;return R===_.x&&V===_.y?_:new Ve(_.k,R,V)}function C(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function $(_,A,S,R){_.on("start.zoom",function(){O(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(R).end()}).tween("zoom",function(){var V=this,T=arguments,I=O(V,T).event(R),Y=e.apply(V,T),X=S==null?C(Y):typeof S=="function"?S.apply(V,T):S,J=Math.max(Y[1][0]-Y[0][0],Y[1][1]-Y[0][1]),re=V.__zoom,P=typeof A=="function"?A.apply(V,T):A,Z=d(re.invert(X).concat(J/re.k),P.invert(X).concat(J/P.k));return function(B){if(B===1)B=P;else{var U=Z(B),K=J/U[2];B=new Ve(K,X[0]-U[0]*K,X[1]-U[1]*K)}I.zoom(null,B)}})}function O(_,A,S){return!S&&_.__zooming||new L(_,A)}function L(_,A){this.that=_,this.args=A,this.active=0,this.sourceEvent=null,this.extent=e.apply(_,A),this.taps=0}L.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,A){return this.mouse&&_!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var A=Se(this.that).datum();c.call(_,this.that,new hu(_,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:c}),A)}};function j(_,...A){if(!t.apply(this,arguments))return;var S=O(this,A).event(_),R=this.__zoom,V=Math.max(s[0],Math.min(s[1],R.k*Math.pow(2,o.apply(this,arguments)))),T=Te(_);if(S.wheel)(S.mouse[0][0]!==T[0]||S.mouse[0][1]!==T[1])&&(S.mouse[1]=R.invert(S.mouse[0]=T)),clearTimeout(S.wheel);else{if(R.k===V)return;S.mouse=[T,R.invert(T)],mn(this),S.start()}Bt(_),S.wheel=setTimeout(I,p),S.zoom("mouse",n(y(M(R,V),S.mouse[0],S.mouse[1]),S.extent,l));function I(){S.wheel=null,S.end()}}function W(_,...A){if(h||!t.apply(this,arguments))return;var S=_.currentTarget,R=O(this,A,!0).event(_),V=Se(_.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",J,!0),T=Te(_,S),I=_.clientX,Y=_.clientY;Ai(_.view),bo(_),R.mouse=[T,this.__zoom.invert(T)],mn(this),R.start();function X(re){if(Bt(re),!R.moved){var P=re.clientX-I,Z=re.clientY-Y;R.moved=P*P+Z*Z>m}R.event(re).zoom("mouse",n(y(R.that.__zoom,R.mouse[0]=Te(re,S),R.mouse[1]),R.extent,l))}function J(re){V.on("mousemove.zoom mouseup.zoom",null),$i(re.view,R.moved),Bt(re),R.event(re).end()}}function G(_,...A){if(t.apply(this,arguments)){var S=this.__zoom,R=Te(_.changedTouches?_.changedTouches[0]:_,this),V=S.invert(R),T=S.k*(_.shiftKey?.5:2),I=n(y(M(S,T),R,V),e.apply(this,A),l);Bt(_),a>0?Se(this).transition().duration(a).call($,I,R,_):Se(this).call(E.transform,I,R,_)}}function F(_,...A){if(t.apply(this,arguments)){var S=_.touches,R=S.length,V=O(this,A,_.changedTouches.length===R).event(_),T,I,Y,X;for(bo(_),I=0;I<R;++I)Y=S[I],X=Te(Y,this),X=[X,this.__zoom.invert(X),Y.identifier],V.touch0?!V.touch1&&V.touch0[2]!==X[2]&&(V.touch1=X,V.taps=0):(V.touch0=X,T=!0,V.taps=1+!!u);u&&(u=clearTimeout(u)),T&&(V.taps<2&&(f=X[0],u=setTimeout(function(){u=null},g)),mn(this),V.start())}}function N(_,...A){if(this.__zooming){var S=O(this,A).event(_),R=_.changedTouches,V=R.length,T,I,Y,X;for(Bt(_),T=0;T<V;++T)I=R[T],Y=Te(I,this),S.touch0&&S.touch0[2]===I.identifier?S.touch0[0]=Y:S.touch1&&S.touch1[2]===I.identifier&&(S.touch1[0]=Y);if(I=S.that.__zoom,S.touch1){var J=S.touch0[0],re=S.touch0[1],P=S.touch1[0],Z=S.touch1[1],B=(B=P[0]-J[0])*B+(B=P[1]-J[1])*B,U=(U=Z[0]-re[0])*U+(U=Z[1]-re[1])*U;I=M(I,Math.sqrt(B/U)),Y=[(J[0]+P[0])/2,(J[1]+P[1])/2],X=[(re[0]+Z[0])/2,(re[1]+Z[1])/2]}else if(S.touch0)Y=S.touch0[0],X=S.touch0[1];else return;S.zoom("touch",n(y(I,Y,X),S.extent,l))}}function H(_,...A){if(this.__zooming){var S=O(this,A).event(_),R=_.changedTouches,V=R.length,T,I;for(bo(_),h&&clearTimeout(h),h=setTimeout(function(){h=null},g),T=0;T<V;++T)I=R[T],S.touch0&&S.touch0[2]===I.identifier?delete S.touch0:S.touch1&&S.touch1[2]===I.identifier&&delete S.touch1;if(S.touch1&&!S.touch0&&(S.touch0=S.touch1,delete S.touch1),S.touch0)S.touch0[1]=this.__zoom.invert(S.touch0[0]);else if(S.end(),S.taps===2&&(I=Te(I,this),Math.hypot(f[0]-I[0],f[1]-I[1])<v)){var Y=Se(this).on("dblclick.zoom");Y&&Y.apply(this,arguments)}}}return E.wheelDelta=function(_){return arguments.length?(o=typeof _=="function"?_:yn(+_),E):o},E.filter=function(_){return arguments.length?(t=typeof _=="function"?_:yn(!!_),E):t},E.touchable=function(_){return arguments.length?(i=typeof _=="function"?_:yn(!!_),E):i},E.extent=function(_){return arguments.length?(e=typeof _=="function"?_:yn([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),E):e},E.scaleExtent=function(_){return arguments.length?(s[0]=+_[0],s[1]=+_[1],E):[s[0],s[1]]},E.translateExtent=function(_){return arguments.length?(l[0][0]=+_[0][0],l[1][0]=+_[1][0],l[0][1]=+_[0][1],l[1][1]=+_[1][1],E):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},E.constrain=function(_){return arguments.length?(n=_,E):n},E.duration=function(_){return arguments.length?(a=+_,E):a},E.interpolate=function(_){return arguments.length?(d=_,E):d},E.on=function(){var _=c.on.apply(c,arguments);return _===c?E:_},E.clickDistance=function(_){return arguments.length?(m=(_=+_)*_,E):Math.sqrt(m)},E.tapDistance=function(_){return arguments.length?(v=+_,E):v},E}var oe=(t=>(t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom",t))(oe||{}),xo=(t=>(t.Partial="partial",t.Full="full",t))(xo||{}),et=(t=>(t.Bezier="default",t.SimpleBezier="simple-bezier",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t))(et||{}),Le=(t=>(t.Strict="strict",t.Loose="loose",t))(Le||{}),Fe=(t=>(t.Arrow="arrow",t.ArrowClosed="arrowclosed",t))(Fe||{}),Rt=(t=>(t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal",t))(Rt||{}),us=(t=>(t.TopLeft="top-left",t.TopCenter="top-center",t.TopRight="top-right",t.BottomLeft="bottom-left",t.BottomCenter="bottom-center",t.BottomRight="bottom-right",t))(us||{});const _u=["INPUT","SELECT","TEXTAREA"],bu=typeof document<"u"?document:null;function Eo(t){var e,n;const o=((n=(e=t.composedPath)==null?void 0:e.call(t))==null?void 0:n[0])||t.target,i=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,s=typeof o?.closest=="function"?o.closest(".nokey"):null;return _u.includes(o?.nodeName)||i||!!s}function xu(t){return t.ctrlKey||t.metaKey||t.shiftKey||t.altKey}function fs(t,e,n,o){const i=e.replace("+",`
|
|
1
|
+
(function(_e,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(_e=typeof globalThis<"u"?globalThis:_e||self,r(_e.DuiUI={},_e.Vue))})(this,(function(_e,r){"use strict";const mt=(t,e)=>(t.install=n=>{n.component(t.name,t),e&&e.forEach(o=>{n.component(o.name,o)})},t),Wt=(t="")=>{const e=Date.now(),n=Math.floor(Math.random()*1e9);return t===""?String(n)+String(e):t+"_"+n+String(e)},On={},wr=(t,e,n)=>{n[t]=n[t]||{};const o=Wt();return n[t][o]=e,o},_r=(t,e,n)=>{const o=[],i=n[t]||{};return Object.keys(i).forEach(s=>{const l=i[s];try{l&&o.push(l(e))}catch(a){console.error(a)}}),o},br=(t,e,n)=>{if(e){const o=n[t];o&&delete o[e]}else delete n[t]},Vo=(t,e)=>wr(t,e,On),we=(t,e)=>_r(t,e,On),xr=(t,e)=>{br(t,e,On)},Lo=(t,e,n,o,i,s)=>{const l=e.id,a=e.level,{getDesignLocals:d,selectComponent:c,getComponent:u,isMyChildComponent:f,addComponent:h,deleteComponent:g,getParentComponents:p,removeComponentFromContainer:m,addComponentToContainer:v,copyComponent:E,activedComponent:M,top:y}=r.inject("d-drag-design-provide",{}),C=[],$=r.ref(!1),O=r.ref(!1),L=r.ref(!1),j=r.ref(!1),W=r.ref(!1),G={id:"",type:""},F=r.ref(!1),N=r.ref(!1);let H="",_=null;const A=B=>{if(H===B)return _;H=B;const{top:U,left:K,width:te,height:ce}=t.value.getBoundingClientRect();return _=[{x:K,y:U},{x:K+te,y:U},{x:K+te,y:U+ce},{x:K,y:U+ce}],_},S=(B,U,K)=>{let te=U-K[0].y;te<0&&(te=-te);let ce=U-K[3].y;ce<0&&(ce=-ce);let q=B-K[0].x;q<0&&(q=-q);let ie=B-K[1].x;return ie<0&&(ie=-ie),{ly:te>ce?ce:te,typey:te>ce?"bottom":"top",lx:q>ie?ie:q,lallx:q+ie}},R=(B,U,K)=>B>=K[0].x&&B<=K[1].x&&U>=K[0].y&&U<=K[3].y,V=()=>{if(i){we("dragClick",{id:l});return}if(!O.value){if(c(l),a!==0){const B=t.value.getBoundingClientRect(),U=d();B.top-U.top<22?j.value=!0:j.value=!1}O.value=!0,we("dragClick",{id:l})}},T=B=>{const U=g(B);U&&r.nextTick(()=>{we("dragClick",{id:U})})},I=()=>{G.id="",G.type="",a===0&&(W.value=!1)},Y=()=>{we("mouseEnterOrLeave",{id:l,type:"enter"})},X=()=>{we("mouseEnterOrLeave",{id:l,type:"leave"})},J=B=>{we("dragClick",{id:B})},re={mouseEnterOrLeave:({id:B,type:U})=>{U==="enter"?C.push(B):C.length>0&&C.splice(C.length-1,1);const K=C.length;K>0&&l===C[K-1]?$.value=!0:$.value=!1},dragAciveChild:({type:B,id:U})=>{U===l?B==="top"?(F.value=!0,N.value=!1):(N.value=!0,F.value=!1):(N.value=!1,F.value=!1)},dragClick({id:B,isAgain:U}){console.log("dragClick",B,l),B!==l?O.value=!1:(U&&(O.value=!1),V())}};re[`dragGetChildDistance_${l}`]=({dragX:B,dragY:U,moveId:K})=>{const te=A(K);return S(B,U,te)};const P={isInContainer({x:B,y:U,id:K,moveId:te}){if(l===K||f(K,l))return L.value=!1,{isIn:!1,level:a,id:l,groupId:s};const ce=A(te);if(R(B,U,ce))return a===0&&(W.value=!0),{isIn:!0,level:a,id:l,groupId:s};if(a===0){const{ly:q,lx:ie}=S(B,U,ce);if(q<20&&ie<20)return W.value=!0,{isIn:!0,level:a,id:l,groupId:s};W.value=!1}return L.value=!1,{isIn:!1,level:a,id:l,groupId:s}},dragActiveContainer:({containerId:B,containerGroupId:U,dragX:K,dragY:te,moveId:ce})=>{if(B===l&&U===s)if(L.value=!0,o&&o.value.length>0){let q={ly:9999999,lx:0,lallx:0,id:"",typey:""};o?.value.forEach(ie=>{if(s&&ie.groupId!==s)return;const b=we(`dragGetChildDistance_${ie.id}`,{dragX:K,dragY:te,moveId:ce})[0];b&&(q.ly>b.ly||q.ly===b.ly&&(q.lx>b.lx||q.lx===b.lx&&q.lallx>b.lallx))&&(q=b,q.id=ie.id)}),G.id=q.id,G.type=q.typey,we("dragAciveChild",{id:q.id,type:q.typey})}else we("dragAciveChild",{id:""});else L.value=!1},dragAdd:B=>{if(L.value){let U=o?.value.length||0;G.id!==""&&G.id!==void 0&&(U=o?.value.findIndex(K=>K.id===G.id)||0,G.type==="bottom"&&(U+=1)),h(B,l,U,s),L.value=!1}I()},dragAddByClick:B=>{if(!M.value&&l===y.id||M.value?.id===l||M.value?.containerId===l&&M.value?.dragType!=="container"){const U=o?.value.length||0,K=h(B,l,U,s,!0);K&&B.config&&Object.keys(B.config).forEach(te=>{K.config[te]=B.config[te]})}},dragUpdate(B){if(L.value){const U=u(B);if(U.level=a+1,G.id!==U.id){m(U.containerId,B);let K=o?.value.findIndex(te=>te.id===G.id)||0;G.type==="bottom"&&(K+=1),v(U,l,K,s)}L.value=!1,r.nextTick(()=>{we("dragClick",{id:U.id,isAgain:!0})})}I()}},Z={};return r.onMounted(()=>{(!i||n!=="container")&&Object.keys(re).forEach(B=>{Z[B]=Vo(B,re[B])}),n==="container"&&Object.keys(P).forEach(B=>{Z[B]=Vo(B,P[B])}),e.isNewAdd&&r.nextTick(()=>{V(),delete e.isNewAdd})}),r.onUnmounted(()=>{Object.keys(Z).forEach(B=>{xr(B,Z[B])})}),{onMouseenter:Y,onMouseleave:X,activeComponent:V,handleComponentClick:J,deleteComponentByClick:T,copyComponent:E,getParentComponents:p,isBottomToolBar:j,isHover:$,isSelect:O,isToContainer:L,isMoveingInTopLevel:W,isTopActive:F,isBottomActive:N}},Fo=(t,e)=>{const n={x:0,y:0,clientX:0,clientY:0,dragElement:null,dragElementId:"jcode-darg-move-id",toContainerLevel:-1,toContainerId:"",groupId:"",id:""};let o=!1;const i=(g,p)=>{o!==!0&&(o=!0,setTimeout(()=>{g(),o=!1},p))},s=r.ref(!1),l=(g,p,m)=>{const v=document.createElement("div");return v.id=n.dragElementId,v.innerText=g,v.className="d-drag-move",v.style.top=`${p}px`,v.style.left=`${m}px`,document.body.appendChild(v),v},a=()=>{document.onmousemove=null,document.onmouseup=null,s.value=!1,we("dragAciveChild",{id:""})},d=()=>{a(),n.dragElement&&(n.dragElement.remove(),n.dragElement=null,e?we("dragAdd",t):we("dragUpdate",t.id))},c=g=>{const{clientY:p,clientX:m}=g;if(!n.dragElement){const v=Math.abs(n.x-m),E=Math.abs(n.y-p);if(v<=1&&E<=1)return;s.value=!0,n.dragElement=l(t.name,p-11,m-32)}n.dragElement.style.top=`${p-11}px`,n.dragElement.style.left=`${m-32}px`,n.clientX=m,n.clientY=p,i(()=>{if(!s.value)return;const v=we("isInContainer",{x:m,y:p,id:t.id,moveId:n.id});n.toContainerLevel=-1,n.toContainerId="",n.groupId="",v.forEach(({level:E,id:M,isIn:y,groupId:C})=>{y&&n.toContainerLevel<E&&(n.toContainerLevel=E,n.toContainerId=M,n.groupId=C)}),n.toContainerId!==""?we("dragActiveContainer",{containerId:n.toContainerId,containerGroupId:n.groupId,dragX:m,dragY:p,moveId:n.id}):we("dragAciveChild",{id:""})},100)};return{onContextmenu:()=>{a()},onMousedown:g=>{n.x=g.clientX,n.y=g.clientY,n.id=Wt(),document.onmouseup=d,document.onmousemove=c},onClick:()=>{we("dragAddByClick",t)},moveActive:s}},Er=t=>(t.install=e=>{e.component(t.name,t)},t),Cr=t=>!!(t==null||typeof t=="string"&&t.trim()===""||Array.isArray(t)&&t.length===0||typeof t=="object"&&Object.keys(t).length===0),Go=/^[a-z0-9]+(-[a-z0-9]+)*$/,Yt=(t,e,n,o="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;o=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const a=i.pop(),d=i.pop(),c={provider:i.length>0?i[0]:o,prefix:d,name:a};return e&&!Ut(c)?null:c}const s=i[0],l=s.split("-");if(l.length>1){const a={provider:o,prefix:l.shift(),name:l.join("-")};return e&&!Ut(a)?null:a}if(n&&o===""){const a={provider:o,prefix:"",name:s};return e&&!Ut(a,n)?null:a}return null},Ut=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1,Wo=Object.freeze({left:0,top:0,width:16,height:16}),Xt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),yt=Object.freeze({...Wo,...Xt}),Hn=Object.freeze({...yt,body:"",hidden:!1});function Nr(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const o=((t.rotate||0)+(e.rotate||0))%4;return o&&(n.rotate=o),n}function Yo(t,e){const n=Nr(t,e);for(const o in Hn)o in Xt?o in t&&!(o in n)&&(n[o]=Xt[o]):o in e?n[o]=e[o]:o in t&&(n[o]=t[o]);return n}function kr(t,e){const n=t.icons,o=t.aliases||Object.create(null),i=Object.create(null);function s(l){if(n[l])return i[l]=[];if(!(l in i)){i[l]=null;const a=o[l]&&o[l].parent,d=a&&s(a);d&&(i[l]=[a].concat(d))}return i[l]}return Object.keys(n).concat(Object.keys(o)).forEach(s),i}function Sr(t,e,n){const o=t.icons,i=t.aliases||Object.create(null);let s={};function l(a){s=Yo(o[a]||i[a],s)}return l(e),n.forEach(l),Yo(t,s)}function Uo(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(i=>{e(i,null),n.push(i)});const o=kr(t);for(const i in o){const s=o[i];s&&(e(i,Sr(t,i,s)),n.push(i))}return n}const Mr={provider:"",aliases:{},not_found:{},...Wo};function Vn(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Xo(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!Vn(t,Mr))return null;const n=e.icons;for(const i in n){const s=n[i];if(!i||typeof s.body!="string"||!Vn(s,Hn))return null}const o=e.aliases||Object.create(null);for(const i in o){const s=o[i],l=s.parent;if(!i||typeof l!="string"||!n[l]&&!o[l]||!Vn(s,Hn))return null}return e}const jo=Object.create(null);function Dr(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function it(t,e){const n=jo[t]||(jo[t]=Object.create(null));return n[e]||(n[e]=Dr(t,e))}function Zo(t,e){return Xo(e)?Uo(e,(n,o)=>{o?t.icons[n]=o:t.missing.add(n)}):[]}function zr(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let vt=!1;function qo(t){return typeof t=="boolean"&&(vt=t),vt}function Ko(t){const e=typeof t=="string"?Yt(t,!0,vt):t;if(e){const n=it(e.provider,e.prefix),o=e.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function Tr(t,e){const n=Yt(t,!0,vt);if(!n)return!1;const o=it(n.provider,n.prefix);return e?zr(o,n.name,e):(o.missing.add(n.name),!0)}function Ir(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),vt&&!e&&!t.prefix){let i=!1;return Xo(t)&&(t.prefix="",Uo(t,(s,l)=>{Tr(s,l)&&(i=!0)})),i}const n=t.prefix;if(!Ut({prefix:n,name:"a"}))return!1;const o=it(e,n);return!!Zo(o,t)}function Qo(t){const e=Ko(t);return e&&{...yt,...e}}const Jo=Object.freeze({width:null,height:null}),ei=Object.freeze({...Jo,...Xt}),Br=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Rr=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ti(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const o=t.split(Br);if(o===null||!o.length)return t;const i=[];let s=o.shift(),l=Rr.test(s);for(;;){if(l){const a=parseFloat(s);isNaN(a)?i.push(s):i.push(Math.ceil(a*e*n)/n)}else i.push(s);if(s=o.shift(),s===void 0)return i.join("");l=!l}}function Ar(t,e="defs"){let n="";const o=t.indexOf("<"+e);for(;o>=0;){const i=t.indexOf(">",o),s=t.indexOf("</"+e);if(i===-1||s===-1)break;const l=t.indexOf(">",s);if(l===-1)break;n+=t.slice(i+1,s).trim(),t=t.slice(0,o).trim()+t.slice(l+1)}return{defs:n,content:t}}function $r(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Pr(t,e,n){const o=Ar(t);return $r(o.defs,e+o.content+n)}const Or=t=>t==="unset"||t==="undefined"||t==="none";function Hr(t,e){const n={...yt,...t},o={...ei,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,o].forEach(m=>{const v=[],E=m.hFlip,M=m.vFlip;let y=m.rotate;E?M?y+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):M&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(y<0&&(y-=Math.floor(y/4)*4),y=y%4,y){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}y%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(s=Pr(s,'<g transform="'+v.join(" ")+'">',"</g>"))});const l=o.width,a=o.height,d=i.width,c=i.height;let u,f;l===null?(f=a===null?"1em":a==="auto"?c:a,u=ti(f,d/c)):(u=l==="auto"?d:l,f=a===null?ti(u,c/d):a==="auto"?c:a);const h={},g=(m,v)=>{Or(v)||(h[m]=v.toString())};g("width",u),g("height",f);const p=[i.left,i.top,d,c];return h.viewBox=p.join(" "),{attributes:h,viewBox:p,body:s}}const Vr=/\sid="(\S+)"/g,Lr="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Fr=0;function Gr(t,e=Lr){const n=[];let o;for(;o=Vr.exec(t);)n.push(o[1]);if(!n.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const l=typeof e=="function"?e(s):e+(Fr++).toString(),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+l+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}const Ln=Object.create(null);function Wr(t,e){Ln[t]=e}function Fn(t){return Ln[t]||Ln[""]}function Gn(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Wn=Object.create(null),wt=["https://api.simplesvg.com","https://api.unisvg.com"],jt=[];for(;wt.length>0;)wt.length===1||Math.random()>.5?jt.push(wt.shift()):jt.push(wt.pop());Wn[""]=Gn({resources:["https://api.iconify.design"].concat(jt)});function Yr(t,e){const n=Gn(e);return n===null?!1:(Wn[t]=n,!0)}function Yn(t){return Wn[t]}let ni=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function Ur(t,e){const n=Yn(t);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let i=0;n.resources.forEach(l=>{i=Math.max(i,l.length)});const s=e+".json?icons=";o=n.maxURL-i-n.path.length-s.length}return o}function Xr(t){return t===404}const jr=(t,e,n)=>{const o=[],i=Ur(t,e),s="icons";let l={type:s,provider:t,prefix:e,icons:[]},a=0;return n.forEach((d,c)=>{a+=d.length+1,a>=i&&c>0&&(o.push(l),l={type:s,provider:t,prefix:e,icons:[]},a=d.length),l.icons.push(d)}),o.push(l),o};function Zr(t){if(typeof t=="string"){const e=Yn(t);if(e)return e.path}return"/"}const qr={prepare:jr,send:(t,e,n)=>{if(!ni){n("abort",424);return}let o=Zr(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),d=new URLSearchParams({icons:a});o+=s+".json?"+d.toString();break}case"custom":{const s=e.uri;o+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;ni(t+o).then(s=>{const l=s.status;if(l!==200){setTimeout(()=>{n(Xr(l)?"abort":"next",l)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})}};function Kr(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let o={provider:"",prefix:"",name:""};return t.forEach(i=>{if(o.name===i.name&&o.prefix===i.prefix&&o.provider===i.provider)return;o=i;const s=i.provider,l=i.prefix,a=i.name,d=n[s]||(n[s]=Object.create(null)),c=d[l]||(d[l]=it(s,l));let u;a in c.icons?u=e.loaded:l===""||c.missing.has(a)?u=e.missing:u=e.pending;const f={provider:s,prefix:l,name:a};u.push(f)}),e}function oi(t,e){t.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(i=>i.id!==e))})}function Qr(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const o=t.provider,i=t.prefix;e.forEach(s=>{const l=s.icons,a=l.pending.length;l.pending=l.pending.filter(d=>{if(d.prefix!==i)return!0;const c=d.name;if(t.icons[c])l.loaded.push({provider:o,prefix:i,name:c});else if(t.missing.has(c))l.missing.push({provider:o,prefix:i,name:c});else return n=!0,!0;return!1}),l.pending.length!==a&&(n||oi([t],s.id),s.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),s.abort))})}))}let Jr=0;function el(t,e,n){const o=Jr++,i=oi.bind(null,n,o);if(!e.pending.length)return i;const s={id:o,icons:e,callback:t,abort:i};return n.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(s)}),i}function tl(t,e=!0,n=!1){const o=[];return t.forEach(i=>{const s=typeof i=="string"?Yt(i,e,n):i;s&&o.push(s)}),o}var nl={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ol(t,e,n,o){const i=t.resources.length,s=t.random?Math.floor(Math.random()*i):t.index;let l;if(t.random){let O=t.resources.slice(0);for(l=[];O.length>1;){const L=Math.floor(Math.random()*O.length);l.push(O[L]),O=O.slice(0,L).concat(O.slice(L+1))}l=l.concat(O)}else l=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let d="pending",c=0,u,f=null,h=[],g=[];typeof o=="function"&&g.push(o);function p(){f&&(clearTimeout(f),f=null)}function m(){d==="pending"&&(d="aborted"),p(),h.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),h=[]}function v(O,L){L&&(g=[]),typeof O=="function"&&g.push(O)}function E(){return{startTime:a,payload:e,status:d,queriesSent:c,queriesPending:h.length,subscribe:v,abort:m}}function M(){d="failed",g.forEach(O=>{O(void 0,u)})}function y(){h.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),h=[]}function C(O,L,j){const W=L!=="success";switch(h=h.filter(G=>G!==O),d){case"pending":break;case"failed":if(W||!t.dataAfterTimeout)return;break;default:return}if(L==="abort"){u=j,M();return}if(W){u=j,h.length||(l.length?$():M());return}if(p(),y(),!t.random){const G=t.resources.indexOf(O.resource);G!==-1&&G!==t.index&&(t.index=G)}d="completed",g.forEach(G=>{G(j)})}function $(){if(d!=="pending")return;p();const O=l.shift();if(O===void 0){if(h.length){f=setTimeout(()=>{p(),d==="pending"&&(y(),M())},t.timeout);return}M();return}const L={status:"pending",resource:O,callback:(j,W)=>{C(L,j,W)}};h.push(L),c++,f=setTimeout($,t.rotate),n(O,e,L.callback)}return setTimeout($),E}function ii(t){const e={...nl,...t};let n=[];function o(){n=n.filter(a=>a().status==="pending")}function i(a,d,c){const u=ol(e,a,d,(f,h)=>{o(),c&&c(f,h)});return n.push(u),u}function s(a){return n.find(d=>a(d))||null}return{query:i,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:o}}function si(){}const Un=Object.create(null);function il(t){if(!Un[t]){const e=Yn(t);if(!e)return;const n=ii(e),o={config:e,redundancy:n};Un[t]=o}return Un[t]}function sl(t,e,n){let o,i;if(typeof t=="string"){const s=Fn(t);if(!s)return n(void 0,424),si;i=s.send;const l=il(t);l&&(o=l.redundancy)}else{const s=Gn(t);if(s){o=ii(s);const l=t.resources?t.resources[0]:"",a=Fn(l);a&&(i=a.send)}}return!o||!i?(n(void 0,424),si):o.query(e,i,n)().abort}function ri(){}function rl(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Qr(t)}))}function ll(t){const e=[],n=[];return t.forEach(o=>{(o.match(Go)?e:n).push(o)}),{valid:e,invalid:n}}function _t(t,e,n){function o(){const i=t.pendingIcons;e.forEach(s=>{i&&i.delete(s),t.icons[s]||t.missing.add(s)})}if(n&&typeof n=="object")try{if(!Zo(t,n).length){o();return}}catch(i){console.error(i)}o(),rl(t)}function li(t,e){t instanceof Promise?t.then(n=>{e(n)}).catch(()=>{e(null)}):e(t)}function al(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:o}=t,i=t.iconsToLoad;if(delete t.iconsToLoad,!i||!i.length)return;const s=t.loadIcon;if(t.loadIcons&&(i.length>1||!s)){li(t.loadIcons(i,o,n),u=>{_t(t,i,u)});return}if(s){i.forEach(u=>{const f=s(u,o,n);li(f,h=>{const g=h?{prefix:o,icons:{[u]:h}}:null;_t(t,[u],g)})});return}const{valid:l,invalid:a}=ll(i);if(a.length&&_t(t,a,null),!l.length)return;const d=o.match(Go)?Fn(n):null;if(!d){_t(t,l,null);return}d.prepare(n,o,l).forEach(u=>{sl(n,u,f=>{_t(t,u.icons,f)})})}))}const cl=(t,e)=>{const n=tl(t,!0,qo()),o=Kr(n);if(!o.pending.length){let d=!0;return e&&setTimeout(()=>{d&&e(o.loaded,o.missing,o.pending,ri)}),()=>{d=!1}}const i=Object.create(null),s=[];let l,a;return o.pending.forEach(d=>{const{provider:c,prefix:u}=d;if(u===a&&c===l)return;l=c,a=u,s.push(it(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),o.pending.forEach(d=>{const{provider:c,prefix:u,name:f}=d,h=it(c,u),g=h.pendingIcons||(h.pendingIcons=new Set);g.has(f)||(g.add(f),i[c][u].push(f))}),s.forEach(d=>{const c=i[d.provider][d.prefix];c.length&&al(d,c)}),e?el(e,o,s):ri};function dl(t,e){const n={...t};for(const o in e){const i=e[o],s=typeof i;o in Jo?(i===null||i&&(s==="string"||s==="number"))&&(n[o]=i):s===typeof n[o]&&(n[o]=o==="rotate"?i%4:i)}return n}const ul=/[\s,]+/;function fl(t,e){e.split(ul).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function hl(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function o(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(t);return isNaN(i)?0:o(i)}else if(n!==t){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?o(s):0)}}return e}function gl(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in e)n+=" "+o+'="'+e[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function pl(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ml(t){return"data:image/svg+xml,"+pl(t)}function yl(t){return'url("'+ml(t)+'")'}const ai={...ei,inline:!1},vl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},wl={display:"inline-block"},Xn={backgroundColor:"currentColor"},ci={backgroundColor:"transparent"},di={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},ui={webkitMask:Xn,mask:Xn,background:ci};for(const t in ui){const e=ui[t];for(const n in di)e[t+n]=di[n]}const Zt={};["horizontal","vertical"].forEach(t=>{const e=t.slice(0,1)+"Flip";Zt[t+"-flip"]=e,Zt[t.slice(0,1)+"-flip"]=e,Zt[t+"Flip"]=e});function fi(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const hi=(t,e)=>{const n=dl(ai,e),o={...vl},i=e.mode||"svg",s={},l=e.style,a=typeof l=="object"&&!(l instanceof Array)?l:{};for(let m in e){const v=e[m];if(v!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[m]=v===!0||v==="true"||v===1;break;case"flip":typeof v=="string"&&fl(n,v);break;case"color":s.color=v;break;case"rotate":typeof v=="string"?n[m]=hl(v):typeof v=="number"&&(n[m]=v);break;case"ariaHidden":case"aria-hidden":v!==!0&&v!=="true"&&delete o["aria-hidden"];break;default:{const E=Zt[m];E?(v===!0||v==="true"||v===1)&&(n[E]=!0):ai[m]===void 0&&(o[m]=v)}}}const d=Hr(t,n),c=d.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),i==="svg"){o.style={...s,...a},Object.assign(o,c);let m=0,v=e.id;return typeof v=="string"&&(v=v.replace(/-/g,"_")),o.innerHTML=Gr(d.body,v?()=>v+"ID"+m++:"iconifyVue"),r.h("svg",o)}const{body:u,width:f,height:h}=t,g=i==="mask"||(i==="bg"?!1:u.indexOf("currentColor")!==-1),p=gl(u,{...c,width:f+"",height:h+""});return o.style={...s,"--svg":yl(p),width:fi(c.width),height:fi(c.height),...wl,...g?Xn:ci,...a},r.h("span",o)};if(qo(!0),Wr("",qr),typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Ir(o))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const o="IconifyProviders["+n+"] is invalid.";try{const i=e[n];if(typeof i!="object"||!i||i.resources===void 0)continue;Yr(n,i)||console.error(o)}catch{console.error(o)}}}}const _l={...yt,body:""},gi=r.defineComponent((t,{emit:e})=>{const n=r.ref(null);function o(){n.value&&(n.value.abort?.(),n.value=null)}const i=r.ref(!!t.ssr),s=r.ref(""),l=r.shallowRef(null);function a(){const c=t.icon;if(typeof c=="object"&&c!==null&&typeof c.body=="string")return s.value="",{data:c};let u;if(typeof c!="string"||(u=Yt(c,!1,!0))===null)return null;let f=Ko(u);if(!f){const p=n.value;return(!p||p.name!==c)&&(f===null?n.value={name:c}:n.value={name:c,abort:cl([u],d)}),null}o(),s.value!==c&&(s.value=c,r.nextTick(()=>{e("load",c)}));const h=t.customise;if(h){f=Object.assign({},f);const p=h(f.body,u.name,u.prefix,u.provider);typeof p=="string"&&(f.body=p)}const g=["iconify"];return u.prefix!==""&&g.push("iconify--"+u.prefix),u.provider!==""&&g.push("iconify--"+u.provider),{data:f,classes:g}}function d(){const c=a();c?c.data!==l.value?.data&&(l.value=c):l.value=null}return i.value?d():r.onMounted(()=>{i.value=!0,d()}),r.watch(()=>t.icon,d),r.onUnmounted(o),()=>{const c=l.value;if(!c)return hi(_l,t);let u=t;return c.classes&&(u={...t,class:c.classes.join(" ")}),hi({...yt,...c.data},u)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]}),bt=r.defineComponent({name:"JIcon",inheritAttrs:!1,__name:"icon",props:{icon:{},size:{default:16},color:{default:void 0},rotate:{default:void 0},isDiv:{type:Boolean,default:!0}},setup(t){const e=t,n=r.computed(()=>{const i=e.icon;if(i.indexOf(":")===-1)return Qo(`jcode:${e.icon}`)==null,`jcode:${e.icon}`;const l=`jcode:${i.split(":")[1]}`;return Qo(l)!=null?l:i}),o=r.computed(()=>({size:e.size,color:e.color,icon:n.value}));return(i,s)=>t.isDiv?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0},i.$attrs,{class:"j-icon jicon",style:{height:`${t.size}px`}}),[r.createVNode(r.unref(gi),r.mergeProps(o.value,{height:`${t.size}px`,width:`${t.size}px`,mode:"svg",style:`transform:rotate(${t.rotate||0}deg)`}),null,16,["height","width","style"])],16)):(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:1},i.$attrs,{class:"jicon"}),[r.createVNode(r.unref(gi),r.mergeProps(o.value,{height:`${t.size}px`,width:`${t.size}px`,mode:"svg",style:`transform:rotate(${t.rotate||0}deg)`}),null,16,["height","width","style"])],16))}}),bl=["disabled"],xl={key:2},st=Er(r.defineComponent({name:"JButton",__name:"button",props:{type:{type:String,default:"default"},size:{type:String,default:"default"},shape:{type:String,default:"default"},ghost:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},block:{type:Boolean,default:!1},loading:{type:[Boolean,Object],default:()=>!1},icon:{type:String,default:""},href:{type:String,default:""},target:{type:String,default:"_self"},label:{type:String,default:""},notLabel:{type:Boolean,default:!1},compact:Boolean,lastCompactItem:Boolean,firstCompactItem:Boolean},emits:["click"],setup(t,{expose:e,emit:n}){const o=t,i=n,s=h=>{!u.value&&!o.disabled&&(i("click",h),o.href&&window.open(o.href,o.target?o.target:"_self"))},l=r.shallowRef(null),a=()=>{l.value?.focus()},d=()=>{l.value?.blur()},c=r.computed(()=>o.notLabel||!o.label),u=r.ref(!1);r.watch(()=>o.loading,h=>{if(typeof h=="boolean")u.value=h;else if(Cr(h?.delay))u.value=!1;else{const g=setTimeout(()=>{u.value=!0},h.delay);return()=>clearTimeout(g)}},{immediate:!0});const f=r.computed(()=>o.label||"");return e({focus:a,blur:d}),(h,g)=>(r.openBlock(),r.createElementBlock("button",{ref_key:"buttonNodeRef",ref:l,type:"button",class:r.normalizeClass(["j-button",{"j-button-primary":t.type=="primary","j-button-default":t.type=="default","j-button-dashed":t.type=="dashed","j-button-link":t.type=="link","j-button-text":t.type=="text","j-button-ghost":t.ghost==!0,"j-button-danger":t.danger==!0,"j-button-lg":t.size=="large","j-button-sm":t.size=="small","j-button-circle":t.shape=="circle","j-button-round":t.shape=="round","j-button-block":t.block==!0,"j-button-loading":u.value==!0,"j-button-icon-only":c.value==!0,"j-button-compact":t.compact==!0,"j-button-last-compact-item":t.lastCompactItem==!0,"j-button-first-compact-item":t.firstCompactItem==!0}]),disabled:t.disabled,onClick:r.withModifiers(s,["stop"])},[u.value?(r.openBlock(),r.createBlock(bt,{key:0,icon:"mdi:loading",size:t.size=="large"?14:12,class:"loading-spin j-button-loading-icon"},null,8,["size"])):r.createCommentVNode("",!0),t.icon?(r.openBlock(),r.createBlock(bt,{key:1,icon:t.icon},null,8,["icon"])):r.createCommentVNode("",!0),t.notLabel?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",xl,r.toDisplayString(f.value),1)),r.renderSlot(h.$slots,"iconAfter")],10,bl))}})),El={class:"d-drag-btns-pname"},Cl={key:0,class:"d-drag-mask"},jn=r.defineComponent({name:"DDrag",__name:"drag",props:{componentData:{default:()=>({})},isContainer:{type:Boolean,default:!1}},setup(t){const e=t,n=r.ref(),{onMouseenter:o,onMouseleave:i,activeComponent:s,handleComponentClick:l,deleteComponentByClick:a,copyComponent:d,getParentComponents:c,isHover:u,isSelect:f,isTopActive:h,isBottomActive:g,isBottomToolBar:p}=Lo(n,e.componentData,"component"),{onContextmenu:m,onMousedown:v,moveActive:E}=Fo(e.componentData,!1);return(M,y)=>{const C=r.resolveComponent("el-space");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["d-drag-component",{selected:r.unref(f),hovered:r.unref(u),isBottomToolBar:r.unref(p),active:r.unref(E),isTopActive:r.unref(h),isBottomActive:r.unref(g)}])},[y[11]||(y[11]=r.createElementVNode("div",{class:"d-drag-line"},null,-1)),r.createElementVNode("div",{class:"d-drag-btns",onMouseenter:y[4]||(y[4]=(...$)=>r.unref(o)&&r.unref(o)(...$)),onMouseleave:y[5]||(y[5]=(...$)=>r.unref(i)&&r.unref(i)(...$))},[r.createVNode(C,{size:4},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"d-drag-btns-names",onClick:r.withModifiers(()=>{},["stop"])},[r.createVNode(r.unref(st),{class:"d-drag-btn",type:"primary",size:"small",label:t.componentData.name},null,8,["label"]),r.createElementVNode("div",El,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c)(t.componentData.containerId),$=>(r.openBlock(),r.createElementBlock("div",{key:$.id},[r.createVNode(r.unref(st),{class:"d-drag-btn",type:"primary",size:"small",label:$.name,onClick:O=>r.unref(l)($.id)},null,8,["label","onClick"])]))),128))])]),r.createVNode(r.unref(st),{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:content-copy",onClick:y[0]||(y[0]=r.withModifiers($=>r.unref(d)(t.componentData.id),["stop"]))}),r.createElementVNode("div",{onContextmenu:y[1]||(y[1]=r.withModifiers((...$)=>r.unref(m)&&r.unref(m)(...$),["stop"])),onMousedown:y[2]||(y[2]=r.withModifiers((...$)=>r.unref(v)&&r.unref(v)(...$),["stop"])),style:{display:"flex"}},[r.createVNode(r.unref(st),{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:drag"})],32),r.createVNode(r.unref(st),{class:"d-drag-btn",danger:"",type:"primary",size:"small",icon:"mdi:delete",onClick:y[3]||(y[3]=r.withModifiers($=>r.unref(a)(t.componentData.id),["stop"]))})]),_:1})],32),r.createElementVNode("div",{ref_key:"refDrag",ref:n,class:"d-drag-body",onClick:y[6]||(y[6]=r.withModifiers((...$)=>r.unref(s)&&r.unref(s)(...$),["stop"])),onContextmenu:y[7]||(y[7]=r.withModifiers((...$)=>r.unref(m)&&r.unref(m)(...$),["stop"])),onMousedown:y[8]||(y[8]=r.withModifiers((...$)=>r.unref(v)&&r.unref(v)(...$),["stop"])),onMouseenter:y[9]||(y[9]=(...$)=>r.unref(o)&&r.unref(o)(...$)),onMouseleave:y[10]||(y[10]=(...$)=>r.unref(i)&&r.unref(i)(...$))},[r.renderSlot(M.$slots,"default"),t.isContainer?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Cl))],544)],2)}}}),Zn=r.defineComponent({name:"DDragTool",__name:"tool",props:{config:{}},setup(t){const e=t,{onContextmenu:n,onMousedown:o,onClick:i}=Fo(e.config??{name:"",id:""},!0);return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:"d-drag-tool",onClick:l[0]||(l[0]=r.withModifiers((...a)=>r.unref(i)&&r.unref(i)(...a),["stop"])),onContextmenu:l[1]||(l[1]=r.withModifiers((...a)=>r.unref(n)&&r.unref(n)(...a),["stop"])),onMousedown:l[2]||(l[2]=r.withModifiers((...a)=>r.unref(o)&&r.unref(o)(...a),["stop"]))},[r.renderSlot(s.$slots,"default")],32))}}),Nl={key:0,class:"d-drag-line"},kl={key:1,class:"d-drag-btns"},qn=r.defineComponent({name:"DDragContainer",__name:"container",props:{componentData:{default:()=>({})},isComponentContainer:{type:Boolean,default:!0},groupId:{default:void 0}},setup(t){const e=t,n=r.ref(),o=r.computed(()=>e.componentData?.children||[]),{onMouseenter:i,onMouseleave:s,activeComponent:l,isHover:a,isSelect:d,isToContainer:c,isMoveingInTopLevel:u,isTopActive:f,isBottomActive:h}=Lo(n,e.componentData,"container",o,e.isComponentContainer,e.groupId),g=r.computed(()=>!!(o.value.findIndex(p=>p.groupId===e.groupId)===-1&&c.value));return(p,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"refDrag",ref:n,class:r.normalizeClass(["d-drag-container",{selected:r.unref(d)&&!t.isComponentContainer,hovered:r.unref(a)&&!t.isComponentContainer,isTopLevel:t.componentData.level===0,active:g.value,isMoveingInTopLevel:r.unref(u),isTopActive:r.unref(f),isBottomActive:r.unref(h)}])},[t.isComponentContainer?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Nl)),t.isComponentContainer?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",kl,[r.createElementVNode("div",{class:"d-drag-btns-names",onClick:r.withModifiers(()=>{},["stop"])},[r.createVNode(r.unref(st),{class:"d-drag-btn",type:"primary",size:"small",label:t.componentData.name},null,8,["label"])])])),r.createElementVNode("div",{class:"d-drag-body",onClick:m[0]||(m[0]=r.withModifiers((...v)=>r.unref(l)&&r.unref(l)(...v),["stop"])),onMouseenter:m[1]||(m[1]=(...v)=>r.unref(i)&&r.unref(i)(...v)),onMouseleave:m[2]||(m[2]=(...v)=>r.unref(s)&&r.unref(s)(...v))},[r.renderSlot(p.$slots,"default")],32)],2))}}),Kn=r.defineComponent({name:"DDragFormList",__name:"dragFormList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(t){const{designItemName:e}=r.inject("dui-design-provide",{});return(n,o)=>{const i=r.resolveComponent("el-col");return r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.componentList,s=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:s.id},[s.type!="pkey"?(r.openBlock(),r.createBlock(i,{key:0,span:s.config.span||24},{default:r.withCtx(()=>[r.createVNode(jn,{"is-container":s.dragType!=="component","component-data":s},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(e)),{"component-data":s,"global-config":t.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["is-container","component-data"])]),_:2},1032,["span"])):r.createCommentVNode("",!0)],64))),128)}}}),Qn=r.defineComponent({name:"DDragIndexList",__name:"dragIndexList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(t){const{designItemName:e}=r.inject("dui-design-provide",{}),n=o=>{if(o.flexWidth)return{width:o.flexWidth+"%"}};return(o,i)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.componentList,s=>(r.openBlock(),r.createBlock(jn,{key:s.id,style:r.normalizeStyle(n(s.config)),"is-container":s.dragType!=="component","component-data":s},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(e)),{"component-data":s,"global-config":t.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["style","is-container","component-data"]))),128))}}),pi=mt(jn,[Zn,qn,Kn,Qn]);function xt(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Pe(t){return typeof t=="function"?t():r.unref(t)}const Sl=typeof window<"u"&&typeof document<"u",Ml=t=>typeof t<"u",Dl=Object.prototype.toString,zl=t=>Dl.call(t)==="[object Object]",Tl=()=>{};function Il(t,e){function n(...o){return new Promise((i,s)=>{Promise.resolve(t(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})).then(i).catch(s)})}return n}const mi=t=>t();function Bl(t=mi){const e=r.ref(!0);function n(){e.value=!1}function o(){e.value=!0}const i=(...s)=>{e.value&&t(...s)};return{isActive:r.readonly(e),pause:n,resume:o,eventFilter:i}}function yi(t,e=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(e?()=>i(n):o,t)})}function Rl(t,e,n={}){const{eventFilter:o=mi,...i}=n;return r.watch(t,Il(o,e),i)}function rt(t,e,n={}){const{eventFilter:o,...i}=n,{eventFilter:s,pause:l,resume:a,isActive:d}=Bl(o);return{stop:Rl(t,e,{...i,eventFilter:s}),pause:l,resume:a,isActive:d}}function Al(t,e={}){if(!r.isRef(t))return r.toRefs(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const o in t.value)n[o]=r.customRef(()=>({get(){return t.value[o]},set(i){var s;if((s=Pe(e.replaceRef))!=null?s:!0)if(Array.isArray(t.value)){const a=[...t.value];a[o]=i,t.value=a}else{const a={...t.value,[o]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[o]=i}}));return n}function Jn(t,e=!1){function n(f,{flush:h="sync",deep:g=!1,timeout:p,throwOnTimeout:m}={}){let v=null;const M=[new Promise(y=>{v=r.watch(t,C=>{f(C)!==e&&(v?.(),y(C))},{flush:h,deep:g,immediate:!0})})];return p!=null&&M.push(yi(p,m).then(()=>Pe(t)).finally(()=>v?.())),Promise.race(M)}function o(f,h){if(!r.isRef(f))return n(C=>C===f,h);const{flush:g="sync",deep:p=!1,timeout:m,throwOnTimeout:v}=h??{};let E=null;const y=[new Promise(C=>{E=r.watch([t,f],([$,O])=>{e!==($===O)&&(E?.(),C($))},{flush:g,deep:p,immediate:!0})})];return m!=null&&y.push(yi(m,v).then(()=>Pe(t)).finally(()=>(E?.(),Pe(t)))),Promise.race(y)}function i(f){return n(h=>!!h,f)}function s(f){return o(null,f)}function l(f){return o(void 0,f)}function a(f){return n(Number.isNaN,f)}function d(f,h){return n(g=>{const p=Array.from(g);return p.includes(f)||p.includes(Pe(f))},h)}function c(f){return u(1,f)}function u(f=1,h){let g=-1;return n(()=>(g+=1,g>=f),h)}return Array.isArray(Pe(t))?{toMatch:n,toContains:d,changed:c,changedTimes:u,get not(){return Jn(t,!e)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:s,toBeNaN:a,toBeUndefined:l,changed:c,changedTimes:u,get not(){return Jn(t,!e)}}}function eo(t){return Jn(t)}function $l(t){var e;const n=Pe(t);return(e=n?.$el)!=null?e:n}const vi=Sl?window:void 0;function wi(...t){let e,n,o,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,i]=t,e=vi):[e,n,o,i]=t,!e)return Tl;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],l=()=>{s.forEach(u=>u()),s.length=0},a=(u,f,h,g)=>(u.addEventListener(f,h,g),()=>u.removeEventListener(f,h,g)),d=r.watch(()=>[$l(e),Pe(i)],([u,f])=>{if(l(),!u)return;const h=zl(f)?{...f}:f;s.push(...n.flatMap(g=>o.map(p=>a(u,g,p,h))))},{immediate:!0,flush:"post"}),c=()=>{d(),l()};return xt(c),c}function Pl(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function _i(...t){let e,n,o={};t.length===3?(e=t[0],n=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],o=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:i=vi,eventName:s="keydown",passive:l=!1,dedupe:a=!1}=o,d=Pl(e);return wi(i,s,u=>{u.repeat&&Pe(a)||d(u)&&n(u)},l)}function Ol(t){return JSON.parse(JSON.stringify(t))}function to(t,e,n,o={}){var i,s,l;const{clone:a=!1,passive:d=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:h}=o,g=r.getCurrentInstance(),p=n||g?.emit||((i=g?.$emit)==null?void 0:i.bind(g))||((l=(s=g?.proxy)==null?void 0:s.$emit)==null?void 0:l.bind(g?.proxy));let m=c;e||(e="modelValue"),m=m||`update:${e.toString()}`;const v=y=>a?typeof a=="function"?a(y):Ol(y):y,E=()=>Ml(t[e])?v(t[e]):f,M=y=>{h?h(y)&&p(m,y):p(m,y)};if(d){const y=E(),C=r.ref(y);let $=!1;return r.watch(()=>t[e],O=>{$||($=!0,C.value=v(O),r.nextTick(()=>$=!1))}),r.watch(C,O=>{!$&&(O!==t[e]||u)&&M(O)},{deep:u}),C}else return r.computed({get(){return E()},set(y){M(y)}})}var Hl={value:()=>{}};function qt(){for(var t=0,e=arguments.length,n={},o;t<e;++t){if(!(o=arguments[t]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Kt(n)}function Kt(t){this._=t}function Vl(t,e){return t.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Kt.prototype=qt.prototype={constructor:Kt,on:function(t,e){var n=this._,o=Vl(t+"",n),i,s=-1,l=o.length;if(arguments.length<2){for(;++s<l;)if((i=(t=o[s]).type)&&(i=Ll(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<l;)if(i=(t=o[s]).type)n[i]=bi(n[i],t.name,e);else if(e==null)for(i in n)n[i]=bi(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Kt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,s;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],o=0,i=s.length;o<i;++o)s[o].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],i=0,s=o.length;i<s;++i)o[i].value.apply(e,n)}};function Ll(t,e){for(var n=0,o=t.length,i;n<o;++n)if((i=t[n]).name===e)return i.value}function bi(t,e,n){for(var o=0,i=t.length;o<i;++o)if(t[o].name===e){t[o]=Hl,t=t.slice(0,o).concat(t.slice(o+1));break}return n!=null&&t.push({name:e,value:n}),t}var no="http://www.w3.org/1999/xhtml";const xi={svg:"http://www.w3.org/2000/svg",xhtml:no,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qt(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),xi.hasOwnProperty(e)?{space:xi[e],local:t}:t}function Fl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===no&&e.documentElement.namespaceURI===no?e.createElement(t):e.createElementNS(n,t)}}function Gl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ei(t){var e=Qt(t);return(e.local?Gl:Fl)(e)}function Wl(){}function oo(t){return t==null?Wl:function(){return this.querySelector(t)}}function Yl(t){typeof t!="function"&&(t=oo(t));for(var e=this._groups,n=e.length,o=new Array(n),i=0;i<n;++i)for(var s=e[i],l=s.length,a=o[i]=new Array(l),d,c,u=0;u<l;++u)(d=s[u])&&(c=t.call(d,d.__data__,u,s))&&("__data__"in d&&(c.__data__=d.__data__),a[u]=c);return new Ce(o,this._parents)}function Ul(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Xl(){return[]}function Ci(t){return t==null?Xl:function(){return this.querySelectorAll(t)}}function jl(t){return function(){return Ul(t.apply(this,arguments))}}function Zl(t){typeof t=="function"?t=jl(t):t=Ci(t);for(var e=this._groups,n=e.length,o=[],i=[],s=0;s<n;++s)for(var l=e[s],a=l.length,d,c=0;c<a;++c)(d=l[c])&&(o.push(t.call(d,d.__data__,c,l)),i.push(d));return new Ce(o,i)}function Ni(t){return function(){return this.matches(t)}}function ki(t){return function(e){return e.matches(t)}}var ql=Array.prototype.find;function Kl(t){return function(){return ql.call(this.children,t)}}function Ql(){return this.firstElementChild}function Jl(t){return this.select(t==null?Ql:Kl(typeof t=="function"?t:ki(t)))}var ea=Array.prototype.filter;function ta(){return Array.from(this.children)}function na(t){return function(){return ea.call(this.children,t)}}function oa(t){return this.selectAll(t==null?ta:na(typeof t=="function"?t:ki(t)))}function ia(t){typeof t!="function"&&(t=Ni(t));for(var e=this._groups,n=e.length,o=new Array(n),i=0;i<n;++i)for(var s=e[i],l=s.length,a=o[i]=[],d,c=0;c<l;++c)(d=s[c])&&t.call(d,d.__data__,c,s)&&a.push(d);return new Ce(o,this._parents)}function Si(t){return new Array(t.length)}function sa(){return new Ce(this._enter||this._groups.map(Si),this._parents)}function Jt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Jt.prototype={constructor:Jt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ra(t){return function(){return t}}function la(t,e,n,o,i,s){for(var l=0,a,d=e.length,c=s.length;l<c;++l)(a=e[l])?(a.__data__=s[l],o[l]=a):n[l]=new Jt(t,s[l]);for(;l<d;++l)(a=e[l])&&(i[l]=a)}function aa(t,e,n,o,i,s,l){var a,d,c=new Map,u=e.length,f=s.length,h=new Array(u),g;for(a=0;a<u;++a)(d=e[a])&&(h[a]=g=l.call(d,d.__data__,a,e)+"",c.has(g)?i[a]=d:c.set(g,d));for(a=0;a<f;++a)g=l.call(t,s[a],a,s)+"",(d=c.get(g))?(o[a]=d,d.__data__=s[a],c.delete(g)):n[a]=new Jt(t,s[a]);for(a=0;a<u;++a)(d=e[a])&&c.get(h[a])===d&&(i[a]=d)}function ca(t){return t.__data__}function da(t,e){if(!arguments.length)return Array.from(this,ca);var n=e?aa:la,o=this._parents,i=this._groups;typeof t!="function"&&(t=ra(t));for(var s=i.length,l=new Array(s),a=new Array(s),d=new Array(s),c=0;c<s;++c){var u=o[c],f=i[c],h=f.length,g=ua(t.call(u,u&&u.__data__,c,o)),p=g.length,m=a[c]=new Array(p),v=l[c]=new Array(p),E=d[c]=new Array(h);n(u,f,m,v,E,g,e);for(var M=0,y=0,C,$;M<p;++M)if(C=m[M]){for(M>=y&&(y=M+1);!($=v[y])&&++y<p;);C._next=$||null}}return l=new Ce(l,o),l._enter=a,l._exit=d,l}function ua(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function fa(){return new Ce(this._exit||this._groups.map(Si),this._parents)}function ha(t,e,n){var o=this.enter(),i=this,s=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?s.remove():n(s),o&&i?o.merge(i).order():i}function ga(t){for(var e=t.selection?t.selection():t,n=this._groups,o=e._groups,i=n.length,s=o.length,l=Math.min(i,s),a=new Array(i),d=0;d<l;++d)for(var c=n[d],u=o[d],f=c.length,h=a[d]=new Array(f),g,p=0;p<f;++p)(g=c[p]||u[p])&&(h[p]=g);for(;d<i;++d)a[d]=n[d];return new Ce(a,this._parents)}function pa(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var o=t[e],i=o.length-1,s=o[i],l;--i>=0;)(l=o[i])&&(s&&l.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(l,s),s=l);return this}function ma(t){t||(t=ya);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,o=n.length,i=new Array(o),s=0;s<o;++s){for(var l=n[s],a=l.length,d=i[s]=new Array(a),c,u=0;u<a;++u)(c=l[u])&&(d[u]=c);d.sort(e)}return new Ce(i,this._parents).order()}function ya(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function va(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function wa(){return Array.from(this)}function _a(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o=t[e],i=0,s=o.length;i<s;++i){var l=o[i];if(l)return l}return null}function ba(){let t=0;for(const e of this)++t;return t}function xa(){return!this.node()}function Ea(t){for(var e=this._groups,n=0,o=e.length;n<o;++n)for(var i=e[n],s=0,l=i.length,a;s<l;++s)(a=i[s])&&t.call(a,a.__data__,s,i);return this}function Ca(t){return function(){this.removeAttribute(t)}}function Na(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ka(t,e){return function(){this.setAttribute(t,e)}}function Sa(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ma(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Da(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function za(t,e){var n=Qt(t);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((e==null?n.local?Na:Ca:typeof e=="function"?n.local?Da:Ma:n.local?Sa:ka)(n,e))}function Mi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ta(t){return function(){this.style.removeProperty(t)}}function Ia(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ba(t,e,n){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,n)}}function Ra(t,e,n){return arguments.length>1?this.each((e==null?Ta:typeof e=="function"?Ba:Ia)(t,e,n??"")):lt(this.node(),t)}function lt(t,e){return t.style.getPropertyValue(e)||Mi(t).getComputedStyle(t,null).getPropertyValue(e)}function Aa(t){return function(){delete this[t]}}function $a(t,e){return function(){this[t]=e}}function Pa(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Oa(t,e){return arguments.length>1?this.each((e==null?Aa:typeof e=="function"?Pa:$a)(t,e)):this.node()[t]}function Di(t){return t.trim().split(/^|\s+/)}function io(t){return t.classList||new zi(t)}function zi(t){this._node=t,this._names=Di(t.getAttribute("class")||"")}zi.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ti(t,e){for(var n=io(t),o=-1,i=e.length;++o<i;)n.add(e[o])}function Ii(t,e){for(var n=io(t),o=-1,i=e.length;++o<i;)n.remove(e[o])}function Ha(t){return function(){Ti(this,t)}}function Va(t){return function(){Ii(this,t)}}function La(t,e){return function(){(e.apply(this,arguments)?Ti:Ii)(this,t)}}function Fa(t,e){var n=Di(t+"");if(arguments.length<2){for(var o=io(this.node()),i=-1,s=n.length;++i<s;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?La:e?Ha:Va)(n,e))}function Ga(){this.textContent=""}function Wa(t){return function(){this.textContent=t}}function Ya(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ua(t){return arguments.length?this.each(t==null?Ga:(typeof t=="function"?Ya:Wa)(t)):this.node().textContent}function Xa(){this.innerHTML=""}function ja(t){return function(){this.innerHTML=t}}function Za(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function qa(t){return arguments.length?this.each(t==null?Xa:(typeof t=="function"?Za:ja)(t)):this.node().innerHTML}function Ka(){this.nextSibling&&this.parentNode.appendChild(this)}function Qa(){return this.each(Ka)}function Ja(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ec(){return this.each(Ja)}function tc(t){var e=typeof t=="function"?t:Ei(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function nc(){return null}function oc(t,e){var n=typeof t=="function"?t:Ei(t),o=e==null?nc:typeof e=="function"?e:oo(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function ic(){var t=this.parentNode;t&&t.removeChild(this)}function sc(){return this.each(ic)}function rc(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function lc(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ac(t){return this.select(t?lc:rc)}function cc(t){return arguments.length?this.property("__data__",t):this.node().__data__}function dc(t){return function(e){t.call(this,e,this.__data__)}}function uc(t){return t.trim().split(/^|\s+/).map(function(e){var n="",o=e.indexOf(".");return o>=0&&(n=e.slice(o+1),e=e.slice(0,o)),{type:e,name:n}})}function fc(t){return function(){var e=this.__on;if(e){for(var n=0,o=-1,i=e.length,s;n<i;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++o]=s;++o?e.length=o:delete this.__on}}}function hc(t,e,n){return function(){var o=this.__on,i,s=dc(e);if(o){for(var l=0,a=o.length;l<a;++l)if((i=o[l]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=e;return}}this.addEventListener(t.type,s,n),i={type:t.type,name:t.name,value:e,listener:s,options:n},o?o.push(i):this.__on=[i]}}function gc(t,e,n){var o=uc(t+""),i,s=o.length,l;if(arguments.length<2){var a=this.node().__on;if(a){for(var d=0,c=a.length,u;d<c;++d)for(i=0,u=a[d];i<s;++i)if((l=o[i]).type===u.type&&l.name===u.name)return u.value}return}for(a=e?hc:fc,i=0;i<s;++i)this.each(a(o[i],e,n));return this}function Bi(t,e,n){var o=Mi(t),i=o.CustomEvent;typeof i=="function"?i=new i(e,n):(i=o.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function pc(t,e){return function(){return Bi(this,t,e)}}function mc(t,e){return function(){return Bi(this,t,e.apply(this,arguments))}}function yc(t,e){return this.each((typeof e=="function"?mc:pc)(t,e))}function*vc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o=t[e],i=0,s=o.length,l;i<s;++i)(l=o[i])&&(yield l)}var Ri=[null];function Ce(t,e){this._groups=t,this._parents=e}function Et(){return new Ce([[document.documentElement]],Ri)}function wc(){return this}Ce.prototype=Et.prototype={constructor:Ce,select:Yl,selectAll:Zl,selectChild:Jl,selectChildren:oa,filter:ia,data:da,enter:sa,exit:fa,join:ha,merge:ga,selection:wc,order:pa,sort:ma,call:va,nodes:wa,node:_a,size:ba,empty:xa,each:Ea,attr:za,style:Ra,property:Oa,classed:Fa,text:Ua,html:qa,raise:Qa,lower:ec,append:tc,insert:oc,remove:sc,clone:ac,datum:cc,on:gc,dispatch:yc,[Symbol.iterator]:vc};function Se(t){return typeof t=="string"?new Ce([[document.querySelector(t)]],[document.documentElement]):new Ce([[t]],Ri)}function _c(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Te(t,e){if(t=_c(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,o=o.matrixTransform(e.getScreenCTM().inverse()),[o.x,o.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const bc={passive:!1},Ct={capture:!0,passive:!1};function so(t){t.stopImmediatePropagation()}function at(t){t.preventDefault(),t.stopImmediatePropagation()}function Ai(t){var e=t.document.documentElement,n=Se(t).on("dragstart.drag",at,Ct);"onselectstart"in e?n.on("selectstart.drag",at,Ct):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function $i(t,e){var n=t.document.documentElement,o=Se(t).on("dragstart.drag",null);e&&(o.on("click.drag",at,Ct),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const en=t=>()=>t;function ro(t,{sourceEvent:e,subject:n,target:o,identifier:i,active:s,x:l,y:a,dx:d,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}ro.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function xc(t){return!t.ctrlKey&&!t.button}function Ec(){return this.parentNode}function Cc(t,e){return e??{x:t.x,y:t.y}}function Nc(){return navigator.maxTouchPoints||"ontouchstart"in this}function kc(){var t=xc,e=Ec,n=Cc,o=Nc,i={},s=qt("start","drag","end"),l=0,a,d,c,u,f=0;function h(C){C.on("mousedown.drag",g).filter(o).on("touchstart.drag",v).on("touchmove.drag",E,bc).on("touchend.drag touchcancel.drag",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(C,$){if(!(u||!t.call(this,C,$))){var O=y(this,e.call(this,C,$),C,$,"mouse");O&&(Se(C.view).on("mousemove.drag",p,Ct).on("mouseup.drag",m,Ct),Ai(C.view),so(C),c=!1,a=C.clientX,d=C.clientY,O("start",C))}}function p(C){if(at(C),!c){var $=C.clientX-a,O=C.clientY-d;c=$*$+O*O>f}i.mouse("drag",C)}function m(C){Se(C.view).on("mousemove.drag mouseup.drag",null),$i(C.view,c),at(C),i.mouse("end",C)}function v(C,$){if(t.call(this,C,$)){var O=C.changedTouches,L=e.call(this,C,$),j=O.length,W,G;for(W=0;W<j;++W)(G=y(this,L,C,$,O[W].identifier,O[W]))&&(so(C),G("start",C,O[W]))}}function E(C){var $=C.changedTouches,O=$.length,L,j;for(L=0;L<O;++L)(j=i[$[L].identifier])&&(at(C),j("drag",C,$[L]))}function M(C){var $=C.changedTouches,O=$.length,L,j;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),L=0;L<O;++L)(j=i[$[L].identifier])&&(so(C),j("end",C,$[L]))}function y(C,$,O,L,j,W){var G=s.copy(),F=Te(W||O,$),N,H,_;if((_=n.call(C,new ro("beforestart",{sourceEvent:O,target:h,identifier:j,active:l,x:F[0],y:F[1],dx:0,dy:0,dispatch:G}),L))!=null)return N=_.x-F[0]||0,H=_.y-F[1]||0,function A(S,R,V){var T=F,I;switch(S){case"start":i[j]=A,I=l++;break;case"end":delete i[j],--l;case"drag":F=Te(V||R,$),I=l;break}G.call(S,C,new ro(S,{sourceEvent:R,subject:_,target:h,identifier:j,active:I,x:F[0]+N,y:F[1]+H,dx:F[0]-T[0],dy:F[1]-T[1],dispatch:G}),L)}}return h.filter=function(C){return arguments.length?(t=typeof C=="function"?C:en(!!C),h):t},h.container=function(C){return arguments.length?(e=typeof C=="function"?C:en(C),h):e},h.subject=function(C){return arguments.length?(n=typeof C=="function"?C:en(C),h):n},h.touchable=function(C){return arguments.length?(o=typeof C=="function"?C:en(!!C),h):o},h.on=function(){var C=s.on.apply(s,arguments);return C===s?h:C},h.clickDistance=function(C){return arguments.length?(f=(C=+C)*C,h):Math.sqrt(f)},h}function lo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Pi(t,e){var n=Object.create(t.prototype);for(var o in e)n[o]=e[o];return n}function Nt(){}var kt=.7,tn=1/kt,ct="\\s*([+-]?\\d+)\\s*",St="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sc=/^#([0-9a-f]{3,8})$/,Mc=new RegExp(`^rgb\\(${ct},${ct},${ct}\\)$`),Dc=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),zc=new RegExp(`^rgba\\(${ct},${ct},${ct},${St}\\)$`),Tc=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${St}\\)$`),Ic=new RegExp(`^hsl\\(${St},${Ie},${Ie}\\)$`),Bc=new RegExp(`^hsla\\(${St},${Ie},${Ie},${St}\\)$`),Oi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};lo(Nt,qe,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Hi,formatHex:Hi,formatHex8:Rc,formatHsl:Ac,formatRgb:Vi,toString:Vi});function Hi(){return this.rgb().formatHex()}function Rc(){return this.rgb().formatHex8()}function Ac(){return Yi(this).formatHsl()}function Vi(){return this.rgb().formatRgb()}function qe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Sc.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Li(e):n===3?new xe(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?nn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?nn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Mc.exec(t))?new xe(e[1],e[2],e[3],1):(e=Dc.exec(t))?new xe(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=zc.exec(t))?nn(e[1],e[2],e[3],e[4]):(e=Tc.exec(t))?nn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Ic.exec(t))?Wi(e[1],e[2]/100,e[3]/100,1):(e=Bc.exec(t))?Wi(e[1],e[2]/100,e[3]/100,e[4]):Oi.hasOwnProperty(t)?Li(Oi[t]):t==="transparent"?new xe(NaN,NaN,NaN,0):null}function Li(t){return new xe(t>>16&255,t>>8&255,t&255,1)}function nn(t,e,n,o){return o<=0&&(t=e=n=NaN),new xe(t,e,n,o)}function $c(t){return t instanceof Nt||(t=qe(t)),t?(t=t.rgb(),new xe(t.r,t.g,t.b,t.opacity)):new xe}function ao(t,e,n,o){return arguments.length===1?$c(t):new xe(t,e,n,o??1)}function xe(t,e,n,o){this.r=+t,this.g=+e,this.b=+n,this.opacity=+o}lo(xe,ao,Pi(Nt,{brighter(t){return t=t==null?tn:Math.pow(tn,t),new xe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?kt:Math.pow(kt,t),new xe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new xe(Ke(this.r),Ke(this.g),Ke(this.b),on(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fi,formatHex:Fi,formatHex8:Pc,formatRgb:Gi,toString:Gi}));function Fi(){return`#${Qe(this.r)}${Qe(this.g)}${Qe(this.b)}`}function Pc(){return`#${Qe(this.r)}${Qe(this.g)}${Qe(this.b)}${Qe((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gi(){const t=on(this.opacity);return`${t===1?"rgb(":"rgba("}${Ke(this.r)}, ${Ke(this.g)}, ${Ke(this.b)}${t===1?")":`, ${t})`}`}function on(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ke(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Qe(t){return t=Ke(t),(t<16?"0":"")+t.toString(16)}function Wi(t,e,n,o){return o<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Me(t,e,n,o)}function Yi(t){if(t instanceof Me)return new Me(t.h,t.s,t.l,t.opacity);if(t instanceof Nt||(t=qe(t)),!t)return new Me;if(t instanceof Me)return t;t=t.rgb();var e=t.r/255,n=t.g/255,o=t.b/255,i=Math.min(e,n,o),s=Math.max(e,n,o),l=NaN,a=s-i,d=(s+i)/2;return a?(e===s?l=(n-o)/a+(n<o)*6:n===s?l=(o-e)/a+2:l=(e-n)/a+4,a/=d<.5?s+i:2-s-i,l*=60):a=d>0&&d<1?0:l,new Me(l,a,d,t.opacity)}function Oc(t,e,n,o){return arguments.length===1?Yi(t):new Me(t,e,n,o??1)}function Me(t,e,n,o){this.h=+t,this.s=+e,this.l=+n,this.opacity=+o}lo(Me,Oc,Pi(Nt,{brighter(t){return t=t==null?tn:Math.pow(tn,t),new Me(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?kt:Math.pow(kt,t),new Me(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*e,i=2*n-o;return new xe(co(t>=240?t-240:t+120,i,o),co(t,i,o),co(t<120?t+240:t-120,i,o),this.opacity)},clamp(){return new Me(Ui(this.h),sn(this.s),sn(this.l),on(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=on(this.opacity);return`${t===1?"hsl(":"hsla("}${Ui(this.h)}, ${sn(this.s)*100}%, ${sn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ui(t){return t=(t||0)%360,t<0?t+360:t}function sn(t){return Math.max(0,Math.min(1,t||0))}function co(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const uo=t=>()=>t;function Hc(t,e){return function(n){return t+n*e}}function Vc(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(o){return Math.pow(t+o*e,n)}}function Lc(t){return(t=+t)==1?Xi:function(e,n){return n-e?Vc(e,n,t):uo(isNaN(e)?n:e)}}function Xi(t,e){var n=e-t;return n?Hc(t,n):uo(isNaN(t)?e:t)}const rn=(function t(e){var n=Lc(e);function o(i,s){var l=n((i=ao(i)).r,(s=ao(s)).r),a=n(i.g,s.g),d=n(i.b,s.b),c=Xi(i.opacity,s.opacity);return function(u){return i.r=l(u),i.g=a(u),i.b=d(u),i.opacity=c(u),i+""}}return o.gamma=t,o})(1);function Fc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,o=e.slice(),i;return function(s){for(i=0;i<n;++i)o[i]=t[i]*(1-s)+e[i]*s;return o}}function Gc(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Wc(t,e){var n=e?e.length:0,o=t?Math.min(n,t.length):0,i=new Array(o),s=new Array(n),l;for(l=0;l<o;++l)i[l]=Mt(t[l],e[l]);for(;l<n;++l)s[l]=e[l];return function(a){for(l=0;l<o;++l)s[l]=i[l](a);return s}}function Yc(t,e){var n=new Date;return t=+t,e=+e,function(o){return n.setTime(t*(1-o)+e*o),n}}function Be(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Uc(t,e){var n={},o={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Mt(t[i],e[i]):o[i]=e[i];return function(s){for(i in n)o[i]=n[i](s);return o}}var fo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ho=new RegExp(fo.source,"g");function Xc(t){return function(){return t}}function jc(t){return function(e){return t(e)+""}}function ji(t,e){var n=fo.lastIndex=ho.lastIndex=0,o,i,s,l=-1,a=[],d=[];for(t=t+"",e=e+"";(o=fo.exec(t))&&(i=ho.exec(e));)(s=i.index)>n&&(s=e.slice(n,s),a[l]?a[l]+=s:a[++l]=s),(o=o[0])===(i=i[0])?a[l]?a[l]+=i:a[++l]=i:(a[++l]=null,d.push({i:l,x:Be(o,i)})),n=ho.lastIndex;return n<e.length&&(s=e.slice(n),a[l]?a[l]+=s:a[++l]=s),a.length<2?d[0]?jc(d[0].x):Xc(e):(e=d.length,function(c){for(var u=0,f;u<e;++u)a[(f=d[u]).i]=f.x(c);return a.join("")})}function Mt(t,e){var n=typeof e,o;return e==null||n==="boolean"?uo(e):(n==="number"?Be:n==="string"?(o=qe(e))?(e=o,rn):ji:e instanceof qe?rn:e instanceof Date?Yc:Gc(e)?Fc:Array.isArray(e)?Wc:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Uc:Be)(t,e)}var Zi=180/Math.PI,go={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qi(t,e,n,o,i,s){var l,a,d;return(l=Math.sqrt(t*t+e*e))&&(t/=l,e/=l),(d=t*n+e*o)&&(n-=t*d,o-=e*d),(a=Math.sqrt(n*n+o*o))&&(n/=a,o/=a,d/=a),t*o<e*n&&(t=-t,e=-e,d=-d,l=-l),{translateX:i,translateY:s,rotate:Math.atan2(e,t)*Zi,skewX:Math.atan(d)*Zi,scaleX:l,scaleY:a}}var ln;function Zc(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?go:qi(e.a,e.b,e.c,e.d,e.e,e.f)}function qc(t){return t==null||(ln||(ln=document.createElementNS("http://www.w3.org/2000/svg","g")),ln.setAttribute("transform",t),!(t=ln.transform.baseVal.consolidate()))?go:(t=t.matrix,qi(t.a,t.b,t.c,t.d,t.e,t.f))}function Ki(t,e,n,o){function i(c){return c.length?c.pop()+" ":""}function s(c,u,f,h,g,p){if(c!==f||u!==h){var m=g.push("translate(",null,e,null,n);p.push({i:m-4,x:Be(c,f)},{i:m-2,x:Be(u,h)})}else(f||h)&&g.push("translate("+f+e+h+n)}function l(c,u,f,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:f.push(i(f)+"rotate(",null,o)-2,x:Be(c,u)})):u&&f.push(i(f)+"rotate("+u+o)}function a(c,u,f,h){c!==u?h.push({i:f.push(i(f)+"skewX(",null,o)-2,x:Be(c,u)}):u&&f.push(i(f)+"skewX("+u+o)}function d(c,u,f,h,g,p){if(c!==f||u!==h){var m=g.push(i(g)+"scale(",null,",",null,")");p.push({i:m-4,x:Be(c,f)},{i:m-2,x:Be(u,h)})}else(f!==1||h!==1)&&g.push(i(g)+"scale("+f+","+h+")")}return function(c,u){var f=[],h=[];return c=t(c),u=t(u),s(c.translateX,c.translateY,u.translateX,u.translateY,f,h),l(c.rotate,u.rotate,f,h),a(c.skewX,u.skewX,f,h),d(c.scaleX,c.scaleY,u.scaleX,u.scaleY,f,h),c=u=null,function(g){for(var p=-1,m=h.length,v;++p<m;)f[(v=h[p]).i]=v.x(g);return f.join("")}}}var Kc=Ki(Zc,"px, ","px)","deg)"),Qc=Ki(qc,", ",")",")"),Jc=1e-12;function Qi(t){return((t=Math.exp(t))+1/t)/2}function ed(t){return((t=Math.exp(t))-1/t)/2}function td(t){return((t=Math.exp(2*t))-1)/(t+1)}const an=(function t(e,n,o){function i(s,l){var a=s[0],d=s[1],c=s[2],u=l[0],f=l[1],h=l[2],g=u-a,p=f-d,m=g*g+p*p,v,E;if(m<Jc)E=Math.log(h/c)/e,v=function(L){return[a+L*g,d+L*p,c*Math.exp(e*L*E)]};else{var M=Math.sqrt(m),y=(h*h-c*c+o*m)/(2*c*n*M),C=(h*h-c*c-o*m)/(2*h*n*M),$=Math.log(Math.sqrt(y*y+1)-y),O=Math.log(Math.sqrt(C*C+1)-C);E=(O-$)/e,v=function(L){var j=L*E,W=Qi($),G=c/(n*M)*(W*td(e*j+$)-ed($));return[a+G*g,d+G*p,c*W/Qi(e*j+$)]}}return v.duration=E*1e3*e/Math.SQRT2,v}return i.rho=function(s){var l=Math.max(.001,+s),a=l*l,d=a*a;return t(l,a,d)},i})(Math.SQRT2,2,4);var dt=0,Dt=0,zt=0,Ji=1e3,cn,Tt,dn=0,Je=0,un=0,It=typeof performance=="object"&&performance.now?performance:Date,es=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function po(){return Je||(es(nd),Je=It.now()+un)}function nd(){Je=0}function fn(){this._call=this._time=this._next=null}fn.prototype=ts.prototype={constructor:fn,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?po():+n)+(e==null?0:+e),!this._next&&Tt!==this&&(Tt?Tt._next=this:cn=this,Tt=this),this._call=t,this._time=n,mo()},stop:function(){this._call&&(this._call=null,this._time=1/0,mo())}};function ts(t,e,n){var o=new fn;return o.restart(t,e,n),o}function od(){po(),++dt;for(var t=cn,e;t;)(e=Je-t._time)>=0&&t._call.call(void 0,e),t=t._next;--dt}function ns(){Je=(dn=It.now())+un,dt=Dt=0;try{od()}finally{dt=0,sd(),Je=0}}function id(){var t=It.now(),e=t-dn;e>Ji&&(un-=e,dn=t)}function sd(){for(var t,e=cn,n,o=1/0;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:cn=n);Tt=t,mo(o)}function mo(t){if(!dt){Dt&&(Dt=clearTimeout(Dt));var e=t-Je;e>24?(t<1/0&&(Dt=setTimeout(ns,t-It.now()-un)),zt&&(zt=clearInterval(zt))):(zt||(dn=It.now(),zt=setInterval(id,Ji)),dt=1,es(ns))}}function os(t,e,n){var o=new fn;return e=e==null?0:+e,o.restart(i=>{o.stop(),t(i+e)},e,n),o}var rd=qt("start","end","cancel","interrupt"),ld=[],is=0,ss=1,yo=2,hn=3,rs=4,vo=5,gn=6;function pn(t,e,n,o,i,s){var l=t.__transition;if(!l)t.__transition={};else if(n in l)return;ad(t,n,{name:e,index:o,group:i,on:rd,tween:ld,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:is})}function wo(t,e){var n=De(t,e);if(n.state>is)throw new Error("too late; already scheduled");return n}function Re(t,e){var n=De(t,e);if(n.state>hn)throw new Error("too late; already running");return n}function De(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ad(t,e,n){var o=t.__transition,i;o[e]=n,n.timer=ts(s,0,n.time);function s(c){n.state=ss,n.timer.restart(l,n.delay,n.time),n.delay<=c&&l(c-n.delay)}function l(c){var u,f,h,g;if(n.state!==ss)return d();for(u in o)if(g=o[u],g.name===n.name){if(g.state===hn)return os(l);g.state===rs?(g.state=gn,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete o[u]):+u<e&&(g.state=gn,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete o[u])}if(os(function(){n.state===hn&&(n.state=rs,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=yo,n.on.call("start",t,t.__data__,n.index,n.group),n.state===yo){for(n.state=hn,i=new Array(h=n.tween.length),u=0,f=-1;u<h;++u)(g=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=g);i.length=f+1}}function a(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(d),n.state=vo,1),f=-1,h=i.length;++f<h;)i[f].call(t,u);n.state===vo&&(n.on.call("end",t,t.__data__,n.index,n.group),d())}function d(){n.state=gn,n.timer.stop(),delete o[e];for(var c in o)return;delete t.__transition}}function mn(t,e){var n=t.__transition,o,i,s=!0,l;if(n){e=e==null?null:e+"";for(l in n){if((o=n[l]).name!==e){s=!1;continue}i=o.state>yo&&o.state<vo,o.state=gn,o.timer.stop(),o.on.call(i?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete n[l]}s&&delete t.__transition}}function cd(t){return this.each(function(){mn(this,t)})}function dd(t,e){var n,o;return function(){var i=Re(this,t),s=i.tween;if(s!==n){o=n=s;for(var l=0,a=o.length;l<a;++l)if(o[l].name===e){o=o.slice(),o.splice(l,1);break}}i.tween=o}}function ud(t,e,n){var o,i;if(typeof n!="function")throw new Error;return function(){var s=Re(this,t),l=s.tween;if(l!==o){i=(o=l).slice();for(var a={name:e,value:n},d=0,c=i.length;d<c;++d)if(i[d].name===e){i[d]=a;break}d===c&&i.push(a)}s.tween=i}}function fd(t,e){var n=this._id;if(t+="",arguments.length<2){for(var o=De(this.node(),n).tween,i=0,s=o.length,l;i<s;++i)if((l=o[i]).name===t)return l.value;return null}return this.each((e==null?dd:ud)(n,t,e))}function _o(t,e,n){var o=t._id;return t.each(function(){var i=Re(this,o);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return De(i,o).value[e]}}function ls(t,e){var n;return(typeof e=="number"?Be:e instanceof qe?rn:(n=qe(e))?(e=n,rn):ji)(t,e)}function hd(t){return function(){this.removeAttribute(t)}}function gd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pd(t,e,n){var o,i=n+"",s;return function(){var l=this.getAttribute(t);return l===i?null:l===o?s:s=e(o=l,n)}}function md(t,e,n){var o,i=n+"",s;return function(){var l=this.getAttributeNS(t.space,t.local);return l===i?null:l===o?s:s=e(o=l,n)}}function yd(t,e,n){var o,i,s;return function(){var l,a=n(this),d;return a==null?void this.removeAttribute(t):(l=this.getAttribute(t),d=a+"",l===d?null:l===o&&d===i?s:(i=d,s=e(o=l,a)))}}function vd(t,e,n){var o,i,s;return function(){var l,a=n(this),d;return a==null?void this.removeAttributeNS(t.space,t.local):(l=this.getAttributeNS(t.space,t.local),d=a+"",l===d?null:l===o&&d===i?s:(i=d,s=e(o=l,a)))}}function wd(t,e){var n=Qt(t),o=n==="transform"?Qc:ls;return this.attrTween(t,typeof e=="function"?(n.local?vd:yd)(n,o,_o(this,"attr."+t,e)):e==null?(n.local?gd:hd)(n):(n.local?md:pd)(n,o,e))}function _d(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function bd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function xd(t,e){var n,o;function i(){var s=e.apply(this,arguments);return s!==o&&(n=(o=s)&&bd(t,s)),n}return i._value=e,i}function Ed(t,e){var n,o;function i(){var s=e.apply(this,arguments);return s!==o&&(n=(o=s)&&_d(t,s)),n}return i._value=e,i}function Cd(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var o=Qt(t);return this.tween(n,(o.local?xd:Ed)(o,e))}function Nd(t,e){return function(){wo(this,t).delay=+e.apply(this,arguments)}}function kd(t,e){return e=+e,function(){wo(this,t).delay=e}}function Sd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Nd:kd)(e,t)):De(this.node(),e).delay}function Md(t,e){return function(){Re(this,t).duration=+e.apply(this,arguments)}}function Dd(t,e){return e=+e,function(){Re(this,t).duration=e}}function zd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Md:Dd)(e,t)):De(this.node(),e).duration}function Td(t,e){if(typeof e!="function")throw new Error;return function(){Re(this,t).ease=e}}function Id(t){var e=this._id;return arguments.length?this.each(Td(e,t)):De(this.node(),e).ease}function Bd(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Re(this,t).ease=n}}function Rd(t){if(typeof t!="function")throw new Error;return this.each(Bd(this._id,t))}function Ad(t){typeof t!="function"&&(t=Ni(t));for(var e=this._groups,n=e.length,o=new Array(n),i=0;i<n;++i)for(var s=e[i],l=s.length,a=o[i]=[],d,c=0;c<l;++c)(d=s[c])&&t.call(d,d.__data__,c,s)&&a.push(d);return new Oe(o,this._parents,this._name,this._id)}function $d(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,o=e.length,i=n.length,s=Math.min(o,i),l=new Array(o),a=0;a<s;++a)for(var d=e[a],c=n[a],u=d.length,f=l[a]=new Array(u),h,g=0;g<u;++g)(h=d[g]||c[g])&&(f[g]=h);for(;a<o;++a)l[a]=e[a];return new Oe(l,this._parents,this._name,this._id)}function Pd(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Od(t,e,n){var o,i,s=Pd(e)?wo:Re;return function(){var l=s(this,t),a=l.on;a!==o&&(i=(o=a).copy()).on(e,n),l.on=i}}function Hd(t,e){var n=this._id;return arguments.length<2?De(this.node(),n).on.on(t):this.each(Od(n,t,e))}function Vd(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ld(){return this.on("end.remove",Vd(this._id))}function Fd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=oo(t));for(var o=this._groups,i=o.length,s=new Array(i),l=0;l<i;++l)for(var a=o[l],d=a.length,c=s[l]=new Array(d),u,f,h=0;h<d;++h)(u=a[h])&&(f=t.call(u,u.__data__,h,a))&&("__data__"in u&&(f.__data__=u.__data__),c[h]=f,pn(c[h],e,n,h,c,De(u,n)));return new Oe(s,this._parents,e,n)}function Gd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ci(t));for(var o=this._groups,i=o.length,s=[],l=[],a=0;a<i;++a)for(var d=o[a],c=d.length,u,f=0;f<c;++f)if(u=d[f]){for(var h=t.call(u,u.__data__,f,d),g,p=De(u,n),m=0,v=h.length;m<v;++m)(g=h[m])&&pn(g,e,n,m,h,p);s.push(h),l.push(u)}return new Oe(s,l,e,n)}var Wd=Et.prototype.constructor;function Yd(){return new Wd(this._groups,this._parents)}function Ud(t,e){var n,o,i;return function(){var s=lt(this,t),l=(this.style.removeProperty(t),lt(this,t));return s===l?null:s===n&&l===o?i:i=e(n=s,o=l)}}function as(t){return function(){this.style.removeProperty(t)}}function Xd(t,e,n){var o,i=n+"",s;return function(){var l=lt(this,t);return l===i?null:l===o?s:s=e(o=l,n)}}function jd(t,e,n){var o,i,s;return function(){var l=lt(this,t),a=n(this),d=a+"";return a==null&&(d=a=(this.style.removeProperty(t),lt(this,t))),l===d?null:l===o&&d===i?s:(i=d,s=e(o=l,a))}}function Zd(t,e){var n,o,i,s="style."+e,l="end."+s,a;return function(){var d=Re(this,t),c=d.on,u=d.value[s]==null?a||(a=as(e)):void 0;(c!==n||i!==u)&&(o=(n=c).copy()).on(l,i=u),d.on=o}}function qd(t,e,n){var o=(t+="")=="transform"?Kc:ls;return e==null?this.styleTween(t,Ud(t,o)).on("end.style."+t,as(t)):typeof e=="function"?this.styleTween(t,jd(t,o,_o(this,"style."+t,e))).each(Zd(this._id,t)):this.styleTween(t,Xd(t,o,e),n).on("end.style."+t,null)}function Kd(t,e,n){return function(o){this.style.setProperty(t,e.call(this,o),n)}}function Qd(t,e,n){var o,i;function s(){var l=e.apply(this,arguments);return l!==i&&(o=(i=l)&&Kd(t,l,n)),o}return s._value=e,s}function Jd(t,e,n){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,Qd(t,e,n??""))}function eu(t){return function(){this.textContent=t}}function tu(t){return function(){var e=t(this);this.textContent=e??""}}function nu(t){return this.tween("text",typeof t=="function"?tu(_o(this,"text",t)):eu(t==null?"":t+""))}function ou(t){return function(e){this.textContent=t.call(this,e)}}function iu(t){var e,n;function o(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&ou(i)),e}return o._value=t,o}function su(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,iu(t))}function ru(){for(var t=this._name,e=this._id,n=cs(),o=this._groups,i=o.length,s=0;s<i;++s)for(var l=o[s],a=l.length,d,c=0;c<a;++c)if(d=l[c]){var u=De(d,e);pn(d,t,n,c,l,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Oe(o,this._parents,t,n)}function lu(){var t,e,n=this,o=n._id,i=n.size();return new Promise(function(s,l){var a={value:l},d={value:function(){--i===0&&s()}};n.each(function(){var c=Re(this,o),u=c.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(d)),c.on=e}),i===0&&s()})}var au=0;function Oe(t,e,n,o){this._groups=t,this._parents=e,this._name=n,this._id=o}function cs(){return++au}var He=Et.prototype;Oe.prototype={constructor:Oe,select:Fd,selectAll:Gd,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:Ad,merge:$d,selection:Yd,transition:ru,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:Hd,attr:wd,attrTween:Cd,style:qd,styleTween:Jd,text:nu,textTween:su,remove:Ld,tween:fd,delay:Sd,duration:zd,ease:Id,easeVarying:Rd,end:lu,[Symbol.iterator]:He[Symbol.iterator]};function cu(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var du={time:null,delay:0,duration:250,ease:cu};function uu(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function fu(t){var e,n;t instanceof Oe?(e=t._id,t=t._name):(e=cs(),(n=du).time=po(),t=t==null?null:t+"");for(var o=this._groups,i=o.length,s=0;s<i;++s)for(var l=o[s],a=l.length,d,c=0;c<a;++c)(d=l[c])&&pn(d,t,e,c,l,n||uu(d,e));return new Oe(o,this._parents,t,e)}Et.prototype.interrupt=cd,Et.prototype.transition=fu;const yn=t=>()=>t;function hu(t,{sourceEvent:e,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Ve(t,e,n){this.k=t,this.x=e,this.y=n}Ve.prototype={constructor:Ve,scale:function(t){return t===1?this:new Ve(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Ve(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ut=new Ve(1,0,0);Ve.prototype;function bo(t){t.stopImmediatePropagation()}function Bt(t){t.preventDefault(),t.stopImmediatePropagation()}function gu(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function pu(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function ds(){return this.__zoom||ut}function mu(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function yu(){return navigator.maxTouchPoints||"ontouchstart"in this}function vu(t,e,n){var o=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],l=t.invertY(e[1][1])-n[1][1];return t.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),l>s?(s+l)/2:Math.min(0,s)||Math.max(0,l))}function wu(){var t=gu,e=pu,n=vu,o=mu,i=yu,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],a=250,d=an,c=qt("start","zoom","end"),u,f,h,g=500,p=150,m=0,v=10;function E(_){_.property("__zoom",ds).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",W).on("dblclick.zoom",G).filter(i).on("touchstart.zoom",F).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(_,A,S,R){var V=_.selection?_.selection():_;V.property("__zoom",ds),_!==V?$(_,A,S,R):V.interrupt().each(function(){O(this,arguments).event(R).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},E.scaleBy=function(_,A,S,R){E.scaleTo(_,function(){var V=this.__zoom.k,T=typeof A=="function"?A.apply(this,arguments):A;return V*T},S,R)},E.scaleTo=function(_,A,S,R){E.transform(_,function(){var V=e.apply(this,arguments),T=this.__zoom,I=S==null?C(V):typeof S=="function"?S.apply(this,arguments):S,Y=T.invert(I),X=typeof A=="function"?A.apply(this,arguments):A;return n(y(M(T,X),I,Y),V,l)},S,R)},E.translateBy=function(_,A,S,R){E.transform(_,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof S=="function"?S.apply(this,arguments):S),e.apply(this,arguments),l)},null,R)},E.translateTo=function(_,A,S,R,V){E.transform(_,function(){var T=e.apply(this,arguments),I=this.__zoom,Y=R==null?C(T):typeof R=="function"?R.apply(this,arguments):R;return n(ut.translate(Y[0],Y[1]).scale(I.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof S=="function"?-S.apply(this,arguments):-S),T,l)},R,V)};function M(_,A){return A=Math.max(s[0],Math.min(s[1],A)),A===_.k?_:new Ve(A,_.x,_.y)}function y(_,A,S){var R=A[0]-S[0]*_.k,V=A[1]-S[1]*_.k;return R===_.x&&V===_.y?_:new Ve(_.k,R,V)}function C(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function $(_,A,S,R){_.on("start.zoom",function(){O(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(R).end()}).tween("zoom",function(){var V=this,T=arguments,I=O(V,T).event(R),Y=e.apply(V,T),X=S==null?C(Y):typeof S=="function"?S.apply(V,T):S,J=Math.max(Y[1][0]-Y[0][0],Y[1][1]-Y[0][1]),re=V.__zoom,P=typeof A=="function"?A.apply(V,T):A,Z=d(re.invert(X).concat(J/re.k),P.invert(X).concat(J/P.k));return function(B){if(B===1)B=P;else{var U=Z(B),K=J/U[2];B=new Ve(K,X[0]-U[0]*K,X[1]-U[1]*K)}I.zoom(null,B)}})}function O(_,A,S){return!S&&_.__zooming||new L(_,A)}function L(_,A){this.that=_,this.args=A,this.active=0,this.sourceEvent=null,this.extent=e.apply(_,A),this.taps=0}L.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,A){return this.mouse&&_!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var A=Se(this.that).datum();c.call(_,this.that,new hu(_,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:c}),A)}};function j(_,...A){if(!t.apply(this,arguments))return;var S=O(this,A).event(_),R=this.__zoom,V=Math.max(s[0],Math.min(s[1],R.k*Math.pow(2,o.apply(this,arguments)))),T=Te(_);if(S.wheel)(S.mouse[0][0]!==T[0]||S.mouse[0][1]!==T[1])&&(S.mouse[1]=R.invert(S.mouse[0]=T)),clearTimeout(S.wheel);else{if(R.k===V)return;S.mouse=[T,R.invert(T)],mn(this),S.start()}Bt(_),S.wheel=setTimeout(I,p),S.zoom("mouse",n(y(M(R,V),S.mouse[0],S.mouse[1]),S.extent,l));function I(){S.wheel=null,S.end()}}function W(_,...A){if(h||!t.apply(this,arguments))return;var S=_.currentTarget,R=O(this,A,!0).event(_),V=Se(_.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",J,!0),T=Te(_,S),I=_.clientX,Y=_.clientY;Ai(_.view),bo(_),R.mouse=[T,this.__zoom.invert(T)],mn(this),R.start();function X(re){if(Bt(re),!R.moved){var P=re.clientX-I,Z=re.clientY-Y;R.moved=P*P+Z*Z>m}R.event(re).zoom("mouse",n(y(R.that.__zoom,R.mouse[0]=Te(re,S),R.mouse[1]),R.extent,l))}function J(re){V.on("mousemove.zoom mouseup.zoom",null),$i(re.view,R.moved),Bt(re),R.event(re).end()}}function G(_,...A){if(t.apply(this,arguments)){var S=this.__zoom,R=Te(_.changedTouches?_.changedTouches[0]:_,this),V=S.invert(R),T=S.k*(_.shiftKey?.5:2),I=n(y(M(S,T),R,V),e.apply(this,A),l);Bt(_),a>0?Se(this).transition().duration(a).call($,I,R,_):Se(this).call(E.transform,I,R,_)}}function F(_,...A){if(t.apply(this,arguments)){var S=_.touches,R=S.length,V=O(this,A,_.changedTouches.length===R).event(_),T,I,Y,X;for(bo(_),I=0;I<R;++I)Y=S[I],X=Te(Y,this),X=[X,this.__zoom.invert(X),Y.identifier],V.touch0?!V.touch1&&V.touch0[2]!==X[2]&&(V.touch1=X,V.taps=0):(V.touch0=X,T=!0,V.taps=1+!!u);u&&(u=clearTimeout(u)),T&&(V.taps<2&&(f=X[0],u=setTimeout(function(){u=null},g)),mn(this),V.start())}}function N(_,...A){if(this.__zooming){var S=O(this,A).event(_),R=_.changedTouches,V=R.length,T,I,Y,X;for(Bt(_),T=0;T<V;++T)I=R[T],Y=Te(I,this),S.touch0&&S.touch0[2]===I.identifier?S.touch0[0]=Y:S.touch1&&S.touch1[2]===I.identifier&&(S.touch1[0]=Y);if(I=S.that.__zoom,S.touch1){var J=S.touch0[0],re=S.touch0[1],P=S.touch1[0],Z=S.touch1[1],B=(B=P[0]-J[0])*B+(B=P[1]-J[1])*B,U=(U=Z[0]-re[0])*U+(U=Z[1]-re[1])*U;I=M(I,Math.sqrt(B/U)),Y=[(J[0]+P[0])/2,(J[1]+P[1])/2],X=[(re[0]+Z[0])/2,(re[1]+Z[1])/2]}else if(S.touch0)Y=S.touch0[0],X=S.touch0[1];else return;S.zoom("touch",n(y(I,Y,X),S.extent,l))}}function H(_,...A){if(this.__zooming){var S=O(this,A).event(_),R=_.changedTouches,V=R.length,T,I;for(bo(_),h&&clearTimeout(h),h=setTimeout(function(){h=null},g),T=0;T<V;++T)I=R[T],S.touch0&&S.touch0[2]===I.identifier?delete S.touch0:S.touch1&&S.touch1[2]===I.identifier&&delete S.touch1;if(S.touch1&&!S.touch0&&(S.touch0=S.touch1,delete S.touch1),S.touch0)S.touch0[1]=this.__zoom.invert(S.touch0[0]);else if(S.end(),S.taps===2&&(I=Te(I,this),Math.hypot(f[0]-I[0],f[1]-I[1])<v)){var Y=Se(this).on("dblclick.zoom");Y&&Y.apply(this,arguments)}}}return E.wheelDelta=function(_){return arguments.length?(o=typeof _=="function"?_:yn(+_),E):o},E.filter=function(_){return arguments.length?(t=typeof _=="function"?_:yn(!!_),E):t},E.touchable=function(_){return arguments.length?(i=typeof _=="function"?_:yn(!!_),E):i},E.extent=function(_){return arguments.length?(e=typeof _=="function"?_:yn([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),E):e},E.scaleExtent=function(_){return arguments.length?(s[0]=+_[0],s[1]=+_[1],E):[s[0],s[1]]},E.translateExtent=function(_){return arguments.length?(l[0][0]=+_[0][0],l[1][0]=+_[1][0],l[0][1]=+_[0][1],l[1][1]=+_[1][1],E):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},E.constrain=function(_){return arguments.length?(n=_,E):n},E.duration=function(_){return arguments.length?(a=+_,E):a},E.interpolate=function(_){return arguments.length?(d=_,E):d},E.on=function(){var _=c.on.apply(c,arguments);return _===c?E:_},E.clickDistance=function(_){return arguments.length?(m=(_=+_)*_,E):Math.sqrt(m)},E.tapDistance=function(_){return arguments.length?(v=+_,E):v},E}var oe=(t=>(t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom",t))(oe||{}),xo=(t=>(t.Partial="partial",t.Full="full",t))(xo||{}),et=(t=>(t.Bezier="default",t.SimpleBezier="simple-bezier",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t))(et||{}),Le=(t=>(t.Strict="strict",t.Loose="loose",t))(Le||{}),Fe=(t=>(t.Arrow="arrow",t.ArrowClosed="arrowclosed",t))(Fe||{}),Rt=(t=>(t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal",t))(Rt||{}),us=(t=>(t.TopLeft="top-left",t.TopCenter="top-center",t.TopRight="top-right",t.BottomLeft="bottom-left",t.BottomCenter="bottom-center",t.BottomRight="bottom-right",t))(us||{});const _u=["INPUT","SELECT","TEXTAREA"],bu=typeof document<"u"?document:null;function Eo(t){var e,n;const o=((n=(e=t.composedPath)==null?void 0:e.call(t))==null?void 0:n[0])||t.target,i=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,s=typeof o?.closest=="function"?o.closest(".nokey"):null;return _u.includes(o?.nodeName)||i||!!s}function xu(t){return t.ctrlKey||t.metaKey||t.shiftKey||t.altKey}function fs(t,e,n,o){const i=e.replace("+",`
|
|
2
2
|
`).replace(`
|
|
3
3
|
|
|
4
4
|
`,`
|